Add comment for not listening EXTERNAL_APPLICATIONS_UNAVAILABLE am: e7e02d7880 am: 3c811e1e55

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1826071

Change-Id: If268578d69566cf9548ed8ea184ee4947fffcdc3
This commit is contained in:
paulhu
2021-10-01 02:03:26 +00:00
committed by Automerger Merge Worker

View File

@@ -222,6 +222,10 @@ public class PermissionMonitor {
mIntentReceiver, intentFilter, null /* broadcastPermission */, mIntentReceiver, intentFilter, null /* broadcastPermission */,
null /* scheduler */); null /* scheduler */);
// Listen to EXTERNAL_APPLICATIONS_AVAILABLE is that an app becoming available means it may
// need to gain a permission. But an app that becomes unavailable can neither gain nor lose
// permissions on that account, it just can no longer run. Thus, doesn't need to listen to
// EXTERNAL_APPLICATIONS_UNAVAILABLE.
final IntentFilter externalIntentFilter = final IntentFilter externalIntentFilter =
new IntentFilter(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE); new IntentFilter(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
userAllContext.registerReceiver( userAllContext.registerReceiver(