Loading core/java/android/service/notification/StatusBarNotification.java +0 −17 Original line number Original line Diff line number Diff line Loading @@ -174,23 +174,6 @@ public class StatusBarNotification implements Parcelable { return sbnKey; return sbnKey; } } /** * @return Whether the Entry is a group child by the app or system * @hide */ public boolean isAppOrSystemGroupChild() { return isGroup() && !getNotification().isGroupSummary(); } /** * @return Whether the Entry is a group summary by the app or system * @hide */ public boolean isAppOrSystemGroupSummary() { return isGroup() && getNotification().isGroupSummary(); } private String groupKey() { private String groupKey() { if (overrideGroupKey != null) { if (overrideGroupKey != null) { return user.getIdentifier() + "|" + pkg + "|" + "g:" + overrideGroupKey; return user.getIdentifier() + "|" + pkg + "|" + "g:" + overrideGroupKey; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +23 −0 Original line number Original line Diff line number Diff line Loading @@ -171,6 +171,9 @@ public final class NotificationEntry extends ListEntry { private boolean mIsMarkedForUserTriggeredMovement; private boolean mIsMarkedForUserTriggeredMovement; private boolean mIsHeadsUpEntry; private boolean mIsHeadsUpEntry; private boolean mHasEverBeenGroupSummary; private boolean mHasEverBeenGroupChild; public boolean mRemoteEditImeAnimatingAway; public boolean mRemoteEditImeAnimatingAway; public boolean mRemoteEditImeVisible; public boolean mRemoteEditImeVisible; private boolean mExpandAnimationRunning; private boolean mExpandAnimationRunning; Loading Loading @@ -217,6 +220,26 @@ public final class NotificationEntry extends ListEntry { mIsDemoted = true; mIsDemoted = true; } } /** called when entry is currently a summary of a group */ public void markAsGroupSummary() { mHasEverBeenGroupSummary = true; } /** whether this entry has ever been marked as a summary */ public boolean hasEverBeenGroupSummary() { return mHasEverBeenGroupSummary; } /** called when entry is currently a child in a group */ public void markAsGroupChild() { mHasEverBeenGroupChild = true; } /** whether this entry has ever been marked as a child */ public boolean hasEverBeenGroupChild() { return mHasEverBeenGroupChild; } /** /** * @param sbn the StatusBarNotification from system server * @param sbn the StatusBarNotification from system server * @param ranking also from system server * @param ranking also from system server Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/PreparationCoordinator.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,8 @@ import com.android.systemui.statusbar.notification.collection.render.NotifViewBa import com.android.systemui.statusbar.notification.collection.render.NotifViewController; import com.android.systemui.statusbar.notification.collection.render.NotifViewController; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager.NotifInflationErrorListener; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager.NotifInflationErrorListener; import com.android.systemui.statusbar.notification.row.shared.AsyncGroupHeaderViewInflation; import com.android.systemui.statusbar.notification.row.shared.AsyncHybridViewInflation; import java.lang.annotation.Retention; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -273,10 +275,14 @@ public class PreparationCoordinator implements Coordinator { private void inflateRequiredGroupViews(GroupEntry groupEntry) { private void inflateRequiredGroupViews(GroupEntry groupEntry) { NotificationEntry summary = groupEntry.getSummary(); NotificationEntry summary = groupEntry.getSummary(); if (summary != null && AsyncGroupHeaderViewInflation.isEnabled()) { summary.markAsGroupSummary(); } List<NotificationEntry> children = groupEntry.getChildren(); List<NotificationEntry> children = groupEntry.getChildren(); inflateRequiredNotifViews(summary); inflateRequiredNotifViews(summary); for (int j = 0; j < children.size(); j++) { for (int j = 0; j < children.size(); j++) { NotificationEntry child = children.get(j); NotificationEntry child = children.get(j); if (AsyncHybridViewInflation.isEnabled()) child.markAsGroupChild(); boolean childShouldBeBound = j < mChildBindCutoff; boolean childShouldBeBound = j < mChildBindCutoff; if (childShouldBeBound) { if (childShouldBeBound) { inflateRequiredNotifViews(child); inflateRequiredNotifViews(child); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustment.kt +1 −4 Original line number Original line Diff line number Diff line Loading @@ -52,11 +52,8 @@ class NotifUiAdjustment internal constructor( oldAdjustment.needsRedaction != newAdjustment.needsRedaction -> true oldAdjustment.needsRedaction != newAdjustment.needsRedaction -> true areDifferent(oldAdjustment.smartActions, newAdjustment.smartActions) -> true areDifferent(oldAdjustment.smartActions, newAdjustment.smartActions) -> true newAdjustment.smartReplies != oldAdjustment.smartReplies -> true newAdjustment.smartReplies != oldAdjustment.smartReplies -> true // TODO(b/217799515): Here we decide whether to re-inflate the row on every group-status // change if we want to keep the single-line view, the following line should be: // !oldAdjustment.isChildInGroup && newAdjustment.isChildInGroup -> true AsyncHybridViewInflation.isEnabled && AsyncHybridViewInflation.isEnabled && oldAdjustment.isChildInGroup != newAdjustment.isChildInGroup -> true !oldAdjustment.isChildInGroup && newAdjustment.isChildInGroup -> true AsyncGroupHeaderViewInflation.isEnabled && AsyncGroupHeaderViewInflation.isEnabled && !oldAdjustment.isGroupSummary && newAdjustment.isGroupSummary -> true !oldAdjustment.isGroupSummary && newAdjustment.isGroupSummary -> true else -> false else -> false Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustmentProvider.kt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -141,7 +141,7 @@ class NotifUiAdjustmentProvider @Inject constructor( lockscreenUserManager.needsRedaction(entry) || lockscreenUserManager.needsRedaction(entry) || (screenshareNotificationHiding() && (screenshareNotificationHiding() && sensitiveNotifProtectionController.shouldProtectNotification(entry)), sensitiveNotifProtectionController.shouldProtectNotification(entry)), isChildInGroup = entry.sbn.isAppOrSystemGroupChild, isChildInGroup = entry.hasEverBeenGroupChild(), isGroupSummary = entry.sbn.isAppOrSystemGroupSummary, isGroupSummary = entry.hasEverBeenGroupSummary(), ) ) } } Loading
core/java/android/service/notification/StatusBarNotification.java +0 −17 Original line number Original line Diff line number Diff line Loading @@ -174,23 +174,6 @@ public class StatusBarNotification implements Parcelable { return sbnKey; return sbnKey; } } /** * @return Whether the Entry is a group child by the app or system * @hide */ public boolean isAppOrSystemGroupChild() { return isGroup() && !getNotification().isGroupSummary(); } /** * @return Whether the Entry is a group summary by the app or system * @hide */ public boolean isAppOrSystemGroupSummary() { return isGroup() && getNotification().isGroupSummary(); } private String groupKey() { private String groupKey() { if (overrideGroupKey != null) { if (overrideGroupKey != null) { return user.getIdentifier() + "|" + pkg + "|" + "g:" + overrideGroupKey; return user.getIdentifier() + "|" + pkg + "|" + "g:" + overrideGroupKey; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +23 −0 Original line number Original line Diff line number Diff line Loading @@ -171,6 +171,9 @@ public final class NotificationEntry extends ListEntry { private boolean mIsMarkedForUserTriggeredMovement; private boolean mIsMarkedForUserTriggeredMovement; private boolean mIsHeadsUpEntry; private boolean mIsHeadsUpEntry; private boolean mHasEverBeenGroupSummary; private boolean mHasEverBeenGroupChild; public boolean mRemoteEditImeAnimatingAway; public boolean mRemoteEditImeAnimatingAway; public boolean mRemoteEditImeVisible; public boolean mRemoteEditImeVisible; private boolean mExpandAnimationRunning; private boolean mExpandAnimationRunning; Loading Loading @@ -217,6 +220,26 @@ public final class NotificationEntry extends ListEntry { mIsDemoted = true; mIsDemoted = true; } } /** called when entry is currently a summary of a group */ public void markAsGroupSummary() { mHasEverBeenGroupSummary = true; } /** whether this entry has ever been marked as a summary */ public boolean hasEverBeenGroupSummary() { return mHasEverBeenGroupSummary; } /** called when entry is currently a child in a group */ public void markAsGroupChild() { mHasEverBeenGroupChild = true; } /** whether this entry has ever been marked as a child */ public boolean hasEverBeenGroupChild() { return mHasEverBeenGroupChild; } /** /** * @param sbn the StatusBarNotification from system server * @param sbn the StatusBarNotification from system server * @param ranking also from system server * @param ranking also from system server Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/PreparationCoordinator.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,8 @@ import com.android.systemui.statusbar.notification.collection.render.NotifViewBa import com.android.systemui.statusbar.notification.collection.render.NotifViewController; import com.android.systemui.statusbar.notification.collection.render.NotifViewController; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager.NotifInflationErrorListener; import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager.NotifInflationErrorListener; import com.android.systemui.statusbar.notification.row.shared.AsyncGroupHeaderViewInflation; import com.android.systemui.statusbar.notification.row.shared.AsyncHybridViewInflation; import java.lang.annotation.Retention; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -273,10 +275,14 @@ public class PreparationCoordinator implements Coordinator { private void inflateRequiredGroupViews(GroupEntry groupEntry) { private void inflateRequiredGroupViews(GroupEntry groupEntry) { NotificationEntry summary = groupEntry.getSummary(); NotificationEntry summary = groupEntry.getSummary(); if (summary != null && AsyncGroupHeaderViewInflation.isEnabled()) { summary.markAsGroupSummary(); } List<NotificationEntry> children = groupEntry.getChildren(); List<NotificationEntry> children = groupEntry.getChildren(); inflateRequiredNotifViews(summary); inflateRequiredNotifViews(summary); for (int j = 0; j < children.size(); j++) { for (int j = 0; j < children.size(); j++) { NotificationEntry child = children.get(j); NotificationEntry child = children.get(j); if (AsyncHybridViewInflation.isEnabled()) child.markAsGroupChild(); boolean childShouldBeBound = j < mChildBindCutoff; boolean childShouldBeBound = j < mChildBindCutoff; if (childShouldBeBound) { if (childShouldBeBound) { inflateRequiredNotifViews(child); inflateRequiredNotifViews(child); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustment.kt +1 −4 Original line number Original line Diff line number Diff line Loading @@ -52,11 +52,8 @@ class NotifUiAdjustment internal constructor( oldAdjustment.needsRedaction != newAdjustment.needsRedaction -> true oldAdjustment.needsRedaction != newAdjustment.needsRedaction -> true areDifferent(oldAdjustment.smartActions, newAdjustment.smartActions) -> true areDifferent(oldAdjustment.smartActions, newAdjustment.smartActions) -> true newAdjustment.smartReplies != oldAdjustment.smartReplies -> true newAdjustment.smartReplies != oldAdjustment.smartReplies -> true // TODO(b/217799515): Here we decide whether to re-inflate the row on every group-status // change if we want to keep the single-line view, the following line should be: // !oldAdjustment.isChildInGroup && newAdjustment.isChildInGroup -> true AsyncHybridViewInflation.isEnabled && AsyncHybridViewInflation.isEnabled && oldAdjustment.isChildInGroup != newAdjustment.isChildInGroup -> true !oldAdjustment.isChildInGroup && newAdjustment.isChildInGroup -> true AsyncGroupHeaderViewInflation.isEnabled && AsyncGroupHeaderViewInflation.isEnabled && !oldAdjustment.isGroupSummary && newAdjustment.isGroupSummary -> true !oldAdjustment.isGroupSummary && newAdjustment.isGroupSummary -> true else -> false else -> false Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustmentProvider.kt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -141,7 +141,7 @@ class NotifUiAdjustmentProvider @Inject constructor( lockscreenUserManager.needsRedaction(entry) || lockscreenUserManager.needsRedaction(entry) || (screenshareNotificationHiding() && (screenshareNotificationHiding() && sensitiveNotifProtectionController.shouldProtectNotification(entry)), sensitiveNotifProtectionController.shouldProtectNotification(entry)), isChildInGroup = entry.sbn.isAppOrSystemGroupChild, isChildInGroup = entry.hasEverBeenGroupChild(), isGroupSummary = entry.sbn.isAppOrSystemGroupSummary, isGroupSummary = entry.hasEverBeenGroupSummary(), ) ) } }