blob: babbef06fa8d00496de011683598a1a8a4e2c3aa [file] [log] [blame]
Netta P958d0a52017-02-07 11:20:55 -08001/*
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
Yi Jinc7f93072017-09-29 15:29:38 -070017syntax = "proto2";
Kweku Adamse6b00c22017-10-23 16:46:45 -070018package com.android.server.power;
Netta P958d0a52017-02-07 11:20:55 -080019
20option java_multiple_files = true;
Netta P958d0a52017-02-07 11:20:55 -080021
Bookatzdb026a22018-01-10 19:01:56 -080022import "frameworks/base/core/proto/android/app/enums.proto";
Kweku Adamse6b00c22017-10-23 16:46:45 -070023import "frameworks/base/core/proto/android/content/intent.proto";
24import "frameworks/base/core/proto/android/os/batterymanager.proto";
Netta P958d0a52017-02-07 11:20:55 -080025import "frameworks/base/core/proto/android/os/looper.proto";
Kweku Adamse6b00c22017-10-23 16:46:45 -070026import "frameworks/base/core/proto/android/os/powermanager.proto";
Netta P958d0a52017-02-07 11:20:55 -080027import "frameworks/base/core/proto/android/os/worksource.proto";
Kweku Adamse6b00c22017-10-23 16:46:45 -070028import "frameworks/base/core/proto/android/providers/settings.proto";
29import "frameworks/base/core/proto/android/server/wirelesschargerdetector.proto";
30import "frameworks/base/core/proto/android/view/display.proto";
Kweku Adams80b83072018-01-23 20:06:15 -080031import "frameworks/base/libs/incident/proto/android/privacy.proto";
Netta P958d0a52017-02-07 11:20:55 -080032
Kweku Adamse6b00c22017-10-23 16:46:45 -070033message PowerManagerServiceDumpProto {
Kweku Adams80b83072018-01-23 20:06:15 -080034 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
35
Kweku Adams32198522017-10-25 15:12:34 -070036 // A com.android.server.power.PowerManagerService.Constants object.
Netta P958d0a52017-02-07 11:20:55 -080037 message ConstantsProto {
Kweku Adams80b83072018-01-23 20:06:15 -080038 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
39
Yi Jinc7f93072017-09-29 15:29:38 -070040 optional bool is_no_cached_wake_locks = 1;
Netta P958d0a52017-02-07 11:20:55 -080041 }
42 message ActiveWakeLocksProto {
Kweku Adams80b83072018-01-23 20:06:15 -080043 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
44
Yi Jinc7f93072017-09-29 15:29:38 -070045 optional bool is_cpu = 1;
46 optional bool is_screen_bright = 2;
47 optional bool is_screen_dim = 3;
48 optional bool is_button_bright = 4;
49 optional bool is_proximity_screen_off = 5;
Netta P958d0a52017-02-07 11:20:55 -080050 // only set if already awake
Yi Jinc7f93072017-09-29 15:29:38 -070051 optional bool is_stay_awake = 6;
52 optional bool is_doze = 7;
53 optional bool is_draw = 8;
Netta P958d0a52017-02-07 11:20:55 -080054 }
55 message UserActivityProto {
Kweku Adams80b83072018-01-23 20:06:15 -080056 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
57
Yi Jinc7f93072017-09-29 15:29:38 -070058 optional bool is_screen_bright = 1;
59 optional bool is_screen_dim = 2;
60 optional bool is_screen_dream = 3;
Netta P958d0a52017-02-07 11:20:55 -080061 }
Kweku Adams32198522017-10-25 15:12:34 -070062 // A com.android.server.power.PowerManagerService.UidState object.
63 message UidStateProto {
Kweku Adams80b83072018-01-23 20:06:15 -080064 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
65
Yi Jinc7f93072017-09-29 15:29:38 -070066 optional int32 uid = 1;
67 optional string uid_string = 2;
68 optional bool is_active = 3;
69 optional int32 num_wake_locks = 4;
Bookatzdb026a22018-01-10 19:01:56 -080070 optional .android.app.ProcessStateEnum process_state = 5;
Netta P958d0a52017-02-07 11:20:55 -080071 }
72
Yi Jinc7f93072017-09-29 15:29:38 -070073 optional ConstantsProto constants = 1;
Netta P958d0a52017-02-07 11:20:55 -080074 // A bitfield that indicates what parts of the power state have
75 // changed and need to be recalculated.
Yi Jinc7f93072017-09-29 15:29:38 -070076 optional int32 dirty = 2;
Netta P958d0a52017-02-07 11:20:55 -080077 // Indicates whether the device is awake or asleep or somewhere in between.
Kweku Adamse6b00c22017-10-23 16:46:45 -070078 optional .android.os.PowerManagerInternalProto.Wakefulness wakefulness = 3;
Yi Jinc7f93072017-09-29 15:29:38 -070079 optional bool is_wakefulness_changing = 4;
Netta P958d0a52017-02-07 11:20:55 -080080 // True if the device is plugged into a power source.
Yi Jinc7f93072017-09-29 15:29:38 -070081 optional bool is_powered = 5;
Netta P958d0a52017-02-07 11:20:55 -080082 // The current plug type
Kweku Adamse6b00c22017-10-23 16:46:45 -070083 optional .android.os.BatteryManagerProto.PlugType plug_type = 6;
Netta P958d0a52017-02-07 11:20:55 -080084 // The current battery level percentage.
Yi Jinc7f93072017-09-29 15:29:38 -070085 optional int32 battery_level = 7;
Netta P958d0a52017-02-07 11:20:55 -080086 // The battery level percentage at the time the dream started.
Yi Jinc7f93072017-09-29 15:29:38 -070087 optional int32 battery_level_when_dream_started = 8;
Netta P958d0a52017-02-07 11:20:55 -080088 // The current dock state.
Kweku Adamse6b00c22017-10-23 16:46:45 -070089 optional .android.content.IntentProto.DockState dock_state = 9;
Netta P958d0a52017-02-07 11:20:55 -080090 // True if the device should stay on.
Yi Jinc7f93072017-09-29 15:29:38 -070091 optional bool is_stay_on = 10;
Netta P958d0a52017-02-07 11:20:55 -080092 // True if the proximity sensor reads a positive result.
Yi Jinc7f93072017-09-29 15:29:38 -070093 optional bool is_proximity_positive = 11;
Netta P958d0a52017-02-07 11:20:55 -080094 // True if boot completed occurred. We keep the screen on until this happens.
Yi Jinc7f93072017-09-29 15:29:38 -070095 optional bool is_boot_completed = 12;
Netta P958d0a52017-02-07 11:20:55 -080096 // True if systemReady() has been called.
Yi Jinc7f93072017-09-29 15:29:38 -070097 optional bool is_system_ready = 13;
Netta P958d0a52017-02-07 11:20:55 -080098 // True if auto-suspend mode is enabled.
Yi Jinc7f93072017-09-29 15:29:38 -070099 optional bool is_hal_auto_suspend_mode_enabled = 14;
Netta P958d0a52017-02-07 11:20:55 -0800100 // True if interactive mode is enabled.
Yi Jinc7f93072017-09-29 15:29:38 -0700101 optional bool is_hal_auto_interactive_mode_enabled = 15;
Netta P958d0a52017-02-07 11:20:55 -0800102 // Summarizes the state of all active wakelocks.
Yi Jinc7f93072017-09-29 15:29:38 -0700103 optional ActiveWakeLocksProto active_wake_locks = 16;
Netta P958d0a52017-02-07 11:20:55 -0800104 // Have we scheduled a message to check for long wake locks? This is when
105 // we will check. (In milliseconds timestamp)
Yi Jinc7f93072017-09-29 15:29:38 -0700106 optional int64 notify_long_scheduled_ms = 17;
Netta P958d0a52017-02-07 11:20:55 -0800107 // Last time we checked for long wake locks. (In milliseconds timestamp)
Yi Jinc7f93072017-09-29 15:29:38 -0700108 optional int64 notify_long_dispatched_ms = 18;
Netta P958d0a52017-02-07 11:20:55 -0800109 // The time we decided to do next long check. (In milliseconds timestamp)
Yi Jinc7f93072017-09-29 15:29:38 -0700110 optional int64 notify_long_next_check_ms = 19;
Netta P958d0a52017-02-07 11:20:55 -0800111 // Summarizes the effect of the user activity timer.
Yi Jinc7f93072017-09-29 15:29:38 -0700112 optional UserActivityProto user_activity = 20;
Netta P958d0a52017-02-07 11:20:55 -0800113 // If true, instructs the display controller to wait for the proximity
114 // sensor to go negative before turning the screen on.
Yi Jinc7f93072017-09-29 15:29:38 -0700115 optional bool is_request_wait_for_negative_proximity = 21;
Netta P958d0a52017-02-07 11:20:55 -0800116 // True if MSG_SANDMAN has been scheduled.
Yi Jinc7f93072017-09-29 15:29:38 -0700117 optional bool is_sandman_scheduled = 22;
Netta P958d0a52017-02-07 11:20:55 -0800118 // True if the sandman has just been summoned for the first time since entering
119 // the dreaming or dozing state. Indicates whether a new dream should begin.
Yi Jinc7f93072017-09-29 15:29:38 -0700120 optional bool is_sandman_summoned = 23;
Netta P958d0a52017-02-07 11:20:55 -0800121 // If true, the device is in low power mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700122 optional bool is_low_power_mode_enabled = 24;
Netta P958d0a52017-02-07 11:20:55 -0800123 // True if the battery level is currently considered low.
Yi Jinc7f93072017-09-29 15:29:38 -0700124 optional bool is_battery_level_low = 25;
Netta P958d0a52017-02-07 11:20:55 -0800125 // True if we are currently in light device idle mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700126 optional bool is_light_device_idle_mode = 26;
Netta P958d0a52017-02-07 11:20:55 -0800127 // True if we are currently in device idle mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700128 optional bool is_device_idle_mode = 27;
Netta P958d0a52017-02-07 11:20:55 -0800129 // Set of app ids that we will always respect the wake locks for.
130 repeated int32 device_idle_whitelist = 28;
131 // Set of app ids that are temporarily allowed to acquire wakelocks due to
132 // high-pri message
133 repeated int32 device_idle_temp_whitelist = 29;
134 // Timestamp of the last time the device was awoken.
Yi Jinc7f93072017-09-29 15:29:38 -0700135 optional int64 last_wake_time_ms = 30;
Netta P958d0a52017-02-07 11:20:55 -0800136 // Timestamp of the last time the device was put to sleep.
Yi Jinc7f93072017-09-29 15:29:38 -0700137 optional int64 last_sleep_time_ms = 31;
Netta P958d0a52017-02-07 11:20:55 -0800138 // Timestamp of the last call to user activity.
Yi Jinc7f93072017-09-29 15:29:38 -0700139 optional int64 last_user_activity_time_ms = 32;
140 optional int64 last_user_activity_time_no_change_lights_ms = 33;
Netta P958d0a52017-02-07 11:20:55 -0800141 // Timestamp of last interactive power hint.
Yi Jinc7f93072017-09-29 15:29:38 -0700142 optional int64 last_interactive_power_hint_time_ms = 34;
Netta P958d0a52017-02-07 11:20:55 -0800143 // Timestamp of the last screen brightness boost.
Yi Jinc7f93072017-09-29 15:29:38 -0700144 optional int64 last_screen_brightness_boost_time_ms = 35;
Netta P958d0a52017-02-07 11:20:55 -0800145 // True if screen brightness boost is in progress.
Yi Jinc7f93072017-09-29 15:29:38 -0700146 optional bool is_screen_brightness_boost_in_progress = 36;
Netta P958d0a52017-02-07 11:20:55 -0800147 // True if the display power state has been fully applied, which means the
148 // display is actually on or actually off or whatever was requested.
Yi Jinc7f93072017-09-29 15:29:38 -0700149 optional bool is_display_ready = 37;
Netta P958d0a52017-02-07 11:20:55 -0800150 // True if the wake lock suspend blocker has been acquired.
Yi Jinc7f93072017-09-29 15:29:38 -0700151 optional bool is_holding_wake_lock_suspend_blocker = 38;
Netta P958d0a52017-02-07 11:20:55 -0800152 // The suspend blocker used to keep the CPU alive when the display is on, the
153 // display is getting ready or there is user activity (in which case the
154 // display must be on).
Yi Jinc7f93072017-09-29 15:29:38 -0700155 optional bool is_holding_display_suspend_blocker = 39;
Netta P958d0a52017-02-07 11:20:55 -0800156 // Settings and configuration
Yi Jinc7f93072017-09-29 15:29:38 -0700157 optional PowerServiceSettingsAndConfigurationDumpProto settings_and_configuration = 40;
Kweku Adamsf21597c2017-11-13 19:49:37 -0800158 // Sleep timeout in ms. This can be -1.
Yi Jinc7f93072017-09-29 15:29:38 -0700159 optional sint32 sleep_timeout_ms = 41;
Netta P958d0a52017-02-07 11:20:55 -0800160 // Screen off timeout in ms
Yi Jinc7f93072017-09-29 15:29:38 -0700161 optional int32 screen_off_timeout_ms = 42;
Netta P958d0a52017-02-07 11:20:55 -0800162 // Screen dim duration in ms
Yi Jinc7f93072017-09-29 15:29:38 -0700163 optional int32 screen_dim_duration_ms = 43;
Netta P958d0a52017-02-07 11:20:55 -0800164 // We are currently in the middle of a batch change of uids.
Yi Jinc7f93072017-09-29 15:29:38 -0700165 optional bool are_uids_changing = 44;
Netta P958d0a52017-02-07 11:20:55 -0800166 // Some uids have actually changed while mUidsChanging was true.
Yi Jinc7f93072017-09-29 15:29:38 -0700167 optional bool are_uids_changed = 45;
Netta P958d0a52017-02-07 11:20:55 -0800168 // List of UIDs and their states
Kweku Adams32198522017-10-25 15:12:34 -0700169 repeated UidStateProto uid_states = 46;
Kweku Adamse6b00c22017-10-23 16:46:45 -0700170 optional .android.os.LooperProto looper = 47;
Netta P958d0a52017-02-07 11:20:55 -0800171 // List of all wake locks acquired by applications.
172 repeated WakeLockProto wake_locks = 48;
173 // List of all suspend blockers.
174 repeated SuspendBlockerProto suspend_blockers = 49;
Yi Jinc7f93072017-09-29 15:29:38 -0700175 optional WirelessChargerDetectorProto wireless_charger_detector = 50;
Netta P958d0a52017-02-07 11:20:55 -0800176}
177
Kweku Adams32198522017-10-25 15:12:34 -0700178// A com.android.server.power.PowerManagerService.SuspendBlockerImpl object.
Netta P958d0a52017-02-07 11:20:55 -0800179message SuspendBlockerProto {
Kweku Adams80b83072018-01-23 20:06:15 -0800180 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
181
Yi Jinc7f93072017-09-29 15:29:38 -0700182 optional string name = 1;
183 optional int32 reference_count = 2;
Netta P958d0a52017-02-07 11:20:55 -0800184}
185
Kweku Adams32198522017-10-25 15:12:34 -0700186// A com.android.server.power.PowerManagerService.WakeLock object.
Netta P958d0a52017-02-07 11:20:55 -0800187message WakeLockProto {
Kweku Adams80b83072018-01-23 20:06:15 -0800188 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
189
Netta P958d0a52017-02-07 11:20:55 -0800190 message WakeLockFlagsProto {
Kweku Adams80b83072018-01-23 20:06:15 -0800191 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
192
Netta P958d0a52017-02-07 11:20:55 -0800193 // Turn the screen on when the wake lock is acquired.
Yi Jinc7f93072017-09-29 15:29:38 -0700194 optional bool is_acquire_causes_wakeup = 1;
Netta P958d0a52017-02-07 11:20:55 -0800195 // When this wake lock is released, poke the user activity timer
196 // so the screen stays on for a little longer.
Yi Jinc7f93072017-09-29 15:29:38 -0700197 optional bool is_on_after_release = 2;
Netta P958d0a52017-02-07 11:20:55 -0800198 }
199
Kweku Adamse6b00c22017-10-23 16:46:45 -0700200 optional .android.os.PowerManagerProto.WakeLockLevel lock_level = 1;
Kweku Adams80b83072018-01-23 20:06:15 -0800201 optional string tag = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
Yi Jinc7f93072017-09-29 15:29:38 -0700202 optional WakeLockFlagsProto flags = 3;
203 optional bool is_disabled = 4;
Netta P958d0a52017-02-07 11:20:55 -0800204 // Acquire time in ms
Yi Jinc7f93072017-09-29 15:29:38 -0700205 optional int64 acq_ms = 5;
206 optional bool is_notified_long = 6;
Netta P958d0a52017-02-07 11:20:55 -0800207 // Owner UID
Yi Jinc7f93072017-09-29 15:29:38 -0700208 optional int32 uid = 7;
Netta P958d0a52017-02-07 11:20:55 -0800209 // Owner PID
Yi Jinc7f93072017-09-29 15:29:38 -0700210 optional int32 pid = 8;
Kweku Adamse6b00c22017-10-23 16:46:45 -0700211 optional .android.os.WorkSourceProto work_source = 9;
Netta P958d0a52017-02-07 11:20:55 -0800212}
213
214message PowerServiceSettingsAndConfigurationDumpProto {
Kweku Adams80b83072018-01-23 20:06:15 -0800215 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
216
Netta P958d0a52017-02-07 11:20:55 -0800217 message StayOnWhilePluggedInProto {
Kweku Adams80b83072018-01-23 20:06:15 -0800218 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
219
Yi Jinc7f93072017-09-29 15:29:38 -0700220 optional bool is_stay_on_while_plugged_in_ac = 1;
221 optional bool is_stay_on_while_plugged_in_usb = 2;
222 optional bool is_stay_on_while_plugged_in_wireless = 3;
Netta P958d0a52017-02-07 11:20:55 -0800223 }
224 message ScreenBrightnessSettingLimitsProto {
Kweku Adams80b83072018-01-23 20:06:15 -0800225 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
226
Yi Jinc7f93072017-09-29 15:29:38 -0700227 optional int32 setting_minimum = 1;
228 optional int32 setting_maximum = 2;
229 optional int32 setting_default = 3;
230 optional int32 setting_for_vr_default = 4;
Netta P958d0a52017-02-07 11:20:55 -0800231 }
232
Netta P958d0a52017-02-07 11:20:55 -0800233 // True to decouple auto-suspend mode from the display state.
Yi Jinc7f93072017-09-29 15:29:38 -0700234 optional bool is_decouple_hal_auto_suspend_mode_from_display_config = 1;
Netta P958d0a52017-02-07 11:20:55 -0800235 // True to decouple interactive mode from the display state.
Yi Jinc7f93072017-09-29 15:29:38 -0700236 optional bool is_decouple_hal_interactive_mode_from_display_config = 2;
Netta P958d0a52017-02-07 11:20:55 -0800237 // True if the device should wake up when plugged or unplugged.
Yi Jinc7f93072017-09-29 15:29:38 -0700238 optional bool is_wake_up_when_plugged_or_unplugged_config = 3;
Netta P958d0a52017-02-07 11:20:55 -0800239 // True if the device should wake up when plugged or unplugged in theater mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700240 optional bool is_wake_up_when_plugged_or_unplugged_in_theater_mode_config = 4;
Netta P958d0a52017-02-07 11:20:55 -0800241 // True if theater mode is enabled
Yi Jinc7f93072017-09-29 15:29:38 -0700242 optional bool is_theater_mode_enabled = 5;
Netta P958d0a52017-02-07 11:20:55 -0800243 // True if the device should suspend when the screen is off due to proximity.
Yi Jinc7f93072017-09-29 15:29:38 -0700244 optional bool is_suspend_when_screen_off_due_to_proximity_config = 6;
Netta P958d0a52017-02-07 11:20:55 -0800245 // True if dreams are supported on this device.
Yi Jinc7f93072017-09-29 15:29:38 -0700246 optional bool are_dreams_supported_config = 7;
Netta P958d0a52017-02-07 11:20:55 -0800247 // Default value for dreams enabled
Yi Jinc7f93072017-09-29 15:29:38 -0700248 optional bool are_dreams_enabled_by_default_config = 8;
Netta P958d0a52017-02-07 11:20:55 -0800249 // Default value for dreams activate-on-sleep
Yi Jinc7f93072017-09-29 15:29:38 -0700250 optional bool are_dreams_activated_on_sleep_by_default_config = 9;
Netta P958d0a52017-02-07 11:20:55 -0800251 // Default value for dreams activate-on-dock
Yi Jinc7f93072017-09-29 15:29:38 -0700252 optional bool are_dreams_activated_on_dock_by_default_config = 10;
Netta P958d0a52017-02-07 11:20:55 -0800253 // True if dreams can run while not plugged in.
Yi Jinc7f93072017-09-29 15:29:38 -0700254 optional bool are_dreams_enabled_on_battery_config = 11;
Netta P958d0a52017-02-07 11:20:55 -0800255 // Minimum battery level to allow dreaming when powered.
256 // Use -1 to disable this safety feature.
Yi Jinc7f93072017-09-29 15:29:38 -0700257 optional sint32 dreams_battery_level_minimum_when_powered_config = 12;
Netta P958d0a52017-02-07 11:20:55 -0800258 // Minimum battery level to allow dreaming when not powered.
259 // Use -1 to disable this safety feature.
Yi Jinc7f93072017-09-29 15:29:38 -0700260 optional sint32 dreams_battery_level_minimum_when_not_powered_config = 13;
Netta P958d0a52017-02-07 11:20:55 -0800261 // If the battery level drops by this percentage and the user activity
262 // timeout has expired, then assume the device is receiving insufficient
263 // current to charge effectively and terminate the dream. Use -1 to disable
264 // this safety feature.
Yi Jinc7f93072017-09-29 15:29:38 -0700265 optional sint32 dreams_battery_level_drain_cutoff_config = 14;
Netta P958d0a52017-02-07 11:20:55 -0800266 // True if dreams are enabled by the user.
Yi Jinc7f93072017-09-29 15:29:38 -0700267 optional bool are_dreams_enabled_setting = 15;
Netta P958d0a52017-02-07 11:20:55 -0800268 // True if dreams should be activated on sleep.
Yi Jinc7f93072017-09-29 15:29:38 -0700269 optional bool are_dreams_activate_on_sleep_setting = 16;
Netta P958d0a52017-02-07 11:20:55 -0800270 // True if dreams should be activated on dock.
Yi Jinc7f93072017-09-29 15:29:38 -0700271 optional bool are_dreams_activate_on_dock_setting = 17;
Netta P958d0a52017-02-07 11:20:55 -0800272 // True if doze should not be started until after the screen off transition.
Yi Jinc7f93072017-09-29 15:29:38 -0700273 optional bool is_doze_after_screen_off_config = 18;
Netta P958d0a52017-02-07 11:20:55 -0800274 // If true, the device is in low power mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700275 optional bool is_low_power_mode_setting = 19;
Netta P958d0a52017-02-07 11:20:55 -0800276 // Current state of whether the settings are allowing auto low power mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700277 optional bool is_auto_low_power_mode_configured = 20;
Netta P958d0a52017-02-07 11:20:55 -0800278 // The user turned off low power mode below the trigger level
Yi Jinc7f93072017-09-29 15:29:38 -0700279 optional bool is_auto_low_power_mode_snoozing = 21;
Netta P958d0a52017-02-07 11:20:55 -0800280 // The minimum screen off timeout, in milliseconds.
Yi Jinc7f93072017-09-29 15:29:38 -0700281 optional int32 minimum_screen_off_timeout_config_ms = 22;
Netta P958d0a52017-02-07 11:20:55 -0800282 // The screen dim duration, in milliseconds.
Yi Jinc7f93072017-09-29 15:29:38 -0700283 optional int32 maximum_screen_dim_duration_config_ms = 23;
Netta P958d0a52017-02-07 11:20:55 -0800284 // The maximum screen dim time expressed as a ratio relative to the screen off timeout.
Yi Jinc7f93072017-09-29 15:29:38 -0700285 optional float maximum_screen_dim_ratio_config = 24;
Netta P958d0a52017-02-07 11:20:55 -0800286 // The screen off timeout setting value in milliseconds.
Yi Jinc7f93072017-09-29 15:29:38 -0700287 optional int32 screen_off_timeout_setting_ms = 25;
Kweku Adamsf21597c2017-11-13 19:49:37 -0800288 // The sleep timeout setting value in milliseconds. Default value is -1.
Yi Jinc7f93072017-09-29 15:29:38 -0700289 optional sint32 sleep_timeout_setting_ms = 26;
Netta P958d0a52017-02-07 11:20:55 -0800290 // The maximum allowable screen off timeout according to the device administration policy.
Yi Jinc7f93072017-09-29 15:29:38 -0700291 optional int32 maximum_screen_off_timeout_from_device_admin_ms = 27;
292 optional bool is_maximum_screen_off_timeout_from_device_admin_enforced_locked = 28;
Netta P958d0a52017-02-07 11:20:55 -0800293 // The stay on while plugged in setting.
294 // A set of battery conditions under which to make the screen stay on.
Yi Jinc7f93072017-09-29 15:29:38 -0700295 optional StayOnWhilePluggedInProto stay_on_while_plugged_in = 29;
Netta P958d0a52017-02-07 11:20:55 -0800296 // The screen brightness setting, from 0 to 255.
297 // Use -1 if no value has been set.
Yi Jinc7f93072017-09-29 15:29:38 -0700298 optional sint32 screen_brightness_setting = 30;
Netta P958d0a52017-02-07 11:20:55 -0800299 // The screen auto-brightness adjustment setting, from -1 to 1.
300 // Use 0 if there is no adjustment.
Yi Jinc7f93072017-09-29 15:29:38 -0700301 optional float screen_auto_brightness_adjustment_setting = 31;
Netta P958d0a52017-02-07 11:20:55 -0800302 // The screen brightness mode.
Kweku Adamse6b00c22017-10-23 16:46:45 -0700303 optional .android.providers.settings.SettingsProto.ScreenBrightnessMode screen_brightness_mode_setting = 32;
Netta P958d0a52017-02-07 11:20:55 -0800304 // The screen brightness setting override from the window manager
305 // to allow the current foreground activity to override the brightness.
306 // Use -1 to disable.
Yi Jinc7f93072017-09-29 15:29:38 -0700307 optional sint32 screen_brightness_override_from_window_manager = 33;
Netta P958d0a52017-02-07 11:20:55 -0800308 // The user activity timeout override from the window manager
309 // to allow the current foreground activity to override the user activity
310 // timeout. Use -1 to disable.
Yi Jinc7f93072017-09-29 15:29:38 -0700311 optional sint64 user_activity_timeout_override_from_window_manager_ms = 34;
Netta P958d0a52017-02-07 11:20:55 -0800312 // The window manager has determined the user to be inactive via other means.
313 // Set this to false to disable.
Yi Jinc7f93072017-09-29 15:29:38 -0700314 optional bool is_user_inactive_override_from_window_manager = 35;
Netta P958d0a52017-02-07 11:20:55 -0800315 // The screen brightness setting override from the settings application
316 // to temporarily adjust the brightness until next updated,
317 // Use -1 to disable.
Yi Jinc7f93072017-09-29 15:29:38 -0700318 optional sint32 temporary_screen_brightness_setting_override = 36;
Netta P958d0a52017-02-07 11:20:55 -0800319 // The screen brightness adjustment setting override from the settings
320 // application to temporarily adjust the auto-brightness adjustment factor
321 // until next updated, in the range -1..1.
322 // Use NaN to disable.
Yi Jinc7f93072017-09-29 15:29:38 -0700323 optional float temporary_screen_auto_brightness_adjustment_setting_override = 37;
Netta P958d0a52017-02-07 11:20:55 -0800324 // The screen state to use while dozing.
Kweku Adamse6b00c22017-10-23 16:46:45 -0700325 optional .android.view.DisplayProto.DisplayState doze_screen_state_override_from_dream_manager = 38;
Netta P958d0a52017-02-07 11:20:55 -0800326 // The screen brightness to use while dozing.
Yi Jinc7f93072017-09-29 15:29:38 -0700327 optional float dozed_screen_brightness_override_from_dream_manager = 39;
Netta P958d0a52017-02-07 11:20:55 -0800328 // Screen brightness settings limits.
Yi Jinc7f93072017-09-29 15:29:38 -0700329 optional ScreenBrightnessSettingLimitsProto screen_brightness_setting_limits = 40;
Netta P958d0a52017-02-07 11:20:55 -0800330 // The screen brightness setting, from 0 to 255, to be used while in VR Mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700331 optional int32 screen_brightness_for_vr_setting = 41;
Netta P958d0a52017-02-07 11:20:55 -0800332 // True if double tap to wake is enabled
Yi Jinc7f93072017-09-29 15:29:38 -0700333 optional bool is_double_tap_wake_enabled = 42;
Netta P958d0a52017-02-07 11:20:55 -0800334 // True if we are currently in VR Mode.
Yi Jinc7f93072017-09-29 15:29:38 -0700335 optional bool is_vr_mode_enabled = 43;
Netta P958d0a52017-02-07 11:20:55 -0800336}