Add a logging for ACTION_BAN_APP_NOTES
Bug: 111215354 Test: adb logcat -b events Change-Id: I4e26adac7a7ad5053b919605b8a25e18bd93cac7 Merged-In: I4e26adac7a7ad5053b919605b8a25e18bd93cac7
This commit is contained in:
@@ -941,9 +941,10 @@ message MetricsEvent {
|
|||||||
// OS: 6.0
|
// OS: 6.0
|
||||||
NOTIFICATION_ZEN_MODE_EVENT_RULE = 146;
|
NOTIFICATION_ZEN_MODE_EVENT_RULE = 146;
|
||||||
|
|
||||||
// ACTION: App notification settings > Block Notifications
|
// ACTION: App notification settings > Block Notifications or long press on
|
||||||
|
// notification blocks.
|
||||||
// CATEGORY: SETTINGS
|
// CATEGORY: SETTINGS
|
||||||
// OS: 6.0
|
// OS: 9.0
|
||||||
ACTION_BAN_APP_NOTES = 147;
|
ACTION_BAN_APP_NOTES = 147;
|
||||||
|
|
||||||
// ACTION: Notification shade > Dismiss all button
|
// ACTION: Notification shade > Dismiss all button
|
||||||
|
|||||||
@@ -2119,6 +2119,10 @@ public class NotificationManagerService extends SystemService {
|
|||||||
enforceSystemOrSystemUI("setNotificationsEnabledForPackage");
|
enforceSystemOrSystemUI("setNotificationsEnabledForPackage");
|
||||||
|
|
||||||
mRankingHelper.setEnabled(pkg, uid, enabled);
|
mRankingHelper.setEnabled(pkg, uid, enabled);
|
||||||
|
mMetricsLogger.write(new LogMaker(MetricsEvent.ACTION_BAN_APP_NOTES)
|
||||||
|
.setType(MetricsEvent.TYPE_ACTION)
|
||||||
|
.setPackageName(pkg)
|
||||||
|
.setSubtype(enabled ? 1 : 0));
|
||||||
// Now, cancel any outstanding notifications that are part of a just-disabled app
|
// Now, cancel any outstanding notifications that are part of a just-disabled app
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
cancelAllNotificationsInt(MY_UID, MY_PID, pkg, null, 0, 0, true,
|
cancelAllNotificationsInt(MY_UID, MY_PID, pkg, null, 0, 0, true,
|
||||||
|
|||||||
Reference in New Issue
Block a user