Cache correct calling UID for VcnStatusCallbacks.
This CL updates VcnManagementService to cache the correct UID for the caller when a VcnStatusCallback is registered. Previously, getBinderCallingUid() was checked after the calling identity was cleared. Bug: 183437200 Test: atest FrameworksVcnTests CtsVcnTestCases Change-Id: Idfa2d2aad6bc03b3d08a137f9913276057632a3b
This commit is contained in:
@@ -821,8 +821,7 @@ public class VcnManagementService extends IVcnManagementService.Stub {
|
||||
|
||||
final IBinder cbBinder = callback.asBinder();
|
||||
final VcnStatusCallbackInfo cbInfo =
|
||||
new VcnStatusCallbackInfo(
|
||||
subGroup, callback, opPkgName, mDeps.getBinderCallingUid());
|
||||
new VcnStatusCallbackInfo(subGroup, callback, opPkgName, callingUid);
|
||||
|
||||
try {
|
||||
cbBinder.linkToDeath(cbInfo, 0 /* flags */);
|
||||
|
||||
Reference in New Issue
Block a user