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

Commit 458e8062 authored by David Brown's avatar David Brown
Browse files

Add INCALL_POWER_BUTTON_BEHAVIOR setting.

This is part 1 of the fix for bug 2364220 "Accessibility improvements for
ending calls".  This change adds a new (hidden) constant
Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR, for a setting that controls
whether the Power button hangs up the current call, or just turns off the
screen.

Bug: 2364220

Change-Id: I14d4a89b27e99cac51dc16826d217072d999b2d6
parent 4ea833d9
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
@@ -1033,6 +1033,24 @@ public final class Settings {
         */
        public static final String END_BUTTON_BEHAVIOR = "end_button_behavior";

        /**
         * END_BUTTON_BEHAVIOR value for "go home".
         * @hide
         */
        public static final int END_BUTTON_BEHAVIOR_HOME = 0x1;

        /**
         * END_BUTTON_BEHAVIOR value for "go to sleep".
         * @hide
         */
        public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2;

        /**
         * END_BUTTON_BEHAVIOR default value.
         * @hide
         */
        public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP;

        /**
         * Whether Airplane Mode is on.
         */
@@ -3190,6 +3208,36 @@ public final class Settings {
         */
        public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";

        /**
         * What happens when the user presses the Power button while in-call
         * and the screen is on.<br/>
         * <b>Values:</b><br/>
         * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/>
         * 2 - The Power button hangs up the current call.<br/>
         *
         * @hide
         */
        public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior";

        /**
         * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen".
         * @hide
         */
        public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1;

        /**
         * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up".
         * @hide
         */
        public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2;

        /**
         * INCALL_POWER_BUTTON_BEHAVIOR default value.
         * @hide
         */
        public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
                INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;

        /**
         * @hide
         */