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.display;
20
21option java_outer_classname = "DisplayProtoEnums";
22option java_multiple_files = true;
23
24// Define ranges among 38 brightness buckets:
25// [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80,
26//   90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1200,
27//   1400, 1600, 1800, 2000, 2250, 2500, 2750, 3000, inf ]
28enum DisplayBrightnessRangeEnum {
29    // The display brightness is unknown.
30    RANGE_UNKNOWN = 0;
31    // The display brightness ranges from low to high.
32    RANGE_0_1 = 1;
33    RANGE_1_2 = 2;
34    RANGE_2_3 = 3;
35    RANGE_3_4 = 4;
36    RANGE_4_5 = 5;
37    RANGE_5_6 = 6;
38    RANGE_6_7 = 7;
39    RANGE_7_8 = 8;
40    RANGE_8_9 = 9;
41    RANGE_9_10 = 10;
42    RANGE_10_20 = 11;
43    RANGE_20_30 = 12;
44    RANGE_30_40 = 13;
45    RANGE_40_50 = 14;
46    RANGE_50_60 = 15;
47    RANGE_60_70 = 16;
48    RANGE_70_80 = 17;
49    RANGE_80_90 = 18;
50    RANGE_90_100 = 19;
51    RANGE_100_200 = 20;
52    RANGE_200_300 = 21;
53    RANGE_300_400 = 22;
54    RANGE_400_500 = 23;
55    RANGE_500_600 = 24;
56    RANGE_600_700 = 25;
57    RANGE_700_800 = 26;
58    RANGE_800_900 = 27;
59    RANGE_900_1000 = 28;
60    RANGE_1000_1200 = 29;
61    RANGE_1200_1400 = 30;
62    RANGE_1400_1600 = 31;
63    RANGE_1600_1800 = 32;
64    RANGE_1800_2000 = 33;
65    RANGE_2000_2250 = 34;
66    RANGE_2250_2500 = 35;
67    RANGE_2500_2750 = 36;
68    RANGE_2750_3000 = 37;
69    RANGE_3000_INF = 38;
70}
71
72// The original definition of this enum comes from
73// frameworks/base/services/core/java/com/android/server/display/brightness/BrightnessReason.java
74enum DisplayBrightnessChangeReasonEnum {
75    REASON_UNKNOWN = 0;
76    REASON_MANUAL = 1;
77    REASON_DOZE = 2;
78    REASON_DOZE_DEFAULT = 3;
79    REASON_AUTOMATIC = 4;
80    REASON_SCREEN_OFF = 5;
81    REASON_OVERRIDE = 6;
82    REASON_TEMPORARY = 7;
83    REASON_BOOST = 8;
84    REASON_SCREEN_OFF_BRIGHTNESS_SENSOR = 9;
85    REASON_FOLLOWER = 10;
86    REASON_OFFLOAD = 11;
87    REASON_DOZE_MANUAL = 12;
88}
89
90// Contains vote different statuses.
91// Logged in DisplayModeDirectorVoteChanged atom.
92enum DisplayModeDirectorVoteStatus {
93    STATUS_UNKNOWN = 0;
94    STATUS_ADDED = 1;
95    STATUS_ACTIVE = 2;
96    STATUS_REMOVED = 3;
97}
98