Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +5 −4 Original line number Diff line number Diff line Loading @@ -237,6 +237,7 @@ public class NotifCollection implements Dumpable { stats.notificationVisibility); } catch (RemoteException e) { // system process is dead if we're here. mLogger.logRemoteExceptionOnNotificationClear(entry.getKey(), e); } } } Loading @@ -251,8 +252,7 @@ public class NotifCollection implements Dumpable { public void dismissNotification( NotificationEntry entry, @NonNull DismissedByUserStats stats) { dismissNotifications(List.of( new Pair<NotificationEntry, DismissedByUserStats>(entry, stats))); dismissNotifications(List.of(new Pair<>(entry, stats))); } /** Loading @@ -266,9 +266,10 @@ public class NotifCollection implements Dumpable { mStatusBarService.onClearAllNotifications(userId); } catch (RemoteException e) { // system process is dead if we're here. mLogger.logRemoteExceptionOnClearAllNotifications(e); } final List<NotificationEntry> entries = new ArrayList(getActiveNotifs()); final List<NotificationEntry> entries = new ArrayList<>(getActiveNotifs()); for (int i = entries.size() - 1; i >= 0; i--) { NotificationEntry entry = entries.get(i); if (!shouldDismissOnClearAll(entry, userId)) { Loading Loading @@ -777,6 +778,6 @@ public class NotifCollection implements Dumpable { @Retention(RetentionPolicy.SOURCE) public @interface CancellationReason {} public static final int REASON_NOT_CANCELED = -1; static final int REASON_NOT_CANCELED = -1; public static final int REASON_UNKNOWN = 0; } packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionLogger.kt +20 −1 Original line number Diff line number Diff line Loading @@ -16,11 +16,13 @@ package com.android.systemui.statusbar.notification.collection.notifcollection import android.os.RemoteException import android.service.notification.NotificationListenerService.RankingMap import com.android.systemui.log.LogBuffer import com.android.systemui.log.LogLevel.DEBUG import com.android.systemui.log.LogLevel.INFO import com.android.systemui.log.LogLevel.WARNING import com.android.systemui.log.LogLevel.WTF import com.android.systemui.log.dagger.NotificationLog import javax.inject.Inject Loading Loading @@ -92,6 +94,23 @@ class NotifCollectionLogger @Inject constructor( buffer.log(TAG, DEBUG, { str1 = entry }, { " $str1" }) } } fun logRemoteExceptionOnNotificationClear(key: String, e: RemoteException) { buffer.log(TAG, WTF, { str1 = key str2 = e.toString() }, { "RemoteException while attempting to clear $str1:\n$str2" }) } fun logRemoteExceptionOnClearAllNotifications(e: RemoteException) { buffer.log(TAG, WTF, { str1 = e.toString() }, { "RemoteException while attempting to clear all notifications:\n$str1" }) } } private const val TAG = "NotifCollection" Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +5 −4 Original line number Diff line number Diff line Loading @@ -237,6 +237,7 @@ public class NotifCollection implements Dumpable { stats.notificationVisibility); } catch (RemoteException e) { // system process is dead if we're here. mLogger.logRemoteExceptionOnNotificationClear(entry.getKey(), e); } } } Loading @@ -251,8 +252,7 @@ public class NotifCollection implements Dumpable { public void dismissNotification( NotificationEntry entry, @NonNull DismissedByUserStats stats) { dismissNotifications(List.of( new Pair<NotificationEntry, DismissedByUserStats>(entry, stats))); dismissNotifications(List.of(new Pair<>(entry, stats))); } /** Loading @@ -266,9 +266,10 @@ public class NotifCollection implements Dumpable { mStatusBarService.onClearAllNotifications(userId); } catch (RemoteException e) { // system process is dead if we're here. mLogger.logRemoteExceptionOnClearAllNotifications(e); } final List<NotificationEntry> entries = new ArrayList(getActiveNotifs()); final List<NotificationEntry> entries = new ArrayList<>(getActiveNotifs()); for (int i = entries.size() - 1; i >= 0; i--) { NotificationEntry entry = entries.get(i); if (!shouldDismissOnClearAll(entry, userId)) { Loading Loading @@ -777,6 +778,6 @@ public class NotifCollection implements Dumpable { @Retention(RetentionPolicy.SOURCE) public @interface CancellationReason {} public static final int REASON_NOT_CANCELED = -1; static final int REASON_NOT_CANCELED = -1; public static final int REASON_UNKNOWN = 0; }
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionLogger.kt +20 −1 Original line number Diff line number Diff line Loading @@ -16,11 +16,13 @@ package com.android.systemui.statusbar.notification.collection.notifcollection import android.os.RemoteException import android.service.notification.NotificationListenerService.RankingMap import com.android.systemui.log.LogBuffer import com.android.systemui.log.LogLevel.DEBUG import com.android.systemui.log.LogLevel.INFO import com.android.systemui.log.LogLevel.WARNING import com.android.systemui.log.LogLevel.WTF import com.android.systemui.log.dagger.NotificationLog import javax.inject.Inject Loading Loading @@ -92,6 +94,23 @@ class NotifCollectionLogger @Inject constructor( buffer.log(TAG, DEBUG, { str1 = entry }, { " $str1" }) } } fun logRemoteExceptionOnNotificationClear(key: String, e: RemoteException) { buffer.log(TAG, WTF, { str1 = key str2 = e.toString() }, { "RemoteException while attempting to clear $str1:\n$str2" }) } fun logRemoteExceptionOnClearAllNotifications(e: RemoteException) { buffer.log(TAG, WTF, { str1 = e.toString() }, { "RemoteException while attempting to clear all notifications:\n$str1" }) } } private const val TAG = "NotifCollection"