Fix indicator not removing in certain cases

This is an internal CP of aosp/2041184

Test: manual
Bug: 227647076
Change-Id: I72680218e7147281ded8305154ba7ccd2aea7a7e
Merged-In: I1fe5eb2dcb216ab18907ecbcb3a58edf27b3c21f
This commit is contained in:
Nate Myren
2022-04-28 14:54:29 -07:00
parent c49ba33ac0
commit e1beb1b33a

View File

@@ -375,7 +375,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) {