public final class NetworkStatsAccess extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
NetworkStatsAccess.Level
Represents an access level for the network usage history and statistics APIs.
|
Modifier and Type | Method and Description |
---|---|
static int |
checkAccessLevel(Context context,
int callingUid,
String callingPackage)
Returns the
NetworkStatsAccess.Level for the given caller. |
static boolean |
isAccessibleToUser(int uid,
int callerUid,
int accessLevel)
Returns whether the given caller should be able to access the given UID when the caller has
the given
NetworkStatsAccess.Level . |
public static int checkAccessLevel(Context context, int callingUid, String callingPackage)
NetworkStatsAccess.Level
for the given caller.public static boolean isAccessibleToUser(int uid, int callerUid, int accessLevel)
NetworkStatsAccess.Level
.