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

Commit 8e80a9e5 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Add Option To Prevent Wake On Back Key Press" into rvc-dev am:...

Merge "Add Option To Prevent Wake On Back Key Press" into rvc-dev am: ba58fd61 am: d4797a1d am: d2c04ff8 am: 9408c534

Change-Id: I81d07b22c12305642d0ff69a9a09607f11a5b230
parents 01302a86 9408c534
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1974,7 +1974,6 @@ public class KeyEvent extends InputEvent implements Parcelable {
    /** @hide */
    public static final boolean isWakeKey(int keyCode) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_BACK:
            case KeyEvent.KEYCODE_CAMERA:
            case KeyEvent.KEYCODE_MENU:
            case KeyEvent.KEYCODE_PAIRING:
+1 −0
Original line number Diff line number Diff line
@@ -4404,6 +4404,7 @@
         Determines whether the specified key groups can be used to wake up the device. -->
    <bool name="config_wakeOnDpadKeyPress">true</bool>
    <bool name="config_wakeOnAssistKeyPress">true</bool>
    <bool name="config_wakeOnBackKeyPress">true</bool>

    <!-- Whether to default to an expanded list of users on the lock screen user switcher. -->
    <bool name="config_expandLockScreenUserSwitcher">false</bool>
+1 −0
Original line number Diff line number Diff line
@@ -3052,6 +3052,7 @@
  <!-- Override Wake Key Behavior When Screen is Off -->
  <java-symbol type="bool" name="config_wakeOnDpadKeyPress" />
  <java-symbol type="bool" name="config_wakeOnAssistKeyPress" />
  <java-symbol type="bool" name="config_wakeOnBackKeyPress" />

  <!-- Pinner Service -->
  <java-symbol type="array" name="config_defaultPinnerServiceFiles" />
+6 −0
Original line number Diff line number Diff line
@@ -483,6 +483,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    MetricsLogger mLogger;
    boolean mWakeOnDpadKeyPress;
    boolean mWakeOnAssistKeyPress;
    boolean mWakeOnBackKeyPress;

    private boolean mHandleVolumeKeysInWM;

@@ -1738,6 +1739,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                res.getBoolean(com.android.internal.R.bool.config_wakeOnDpadKeyPress);
        mWakeOnAssistKeyPress =
                res.getBoolean(com.android.internal.R.bool.config_wakeOnAssistKeyPress);
        mWakeOnBackKeyPress =
                res.getBoolean(com.android.internal.R.bool.config_wakeOnBackKeyPress);

        // Init display burn-in protection
        boolean burnInProtectionEnabled = context.getResources().getBoolean(
@@ -4109,6 +4112,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {

            case KeyEvent.KEYCODE_ASSIST:
                return mWakeOnAssistKeyPress;

            case KeyEvent.KEYCODE_BACK:
                return mWakeOnBackKeyPress;
        }

        return true;