/frameworks/base/tests/net/java/com/android/server/net/ |
D | NetworkStatsAccessTest.java | 82 assertEquals(NetworkStatsAccess.Level.DEVICE, in testCheckAccessLevel_hasCarrierPrivileges() 83 NetworkStatsAccess.checkAccessLevel(mContext, TEST_UID, TEST_PKG)); in testCheckAccessLevel_hasCarrierPrivileges() 93 assertEquals(NetworkStatsAccess.Level.DEVICE, in testCheckAccessLevel_isDeviceOwner() 94 NetworkStatsAccess.checkAccessLevel(mContext, TEST_UID, TEST_PKG)); in testCheckAccessLevel_isDeviceOwner() 104 assertEquals(NetworkStatsAccess.Level.USER, in testCheckAccessLevel_isProfileOwner() 105 NetworkStatsAccess.checkAccessLevel(mContext, TEST_UID, TEST_PKG)); in testCheckAccessLevel_isProfileOwner() 115 assertEquals(NetworkStatsAccess.Level.DEVICESUMMARY, in testCheckAccessLevel_hasAppOpsBitAllowed() 116 NetworkStatsAccess.checkAccessLevel(mContext, TEST_UID, TEST_PKG)); in testCheckAccessLevel_hasAppOpsBitAllowed() 126 assertEquals(NetworkStatsAccess.Level.DEVICESUMMARY, in testCheckAccessLevel_hasAppOpsBitDefault_grantedPermission() 127 NetworkStatsAccess.checkAccessLevel(mContext, TEST_UID, TEST_PKG)); in testCheckAccessLevel_hasAppOpsBitDefault_grantedPermission() [all …]
|
D | NetworkStatsCollectionTest.java | 123 636016770L, 709306L, 88038768L, 518836L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyNetwork() 132 0L, 0L, 0L, 0L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyNetwork() 137 636016770L, 709306L, 88038768L, 518836L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyNetwork() 151 637076152L, 711413L, 88343717L, 521022L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyUid() 160 0L, 0L, 0L, 0L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyUid() 165 637076152L, 711413L, 88343717L, 521022L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyUid() 245 collection.getRelevantUids(NetworkStatsAccess.Level.DEFAULT)); in testAccessLevels() 247 collection.getRelevantUids(NetworkStatsAccess.Level.USER)); in testAccessLevels() 250 collection.getRelevantUids(NetworkStatsAccess.Level.DEVICE)); in testAccessLevels() 254 TAG_NONE, 0, 0L, 0L, NetworkStatsAccess.Level.DEFAULT, myUid)); in testAccessLevels() [all …]
|
D | NetworkStatsObserversTest.java | 137 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testRegister_thresholdTooLow_setsDefaultThreshold() 150 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testRegister_highThreshold_accepted() 162 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testRegister_twoRequests_twoIds() 168 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testRegister_twoRequests_twoIds() 188 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testUnregister_knownRequest_releasesCaller() 206 UID_RED, NetworkStatsAccess.Level.DEVICE); in testUnregister_knownRequest_invalidUid_doesNotUnregister() 233 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testUpdateStats_initialSample_doesNotNotify() 257 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testUpdateStats_belowThreshold_doesNotNotify() 287 Process.SYSTEM_UID, NetworkStatsAccess.Level.DEVICE); in testUpdateStats_deviceAccess_notifies() 318 UID_RED, NetworkStatsAccess.Level.DEFAULT); in testUpdateStats_defaultAccess_notifiesSameUid() [all …]
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkStatsAccess.java | 40 public final class NetworkStatsAccess { class 41 private NetworkStatsAccess() {} in NetworkStatsAccess() method in NetworkStatsAccess 105 public static @NetworkStatsAccess.Level int checkAccessLevel( in checkAccessLevel() 120 return NetworkStatsAccess.Level.DEVICE; in checkAccessLevel() 126 return NetworkStatsAccess.Level.DEVICESUMMARY; in checkAccessLevel() 134 return NetworkStatsAccess.Level.USER; in checkAccessLevel() 138 return NetworkStatsAccess.Level.DEFAULT; in checkAccessLevel() 146 @NetworkStatsAccess.Level int accessLevel) { in isAccessibleToUser() 148 case NetworkStatsAccess.Level.DEVICE: in isAccessibleToUser() 151 case NetworkStatsAccess.Level.DEVICESUMMARY: in isAccessibleToUser() [all …]
|
D | NetworkStatsObservers.java | 78 IBinder binder, int callingUid, @NetworkStatsAccess.Level int accessLevel) { in register() 210 @NetworkStatsAccess.Level int accessLevel) { in buildRequestInfo() 211 if (accessLevel <= NetworkStatsAccess.Level.USER) { in buildRequestInfo() 216 checkArgument(accessLevel >= NetworkStatsAccess.Level.DEVICESUMMARY); in buildRequestInfo() 232 protected final @NetworkStatsAccess.Level int mAccessLevel; 238 @NetworkStatsAccess.Level int accessLevel) { in RequestInfo() 333 @NetworkStatsAccess.Level int accessLevel) { in NetworkUsageRequestInfo() 375 @NetworkStatsAccess.Level int accessLevel) { in UserUsageRequestInfo()
|
D | NetworkStatsCollection.java | 189 public int[] getRelevantUids(@NetworkStatsAccess.Level int accessLevel) { in getRelevantUids() 193 public int[] getRelevantUids(@NetworkStatsAccess.Level int accessLevel, in getRelevantUids() 198 if (NetworkStatsAccess.isAccessibleToUser(key.uid, callerUid, accessLevel)) { in getRelevantUids() 216 @NetworkStatsAccess.Level int accessLevel, int callerUid) { in getHistory() 217 if (!NetworkStatsAccess.isAccessibleToUser(uid, callerUid, accessLevel)) { in getHistory() 332 @NetworkStatsAccess.Level int accessLevel, int callerUid) { in getSummary() 346 && NetworkStatsAccess.isAccessibleToUser(key.uid, callerUid, accessLevel) in getSummary()
|
D | NetworkStatsService.java | 701 private final @NetworkStatsAccess.Level int mAccessLevel = checkAccessLevel( 807 private @NetworkStatsAccess.Level int checkAccessLevel(String callingPackage) { 808 return NetworkStatsAccess.checkAccessLevel( 839 long start, long end, @NetworkStatsAccess.Level int accessLevel, int callingUid) { 860 int flags, int fields, @NetworkStatsAccess.Level int accessLevel, int callingUid) { 878 NetworkStatsAccess.Level.DEVICE, Binder.getCallingUid()).getTotalBytes(); 888 return uidComplete.getSummary(template, start, end, NetworkStatsAccess.Level.DEVICE, 1040 @NetworkStatsAccess.Level int accessLevel = checkAccessLevel(callingPackage);
|
D | NetworkStatsRecorder.java | 153 NetworkStatsAccess.Level.DEVICE, Binder.getCallingUid()).getTotal(null); in getTotalSinceBootLocked()
|
/frameworks/base/services/ |
D | art-profile | 8965 HSPLcom/android/server/net/NetworkStatsAccess;->checkAccessLevel(Landroid/content/Context;ILjava/la… 8966 PLcom/android/server/net/NetworkStatsAccess;->hasAppOpsPermission(Landroid/content/Context;ILjava/l… 8967 HSPLcom/android/server/net/NetworkStatsAccess;->isAccessibleToUser(III)Z 19630 Lcom/android/server/net/NetworkStatsAccess;
|