Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -165,8 +165,7 @@ public class NotificationBlockingHelperManager { private LogMaker getLogMaker() { return mBlockingHelperRow.getStatusBarNotification() .getLogMaker() .setCategory(MetricsEvent.NOTIFICATION_ITEM) .setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER); .setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER); } // Format must stay in sync with frameworks/base/core/res/res/values/config.xml Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java +15 −8 Original line number Diff line number Diff line Loading @@ -126,14 +126,17 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G private OnClickListener mOnKeepShowing = v -> { mExitReason = NotificationCounters.BLOCKING_HELPER_KEEP_SHOWING; closeControls(v); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_ACTION) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_STAY_SILENT)); }; private OnClickListener mOnToggleSilent = v -> { Runnable saveImportance = () -> { swapContent(ACTION_TOGGLE_SILENT, true /* animate */); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker() .setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_ACTION) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_ALERT_ME)); }; if (mCheckSaveListener != null) { Loading @@ -146,7 +149,9 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G private OnClickListener mOnStopOrMinimizeNotifications = v -> { Runnable saveImportance = () -> { swapContent(ACTION_BLOCK, true /* animate */); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker() .setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_ACTION) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_BLOCKED)); }; if (mCheckSaveListener != null) { Loading @@ -162,7 +167,8 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G logBlockingHelperCounter(NotificationCounters.BLOCKING_HELPER_UNDO); mMetricsLogger.write(importanceChangeLogMaker().setType(MetricsEvent.TYPE_DISMISS)); swapContent(ACTION_UNDO, true /* animate */); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_DISMISS) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_UNDO)); }; Loading Loading @@ -263,7 +269,8 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G bindPrompt(); bindButtons(); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_OPEN) .setSubtype(MetricsEvent.BLOCKING_HELPER_DISPLAY)); } Loading Loading @@ -609,8 +616,8 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G confirmation.setAlpha(1f); header.setVisibility(VISIBLE); header.setAlpha(1f); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setSubtype(MetricsEvent.BLOCKING_HELPER_DISMISS)); mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_CLOSE)); } @Override Loading Loading @@ -758,6 +765,6 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G } private LogMaker getLogMaker() { return mSbn.getLogMaker().setCategory(MetricsEvent.NOTIFICATION_ITEM); return mSbn.getLogMaker(); } } packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationInfoTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -504,7 +504,8 @@ public class NotificationInfoTest extends SysuiTestCase { IMPORTANCE_DEFAULT, true); mNotificationInfo.logBlockingHelperCounter("HowCanNotifsBeRealIfAppsArent"); verify(mMetricsLogger).write(argThat(logMaker -> logMaker.getType() == MetricsEvent.NOTIFICATION_BLOCKING_HELPER logMaker.getCategory() == MetricsEvent.NOTIFICATION_BLOCKING_HELPER && logMaker.getType() == MetricsEvent.TYPE_OPEN && logMaker.getSubtype() == MetricsEvent.BLOCKING_HELPER_DISPLAY )); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -165,8 +165,7 @@ public class NotificationBlockingHelperManager { private LogMaker getLogMaker() { return mBlockingHelperRow.getStatusBarNotification() .getLogMaker() .setCategory(MetricsEvent.NOTIFICATION_ITEM) .setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER); .setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER); } // Format must stay in sync with frameworks/base/core/res/res/values/config.xml Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java +15 −8 Original line number Diff line number Diff line Loading @@ -126,14 +126,17 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G private OnClickListener mOnKeepShowing = v -> { mExitReason = NotificationCounters.BLOCKING_HELPER_KEEP_SHOWING; closeControls(v); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_ACTION) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_STAY_SILENT)); }; private OnClickListener mOnToggleSilent = v -> { Runnable saveImportance = () -> { swapContent(ACTION_TOGGLE_SILENT, true /* animate */); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker() .setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_ACTION) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_ALERT_ME)); }; if (mCheckSaveListener != null) { Loading @@ -146,7 +149,9 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G private OnClickListener mOnStopOrMinimizeNotifications = v -> { Runnable saveImportance = () -> { swapContent(ACTION_BLOCK, true /* animate */); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker() .setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_ACTION) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_BLOCKED)); }; if (mCheckSaveListener != null) { Loading @@ -162,7 +167,8 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G logBlockingHelperCounter(NotificationCounters.BLOCKING_HELPER_UNDO); mMetricsLogger.write(importanceChangeLogMaker().setType(MetricsEvent.TYPE_DISMISS)); swapContent(ACTION_UNDO, true /* animate */); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_DISMISS) .setSubtype(MetricsEvent.BLOCKING_HELPER_CLICK_UNDO)); }; Loading Loading @@ -263,7 +269,8 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G bindPrompt(); bindButtons(); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_OPEN) .setSubtype(MetricsEvent.BLOCKING_HELPER_DISPLAY)); } Loading Loading @@ -609,8 +616,8 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G confirmation.setAlpha(1f); header.setVisibility(VISIBLE); header.setAlpha(1f); mMetricsLogger.write(getLogMaker().setType(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setSubtype(MetricsEvent.BLOCKING_HELPER_DISMISS)); mMetricsLogger.write(getLogMaker().setCategory(MetricsEvent.NOTIFICATION_BLOCKING_HELPER) .setType(MetricsEvent.TYPE_CLOSE)); } @Override Loading Loading @@ -758,6 +765,6 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G } private LogMaker getLogMaker() { return mSbn.getLogMaker().setCategory(MetricsEvent.NOTIFICATION_ITEM); return mSbn.getLogMaker(); } }
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationInfoTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -504,7 +504,8 @@ public class NotificationInfoTest extends SysuiTestCase { IMPORTANCE_DEFAULT, true); mNotificationInfo.logBlockingHelperCounter("HowCanNotifsBeRealIfAppsArent"); verify(mMetricsLogger).write(argThat(logMaker -> logMaker.getType() == MetricsEvent.NOTIFICATION_BLOCKING_HELPER logMaker.getCategory() == MetricsEvent.NOTIFICATION_BLOCKING_HELPER && logMaker.getType() == MetricsEvent.TYPE_OPEN && logMaker.getSubtype() == MetricsEvent.BLOCKING_HELPER_DISPLAY )); } Loading