Loading core/java/android/app/StatusBarManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,7 @@ public class StatusBarManager { * Constant for {@link #setNavBarMode(int)} indicating kids navbar mode. * * <p>When used, back and home icons will change drawables and layout, recents will be hidden, * and the navbar will remain visible when apps are in immersive mode. * and enables the setting to force navbar visible, even when apps are in immersive mode. * * @hide */ Loading core/java/android/provider/Settings.java +8 −0 Original line number Diff line number Diff line Loading @@ -10287,6 +10287,14 @@ public final class Settings { public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = "theme_customization_overlay_packages"; /** * Indicates whether the nav bar is forced to always be visible, even in immersive mode. * <p>Type: int (0 for false, 1 for true) * * @hide */ public static final String NAV_BAR_FORCE_VISIBLE = "nav_bar_force_visible"; /** * Indicates whether the device is in kids nav mode. * <p>Type: int (0 for false, 1 for true) Loading core/java/com/android/internal/policy/ForceShowNavigationBarSettingsObserver.java +3 −3 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import android.provider.Settings; /** * A ContentObserver for listening force show navigation bar relative setting keys: * - {@link Settings.Secure#NAVIGATION_MODE} * - {@link Settings.Secure#NAV_BAR_KIDS_MODE} * - {@link Settings.Secure#NAV_BAR_FORCE_VISIBLE} * * @hide */ Loading @@ -52,7 +52,7 @@ public class ForceShowNavigationBarSettingsObserver extends ContentObserver { Settings.Secure.getUriFor(Settings.Secure.NAVIGATION_MODE), false, this, UserHandle.USER_ALL); r.registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_FORCE_VISIBLE), false, this, UserHandle.USER_ALL); } Loading @@ -78,6 +78,6 @@ public class ForceShowNavigationBarSettingsObserver extends ContentObserver { return Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.NAVIGATION_MODE, 0, UserHandle.USER_CURRENT) == 0 && Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.NAV_BAR_KIDS_MODE, 0, UserHandle.USER_CURRENT) == 1; Settings.Secure.NAV_BAR_FORCE_VISIBLE, 0, UserHandle.USER_CURRENT) == 1; } } core/proto/android/providers/settings/secure.proto +13 −2 Original line number Diff line number Diff line Loading @@ -385,7 +385,18 @@ message SecureSettingsProto { optional SettingProto multi_press_timeout = 38 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto nav_bar_kids_mode = 91 [ (android.privacy).dest = DEST_AUTOMATIC ]; message NavBar { option (android.msg_privacy).dest = DEST_EXPLICIT; // Nav bar is forced to always be visible, even in immersive mode. optional SettingProto nav_bar_force_visible = 1 [ (android.privacy).dest = DEST_AUTOMATIC ]; // Indicates whether the device is in kids nav mode. optional SettingProto nav_bar_kids_mode = 2 [ (android.privacy).dest = DEST_AUTOMATIC ]; } optional NavBar nav_bar = 92; reserved 91; // Formerly nav_bar_kids_mode reserved "nav_bar_kids_mode"; // Moved to message NavBar optional SettingProto navigation_mode = 76 [ (android.privacy).dest = DEST_AUTOMATIC ]; message NfcPayment { Loading Loading @@ -668,5 +679,5 @@ message SecureSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 92; // Next tag = 93; } packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.SKIP_DIRECTION, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SILENCE_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, JSON_OBJECT_VALIDATOR); VALIDATORS.put(Secure.NAV_BAR_FORCE_VISIBLE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NAV_BAR_KIDS_MODE, BOOLEAN_VALIDATOR); VALIDATORS.put( Secure.NAVIGATION_MODE, new DiscreteValueValidator(new String[] {"0", "1", "2"})); Loading Loading
core/java/android/app/StatusBarManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,7 @@ public class StatusBarManager { * Constant for {@link #setNavBarMode(int)} indicating kids navbar mode. * * <p>When used, back and home icons will change drawables and layout, recents will be hidden, * and the navbar will remain visible when apps are in immersive mode. * and enables the setting to force navbar visible, even when apps are in immersive mode. * * @hide */ Loading
core/java/android/provider/Settings.java +8 −0 Original line number Diff line number Diff line Loading @@ -10287,6 +10287,14 @@ public final class Settings { public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = "theme_customization_overlay_packages"; /** * Indicates whether the nav bar is forced to always be visible, even in immersive mode. * <p>Type: int (0 for false, 1 for true) * * @hide */ public static final String NAV_BAR_FORCE_VISIBLE = "nav_bar_force_visible"; /** * Indicates whether the device is in kids nav mode. * <p>Type: int (0 for false, 1 for true) Loading
core/java/com/android/internal/policy/ForceShowNavigationBarSettingsObserver.java +3 −3 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import android.provider.Settings; /** * A ContentObserver for listening force show navigation bar relative setting keys: * - {@link Settings.Secure#NAVIGATION_MODE} * - {@link Settings.Secure#NAV_BAR_KIDS_MODE} * - {@link Settings.Secure#NAV_BAR_FORCE_VISIBLE} * * @hide */ Loading @@ -52,7 +52,7 @@ public class ForceShowNavigationBarSettingsObserver extends ContentObserver { Settings.Secure.getUriFor(Settings.Secure.NAVIGATION_MODE), false, this, UserHandle.USER_ALL); r.registerContentObserver( Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_FORCE_VISIBLE), false, this, UserHandle.USER_ALL); } Loading @@ -78,6 +78,6 @@ public class ForceShowNavigationBarSettingsObserver extends ContentObserver { return Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.NAVIGATION_MODE, 0, UserHandle.USER_CURRENT) == 0 && Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.NAV_BAR_KIDS_MODE, 0, UserHandle.USER_CURRENT) == 1; Settings.Secure.NAV_BAR_FORCE_VISIBLE, 0, UserHandle.USER_CURRENT) == 1; } }
core/proto/android/providers/settings/secure.proto +13 −2 Original line number Diff line number Diff line Loading @@ -385,7 +385,18 @@ message SecureSettingsProto { optional SettingProto multi_press_timeout = 38 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto nav_bar_kids_mode = 91 [ (android.privacy).dest = DEST_AUTOMATIC ]; message NavBar { option (android.msg_privacy).dest = DEST_EXPLICIT; // Nav bar is forced to always be visible, even in immersive mode. optional SettingProto nav_bar_force_visible = 1 [ (android.privacy).dest = DEST_AUTOMATIC ]; // Indicates whether the device is in kids nav mode. optional SettingProto nav_bar_kids_mode = 2 [ (android.privacy).dest = DEST_AUTOMATIC ]; } optional NavBar nav_bar = 92; reserved 91; // Formerly nav_bar_kids_mode reserved "nav_bar_kids_mode"; // Moved to message NavBar optional SettingProto navigation_mode = 76 [ (android.privacy).dest = DEST_AUTOMATIC ]; message NfcPayment { Loading Loading @@ -668,5 +679,5 @@ message SecureSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 92; // Next tag = 93; }
packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.SKIP_DIRECTION, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SILENCE_GESTURE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, JSON_OBJECT_VALIDATOR); VALIDATORS.put(Secure.NAV_BAR_FORCE_VISIBLE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NAV_BAR_KIDS_MODE, BOOLEAN_VALIDATOR); VALIDATORS.put( Secure.NAVIGATION_MODE, new DiscreteValueValidator(new String[] {"0", "1", "2"})); Loading