Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44aa750f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move notification policy log to ZenLog" into pi-dev

parents 25092e1d 5e073224
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 {
+9 −0
Original line number Diff line number Diff line
@@ -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";
        }
    }