Loading core/java/android/service/notification/StatusBarNotification.java +17 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,23 @@ public class StatusBarNotification implements Parcelable { 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() { if (overrideGroupKey != null) { return user.getIdentifier() + "|" + pkg + "|" + "g:" + overrideGroupKey; Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationGroupingUtil.java +7 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ import com.android.internal.widget.ConversationLayout; import com.android.internal.widget.ImageFloatingTextView; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationContentView; import com.android.systemui.statusbar.notification.row.shared.AsyncGroupHeaderViewInflation; import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper; import java.util.ArrayList; import java.util.HashSet; Loading Loading @@ -253,7 +255,8 @@ public class NotificationGroupingUtil { } public void init() { View header = mParentRow.getNotificationViewWrapper().getNotificationHeader(); NotificationViewWrapper wrapper = mParentRow.getNotificationViewWrapper(); View header = wrapper == null ? null : wrapper.getNotificationHeader(); mParentView = header == null ? null : header.findViewById(mId); mParentData = mExtractor == null ? null : mExtractor.extractData(mParentRow); mApply = !mComparator.isEmpty(mParentView); Loading Loading @@ -326,6 +329,9 @@ public class NotificationGroupingUtil { @Override public boolean isEmpty(View view) { if (AsyncGroupHeaderViewInflation.isEnabled() && view == null) { return true; } if (view instanceof ImageView) { return ((ImageView) view).getDrawable() == null; } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/PreparationCoordinator.java +5 −4 Original line number Diff line number Diff line Loading @@ -363,10 +363,11 @@ public class PreparationCoordinator implements Coordinator { NotifInflater.Params getInflaterParams(NotifUiAdjustment adjustment, String reason) { return new NotifInflater.Params( adjustment.isMinimized(), reason, adjustment.isSnoozeEnabled(), adjustment.isChildInGroup() /* isLowPriority = */ adjustment.isMinimized(), /* reason = */ reason, /* showSnooze = */ adjustment.isSnoozeEnabled(), /* isChildInGroup = */ adjustment.isChildInGroup(), /* isGroupSummary = */ adjustment.isGroupSummary() ); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifInflater.kt +1 −0 Original line number Diff line number Diff line Loading @@ -60,5 +60,6 @@ interface NotifInflater { val reason: String, val showSnooze: Boolean, val isChildInGroup: Boolean = false, val isGroupSummary: Boolean = false, ) } packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustment.kt +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.Notification import android.app.RemoteInput import android.graphics.drawable.Icon import android.text.TextUtils import com.android.systemui.statusbar.notification.row.shared.AsyncGroupHeaderViewInflation import com.android.systemui.statusbar.notification.row.shared.AsyncHybridViewInflation /** Loading @@ -36,6 +37,7 @@ class NotifUiAdjustment internal constructor( val isMinimized: Boolean, val needsRedaction: Boolean, val isChildInGroup: Boolean, val isGroupSummary: Boolean, ) { companion object { @JvmStatic Loading @@ -55,6 +57,8 @@ class NotifUiAdjustment internal constructor( // !oldAdjustment.isChildInGroup && newAdjustment.isChildInGroup -> true AsyncHybridViewInflation.isEnabled && oldAdjustment.isChildInGroup != newAdjustment.isChildInGroup -> true AsyncGroupHeaderViewInflation.isEnabled && !oldAdjustment.isGroupSummary && newAdjustment.isGroupSummary -> true else -> false } Loading Loading
core/java/android/service/notification/StatusBarNotification.java +17 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,23 @@ public class StatusBarNotification implements Parcelable { 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() { if (overrideGroupKey != null) { return user.getIdentifier() + "|" + pkg + "|" + "g:" + overrideGroupKey; Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationGroupingUtil.java +7 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ import com.android.internal.widget.ConversationLayout; import com.android.internal.widget.ImageFloatingTextView; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationContentView; import com.android.systemui.statusbar.notification.row.shared.AsyncGroupHeaderViewInflation; import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper; import java.util.ArrayList; import java.util.HashSet; Loading Loading @@ -253,7 +255,8 @@ public class NotificationGroupingUtil { } public void init() { View header = mParentRow.getNotificationViewWrapper().getNotificationHeader(); NotificationViewWrapper wrapper = mParentRow.getNotificationViewWrapper(); View header = wrapper == null ? null : wrapper.getNotificationHeader(); mParentView = header == null ? null : header.findViewById(mId); mParentData = mExtractor == null ? null : mExtractor.extractData(mParentRow); mApply = !mComparator.isEmpty(mParentView); Loading Loading @@ -326,6 +329,9 @@ public class NotificationGroupingUtil { @Override public boolean isEmpty(View view) { if (AsyncGroupHeaderViewInflation.isEnabled() && view == null) { return true; } if (view instanceof ImageView) { return ((ImageView) view).getDrawable() == null; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/PreparationCoordinator.java +5 −4 Original line number Diff line number Diff line Loading @@ -363,10 +363,11 @@ public class PreparationCoordinator implements Coordinator { NotifInflater.Params getInflaterParams(NotifUiAdjustment adjustment, String reason) { return new NotifInflater.Params( adjustment.isMinimized(), reason, adjustment.isSnoozeEnabled(), adjustment.isChildInGroup() /* isLowPriority = */ adjustment.isMinimized(), /* reason = */ reason, /* showSnooze = */ adjustment.isSnoozeEnabled(), /* isChildInGroup = */ adjustment.isChildInGroup(), /* isGroupSummary = */ adjustment.isGroupSummary() ); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifInflater.kt +1 −0 Original line number Diff line number Diff line Loading @@ -60,5 +60,6 @@ interface NotifInflater { val reason: String, val showSnooze: Boolean, val isChildInGroup: Boolean = false, val isGroupSummary: Boolean = false, ) }
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotifUiAdjustment.kt +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.Notification import android.app.RemoteInput import android.graphics.drawable.Icon import android.text.TextUtils import com.android.systemui.statusbar.notification.row.shared.AsyncGroupHeaderViewInflation import com.android.systemui.statusbar.notification.row.shared.AsyncHybridViewInflation /** Loading @@ -36,6 +37,7 @@ class NotifUiAdjustment internal constructor( val isMinimized: Boolean, val needsRedaction: Boolean, val isChildInGroup: Boolean, val isGroupSummary: Boolean, ) { companion object { @JvmStatic Loading @@ -55,6 +57,8 @@ class NotifUiAdjustment internal constructor( // !oldAdjustment.isChildInGroup && newAdjustment.isChildInGroup -> true AsyncHybridViewInflation.isEnabled && oldAdjustment.isChildInGroup != newAdjustment.isChildInGroup -> true AsyncGroupHeaderViewInflation.isEnabled && !oldAdjustment.isGroupSummary && newAdjustment.isGroupSummary -> true else -> false } Loading