Merge "Fix transition after restarting inactive media" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5b5417285e
@@ -537,8 +537,19 @@ class MediaHierarchyManager @Inject constructor(
|
|||||||
) {
|
) {
|
||||||
val desiredLocation = calculateLocation()
|
val desiredLocation = calculateLocation()
|
||||||
if (desiredLocation != this.desiredLocation || forceStateUpdate) {
|
if (desiredLocation != this.desiredLocation || forceStateUpdate) {
|
||||||
if (this.desiredLocation >= 0) {
|
if (this.desiredLocation >= 0 && desiredLocation != this.desiredLocation) {
|
||||||
|
// Only update previous location when it actually changes
|
||||||
previousLocation = this.desiredLocation
|
previousLocation = this.desiredLocation
|
||||||
|
} else if (forceStateUpdate) {
|
||||||
|
val onLockscreen = (!bypassController.bypassEnabled &&
|
||||||
|
(statusbarState == StatusBarState.KEYGUARD ||
|
||||||
|
statusbarState == StatusBarState.FULLSCREEN_USER_SWITCHER))
|
||||||
|
if (desiredLocation == LOCATION_QS && previousLocation == LOCATION_LOCKSCREEN &&
|
||||||
|
!onLockscreen) {
|
||||||
|
// If media active state changed and the device is now unlocked, update the
|
||||||
|
// previous location so we animate between the correct hosts
|
||||||
|
previousLocation = LOCATION_QQS
|
||||||
|
}
|
||||||
}
|
}
|
||||||
val isNewView = this.desiredLocation == -1
|
val isNewView = this.desiredLocation == -1
|
||||||
this.desiredLocation = desiredLocation
|
this.desiredLocation = desiredLocation
|
||||||
|
|||||||
Reference in New Issue
Block a user