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

Commit 59028ace authored by Oleksandr Byelkin's avatar Oleksandr Byelkin Committed by Ricardo Cerqueira
Browse files

Adds ability to answer call with hardware HOME button (preparation to winter time)

Change-Id: Ic11449acf87c6b4d932142b74158af7441658b3d

Patch set 1 : Upload the change
Patch set 2 : Only change the real Author
Patch set 3 : Bugfix:
              Add register for the ContentObserver (Settings.Secure.RING_HOME_BUTTON_BEHAVIOR) in PhoneWindowManager,
              and correcting the logging functions and deleting some unneeded comments
parent b88597c2
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -5133,6 +5133,36 @@ public final class Settings {
        public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
                INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;

        /**
         * What happens when the user presses the Home button when the
         * phone is ringing.<br/>
         * <b>Values:</b><br/>
         * 1 - Nothing happens. (Default behavior)<br/>
         * 2 - The Home button answer the current call.<br/>
         *
         * @hide
         */
        public static final String RING_HOME_BUTTON_BEHAVIOR = "ring_home_button_behavior";

        /**
         * RING_HOME_BUTTON_BEHAVIOR value for "do nothing".
         * @hide
         */
        public static final int RING_HOME_BUTTON_BEHAVIOR_DO_NOTHING = 0x1;

        /**
         * RING_HOME_BUTTON_BEHAVIOR value for "answer".
         * @hide
         */
        public static final int RING_HOME_BUTTON_BEHAVIOR_ANSWER = 0x2;

        /**
         * RING_HOME_BUTTON_BEHAVIOR default value.
         * @hide
         */
        public static final int RING_HOME_BUTTON_BEHAVIOR_DEFAULT =
                RING_HOME_BUTTON_BEHAVIOR_DO_NOTHING;

        /**
         * The current night mode that has been selected by the user.  Owned
         * and controlled by UiModeManagerService.  Constants are as per