Merge "Allow the System UID to unregister ConnDiags CBs." am: 636f8cbced am: 5d0cc85448

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1515688

Change-Id: I5b6a900611b727ee58a5b1f2762ed10b5a24fe44
This commit is contained in:
Cody Kesting
2020-12-04 18:01:04 +00:00
committed by Automerger Merge Worker

View File

@@ -8200,8 +8200,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
final NetworkRequestInfo nri = cbInfo.mRequestInfo; final NetworkRequestInfo nri = cbInfo.mRequestInfo;
if (uid != nri.mUid) { // Caller's UID must either be the registrants (if they are unregistering) or the System's
if (VDBG) loge("Different uid than registrant attempting to unregister cb"); // (if the Binder died)
if (uid != nri.mUid && uid != Process.SYSTEM_UID) {
if (DBG) loge("Uid(" + uid + ") not registrant's (" + nri.mUid + ") or System's");
return; return;
} }