Fix media control flash when unlock device

It adds a new condition when the large screen is in landscape, the
media controls is on lockscreen, and the next location will be in qs.
the media controls should not animate while switching from lockscreen
location to qs location

Bug: 251717467.
Bug: 252981595.
Test: atest MediaHierarchyManagerTest.
Test: Check the media control is not flashing anymore.
Change-Id: Ib242e7f6e87191fc6094aed260e4828ca5f13d70
This commit is contained in:
Michael Mikhail
2022-11-18 01:29:21 +00:00
parent 91265752f1
commit ecd9e0c087

View File

@@ -798,6 +798,16 @@ constructor(
return true
}
if (
desiredLocation == LOCATION_QS &&
previousLocation == LOCATION_LOCKSCREEN &&
statusbarState == StatusBarState.SHADE
) {
// This is an invalid transition, can happen when tapping on home control and the UMO
// while being on landscape orientation in tablet.
return false
}
if (
statusbarState == StatusBarState.KEYGUARD &&
(currentLocation == LOCATION_LOCKSCREEN || previousLocation == LOCATION_LOCKSCREEN)