Skip to content

Add toggle to hide location access indicator on a per-app basis#305

Open
elian1203 wants to merge 444 commits intoGrapheneOS:16-qpr2from
elian1203:feature/hide-location-indicator
Open

Add toggle to hide location access indicator on a per-app basis#305
elian1203 wants to merge 444 commits intoGrapheneOS:16-qpr2from
elian1203:feature/hide-location-indicator

Conversation

@elian1203
Copy link

Adds a flag in GosPackageState which is used to hide the location access privacy indicator when an app with the flag set requests location access.

This is useful for trusted apps such as Home Assistant or GPS logger which frequently collect and relay your location to a trusted destination. This feature improves both usability and privacy by reducing noise that users of these apps face and preventing them from "being used" to the privacy indicator when a less trusted app uses it or disabling the feature entirely via an adb shell command.

When combined with platform_packages_modules_Permission change, closes GrapheneOS/os-issue-tracker#1886

muhomorr and others added 30 commits December 6, 2025 00:19
This is a precaution in case ro.vendor.camera.extensions.package is set to an unexpected value.
Co-authored-by: Pratyush <codelab@pratyush.dev>
Co-authored-by: Pratyush <codelab@pratyush.dev>
If there's no network location provider:
- redirect network location requests to one of available location providers
- stub out mock location management calls for network provider (TestProvider methods), since
redirecting them is infeasible

These changes apply only to third-party apps.

There's a relevant system feature (android.hardware.location.network) that is still listed as
available to improve app compatibility.
Removing it would not make this change redundant, because there are apps that try to use the network
location provider without declaring the need for this feature or checking its presence at runtime.
- report job progress when it's running
- prompt the user to restart optimized apps after job completion
- schedule automatic restart of optimized apps via ActivityManager.killProcessesWhenImperceptible()
in case they aren't restarted manually
This allows to skip restarting them after post-OTA asynchronous optimization, which some VPN service
hosts don't handle properly.
Some of per-app features (e.g. SELinux restrictions) require app process restart to be applied.
Value of the previous global setting is used as a default value of the new per-app setting.

For system apps, native debugging is blocked unconditionally.
"App info" screen for controlling ptrace access is linked from this notification.
All non-app tombstones were considered to have the same processName ("UNKNOWN"), which meant that
frequent tombstones from one system process rate-limited tombstones from all system processes.
Instances of FileList and EntryFile are stored in java.util.TreeSet.

TreeSet requires that compareTo() is consistent with equals().
System error file contents are added to the DropBox when file's timestamp changes. Last known file
timestamps are kept in a separate file. This race condition caused some updates to last known
timestamps getting lost, which led to their corresponding system error files being treated as
new system errors after device reboot.
muhomorr and others added 28 commits January 2, 2026 15:05
It conflicts with the broader GrapheneOS external port protection feature.
Stubbing isNotificationListenerAccessGranted() for all arguments is potentially unsafe.
Phenotype flag client library now reads flag snapshot files directly from GmsCore storage, which is
not allowed for unprivileged apps (privileged apps can make their private data accessible to
unprivileged apps).

This is a similar approach to the one that is used for loading Dynamite modules.

This commit modifies the compatibility layer that is used for loading Dynamite modules to make it
handle the phenotype flag snapshot files as well.
If the device is protected with a password and a broken third-party keyboard is used then the device
becomes non-unlockable.
The device might become non-unlockable if it's protected with a password and a broken third-party
keyboard is used. The system keyboard is unconditionally used in safe mode.

There's already an option to reboot to safe mode by pressing and holding the "Restart" button, but
its discoverability is low.
The second argument of (String, int) overload is a flags integer.

userId can by passed by using the (String, int, UserHandle) overload, but that's not needed in this
case since the default userId is the app context userId.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a toggle to disable the green location indicator