-
@ExperimentalApi(value = https://github.com/grpc/grpc-java/issues/8022) public final class PeerUidIdentifies a gRPC/binder client or server by Android/Linux UID (https://source.android.com/security/app-sandbox).
Use REMOTE_PEER to obtain the client's PeerUid from the server's io.grpc.Context
The actual integer uid is intentionally not exposed to prevent misuse. If you want the uid for access control, consider one of the existing SecurityPolicies instead (or propose a new one). If you want the uid to pass to some other Android API, consider one of the static wrapper methods of PeerUids instead (or propose a new one).