Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +25 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,8 @@ public class NotificationPanelView extends PanelView implements private int mCurrentPanelAlpha; private final Paint mAlphaPaint = new Paint(); private Runnable mPanelAlphaEndAction; private float mBottomAreaShadeAlpha; private final ValueAnimator mBottomAreaShadeAlphaAnimator; private AnimatorListenerAdapter mAnimatorListenerAdapter = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { Loading Loading @@ -372,6 +374,14 @@ public class NotificationPanelView extends PanelView implements mThemeResId = context.getThemeResId(); mKeyguardBypassController = bypassController; dynamicPrivacyController.addListener(this); mBottomAreaShadeAlphaAnimator = ValueAnimator.ofFloat(1f, 0); mBottomAreaShadeAlphaAnimator.addUpdateListener(animation -> { mBottomAreaShadeAlpha = (float) animation.getAnimatedValue(); updateKeyguardBottomAreaAlpha(); }); mBottomAreaShadeAlphaAnimator.setDuration(160); mBottomAreaShadeAlphaAnimator.setInterpolator(Interpolators.ALPHA_OUT); } /** Loading Loading @@ -1382,10 +1392,20 @@ public class NotificationPanelView extends PanelView implements updateDozingVisibilities(false /* animate */); } maybeAnimateBottomAreaAlpha(); resetHorizontalPanelPosition(); updateQsState(); } private void maybeAnimateBottomAreaAlpha() { mBottomAreaShadeAlphaAnimator.cancel(); if (mBarState == StatusBarState.SHADE_LOCKED) { mBottomAreaShadeAlphaAnimator.start(); } else { mBottomAreaShadeAlpha = 1f; } } private final Runnable mAnimateKeyguardStatusViewInvisibleEndRunnable = new Runnable() { @Override public void run() { Loading Loading @@ -1992,6 +2012,7 @@ public class NotificationPanelView extends PanelView implements ? 0 : KeyguardBouncer.ALPHA_EXPANSION_THRESHOLD, 1f, 0f, 1f, getExpandedFraction()); float alpha = Math.min(expansionAlpha, 1 - getQsExpansionFraction()); alpha *= mBottomAreaShadeAlpha; mKeyguardBottomArea.setAffordanceAlpha(alpha); mKeyguardBottomArea.setImportantForAccessibility(alpha == 0f ? IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS Loading Loading @@ -2902,6 +2923,10 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.setDozing(mDozing, animate, wakeUpTouchLocation); mKeyguardBottomArea.setDozing(mDozing, animate); if (dozing) { mBottomAreaShadeAlphaAnimator.cancel(); } if (mBarState == StatusBarState.KEYGUARD || mBarState == StatusBarState.SHADE_LOCKED) { updateDozingVisibilities(animate); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +25 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,8 @@ public class NotificationPanelView extends PanelView implements private int mCurrentPanelAlpha; private final Paint mAlphaPaint = new Paint(); private Runnable mPanelAlphaEndAction; private float mBottomAreaShadeAlpha; private final ValueAnimator mBottomAreaShadeAlphaAnimator; private AnimatorListenerAdapter mAnimatorListenerAdapter = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { Loading Loading @@ -372,6 +374,14 @@ public class NotificationPanelView extends PanelView implements mThemeResId = context.getThemeResId(); mKeyguardBypassController = bypassController; dynamicPrivacyController.addListener(this); mBottomAreaShadeAlphaAnimator = ValueAnimator.ofFloat(1f, 0); mBottomAreaShadeAlphaAnimator.addUpdateListener(animation -> { mBottomAreaShadeAlpha = (float) animation.getAnimatedValue(); updateKeyguardBottomAreaAlpha(); }); mBottomAreaShadeAlphaAnimator.setDuration(160); mBottomAreaShadeAlphaAnimator.setInterpolator(Interpolators.ALPHA_OUT); } /** Loading Loading @@ -1382,10 +1392,20 @@ public class NotificationPanelView extends PanelView implements updateDozingVisibilities(false /* animate */); } maybeAnimateBottomAreaAlpha(); resetHorizontalPanelPosition(); updateQsState(); } private void maybeAnimateBottomAreaAlpha() { mBottomAreaShadeAlphaAnimator.cancel(); if (mBarState == StatusBarState.SHADE_LOCKED) { mBottomAreaShadeAlphaAnimator.start(); } else { mBottomAreaShadeAlpha = 1f; } } private final Runnable mAnimateKeyguardStatusViewInvisibleEndRunnable = new Runnable() { @Override public void run() { Loading Loading @@ -1992,6 +2012,7 @@ public class NotificationPanelView extends PanelView implements ? 0 : KeyguardBouncer.ALPHA_EXPANSION_THRESHOLD, 1f, 0f, 1f, getExpandedFraction()); float alpha = Math.min(expansionAlpha, 1 - getQsExpansionFraction()); alpha *= mBottomAreaShadeAlpha; mKeyguardBottomArea.setAffordanceAlpha(alpha); mKeyguardBottomArea.setImportantForAccessibility(alpha == 0f ? IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS Loading Loading @@ -2902,6 +2923,10 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.setDozing(mDozing, animate, wakeUpTouchLocation); mKeyguardBottomArea.setDozing(mDozing, animate); if (dozing) { mBottomAreaShadeAlphaAnimator.cancel(); } if (mBarState == StatusBarState.KEYGUARD || mBarState == StatusBarState.SHADE_LOCKED) { updateDozingVisibilities(animate); Loading