Home
last modified time | relevance | path

Searched refs:NetworkStatsAccess (Results 1 – 9 of 9) sorted by relevance

/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsAccessTest.java82 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 …]
DNetworkStatsObserversTest.java137 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 …]
DNetworkStatsCollectionTest.java122 636016770L, 709306L, 88038768L, 518836L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyNetwork()
131 0L, 0L, 0L, 0L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyNetwork()
136 636016770L, 709306L, 88038768L, 518836L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyNetwork()
150 637076152L, 711413L, 88343717L, 521022L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyUid()
159 0L, 0L, 0L, 0L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyUid()
164 637076152L, 711413L, 88343717L, 521022L, NetworkStatsAccess.Level.DEVICE); in testReadLegacyUid()
244 collection.getRelevantUids(NetworkStatsAccess.Level.DEFAULT)); in testAccessLevels()
246 collection.getRelevantUids(NetworkStatsAccess.Level.USER)); in testAccessLevels()
249 collection.getRelevantUids(NetworkStatsAccess.Level.DEVICE)); in testAccessLevels()
253 TAG_NONE, 0, 0L, 0L, NetworkStatsAccess.Level.DEFAULT, myUid)); in testAccessLevels()
[all …]
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsAccess.java40 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 …]
DNetworkStatsObservers.java78 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()
DNetworkStatsCollection.java217 public int[] getRelevantUids(@NetworkStatsAccess.Level int accessLevel) { in getRelevantUids()
221 public int[] getRelevantUids(@NetworkStatsAccess.Level int accessLevel, in getRelevantUids()
226 if (NetworkStatsAccess.isAccessibleToUser(key.uid, callerUid, accessLevel)) { in getRelevantUids()
244 @NetworkStatsAccess.Level int accessLevel, int callerUid) { in getHistory()
245 if (!NetworkStatsAccess.isAccessibleToUser(uid, callerUid, accessLevel)) { in getHistory()
356 @NetworkStatsAccess.Level int accessLevel, int callerUid) { in getSummary()
370 && NetworkStatsAccess.isAccessibleToUser(key.uid, callerUid, accessLevel) in getSummary()
DNetworkStatsService.java668 private final @NetworkStatsAccess.Level int mAccessLevel = checkAccessLevel( in openSessionInternal()
774 private @NetworkStatsAccess.Level int checkAccessLevel(String callingPackage) { in checkAccessLevel()
775 return NetworkStatsAccess.checkAccessLevel( in checkAccessLevel()
806 long start, long end, @NetworkStatsAccess.Level int accessLevel, int callingUid) { in internalGetSummaryForNetwork()
827 int flags, int fields, @NetworkStatsAccess.Level int accessLevel, int callingUid) { in internalGetHistoryForNetwork()
845 NetworkStatsAccess.Level.DEVICE, Binder.getCallingUid()).getTotalBytes(); in getNetworkTotalBytes()
855 return uidComplete.getSummary(template, start, end, NetworkStatsAccess.Level.DEVICE, in getNetworkUidBytes()
1008 @NetworkStatsAccess.Level int accessLevel = checkAccessLevel(callingPackage); in registerUsageCallback()
DNetworkStatsRecorder.java153 NetworkStatsAccess.Level.DEVICE, Binder.getCallingUid()).getTotal(null); in getTotalSinceBootLocked()
/frameworks/base/services/
Dart-profile20478 HPLcom/android/server/net/NetworkStatsAccess;->checkAccessLevel(Landroid/content/Context;ILjava/lan…
20479 HPLcom/android/server/net/NetworkStatsAccess;->hasAppOpsPermission(Landroid/content/Context;ILjava/…
20480 HPLcom/android/server/net/NetworkStatsAccess;->isAccessibleToUser(III)Z
43594 Lcom/android/server/net/NetworkStatsAccess;