The voice assist may now be launched above the lockscreen
A possibility was introduced to launch voice assist over
the lockscreen using the left keyguard affordance.
Change-Id: Ic4618d24256b65441a50d77d0ef59b0ec99b6ead
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index a8ecc42..c3ede75 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -952,6 +952,10 @@
} else {
mKeyguardStatusBar.setAlpha(1f);
mKeyguardStatusBar.setVisibility(keyguardShowing ? View.VISIBLE : View.INVISIBLE);
+ if (keyguardShowing && oldState != mStatusBarState) {
+ mKeyguardBottomArea.updateLeftAffordance();
+ mAfforanceHelper.updatePreviews();
+ }
}
resetVerticalPanelPosition();
updateQsState();
@@ -1831,7 +1835,7 @@
if (start) {
EventLogTags.writeSysuiLockscreenGesture(
EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER, lengthDp, velocityDp);
- mKeyguardBottomArea.launchPhone();
+ mKeyguardBottomArea.launchLeftAffordance();
} else {
EventLogTags.writeSysuiLockscreenGesture(
EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA, lengthDp, velocityDp);
@@ -1912,15 +1916,19 @@
if (rightIcon) {
mStatusBar.onCameraHintStarted();
} else {
- mStatusBar.onPhoneHintStarted();
+ if (mKeyguardBottomArea.isLeftVoiceAssist()) {
+ mStatusBar.onVoiceAssistHintStarted();
+ } else {
+ mStatusBar.onPhoneHintStarted();
+ }
}
}
@Override
public KeyguardAffordanceView getLeftIcon() {
return getLayoutDirection() == LAYOUT_DIRECTION_RTL
- ? mKeyguardBottomArea.getCameraView()
- : mKeyguardBottomArea.getPhoneView();
+ ? mKeyguardBottomArea.getRightView()
+ : mKeyguardBottomArea.getLeftView();
}
@Override
@@ -1931,22 +1939,22 @@
@Override
public KeyguardAffordanceView getRightIcon() {
return getLayoutDirection() == LAYOUT_DIRECTION_RTL
- ? mKeyguardBottomArea.getPhoneView()
- : mKeyguardBottomArea.getCameraView();
+ ? mKeyguardBottomArea.getLeftView()
+ : mKeyguardBottomArea.getRightView();
}
@Override
public View getLeftPreview() {
return getLayoutDirection() == LAYOUT_DIRECTION_RTL
- ? mKeyguardBottomArea.getCameraPreview()
- : mKeyguardBottomArea.getPhonePreview();
+ ? mKeyguardBottomArea.getRightPreview()
+ : mKeyguardBottomArea.getLeftPreview();
}
@Override
public View getRightPreview() {
return getLayoutDirection() == LAYOUT_DIRECTION_RTL
- ? mKeyguardBottomArea.getPhonePreview()
- : mKeyguardBottomArea.getCameraPreview();
+ ? mKeyguardBottomArea.getLeftPreview()
+ : mKeyguardBottomArea.getRightPreview();
}
@Override