Merge "Do not launch assistant via long press when device is locked." into cw-f-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2ab563ec6a
@@ -1373,8 +1373,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
case LONG_PRESS_BACK_NOTHING:
|
case LONG_PRESS_BACK_NOTHING:
|
||||||
break;
|
break;
|
||||||
case LONG_PRESS_BACK_GO_TO_VOICE_ASSIST:
|
case LONG_PRESS_BACK_GO_TO_VOICE_ASSIST:
|
||||||
Intent intent = new Intent(Intent.ACTION_VOICE_ASSIST);
|
final boolean keyguardActive = mKeyguardDelegate == null
|
||||||
startActivityAsUser(intent, UserHandle.CURRENT_OR_SELF);
|
? false
|
||||||
|
: mKeyguardDelegate.isShowing();
|
||||||
|
if (!keyguardActive) {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VOICE_ASSIST);
|
||||||
|
startActivityAsUser(intent, UserHandle.CURRENT_OR_SELF);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user