Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +10 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView } private LayoutListener mLayoutListener; private boolean mLowPriorityStateUpdated; private final NotificationInflater mNotificationInflater; private int mIconTransformContentShift; private int mIconTransformContentShiftNoIcon; Loading Loading @@ -1121,6 +1122,15 @@ public class ExpandableNotificationRow extends ActivatableNotificationView } } public void setLowPriorityStateUpdated(boolean lowPriorityStateUpdated) { mLowPriorityStateUpdated = lowPriorityStateUpdated; } public boolean hasLowPriorityStateUpdated() { return mLowPriorityStateUpdated; } public boolean isLowPriority() { return mIsLowPriority; } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { private boolean mReorderingAllowed; private VisibilityLocationProvider mVisibilityLocationProvider; private ArraySet<View> mAllowedReorderViews = new ArraySet<>(); private ArraySet<View> mLowPriorityReorderingViews = new ArraySet<>(); private ArraySet<View> mAddedChildren = new ArraySet<>(); private boolean mPulsing; Loading Loading @@ -115,6 +116,9 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { if (mAddedChildren.contains(row)) { return true; } if (mLowPriorityReorderingViews.contains(row)) { return true; } if (mAllowedReorderViews.contains(row) && !mVisibilityLocationProvider.isInVisibleLocation(row)) { return true; Loading @@ -130,6 +134,7 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { public void onReorderingFinished() { mAllowedReorderViews.clear(); mAddedChildren.clear(); mLowPriorityReorderingViews.clear(); } @Override Loading @@ -141,6 +146,10 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { } } public void onLowPriorityUpdated(NotificationData.Entry entry) { mLowPriorityReorderingViews.add(entry.row); } /** * Notify the visual stability manager that a new view was added and should be allowed to * reorder next time. Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +9 −1 Original line number Diff line number Diff line Loading @@ -1614,9 +1614,14 @@ public class StatusBar extends SystemUI implements DemoMode, mPendingNotifications.remove(entry.key); // If there was an async task started after the removal, we don't want to add it back to // the list, otherwise we might get leaks. if (mNotificationData.get(entry.key) == null && !entry.row.isRemoved()) { boolean isNew = mNotificationData.get(entry.key) == null; if (isNew && !entry.row.isRemoved()) { addEntry(entry); } else if (!isNew && entry.row.hasLowPriorityStateUpdated()) { mVisualStabilityManager.onLowPriorityUpdated(entry); updateNotificationShade(); } entry.row.setLowPriorityStateUpdated(false); } private boolean shouldSuppressFullScreenIntent(String key) { Loading Loading @@ -6244,7 +6249,10 @@ public class StatusBar extends SystemUI implements DemoMode, StatusBarNotification sbn, ExpandableNotificationRow row) { row.setNeedsRedaction(needsRedaction(entry)); boolean isLowPriority = mNotificationData.isAmbient(sbn.getKey()); boolean isUpdate = mNotificationData.get(entry.key) != null; boolean wasLowPriority = row.isLowPriority(); row.setIsLowPriority(isLowPriority); row.setLowPriorityStateUpdated(isUpdate && (wasLowPriority != isLowPriority)); // bind the click event to the content area mNotificationClicker.register(row, sbn); Loading services/core/java/com/android/server/notification/RankingHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -447,7 +447,9 @@ public class RankingHelper implements RankingConfig { boolean isGroupSummary = record.getNotification().isGroupSummary(); record.setGlobalSortKey( String.format("intrsv=%c:grnk=0x%04x:gsmry=%c:%s:rnk=0x%04x", record.isRecentlyIntrusive() ? '0' : '1', record.isRecentlyIntrusive() && record.getImportance() > NotificationManager.IMPORTANCE_MIN ? '0' : '1', groupProxy.getAuthoritativeRank(), isGroupSummary ? '0' : '1', groupSortKeyPortion, Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +10 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView } private LayoutListener mLayoutListener; private boolean mLowPriorityStateUpdated; private final NotificationInflater mNotificationInflater; private int mIconTransformContentShift; private int mIconTransformContentShiftNoIcon; Loading Loading @@ -1121,6 +1122,15 @@ public class ExpandableNotificationRow extends ActivatableNotificationView } } public void setLowPriorityStateUpdated(boolean lowPriorityStateUpdated) { mLowPriorityStateUpdated = lowPriorityStateUpdated; } public boolean hasLowPriorityStateUpdated() { return mLowPriorityStateUpdated; } public boolean isLowPriority() { return mIsLowPriority; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { private boolean mReorderingAllowed; private VisibilityLocationProvider mVisibilityLocationProvider; private ArraySet<View> mAllowedReorderViews = new ArraySet<>(); private ArraySet<View> mLowPriorityReorderingViews = new ArraySet<>(); private ArraySet<View> mAddedChildren = new ArraySet<>(); private boolean mPulsing; Loading Loading @@ -115,6 +116,9 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { if (mAddedChildren.contains(row)) { return true; } if (mLowPriorityReorderingViews.contains(row)) { return true; } if (mAllowedReorderViews.contains(row) && !mVisibilityLocationProvider.isInVisibleLocation(row)) { return true; Loading @@ -130,6 +134,7 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { public void onReorderingFinished() { mAllowedReorderViews.clear(); mAddedChildren.clear(); mLowPriorityReorderingViews.clear(); } @Override Loading @@ -141,6 +146,10 @@ public class VisualStabilityManager implements OnHeadsUpChangedListener { } } public void onLowPriorityUpdated(NotificationData.Entry entry) { mLowPriorityReorderingViews.add(entry.row); } /** * Notify the visual stability manager that a new view was added and should be allowed to * reorder next time. Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +9 −1 Original line number Diff line number Diff line Loading @@ -1614,9 +1614,14 @@ public class StatusBar extends SystemUI implements DemoMode, mPendingNotifications.remove(entry.key); // If there was an async task started after the removal, we don't want to add it back to // the list, otherwise we might get leaks. if (mNotificationData.get(entry.key) == null && !entry.row.isRemoved()) { boolean isNew = mNotificationData.get(entry.key) == null; if (isNew && !entry.row.isRemoved()) { addEntry(entry); } else if (!isNew && entry.row.hasLowPriorityStateUpdated()) { mVisualStabilityManager.onLowPriorityUpdated(entry); updateNotificationShade(); } entry.row.setLowPriorityStateUpdated(false); } private boolean shouldSuppressFullScreenIntent(String key) { Loading Loading @@ -6244,7 +6249,10 @@ public class StatusBar extends SystemUI implements DemoMode, StatusBarNotification sbn, ExpandableNotificationRow row) { row.setNeedsRedaction(needsRedaction(entry)); boolean isLowPriority = mNotificationData.isAmbient(sbn.getKey()); boolean isUpdate = mNotificationData.get(entry.key) != null; boolean wasLowPriority = row.isLowPriority(); row.setIsLowPriority(isLowPriority); row.setLowPriorityStateUpdated(isUpdate && (wasLowPriority != isLowPriority)); // bind the click event to the content area mNotificationClicker.register(row, sbn); Loading
services/core/java/com/android/server/notification/RankingHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -447,7 +447,9 @@ public class RankingHelper implements RankingConfig { boolean isGroupSummary = record.getNotification().isGroupSummary(); record.setGlobalSortKey( String.format("intrsv=%c:grnk=0x%04x:gsmry=%c:%s:rnk=0x%04x", record.isRecentlyIntrusive() ? '0' : '1', record.isRecentlyIntrusive() && record.getImportance() > NotificationManager.IMPORTANCE_MIN ? '0' : '1', groupProxy.getAuthoritativeRank(), isGroupSummary ? '0' : '1', groupSortKeyPortion, Loading