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

Commit 3e907fd6 authored by Nancy Zheng's avatar Nancy Zheng Committed by android-build-merger
Browse files

Do not launch assistant via long press when device is locked. am: 0d85ee2e

am: fc824eb1

Change-Id: I709b94235eccdb7949a3a24df9f50ba6c09cef1b
parents c6dbd5d2 fc824eb1
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1373,8 +1373,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case LONG_PRESS_BACK_NOTHING:
                break;
            case LONG_PRESS_BACK_GO_TO_VOICE_ASSIST:
                final boolean keyguardActive = mKeyguardDelegate == null
                        ? false
                        : mKeyguardDelegate.isShowing();
                if (!keyguardActive) {
                    Intent intent = new Intent(Intent.ACTION_VOICE_ASSIST);
                    startActivityAsUser(intent, UserHandle.CURRENT_OR_SELF);
                }
                break;
        }
    }