Loading packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ public abstract class AlertingNotificationManager implements NotificationLifetim } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, boolean shouldExtend) { public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { mExtendedLifetimeAlertEntries.add(entry); } else { Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationLifetimeExtender.java +7 −7 Original line number Diff line number Diff line Loading @@ -27,17 +27,17 @@ public interface NotificationLifetimeExtender { boolean shouldExtendLifetime(@NonNull NotificationData.Entry entry); /** * Sets whether or not the lifetime should be extended. In practice, if shouldExtend is * true, this is where the extender starts managing the entry internally and is now * responsible for calling {@link NotificationSafeToRemoveCallback#onSafeToRemove(String)} when * the entry is safe to remove. If shouldExtend is false, the extender no longer needs to * Sets whether or not the lifetime should be managed by the extender. In practice, if * shouldManage is true, this is where the extender starts managing the entry internally and is * now responsible for calling {@link NotificationSafeToRemoveCallback#onSafeToRemove(String)} * when the entry is safe to remove. If shouldManage is false, the extender no longer needs to * worry about it (either because we will be removing it anyway or the entry is no longer * removed due to an update). * * @param entry the entry to mark as having an extended lifetime * @param shouldExtend true if the extender should manage the entry now, false otherwise * @param entry the entry that needs an extended lifetime * @param shouldManage true if the extender should manage the entry now, false otherwise */ void setShouldExtendLifetime(@NonNull NotificationData.Entry entry, boolean shouldExtend); void setShouldManageLifetime(@NonNull NotificationData.Entry entry, boolean shouldManage); /** * The callback for when the notification is now safe to remove (i.e. its lifetime has ended). Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -502,7 +502,7 @@ public class NotificationRemoteInputManager implements Dumpable { } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { CharSequence remoteInputText = entry.remoteInputText; Loading Loading @@ -548,7 +548,7 @@ public class NotificationRemoteInputManager implements Dumpable { } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { StatusBarNotification newSbn = rebuildNotificationForCanceledSmartReplies(entry); Loading Loading @@ -589,7 +589,7 @@ public class NotificationRemoteInputManager implements Dumpable { } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { if (Log.isLoggable(TAG, Log.DEBUG)) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -491,7 +491,7 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { if (extender.shouldExtendLifetime(entry)) { mLatestRankingMap = ranking; extender.setShouldExtendLifetime(entry, true /* shouldExtend */); extender.setShouldManageLifetime(entry, true /* shouldManage */); return; } } Loading @@ -501,7 +501,7 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. // Ensure any managers keeping the lifetime extended stop managing the entry for (NotificationLifetimeExtender extender: mNotificationLifetimeExtenders) { extender.setShouldExtendLifetime(entry, false /* shouldExtend */); extender.setShouldManageLifetime(entry, false /* shouldManage */); } mMediaManager.onNotificationRemoved(key); Loading Loading @@ -745,9 +745,9 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. } // Notification is updated so it is essentially re-added and thus alive again. Don't need // to keep it's lifetime extended. // to keep its lifetime extended. for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { extender.setShouldExtendLifetime(entry, false /* shouldExtend */); extender.setShouldManageLifetime(entry, false /* shouldManage */); } Notification n = notification.getNotification(); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, boolean shouldExtend) { public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { mKeyToRemoveOnGutsClosed = entry.key; if (Log.isLoggable(TAG, Log.DEBUG)) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ public abstract class AlertingNotificationManager implements NotificationLifetim } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, boolean shouldExtend) { public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { mExtendedLifetimeAlertEntries.add(entry); } else { Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationLifetimeExtender.java +7 −7 Original line number Diff line number Diff line Loading @@ -27,17 +27,17 @@ public interface NotificationLifetimeExtender { boolean shouldExtendLifetime(@NonNull NotificationData.Entry entry); /** * Sets whether or not the lifetime should be extended. In practice, if shouldExtend is * true, this is where the extender starts managing the entry internally and is now * responsible for calling {@link NotificationSafeToRemoveCallback#onSafeToRemove(String)} when * the entry is safe to remove. If shouldExtend is false, the extender no longer needs to * Sets whether or not the lifetime should be managed by the extender. In practice, if * shouldManage is true, this is where the extender starts managing the entry internally and is * now responsible for calling {@link NotificationSafeToRemoveCallback#onSafeToRemove(String)} * when the entry is safe to remove. If shouldManage is false, the extender no longer needs to * worry about it (either because we will be removing it anyway or the entry is no longer * removed due to an update). * * @param entry the entry to mark as having an extended lifetime * @param shouldExtend true if the extender should manage the entry now, false otherwise * @param entry the entry that needs an extended lifetime * @param shouldManage true if the extender should manage the entry now, false otherwise */ void setShouldExtendLifetime(@NonNull NotificationData.Entry entry, boolean shouldExtend); void setShouldManageLifetime(@NonNull NotificationData.Entry entry, boolean shouldManage); /** * The callback for when the notification is now safe to remove (i.e. its lifetime has ended). Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -502,7 +502,7 @@ public class NotificationRemoteInputManager implements Dumpable { } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { CharSequence remoteInputText = entry.remoteInputText; Loading Loading @@ -548,7 +548,7 @@ public class NotificationRemoteInputManager implements Dumpable { } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { StatusBarNotification newSbn = rebuildNotificationForCanceledSmartReplies(entry); Loading Loading @@ -589,7 +589,7 @@ public class NotificationRemoteInputManager implements Dumpable { } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { if (Log.isLoggable(TAG, Log.DEBUG)) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -491,7 +491,7 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { if (extender.shouldExtendLifetime(entry)) { mLatestRankingMap = ranking; extender.setShouldExtendLifetime(entry, true /* shouldExtend */); extender.setShouldManageLifetime(entry, true /* shouldManage */); return; } } Loading @@ -501,7 +501,7 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. // Ensure any managers keeping the lifetime extended stop managing the entry for (NotificationLifetimeExtender extender: mNotificationLifetimeExtenders) { extender.setShouldExtendLifetime(entry, false /* shouldExtend */); extender.setShouldManageLifetime(entry, false /* shouldManage */); } mMediaManager.onNotificationRemoved(key); Loading Loading @@ -745,9 +745,9 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. } // Notification is updated so it is essentially re-added and thus alive again. Don't need // to keep it's lifetime extended. // to keep its lifetime extended. for (NotificationLifetimeExtender extender : mNotificationLifetimeExtenders) { extender.setShouldExtendLifetime(entry, false /* shouldExtend */); extender.setShouldManageLifetime(entry, false /* shouldManage */); } Notification n = notification.getNotification(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx } @Override public void setShouldExtendLifetime(NotificationData.Entry entry, boolean shouldExtend) { public void setShouldManageLifetime(NotificationData.Entry entry, boolean shouldExtend) { if (shouldExtend) { mKeyToRemoveOnGutsClosed = entry.key; if (Log.isLoggable(TAG, Log.DEBUG)) { Loading