DO NOT MERGE Log remote exceptions in NotifCollection am: 3dec27fff4 am: 9a15ecf0b0 am: 8195b2285d
Change-Id: Ida6f8d6dedfef9bb8b19a88f6951f9b217c37a01
This commit is contained in:
@@ -249,6 +249,7 @@ public class NotifCollection implements Dumpable {
|
|||||||
stats.notificationVisibility);
|
stats.notificationVisibility);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
// system process is dead if we're here.
|
// system process is dead if we're here.
|
||||||
|
mLogger.logRemoteExceptionOnNotificationClear(entry.getKey(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,6 +278,7 @@ public class NotifCollection implements Dumpable {
|
|||||||
mStatusBarService.onClearAllNotifications(userId);
|
mStatusBarService.onClearAllNotifications(userId);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
// system process is dead if we're here.
|
// system process is dead if we're here.
|
||||||
|
mLogger.logRemoteExceptionOnClearAllNotifications(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<NotificationEntry> entries = new ArrayList<>(getAllNotifs());
|
final List<NotificationEntry> entries = new ArrayList<>(getAllNotifs());
|
||||||
@@ -743,6 +745,6 @@ public class NotifCollection implements Dumpable {
|
|||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface CancellationReason {}
|
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;
|
public static final int REASON_UNKNOWN = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,13 @@
|
|||||||
|
|
||||||
package com.android.systemui.statusbar.notification.collection.notifcollection
|
package com.android.systemui.statusbar.notification.collection.notifcollection
|
||||||
|
|
||||||
|
import android.os.RemoteException
|
||||||
import android.service.notification.NotificationListenerService.RankingMap
|
import android.service.notification.NotificationListenerService.RankingMap
|
||||||
import com.android.systemui.log.LogBuffer
|
import com.android.systemui.log.LogBuffer
|
||||||
import com.android.systemui.log.LogLevel.DEBUG
|
import com.android.systemui.log.LogLevel.DEBUG
|
||||||
import com.android.systemui.log.LogLevel.INFO
|
import com.android.systemui.log.LogLevel.INFO
|
||||||
import com.android.systemui.log.LogLevel.WARNING
|
import com.android.systemui.log.LogLevel.WARNING
|
||||||
|
import com.android.systemui.log.LogLevel.WTF
|
||||||
import com.android.systemui.log.dagger.NotificationLog
|
import com.android.systemui.log.dagger.NotificationLog
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@@ -92,6 +94,23 @@ class NotifCollectionLogger @Inject constructor(
|
|||||||
buffer.log(TAG, DEBUG, { str1 = entry }, { " $str1" })
|
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"
|
private const val TAG = "NotifCollection"
|
||||||
Reference in New Issue
Block a user