Add Settings.Secure.HIDE_NAVIGATION_HANDLE setting - #440
Conversation
| /** | ||
| * Whether the navigation hint pill is hidden in gesture navigation mode. | ||
| * @hide | ||
| */ | ||
| public static final String HIDE_NAVIGATION_HANDLE = "hide_navigation_handle"; |
There was a problem hiding this comment.
GrapheneOS-specific settings should have an entry in https://github.com/GrapheneOS/platform_frameworks_base/blob/17/core/java/android/ext/settings/ExtSettings.java and all settings reads/writes should be through that ExtSettings class. This static String should also have the appropriate @Protected annotation
See the other GrapheneOS commits on this file for reference: https://github.com/0xALUCARD/platform_frameworks_base/commits/17/core/java/android/provider/Settings.java
There was a problem hiding this comment.
Although for Launcher3, it's probably fine to just use the key for the settings cache
There was a problem hiding this comment.
Could you please clarify your 2nd reply, should I migrate the branch to the ExtSettings paradigm that you described?
There was a problem hiding this comment.
For Launcher3 it seems fine to just keep it as is to use the preexisting SettingsCache
For Settings, there's already ExtSettings-specific infrastructure, e.g. see GrapheneOS/platform_packages_apps_Settings@e32073a. BoolSettingPrefController can just be extended with override for the gesture availability
There was a problem hiding this comment.
I've pushed this update. Note that I set the @Protected annotation of the key to restrictReads = false so that launcher3 could still read it as you said, since the KnownSystemPackage enum does not contain a value for launcher3.
There was a problem hiding this comment.
We can add an entry for Launcher3 to KnownSystemPackage (it is a known system package after all)
There was a problem hiding this comment.
Good call, I have done this now
Adds a new secure setting, hide_navigation_handle, controlling whether the navigation handle in gesture navigation mode (the hint pill on the bottom of the screen) is drawn (default) or hidden.
This feature has been referenced as acceptable by the GrapheneOS team, by @thestinger in #2760, it has been implemented in this PR as instructed: "[It] should not remove the reserved space in apps without edge-to-edge support to avoid breaking app compatibility. It should only hide the navigation zone hint."
This feature is implemented in 3 repos: