Loading packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public interface DozeHost { interface Callback { default void onNewNotifications() {} default void onBuzzBeepBlinked() {} default void onNotificationHeadsUp() {} default void onNotificationLight(boolean on) {} default void onPowerSaveChanged(boolean active) {} } Loading packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +1 −1 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ public class DozeTriggers implements DozeMachine.Part { private DozeHost.Callback mHostCallback = new DozeHost.Callback() { @Override public void onBuzzBeepBlinked() { public void onNotificationHeadsUp() { onNotification(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -2439,7 +2439,7 @@ public abstract class BaseStatusBar extends SystemUI implements Log.d(TAG, "failed to query dream manager", e); } if (!inUse) { if (!inUse && !isDozing()) { if (DEBUG) { Log.d(TAG, "No peeking: not in use: " + sbn.getKey()); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java +10 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { private VisibilityLocationProvider mVisibilityLocationProvider; private ArraySet<View> mAllowedReorderViews = new ArraySet<>(); private ArraySet<View> mAddedChildren = new ArraySet<>(); private boolean mPulsing; /** * Add a callback to invoke when reordering is allowed again. Loading Loading @@ -67,8 +68,16 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { updateReorderingAllowed(); } /** * @param pulsing whether we are currently pulsing for ambient display. */ public void setPulsing(boolean pulsing) { mPulsing = pulsing; updateReorderingAllowed(); } private void updateReorderingAllowed() { boolean reorderingAllowed = !mScreenOn || !mPanelExpanded; boolean reorderingAllowed = (!mScreenOn || !mPanelExpanded) && !mPulsing; boolean changed = reorderingAllowed && !mReorderingAllowed; mReorderingAllowed = reorderingAllowed; if (changed) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +7 −6 Original line number Diff line number Diff line Loading @@ -80,7 +80,6 @@ import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.Process; Loading Loading @@ -2660,6 +2659,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } } else { updateNotificationRanking(null); if (isHeadsUp) { mDozeServiceHost.fireNotificationHeadsUp(); } } } Loading Loading @@ -3076,9 +3078,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, @Override // CommandQueue public void buzzBeepBlinked() { if (mDozeServiceHost != null) { mDozeServiceHost.fireBuzzBeepBlinked(); } } @Override Loading Loading @@ -5240,9 +5239,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } } public void fireBuzzBeepBlinked() { public void fireNotificationHeadsUp() { for (Callback callback : mCallbacks) { callback.onBuzzBeepBlinked(); callback.onNotificationHeadsUp(); } } Loading Loading @@ -5286,12 +5285,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void onPulseStarted() { callback.onPulseStarted(); mStackScroller.setPulsing(true); mVisualStabilityManager.setPulsing(true); } @Override public void onPulseFinished() { callback.onPulseFinished(); mStackScroller.setPulsing(false); mVisualStabilityManager.setPulsing(false); } }, reason); } Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public interface DozeHost { interface Callback { default void onNewNotifications() {} default void onBuzzBeepBlinked() {} default void onNotificationHeadsUp() {} default void onNotificationLight(boolean on) {} default void onPowerSaveChanged(boolean active) {} } Loading
packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +1 −1 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ public class DozeTriggers implements DozeMachine.Part { private DozeHost.Callback mHostCallback = new DozeHost.Callback() { @Override public void onBuzzBeepBlinked() { public void onNotificationHeadsUp() { onNotification(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -2439,7 +2439,7 @@ public abstract class BaseStatusBar extends SystemUI implements Log.d(TAG, "failed to query dream manager", e); } if (!inUse) { if (!inUse && !isDozing()) { if (DEBUG) { Log.d(TAG, "No peeking: not in use: " + sbn.getKey()); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java +10 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { private VisibilityLocationProvider mVisibilityLocationProvider; private ArraySet<View> mAllowedReorderViews = new ArraySet<>(); private ArraySet<View> mAddedChildren = new ArraySet<>(); private boolean mPulsing; /** * Add a callback to invoke when reordering is allowed again. Loading Loading @@ -67,8 +68,16 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { updateReorderingAllowed(); } /** * @param pulsing whether we are currently pulsing for ambient display. */ public void setPulsing(boolean pulsing) { mPulsing = pulsing; updateReorderingAllowed(); } private void updateReorderingAllowed() { boolean reorderingAllowed = !mScreenOn || !mPanelExpanded; boolean reorderingAllowed = (!mScreenOn || !mPanelExpanded) && !mPulsing; boolean changed = reorderingAllowed && !mReorderingAllowed; mReorderingAllowed = reorderingAllowed; if (changed) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +7 −6 Original line number Diff line number Diff line Loading @@ -80,7 +80,6 @@ import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.Process; Loading Loading @@ -2660,6 +2659,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } } else { updateNotificationRanking(null); if (isHeadsUp) { mDozeServiceHost.fireNotificationHeadsUp(); } } } Loading Loading @@ -3076,9 +3078,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, @Override // CommandQueue public void buzzBeepBlinked() { if (mDozeServiceHost != null) { mDozeServiceHost.fireBuzzBeepBlinked(); } } @Override Loading Loading @@ -5240,9 +5239,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } } public void fireBuzzBeepBlinked() { public void fireNotificationHeadsUp() { for (Callback callback : mCallbacks) { callback.onBuzzBeepBlinked(); callback.onNotificationHeadsUp(); } } Loading Loading @@ -5286,12 +5285,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void onPulseStarted() { callback.onPulseStarted(); mStackScroller.setPulsing(true); mVisualStabilityManager.setPulsing(true); } @Override public void onPulseFinished() { callback.onPulseFinished(); mStackScroller.setPulsing(false); mVisualStabilityManager.setPulsing(false); } }, reason); } Loading