diff options
| -rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 1 | ||||
| -rw-r--r-- | services/core/java/com/android/server/notification/ZenLog.java | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index f0b60ec2fe13..b68b98da9a2f 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -3166,6 +3166,7 @@ public class NotificationManagerService extends SystemService { policy.priorityCallSenders, policy.priorityMessageSenders, newVisualEffects); + ZenLog.traceSetNotificationPolicy(pkg, applicationInfo.targetSdkVersion, policy); mZenModeHelper.setNotificationPolicy(policy); } catch (RemoteException e) { } finally { diff --git a/services/core/java/com/android/server/notification/ZenLog.java b/services/core/java/com/android/server/notification/ZenLog.java index f7efff0fedb0..67608753a2c3 100644 --- a/services/core/java/com/android/server/notification/ZenLog.java +++ b/services/core/java/com/android/server/notification/ZenLog.java @@ -16,6 +16,7 @@ package com.android.server.notification; +import android.app.NotificationManager; import android.content.ComponentName; import android.media.AudioManager; import android.net.Uri; @@ -60,6 +61,7 @@ public class ZenLog { private static final int TYPE_DISABLE_EFFECTS = 13; private static final int TYPE_SUPPRESSOR_CHANGED = 14; private static final int TYPE_LISTENER_HINTS_CHANGED = 15; + private static final int TYPE_SET_NOTIFICATION_POLICY = 16; private static int sNext; private static int sSize; @@ -108,6 +110,12 @@ public class ZenLog { append(TYPE_EXIT_CONDITION, c + "," + componentToString(component) + "," + reason); } + public static void traceSetNotificationPolicy(String pkg, int targetSdk, + NotificationManager.Policy policy) { + append(TYPE_SET_NOTIFICATION_POLICY, "pkg=" + pkg + " targetSdk=" + targetSdk + + " NotificationPolicy=" + policy.toString()); + } + public static void traceSubscribe(Uri uri, IConditionProvider provider, RemoteException e) { append(TYPE_SUBSCRIBE, uri + "," + subscribeResult(provider, e)); } @@ -160,6 +168,7 @@ public class ZenLog { case TYPE_DISABLE_EFFECTS: return "disable_effects"; case TYPE_SUPPRESSOR_CHANGED: return "suppressor_changed"; case TYPE_LISTENER_HINTS_CHANGED: return "listener_hints_changed"; + case TYPE_SET_NOTIFICATION_POLICY: return "set_notification_policy"; default: return "unknown"; } } |