diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java index 2f7f47b6cda7d..4e229c00b8912 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java @@ -184,7 +184,7 @@ public class BubbleData { Log.d(TAG, "notificationEntryUpdated: " + entry); } Bubble bubble = getBubbleWithKey(entry.getKey()); - suppressFlyout = !entry.isVisuallyInterruptive || suppressFlyout; + suppressFlyout = !entry.getRanking().visuallyInterruptive() || suppressFlyout; if (bubble == null) { // Create a new bubble diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleView.java index 780c3148a324b..fe4fa90a272dd 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleView.java @@ -39,7 +39,6 @@ import com.android.launcher3.icons.ShadowGenerator; import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.statusbar.notification.collection.NotificationEntry; -import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; /** * A floating object on the screen that can post message updates. @@ -141,15 +140,6 @@ public class BubbleView extends FrameLayout { mUserBadgedAppIcon = appIcon; } - /** - * @return the {@link ExpandableNotificationRow} view to display notification content when the - * bubble is expanded. - */ - @Nullable - public ExpandableNotificationRow getRowView() { - return (mBubble != null) ? mBubble.getEntry().getRow() : null; - } - /** Changes the dot's visibility to match the bubble view's state. */ void updateDotVisibility(boolean animate) { updateDotVisibility(animate, null /* after */); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java index e004ca7d1f1d9..71fc5490d656c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java @@ -85,11 +85,6 @@ import java.util.Objects; * clean this up in the future. */ public final class NotificationEntry { - private static final long LAUNCH_COOLDOWN = 2000; - private static final long REMOTE_INPUT_COOLDOWN = 500; - private static final long INITIALIZATION_DELAY = 400; - private static final long NOT_LAUNCHED_YET = -LAUNCH_COOLDOWN; - private static final int COLOR_INVALID = 1; private final String mKey; private StatusBarNotification mSbn; @@ -109,13 +104,11 @@ public final class NotificationEntry { * TODO: Remove every member beneath this line if possible */ - public boolean noisy; public StatusBarIconView icon; public StatusBarIconView expandedIcon; public StatusBarIconView centeredIcon; public StatusBarIconView aodIcon; private boolean interruption; - public boolean autoRedacted; // whether the redacted notification was generated by us public int targetSdk; private long lastFullScreenIntentLaunchTime = NOT_LAUNCHED_YET; public CharSequence remoteInputText; @@ -155,12 +148,6 @@ public final class NotificationEntry { */ private boolean hasSentReply; - /** - * Whether this notification has changed in visual appearance since the previous post. - * New notifications are interruptive by default. - */ - public boolean isVisuallyInterruptive; - /** * Whether this notification is shown to the user as a high priority notification: visible on * the lock screen/status bar and in the top section in the shade. @@ -236,10 +223,15 @@ public final class NotificationEntry { throw new IllegalArgumentException("New key " + ranking.getKey() + " doesn't match existing key " + mKey); } + mRanking = ranking; - isVisuallyInterruptive = ranking.visuallyInterruptive(); } + + /* + * Convenience getters for SBN and Ranking members + */ + public NotificationChannel getChannel() { return mRanking.getChannel(); } @@ -287,6 +279,12 @@ public final class NotificationEntry { } + /* + * Old methods + * + * TODO: Remove as many of these as possible + */ + public void setInterruption() { interruption = true; } @@ -961,4 +959,10 @@ public final class NotificationEntry { this.index = index; } } + + private static final long LAUNCH_COOLDOWN = 2000; + private static final long REMOTE_INPUT_COOLDOWN = 500; + private static final long INITIALIZATION_DELAY = 400; + private static final long NOT_LAUNCHED_YET = -LAUNCH_COOLDOWN; + private static final int COLOR_INVALID = 1; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationRowBinderImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationRowBinderImpl.java index 5dbb9c544d7b4..396c5fefd8b78 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationRowBinderImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationRowBinderImpl.java @@ -248,7 +248,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { // TODO: should updates to the entry be happening somewhere else? entry.setIconTag(R.id.icon_is_pre_L, entry.targetSdk < Build.VERSION_CODES.LOLLIPOP); - entry.autoRedacted = entry.getSbn().getNotification().publicVersion == null; entry.setRow(row); row.setOnActivatedListener(mPresenter);