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_package = "android.app";
19option java_multiple_files = true;
20
21package android.app;
22
23import "frameworks/base/libs/incident/proto/android/privacy.proto";
24
25/**
26 * An android.app.NotificationManager.Policy object.
27 */
28message PolicyProto {
29    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
30
31    enum Category {
32        CATEGORY_UNKNOWN = 0;
33        // Reminder notifications are prioritized.
34        REMINDERS = 1;
35        // Event notifications are prioritized.
36        EVENTS = 2;
37        // Message notifications are prioritized.
38        MESSAGES = 3;
39        // Calls are prioritized.
40        CALLS = 4;
41        // Calls from repeat callers are prioritized.
42        REPEAT_CALLERS = 5;
43        // Alarms are prioritized.
44        ALARMS = 6;
45        // Media, system, game (catch-all for non-never suppressible sounds) are
46        // prioritized.
47        MEDIA_SYSTEM_OTHER = 7;
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        SCREEN_OFF = 1;
68        // Whether notifications suppressed by DND should not interrupt visually
69        // when the screen is on (e.g. by peeking onto the screen).
70        SCREEN_ON = 2;
71    }
72    repeated SuppressedVisualEffect suppressed_visual_effects = 4;
73}
74