diff options
| author | 2020-12-04 17:47:45 +0000 | |
|---|---|---|
| committer | 2020-12-04 17:47:45 +0000 | |
| commit | a8f74e302c711f6b0954924e432f3f9cb7d163e7 (patch) | |
| tree | a3cd35a4dab083cbec8af1045b60f5a12a6aa321 | |
| parent | 460fe6a19e321d16a3180083b8c8ed478e8a69bf (diff) | |
| parent | fcb4e29a9c9585a07d3ee573dcf06625dbd44fd4 (diff) | |
Merge "Allow the System UID to unregister ConnDiags CBs." am: fcb4e29a9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1515688
Change-Id: Ia82d68661c99ed5123f2a0668aec4afd5ea48cf5
| -rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index e0a484f87517..58f1db399be8 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -8200,8 +8200,10 @@ public class ConnectivityService extends IConnectivityManager.Stub final NetworkRequestInfo nri = cbInfo.mRequestInfo; - if (uid != nri.mUid) { - if (VDBG) loge("Different uid than registrant attempting to unregister cb"); + // Caller's UID must either be the registrants (if they are unregistering) or the System's + // (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; } |