From 085f96663a44d8f9f99dfb96def63569664f961d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=80=9E=E8=AF=9A?= Date: Thu, 24 Mar 2022 11:28:55 +0000 Subject: [PATCH] Fix indicator can't disappear in some cases When an app A starts recording and then passed to other process itself. A became the accessor and receiver one after another, and the indicator appeared because of accessor. but when the recording ended, the accessor was removed first and the callback only receive the notify of receiver. So the indicator can't disappear in addition to reboot. Change-Id: I1fe5eb2dcb216ab18907ecbcb3a58edf27b3c21f --- .../src/com/android/systemui/appops/AppOpsControllerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java b/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java index 9676a57b2df97..91c7a24afaf7c 100644 --- a/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/appops/AppOpsControllerImpl.java @@ -376,7 +376,7 @@ public class AppOpsControllerImpl extends BroadcastReceiver implements AppOpsCon Log.w(TAG, String.format("onActiveChanged(%d,%d,%s,%s,%d,%d)", code, uid, packageName, Boolean.toString(active), attributionChainId, attributionFlags)); } - if (attributionChainId != AppOpsManager.ATTRIBUTION_CHAIN_ID_NONE + if (active && attributionChainId != AppOpsManager.ATTRIBUTION_CHAIN_ID_NONE && attributionFlags != AppOpsManager.ATTRIBUTION_FLAGS_NONE && (attributionFlags & AppOpsManager.ATTRIBUTION_FLAG_ACCESSOR) == 0 && (attributionFlags & AppOpsManager.ATTRIBUTION_FLAG_TRUSTED) == 0) {