Merge "Add trace tags for notifications" into sc-v2-dev am: 46386914b4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16383112

Change-Id: I5c77389ae186cdb04b148f48551d5bfc0a6ad812
This commit is contained in:
Lucas Dupin
2021-12-03 19:07:29 +00:00
committed by Automerger Merge Worker

View File

@@ -20,6 +20,7 @@ import android.os.Handler;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.ServiceManager; import android.os.ServiceManager;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.Trace;
import android.service.notification.NotificationListenerService; import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification;
import android.util.ArrayMap; import android.util.ArrayMap;
@@ -158,6 +159,9 @@ public class NotificationLogger implements StateListener {
mExpansionStateLogger.onVisibilityChanged( mExpansionStateLogger.onVisibilityChanged(
mTmpCurrentlyVisibleNotifications, mTmpCurrentlyVisibleNotifications); mTmpCurrentlyVisibleNotifications, mTmpCurrentlyVisibleNotifications);
Trace.traceCounter(Trace.TRACE_TAG_APP, "Notifications [Active]", N);
Trace.traceCounter(Trace.TRACE_TAG_APP, "Notifications [Visible]",
mCurrentlyVisibleNotifications.size());
recycleAllVisibilityObjects(mTmpNoLongerVisibleNotifications); recycleAllVisibilityObjects(mTmpNoLongerVisibleNotifications);
mTmpCurrentlyVisibleNotifications.clear(); mTmpCurrentlyVisibleNotifications.clear();