Merge "Fixed an issue where media could flicker during bypass" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
eb89b5cf6b
@@ -582,6 +582,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
private int mScrimCornerRadius;
|
private int mScrimCornerRadius;
|
||||||
private int mScreenCornerRadius;
|
private int mScreenCornerRadius;
|
||||||
private int mNotificationScrimPadding;
|
private int mNotificationScrimPadding;
|
||||||
|
private boolean mQSAnimatingHiddenFromCollapsed;
|
||||||
|
|
||||||
private final QuickAccessWalletClient mQuickAccessWalletClient;
|
private final QuickAccessWalletClient mQuickAccessWalletClient;
|
||||||
private final Executor mUiExecutor;
|
private final Executor mUiExecutor;
|
||||||
@@ -1443,7 +1444,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
}
|
}
|
||||||
mStatusBar.getGutsManager().closeAndSaveGuts(true /* leavebehind */, true /* force */,
|
mStatusBar.getGutsManager().closeAndSaveGuts(true /* leavebehind */, true /* force */,
|
||||||
true /* controls */, -1 /* x */, -1 /* y */, true /* resetMenu */);
|
true /* controls */, -1 /* x */, -1 /* y */, true /* resetMenu */);
|
||||||
if (animate) {
|
if (animate && !isFullyCollapsed()) {
|
||||||
animateCloseQs(true /* animateAway */);
|
animateCloseQs(true /* animateAway */);
|
||||||
} else {
|
} else {
|
||||||
closeQs();
|
closeQs();
|
||||||
@@ -1727,6 +1728,11 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private float computeQsExpansionFraction() {
|
private float computeQsExpansionFraction() {
|
||||||
|
if (mQSAnimatingHiddenFromCollapsed) {
|
||||||
|
// When hiding QS from collapsed state, the expansion can sometimes temporarily
|
||||||
|
// be larger than 0 because of the timing, leading to flickers.
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
return Math.min(
|
return Math.min(
|
||||||
1f, (mQsExpansionHeight - mQsMinExpansionHeight) / (mQsMaxExpansionHeight
|
1f, (mQsExpansionHeight - mQsMinExpansionHeight) / (mQsMaxExpansionHeight
|
||||||
- mQsMinExpansionHeight));
|
- mQsMinExpansionHeight));
|
||||||
@@ -2527,6 +2533,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
mQSAnimatingHiddenFromCollapsed = false;
|
||||||
mAnimatingQS = false;
|
mAnimatingQS = false;
|
||||||
notifyExpandingFinished();
|
notifyExpandingFinished();
|
||||||
mNotificationStackScrollLayoutController.resetCheckSnoozeLeavebehind();
|
mNotificationStackScrollLayoutController.resetCheckSnoozeLeavebehind();
|
||||||
@@ -2543,6 +2550,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
animator.start();
|
animator.start();
|
||||||
mQsExpansionAnimator = animator;
|
mQsExpansionAnimator = animator;
|
||||||
mQsAnimatorExpand = expanding;
|
mQsAnimatorExpand = expanding;
|
||||||
|
mQSAnimatingHiddenFromCollapsed = computeQsExpansionFraction() == 0.0f && target == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user