summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java11
2 files changed, 23 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 1e94b3577816..3aac77e90c70 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -4493,7 +4493,20 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
private void handlePulseWhileDozing(@NonNull PulseCallback callback, int reason) {
- mDozeScrimController.pulse(callback, reason);
+ mDozeScrimController.pulse(new PulseCallback() {
+
+ @Override
+ public void onPulseStarted() {
+ callback.onPulseStarted();
+ mStackScroller.setPulsing(true);
+ }
+
+ @Override
+ public void onPulseFinished() {
+ callback.onPulseFinished();
+ mStackScroller.setPulsing(false);
+ }
+ }, reason);
}
private void handleStopDozing() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index cca374602b63..61ec463c5d84 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -324,6 +324,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
};
private PorterDuffXfermode mSrcMode = new PorterDuffXfermode(PorterDuff.Mode.SRC);
+ private boolean mPulsing;
public NotificationStackScrollLayout(Context context) {
this(context, null);
@@ -2194,7 +2195,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void updateNotificationAnimationStates() {
- boolean running = mAnimationsEnabled;
+ boolean running = mAnimationsEnabled || mPulsing;
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
@@ -2204,7 +2205,8 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void updateAnimationState(View child) {
- updateAnimationState(mAnimationsEnabled && (mIsExpanded || isPinnedHeadsUp(child)), child);
+ updateAnimationState((mAnimationsEnabled || mPulsing)
+ && (mIsExpanded || isPinnedHeadsUp(child)), child);
}
@@ -3322,6 +3324,11 @@ public class NotificationStackScrollLayout extends ViewGroup
return mIsExpanded;
}
+ public void setPulsing(boolean pulsing) {
+ mPulsing = pulsing;
+ updateNotificationAnimationStates();
+ }
+
/**
* A listener that is notified when some child locations might have changed.
*/