Loading packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ public interface DozeHost { void abortPulsing(); void extendPulse(); void setAnimateWakeup(boolean animateWakeup); interface Callback { default void onNotificationHeadsUp() {} default void onPowerSaveChanged(boolean active) {} Loading packages/SystemUI/src/com/android/systemui/doze/DozeUi.java +13 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,19 @@ public class DozeUi implements DozeMachine.Part { unscheduleTimeTick(); break; } mHost.setAnimateWakeup(shouldAnimateWakeup(newState)); } private boolean shouldAnimateWakeup(DozeMachine.State state) { switch (state) { case DOZE_AOD: case DOZE_REQUEST_PULSE: case DOZE_PULSING: case DOZE_PULSE_DONE: return true; default: return false; } } private void scheduleTimeTick() { Loading packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +3 −11 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private static final int BACKGROUND_ANIMATION_LENGTH_MS = 220; private static final int ACTIVATE_ANIMATION_LENGTH = 220; private static final int DARK_ANIMATION_LENGTH = 170; private static final long DARK_ANIMATION_LENGTH = StackStateAnimator.ANIMATION_DURATION_WAKEUP; /** * The amount of width, which is kept in the end when performing a disappear animation (also Loading Loading @@ -418,7 +418,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } mDark = dark; updateBackground(); updateBackgroundTint(fade); updateBackgroundTint(false); if (!dark && fade && !shouldHideBackground()) { fadeInFromDark(delay); } Loading Loading @@ -555,23 +555,15 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView final View background = mDimmed ? mBackgroundDimmed : mBackgroundNormal; background.setAlpha(0f); mBackgroundVisibilityUpdater.onAnimationUpdate(null); background.setPivotX(mBackgroundDimmed.getWidth() / 2f); background.setPivotY(getActualHeight() / 2f); background.setScaleX(DARK_EXIT_SCALE_START); background.setScaleY(DARK_EXIT_SCALE_START); background.animate() .alpha(1f) .scaleX(1f) .scaleY(1f) .setDuration(DARK_ANIMATION_LENGTH) .setStartDelay(delay) .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN) .setInterpolator(Interpolators.ALPHA_IN) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationCancel(Animator animation) { // Jump state if we are cancelled background.setScaleX(1f); background.setScaleY(1f); background.setAlpha(1f); } }) Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −0 Original line number Diff line number Diff line Loading @@ -1406,6 +1406,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView @Override public void setDark(boolean dark, boolean fade, long delay) { super.setDark(dark, fade, delay); if (!mIsHeadsUp) { // Only fade the showing view of the pulsing notification. fade = false; } final NotificationContentView showing = getShowingLayout(); if (showing != null) { showing.setDark(dark, fade, delay); Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ public class NotificationShelf extends ActivatableNotificationView implements if (iconState != null) { iconState.scaleX = newSize / icon.getHeight() / icon.getIconScale(); iconState.scaleY = iconState.scaleX; iconState.hidden = transitionAmount == 0.0f; iconState.hidden = transitionAmount == 0.0f && !iconState.isAnimating(icon); iconState.alpha = alpha; iconState.yTranslation = iconYTranslation; if (stayingInShelf) { Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ public interface DozeHost { void abortPulsing(); void extendPulse(); void setAnimateWakeup(boolean animateWakeup); interface Callback { default void onNotificationHeadsUp() {} default void onPowerSaveChanged(boolean active) {} Loading
packages/SystemUI/src/com/android/systemui/doze/DozeUi.java +13 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,19 @@ public class DozeUi implements DozeMachine.Part { unscheduleTimeTick(); break; } mHost.setAnimateWakeup(shouldAnimateWakeup(newState)); } private boolean shouldAnimateWakeup(DozeMachine.State state) { switch (state) { case DOZE_AOD: case DOZE_REQUEST_PULSE: case DOZE_PULSING: case DOZE_PULSE_DONE: return true; default: return false; } } private void scheduleTimeTick() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +3 −11 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private static final int BACKGROUND_ANIMATION_LENGTH_MS = 220; private static final int ACTIVATE_ANIMATION_LENGTH = 220; private static final int DARK_ANIMATION_LENGTH = 170; private static final long DARK_ANIMATION_LENGTH = StackStateAnimator.ANIMATION_DURATION_WAKEUP; /** * The amount of width, which is kept in the end when performing a disappear animation (also Loading Loading @@ -418,7 +418,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } mDark = dark; updateBackground(); updateBackgroundTint(fade); updateBackgroundTint(false); if (!dark && fade && !shouldHideBackground()) { fadeInFromDark(delay); } Loading Loading @@ -555,23 +555,15 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView final View background = mDimmed ? mBackgroundDimmed : mBackgroundNormal; background.setAlpha(0f); mBackgroundVisibilityUpdater.onAnimationUpdate(null); background.setPivotX(mBackgroundDimmed.getWidth() / 2f); background.setPivotY(getActualHeight() / 2f); background.setScaleX(DARK_EXIT_SCALE_START); background.setScaleY(DARK_EXIT_SCALE_START); background.animate() .alpha(1f) .scaleX(1f) .scaleY(1f) .setDuration(DARK_ANIMATION_LENGTH) .setStartDelay(delay) .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN) .setInterpolator(Interpolators.ALPHA_IN) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationCancel(Animator animation) { // Jump state if we are cancelled background.setScaleX(1f); background.setScaleY(1f); background.setAlpha(1f); } }) Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −0 Original line number Diff line number Diff line Loading @@ -1406,6 +1406,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView @Override public void setDark(boolean dark, boolean fade, long delay) { super.setDark(dark, fade, delay); if (!mIsHeadsUp) { // Only fade the showing view of the pulsing notification. fade = false; } final NotificationContentView showing = getShowingLayout(); if (showing != null) { showing.setDark(dark, fade, delay); Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ public class NotificationShelf extends ActivatableNotificationView implements if (iconState != null) { iconState.scaleX = newSize / icon.getHeight() / icon.getIconScale(); iconState.scaleY = iconState.scaleX; iconState.hidden = transitionAmount == 0.0f; iconState.hidden = transitionAmount == 0.0f && !iconState.isAnimating(icon); iconState.alpha = alpha; iconState.yTranslation = iconYTranslation; if (stayingInShelf) { Loading