Fix dumpsys for appops proxy field
- Make flags is the last parameters in access decipher methods.
All calling code assumes this.
- Get proxyUid info from the appropriate field
- Don't create proxy entries if uid is invalid
- Fixed some incorrect docs
Test: adb shell dumpsys appops now shows proxy information
Fixes: 141328071
Change-Id: I2f94e9b171133141643e628c9224d8d74ec5ad87
diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java
index b449041..48d0073 100644
--- a/services/core/java/com/android/server/appop/AppOpsService.java
+++ b/services/core/java/com/android/server/appop/AppOpsService.java
@@ -510,6 +510,10 @@
private void updateProxyState(long key, int proxyUid,
@Nullable String proxyPackageName) {
+ if (proxyUid == Process.INVALID_UID) {
+ return;
+ }
+
if (mProxyUids == null) {
mProxyUids = new LongSparseLongArray();
}