Skip to content

Commit 55e217a

Browse files
committed
exclude Network Location from location indicator
It doesn't make sense to show the location indicator for the OS location services using location data. Scanning nearby cell towers and Wi-Fi APs currently triggers the indicator when apps or the OS itself request location through the fused or network providers. The indicator should be for apps using location rather than the OS providing it.
1 parent 1ade12f commit 55e217a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/java/android/permission/PermissionManager.java

+5
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ public final class PermissionManager {
184184
private static final String PHONE_SERVICES_PKG = "com.android.phone";
185185
private static final String PRINT_SPOOLER_PKG = "com.android.printspooler";
186186
private static final String FUSED_LOCATION_PKG = "com.android.location.fused";
187+
private static final String NETWORK_LOCATION_PKG = "app.grapheneos.networklocation";
187188
private static final String CELL_BROADCAST_SERVICE_PKG = "com.android.cellbroadcastservice";
188189

189190
/**
@@ -1381,7 +1382,11 @@ public static Set<String> getIndicatorExemptedPackages(@NonNull Context context)
13811382
pkgNames.add(PHONE_SERVICES_PKG);
13821383
// Location usage indicator can get triggered when sharing a file to a printer
13831384
pkgNames.add(PRINT_SPOOLER_PKG);
1385+
1386+
// location providers
13841387
pkgNames.add(FUSED_LOCATION_PKG);
1388+
pkgNames.add(NETWORK_LOCATION_PKG);
1389+
13851390
// indicator pops up when determining location during a geofenced alert
13861391
pkgNames.add(CELL_BROADCAST_SERVICE_PKG);
13871392
// location indicator sometimes gets triggered when turning on Wi-Fi hotspot

0 commit comments

Comments
 (0)