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

Commit f6ede14a 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

wm: Nullify hardkey function assignments if enabling the navbar

This caused erroneous (and sometimes duplicate) events being generated
due to the regular key function assignments. The navbar does its
own action management, so don't try to derive from the actions
usually present in hard keys.

Change-Id: I82866e24547f8145cac4f07820ae90aacce09281
parent 5d0d9bdf
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2436,6 +2436,13 @@ public final class Settings {
         */
        public static final String TIME_12_24 = "time_12_24";

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


        /**
         * Date format string
         *   mm/dd/yyyy
+5 −0
Original line number Diff line number Diff line
@@ -232,6 +232,11 @@ interface IWindowManager
     */
    boolean hasNavigationBar();

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

    /**
     * Lock the device immediately with the specified options (can be null).
     */
+5 −0
Original line number Diff line number Diff line
@@ -1186,6 +1186,11 @@ public interface WindowManagerPolicy {
     */
    public boolean hasNavigationBar();

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

    /**
     * Lock the device now.
     */
+2 −0
Original line number Diff line number Diff line
@@ -209,4 +209,6 @@
    <!-- Default for Settings.Global.GUEST_USER_ENABLED -->
    <bool name="def_guest_user_enabled">true</bool>

    <!-- 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
@@ -2298,6 +2298,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {

            loadIntegerSetting(stmt, Settings.System.POINTER_SPEED,
                    R.integer.def_pointer_speed);

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