diff options
author | Cody Kesting <ckesting@google.com> | 2021-03-22 15:14:14 -0700 |
---|---|---|
committer | Cody Kesting <ckesting@google.com> | 2021-03-22 16:02:33 -0700 |
commit | 8ec617ad8dba0443067071a21adb5b499c38942a (patch) | |
tree | f03a22f245a3724078f37abcf25aeafc93c1b259 | |
parent | 79ddf1afb8db511c3586e8dac932c711bb3c0f57 (diff) |
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
-rw-r--r-- | services/core/java/com/android/server/VcnManagementService.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/VcnManagementService.java b/services/core/java/com/android/server/VcnManagementService.java index 6c18cdea51fa..d561ab96c365 100644 --- a/services/core/java/com/android/server/VcnManagementService.java +++ b/services/core/java/com/android/server/VcnManagementService.java @@ -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 */); |