summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-08-20 14:15:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-08-20 14:15:32 +0000
commit58e3d8b33eb2756e0205d09d61af4c39dc86c69a (patch)
tree19fdbfd40412c81e34ecbd06bf0cc7bb52f46ca7
parent4bb7c65788d8e5b3d10cf6e113c4da3e46253376 (diff)
parent6adc3669892e5177e3aa0ec3655033b431364ad8 (diff)
Merge "Media - Don't animate during camera gesture" into rvc-qpr-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt12
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt
index 70f01d576a9c..b31390cf7474 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaHierarchyManager.kt
@@ -389,6 +389,14 @@ class MediaHierarchyManager @Inject constructor(
if (isCurrentlyInGuidedTransformation()) {
return false
}
+ // This is an invalid transition, and can happen when using the camera gesture from the
+ // lock screen. Disallow.
+ if (previousLocation == LOCATION_LOCKSCREEN &&
+ desiredLocation == LOCATION_QQS &&
+ statusbarState == StatusBarState.SHADE) {
+ return false
+ }
+
if (currentLocation == LOCATION_QQS &&
previousLocation == LOCATION_LOCKSCREEN &&
(statusBarStateController.leaveOpenOnKeyguardHide() ||
@@ -604,8 +612,8 @@ class MediaHierarchyManager @Inject constructor(
// When collapsing on the lockscreen, we want to remain in QS
return LOCATION_QS
}
- if (location != LOCATION_LOCKSCREEN && desiredLocation == LOCATION_LOCKSCREEN
- && !fullyAwake) {
+ if (location != LOCATION_LOCKSCREEN && desiredLocation == LOCATION_LOCKSCREEN &&
+ !fullyAwake) {
// When unlocking from dozing / while waking up, the media shouldn't be transitioning
// in an animated way. Let's keep it in the lockscreen until we're fully awake and
// reattach it without an animation