diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-06-10 02:48:58 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-10 02:48:58 +0000 |
commit | bfef7f45e7da97abf924015dba68580b0554834a (patch) | |
tree | b8f963d7c8e7cd72ff50da46ad5779f98e58283a /core/proto | |
parent | e5d29086a8f84d25a95a985253fe68c1231ed008 (diff) | |
parent | 5599ca731fcdd24e328aca933d52aa4544c13c7f (diff) |
Merge "pulled atom for Do Not Disturb configuration" into rvc-dev am: 5599ca731f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11494623
Change-Id: Ib9e26c9c56e952719a071d35219d4f011fbcba80
Diffstat (limited to 'core/proto')
-rw-r--r-- | core/proto/android/service/notification.proto | 72 |
1 files changed, 71 insertions, 1 deletions
diff --git a/core/proto/android/service/notification.proto b/core/proto/android/service/notification.proto index ecb4193a2c6c..8e4006aa6861 100644 --- a/core/proto/android/service/notification.proto +++ b/core/proto/android/service/notification.proto @@ -274,4 +274,74 @@ message PackageRemoteViewInfoProto { // Next Tag: 2 message NotificationRemoteViewsProto { repeated PackageRemoteViewInfoProto package_remote_view_info = 1; -}
\ No newline at end of file +} + +/** + * Atom that represents an item in the list of Do Not Disturb rules, pulled from + * NotificationManagerService.java. + */ +message DNDModeProto { + enum Mode { + ROOT_CONFIG = -1; // Used to distinguish the config (one per user) from the rules. + ZEN_MODE_OFF = 0; + ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; + ZEN_MODE_NO_INTERRUPTIONS = 2; + ZEN_MODE_ALARMS = 3; + } + optional int32 user = 1; // Android user ID (0, 1, 10, ...) + optional bool enabled = 2; // true for ROOT_CONFIG if a manualRule is enabled + optional bool channels_bypassing = 3; // only valid for ROOT_CONFIG + optional Mode zen_mode = 4; + // id is one of the system default rule IDs, or empty + // May also be "MANUAL_RULE" to indicate app-activation of the manual rule. + optional string id = 5; + optional int32 uid = 6; // currently only SYSTEM_UID or 0 for other + optional DNDPolicyProto policy = 7; +} + +/** + * Atom that represents a Do Not Disturb policy, an optional detail proto for DNDModeProto. + */ +message DNDPolicyProto { + enum State { + STATE_UNSET = 0; + STATE_ALLOW = 1; + STATE_DISALLOW = 2; + } + optional State calls = 1; + optional State repeat_callers = 2; + optional State messages = 3; + optional State conversations = 4; + optional State reminders = 5; + optional State events = 6; + optional State alarms = 7; + optional State media = 8; + optional State system = 9; + optional State fullscreen = 10; + optional State lights = 11; + optional State peek = 12; + optional State status_bar = 13; + optional State badge = 14; + optional State ambient = 15; + optional State notification_list = 16; + + enum PeopleType { + PEOPLE_UNSET = 0; + PEOPLE_ANYONE = 1; + PEOPLE_CONTACTS = 2; + PEOPLE_STARRED = 3; + PEOPLE_NONE = 4; + } + + optional PeopleType allow_calls_from = 17; + optional PeopleType allow_messages_from = 18; + + enum ConversationType { + CONV_UNSET = 0; + CONV_ANYONE = 1; + CONV_IMPORTANT = 2; + CONV_NONE = 3; + } + + optional ConversationType allow_conversations_from = 19; +} |