1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package android.app.backup; 17 18 /** 19 * @hide 20 */ 21 public class NotificationLoggingConstants { 22 23 // Key under which the payload blob is stored 24 public static final String KEY_NOTIFICATIONS = "notifications"; 25 26 /** 27 * Events for android.service.notification.ZenModeConfig - the configuration for all modes 28 * settings for a single user 29 */ 30 @BackupRestoreEventLogger.BackupRestoreDataType 31 public static final String DATA_TYPE_ZEN_CONFIG = KEY_NOTIFICATIONS + ":zen_config"; 32 /** 33 * Events for android.service.notification.ZenModeConfig.ZenRule - a single mode within a 34 * ZenModeConfig 35 */ 36 @BackupRestoreEventLogger.BackupRestoreDataType 37 public static final String DATA_TYPE_ZEN_RULES = KEY_NOTIFICATIONS + ":zen_rules"; 38 /** 39 * Events for globally stored notifications data that aren't stored in settings, like whether 40 * to hide silent notification in the status bar 41 */ 42 @BackupRestoreEventLogger.BackupRestoreDataType 43 public static final String DATA_TYPE_NOTIF_GLOBAL = KEY_NOTIFICATIONS + ":global"; 44 /** 45 * Events for package specific notification settings, including app and 46 * android.app.NotificationChannel level settings. 47 */ 48 @BackupRestoreEventLogger.BackupRestoreDataType 49 public static final String DATA_TYPE_NOTIF_PACKAGES = KEY_NOTIFICATIONS + ":packages"; 50 /** 51 * Events for approved ManagedServices (NotificationListenerServices, 52 * NotificationAssistantService, ConditionProviderService). 53 */ 54 @BackupRestoreEventLogger.BackupRestoreDataType 55 public static final String DATA_TYPE_MANAGED_SERVICE_PRIMARY_APPROVED = KEY_NOTIFICATIONS + 56 ":managed_service_primary_approved"; 57 /** 58 * Events for what types of notifications NotificationListenerServices cannot see 59 */ 60 @BackupRestoreEventLogger.BackupRestoreDataType 61 public static final String DATA_TYPE_NLS_RESTRICTED = KEY_NOTIFICATIONS + 62 ":nls_restricted"; 63 /** 64 * Events for ManagedServices that are approved because they have a different primary 65 * ManagedService (ConditionProviderService). 66 */ 67 @BackupRestoreEventLogger.BackupRestoreDataType 68 public static final String DATA_TYPE_MANAGED_SERVICE_SECONDARY_APPROVED = KEY_NOTIFICATIONS + 69 ":managed_service_secondary_approved"; 70 /** 71 * Events for individual snoozed notifications. 72 */ 73 @BackupRestoreEventLogger.BackupRestoreDataType 74 public static final String DATA_TYPE_SNOOZED = KEY_NOTIFICATIONS + ":snoozed"; 75 76 77 @BackupRestoreEventLogger.BackupRestoreError 78 public static final String ERROR_XML_PARSING = KEY_NOTIFICATIONS + ":invalid_xml_parsing"; 79 } 80