Fix screen off after panel expansion
While unlocked, when the panel was expanded the DozeParameters#shouldControlScreenOff was not properly getting reset after the panel was collapsed. This was leading to overlapping animations as the panel state changed. The panel change event that DozeParameters cares about originates in NotificationPanelViewController so make sure the check in UnlockedScreenOffAnimation uses this same field, and not the one in PanelViewController, which may have a different value. Fixes: 203644049 Test: manual (unlock/lock over and over and over ...) Change-Id: Iaa357eed4afae53f8f96995c570b5df1a83c8123
This commit is contained in:
@@ -3037,10 +3037,11 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
private void updatePanelExpanded() {
|
||||
boolean isExpanded = !isFullyCollapsed() || mExpectingSynthesizedDown;
|
||||
if (mPanelExpanded != isExpanded) {
|
||||
mPanelExpanded = isExpanded;
|
||||
|
||||
mHeadsUpManager.setIsPanelExpanded(isExpanded);
|
||||
mStatusBarTouchableRegionManager.setPanelExpanded(isExpanded);
|
||||
mCentralSurfaces.setPanelExpanded(isExpanded);
|
||||
mPanelExpanded = isExpanded;
|
||||
|
||||
if (!isExpanded && mQs != null && mQs.isCustomizing()) {
|
||||
mQs.closeCustomizer();
|
||||
@@ -3048,6 +3049,10 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
}
|
||||
}
|
||||
|
||||
boolean isPanelExpanded() {
|
||||
return mPanelExpanded;
|
||||
}
|
||||
|
||||
private int calculatePanelHeightShade() {
|
||||
final int maxHeight = mNotificationStackScrollLayoutController.getHeight();
|
||||
if (mBarState == KEYGUARD) {
|
||||
|
||||
@@ -313,7 +313,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(
|
||||
// already expanded and showing notifications/QS, the animation looks really messy. For now,
|
||||
// disable it if the notification panel is expanded.
|
||||
if ((!this::mCentralSurfaces.isInitialized ||
|
||||
mCentralSurfaces.notificationPanelViewController.isExpanded) &&
|
||||
mCentralSurfaces.notificationPanelViewController.isPanelExpanded) &&
|
||||
// Status bar might be expanded because we have started
|
||||
// playing the animation already
|
||||
!isAnimationPlaying()
|
||||
|
||||
Reference in New Issue
Block a user