• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2017 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";
18option java_multiple_files = true;
19
20package android.app;
21
22import "frameworks/base/core/proto/android/privacy.proto";
23
24/**
25 * An android.app.NotificationManager.Policy object.
26 */
27message PolicyProto {
28    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
29
30    enum Category {
31        CATEGORY_UNKNOWN = 0;
32        // Reminder notifications are prioritized.
33        REMINDERS = 1;
34        // Event notifications are prioritized.
35        EVENTS = 2;
36        // Message notifications are prioritized.
37        MESSAGES = 3;
38        // Calls are prioritized.
39        CALLS = 4;
40        // Calls from repeat callers are prioritized.
41        REPEAT_CALLERS = 5;
42        // Alarms are prioritized.
43        ALARMS = 6;
44        // Media, game, voice navigation are prioritized.
45        MEDIA = 7;
46        // System (catch-all for non-never suppressible sounds) are prioritized.
47        SYSTEM = 8;
48    }
49    repeated Category priority_categories = 1;
50
51    enum Sender {
52        // Any sender is prioritized.
53        ANY = 0;
54        // Saved contacts are prioritized.
55        CONTACTS = 1;
56        // Only starred contacts are prioritized.
57        STARRED = 2;
58    }
59    optional Sender priority_call_sender = 2;
60    optional Sender priority_message_sender = 3;
61
62    enum SuppressedVisualEffect {
63        SVE_UNKNOWN = 0;
64        // Whether notifications suppressed by DND should not interrupt visually
65        // (e.g. with notification lights or by turning the screen on) when the
66        // screen is off.
67        // FULL_SCREEN_INTENT, AMBIENT, and LIGHTS should be used instead.
68        SCREEN_OFF = 1 [deprecated = true];
69        // Whether notifications suppressed by DND should not interrupt visually
70        // when the screen is on (e.g. by peeking onto the screen).
71        // PEEK should be used instead of ON.
72        SCREEN_ON = 2 [deprecated = true];
73        // Whether full screen intents} from notifications intercepted by DND
74        // are blocked.
75        FULL_SCREEN_INTENT = 3;
76        // Whether lights from notifications intercepted by DND are blocked.
77        LIGHTS = 4;
78        // Whether notifications intercepted by DND are prevented from peeking.
79        PEEK = 5;
80        // Whether notifications intercepted by DND are prevented from
81        // appearing in the status bar, on devices that support status bars.
82        STATUS_BAR = 6;
83        // Whether badges from notifications intercepted by DND are blocked on
84        // devices that support badging.
85        BADGE = 7;
86        // Whether notification intercepted by DND are prevented from appearing
87        // on ambient displays on devices that support ambient display.
88        AMBIENT = 8;
89        // Whether notification intercepted by DND are prevented from appearing
90        // in notification list views like the notification shade or lockscreen
91        // on devices that support those views.
92        NOTIFICATION_LIST = 9;
93    }
94    repeated SuppressedVisualEffect suppressed_visual_effects = 4;
95}
96