Skip to content

Commit

Permalink
add com.android.phone to indicator exemptions
Browse files Browse the repository at this point in the history
Phone services (not the Dialer) accesses detailed cellular information
which is considered to be location information. It's a base OS component
serving the intended purpose and shouldn't trigger spurious location
indicator notices every time it retrieves cellular information.
  • Loading branch information
thestinger committed May 11, 2022
1 parent b0b483e commit ac60a21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/java/android/permission/PermissionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public final class PermissionManager {

private static final String SYSTEM_PKG = "android";
private static final String BLUETOOTH_PKG = "com.android.bluetooth";
private static final String PHONE_SERVICES_PKG = "com.android.phone";

/**
* Refuse to install package if groups of permissions are bad
Expand Down Expand Up @@ -942,6 +943,7 @@ public static Set<String> getIndicatorExemptedPackages(@NonNull Context context)
ArraySet<String> pkgNames = new ArraySet<>();
pkgNames.add(SYSTEM_PKG);
pkgNames.add(BLUETOOTH_PKG);
pkgNames.add(PHONE_SERVICES_PKG);
for (int i = 0; i < INDICATOR_EXEMPTED_PACKAGES.length; i++) {
String exemptedPackage = INDICATOR_EXEMPTED_PACKAGES[i];
if (exemptedPackage != null) {
Expand Down

0 comments on commit ac60a21

Please sign in to comment.