Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6a1eb3b authored by Timo Wendt's avatar Timo Wendt Committed by Steve Kondik
Browse files

Runtime toggle of navbar

This adds the framework support for enabling the Navigation bar
on devices with hardware keys. It is toggled from Settings, and
depends on device-specific support for the KeyDisabler hardware
control

Change-Id: I88fecb2ca1e8613591c327a93f53909b00239cd8
parent 9de5d3f6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2922,6 +2922,12 @@ public final class Settings {
        */
        public static final String EXPANDED_FLASH_MODE = "expanded_flash_mode";

        /**
        * Developer options - Navigation Bar show switch
        * @hide
        */
        public static final String DEV_FORCE_SHOW_NAVBAR = "dev_force_show_navbar";

        /**
        * AutoHide CombinedBar on tablets.
        * @hide
+5 −0
Original line number Diff line number Diff line
@@ -225,6 +225,11 @@ interface IWindowManager
     */
    boolean hasNavigationBar();

    /**
     * Device needs a software navigation bar (because it has no hardware keys).
     */
    boolean needsNavigationBar();

    /**
     * Device can generate KEY_ACTION_MENU keypress
     */
+5 −0
Original line number Diff line number Diff line
@@ -1142,6 +1142,11 @@ public interface WindowManagerPolicy {
     */
    public boolean hasNavigationBar();

    /**
     * Specifies whether the device needs a navigation bar (because it has no hardware buttons)
     */
    public boolean needsNavigationBar();

    /**
     * Specifies whether device can generate KEY_ACTION_MENU keypress
     */
+3 −0
Original line number Diff line number Diff line
@@ -201,4 +201,7 @@
    <!-- Defaults for Settings.System.LOCKSCREEN_TARGETS. -->
    <string name="def_lockscreen_targets" translatable="false"></string>
    <string name="def_lockscreen_targets_no_telephony" translatable="false"></string>

    <!-- Defaults for Settings.System.DEV_FORCE_SHOW_NAVBAR. -->
    <integer name="def_force_disable_navkeys">0</integer>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -2087,6 +2087,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
                loadStringSetting(stmt, Settings.System.LOCKSCREEN_TARGETS,
                        R.string.def_lockscreen_targets_no_telephony);
            }

            loadIntegerSetting(stmt, Settings.System.DEV_FORCE_SHOW_NAVBAR,
                    R.integer.def_force_disable_navkeys);
        } finally {
            if (stmt != null) stmt.close();
        }
Loading