-
-
Field Summary
Fields Modifier and Type Field Description public final static Context.Key<PeerUid>REMOTE_PEER
-
Method Summary
Modifier and Type Method Description static Array<String>getInsecurePackagesForUid(PackageManager packageManager, PeerUid who)Returns package names associated with the given peer's uid according to . static StringgetNameForUid(PackageManager packageManager, PeerUid who)Retrieves the "official name" associated with this uid, as specified by . static UserHandlegetUserHandleForUid(PeerUid who)Retrieves the UserHandle associated with this uid according to . static ServerInterceptornewPeerIdentifyingServerInterceptor()Creates an interceptor that exposes the client's identity in the Context under . -
-
Method Detail
-
getInsecurePackagesForUid
static Array<String> getInsecurePackagesForUid(PackageManager packageManager, PeerUid who)
Returns package names associated with the given peer's uid according to .
WARNING: Apps installed from untrusted sources can set any package name they want.Don't depend on package names for security -- use SecurityPolicies instead.
-
getNameForUid
@Nullable() static String getNameForUid(PackageManager packageManager, PeerUid who)
-
getUserHandleForUid
@RequiresApi(api = VERSION_CODES.N) static UserHandle getUserHandleForUid(PeerUid who)
Retrieves the UserHandle associated with this uid according to .
-
newPeerIdentifyingServerInterceptor
static ServerInterceptor newPeerIdentifyingServerInterceptor()
-
-
-
-