1/* 2 * Copyright (C) 2023 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 17syntax = "proto2"; 18 19package android.stats.dnd; 20 21option java_package = "com.android.os.dnd"; 22option java_multiple_files = true; 23option java_outer_classname = "DNDProtoEnums"; 24 25// Enum used in DNDModeProto. 26enum ZenMode { 27 ROOT_CONFIG = -1; // Used to distinguish the config (one per user) from the rules. 28 ZEN_MODE_OFF = 0; 29 ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; 30 ZEN_MODE_NO_INTERRUPTIONS = 2; 31 ZEN_MODE_ALARMS = 3; 32} 33 34// Enum used in DNDPolicyProto for a particular policy parameter's state. 35enum State { 36 STATE_UNSET = 0; 37 STATE_ALLOW = 1; 38 STATE_DISALLOW = 2; 39} 40 41// Enum used in DNDPolicyProto for which people are allowed to break through. 42enum PeopleType { 43 PEOPLE_UNSET = 0; 44 PEOPLE_ANYONE = 1; 45 PEOPLE_CONTACTS = 2; 46 PEOPLE_STARRED = 3; 47 PEOPLE_NONE = 4; 48} 49 50// Enum used in DNDPolicyProto for conversation types allowed to break through. 51enum ConversationType { 52 CONV_UNSET = 0; 53 CONV_ANYONE = 1; 54 CONV_IMPORTANT = 2; 55 CONV_NONE = 3; 56} 57 58// Enum used in DNDPolicyProto to indicate the type of channels permitted to 59// break through DND. Mirrors values in ZenPolicy. 60enum ChannelPolicy { 61 CHANNEL_POLICY_UNSET = 0; 62 CHANNEL_POLICY_PRIORITY = 1; 63 CHANNEL_POLICY_NONE = 2; 64} 65 66// Enum used in DNDStateChanged to identify the type of rule that changed. 67enum RuleType { 68 UNKNOWN_RULE = 0; 69 MANUAL_RULE = 1; 70 AUTOMATIC_RULE = 2; 71} 72 73// Enum used in DNDModeProto and DNDStateChanged to identify the category 74// of automatic zen rule that the log pertains to. 75// Mirrors values in AutomaticZenRule, with one additional value for 76// the manual rule (which is used in logging only). 77enum ActiveRuleType { 78 TYPE_UNKNOWN = -1; 79 TYPE_OTHER = 0; 80 TYPE_SCHEDULE_TIME = 1; 81 TYPE_SCHEDULE_CALENDAR = 2; 82 TYPE_BEDTIME = 3; 83 TYPE_DRIVING = 4; 84 TYPE_IMMERSIVE = 5; 85 TYPE_THEATER = 6; 86 TYPE_MANAGED = 7; 87 // Intentional gap for future automatic rule types. 88 TYPE_MANUAL = 999; 89} 90