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

Commit 67d8f57c authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Add the rest of the logging types" into main

parents b84b3a48 2cff18e6
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
@@ -23,10 +23,56 @@ public class NotificationLoggingConstants {
    // Key under which the payload blob is stored
    public static final String KEY_NOTIFICATIONS = "notifications";

    /**
     * Events for android.service.notification.ZenModeConfig - the configuration for all modes
     * settings for a single user
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_ZEN_CONFIG = KEY_NOTIFICATIONS + ":zen_config";
    /**
     * Events for android.service.notification.ZenModeConfig.ZenRule - a single mode within a
     * ZenModeConfig
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_ZEN_RULES = KEY_NOTIFICATIONS + ":zen_rules";
    /**
     * Events for globally stored notifications data that aren't stored in settings, like whether
     * to hide silent notification in the status bar
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_NOTIF_GLOBAL = KEY_NOTIFICATIONS + ":global";
    /**
     * Events for package specific notification settings, including app and
     * android.app.NotificationChannel level settings.
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_NOTIF_PACKAGES = KEY_NOTIFICATIONS + ":packages";
    /**
     * Events for approved ManagedServices (NotificationListenerServices,
     * NotificationAssistantService, ConditionProviderService).
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_MANAGED_SERVICE_PRIMARY_APPROVED = KEY_NOTIFICATIONS +
            ":managed_service_primary_approved";
    /**
     * Events for what types of notifications NotificationListenerServices cannot see
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_NLS_RESTRICTED = KEY_NOTIFICATIONS +
            ":nls_restricted";
    /**
     * Events for ManagedServices that are approved because they have a different primary
     * ManagedService (ConditionProviderService).
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_MANAGED_SERVICE_SECONDARY_APPROVED = KEY_NOTIFICATIONS +
            ":managed_service_secondary_approved";
    /**
     * Events for individual snoozed notifications.
     */
    @BackupRestoreEventLogger.BackupRestoreDataType
    public static final String DATA_TYPE_SNOOZED = KEY_NOTIFICATIONS + ":snoozed";


    @BackupRestoreEventLogger.BackupRestoreError
    public static final String ERROR_XML_PARSING = KEY_NOTIFICATIONS + ":invalid_xml_parsing";
+2 −2
Original line number Diff line number Diff line
@@ -528,8 +528,8 @@ public class ZenModeConfigTest extends UiServiceTestCase {
        String xml = "<zen version=\"12\">\n"
                + "<allow calls=\"true\" repeatCallers=\"true\" messages=\"true\""
                + " reminders=\"false\" events=\"false\" callsFrom=\"2\" messagesFrom=\"2\""
                + " alarms=\"true\" media=\"true\" system=\"false\" convos=\"true\" convosFrom=\"2\""
                + " priorityChannelsAllowed=\"true\" />\n"
                + " alarms=\"true\" media=\"true\" system=\"false\" convos=\"true\""
                + " convosFrom=\"2\" priorityChannelsAllowed=\"true\" />\n"
                + "<disallow visualEffects=\"157\" />\n"
                + "<manual enabled=\"true\" zen=\"1\" creationTime=\"0\" modified=\"false\" />\n"
                + "<state areChannelsBypassingDnd=\"true\" />\n"