Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 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 | |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 17 | syntax = "proto2"; |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 18 | package com.android.server.power; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 19 | |
| 20 | option java_multiple_files = true; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 21 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame^] | 22 | import "frameworks/base/core/proto/android/app/enums.proto"; |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 23 | import "frameworks/base/core/proto/android/content/intent.proto"; |
| 24 | import "frameworks/base/core/proto/android/os/batterymanager.proto"; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 25 | import "frameworks/base/core/proto/android/os/looper.proto"; |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 26 | import "frameworks/base/core/proto/android/os/powermanager.proto"; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 27 | import "frameworks/base/core/proto/android/os/worksource.proto"; |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 28 | import "frameworks/base/core/proto/android/providers/settings.proto"; |
| 29 | import "frameworks/base/core/proto/android/server/wirelesschargerdetector.proto"; |
| 30 | import "frameworks/base/core/proto/android/view/display.proto"; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 31 | |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 32 | message PowerManagerServiceDumpProto { |
Kweku Adams | 3219852 | 2017-10-25 15:12:34 -0700 | [diff] [blame] | 33 | // A com.android.server.power.PowerManagerService.Constants object. |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 34 | message ConstantsProto { |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 35 | optional bool is_no_cached_wake_locks = 1; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 36 | } |
| 37 | message ActiveWakeLocksProto { |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 38 | optional bool is_cpu = 1; |
| 39 | optional bool is_screen_bright = 2; |
| 40 | optional bool is_screen_dim = 3; |
| 41 | optional bool is_button_bright = 4; |
| 42 | optional bool is_proximity_screen_off = 5; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 43 | // only set if already awake |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 44 | optional bool is_stay_awake = 6; |
| 45 | optional bool is_doze = 7; |
| 46 | optional bool is_draw = 8; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 47 | } |
| 48 | message UserActivityProto { |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 49 | optional bool is_screen_bright = 1; |
| 50 | optional bool is_screen_dim = 2; |
| 51 | optional bool is_screen_dream = 3; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 52 | } |
Kweku Adams | 3219852 | 2017-10-25 15:12:34 -0700 | [diff] [blame] | 53 | // A com.android.server.power.PowerManagerService.UidState object. |
| 54 | message UidStateProto { |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 55 | optional int32 uid = 1; |
| 56 | optional string uid_string = 2; |
| 57 | optional bool is_active = 3; |
| 58 | optional int32 num_wake_locks = 4; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame^] | 59 | optional .android.app.ProcessStateEnum process_state = 5; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 60 | } |
| 61 | |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 62 | optional ConstantsProto constants = 1; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 63 | // A bitfield that indicates what parts of the power state have |
| 64 | // changed and need to be recalculated. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 65 | optional int32 dirty = 2; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 66 | // Indicates whether the device is awake or asleep or somewhere in between. |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 67 | optional .android.os.PowerManagerInternalProto.Wakefulness wakefulness = 3; |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 68 | optional bool is_wakefulness_changing = 4; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 69 | // True if the device is plugged into a power source. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 70 | optional bool is_powered = 5; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 71 | // The current plug type |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 72 | optional .android.os.BatteryManagerProto.PlugType plug_type = 6; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 73 | // The current battery level percentage. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 74 | optional int32 battery_level = 7; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 75 | // The battery level percentage at the time the dream started. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 76 | optional int32 battery_level_when_dream_started = 8; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 77 | // The current dock state. |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 78 | optional .android.content.IntentProto.DockState dock_state = 9; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 79 | // True if the device should stay on. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 80 | optional bool is_stay_on = 10; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 81 | // True if the proximity sensor reads a positive result. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 82 | optional bool is_proximity_positive = 11; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 83 | // True if boot completed occurred. We keep the screen on until this happens. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 84 | optional bool is_boot_completed = 12; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 85 | // True if systemReady() has been called. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 86 | optional bool is_system_ready = 13; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 87 | // True if auto-suspend mode is enabled. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 88 | optional bool is_hal_auto_suspend_mode_enabled = 14; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 89 | // True if interactive mode is enabled. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 90 | optional bool is_hal_auto_interactive_mode_enabled = 15; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 91 | // Summarizes the state of all active wakelocks. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 92 | optional ActiveWakeLocksProto active_wake_locks = 16; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 93 | // Have we scheduled a message to check for long wake locks? This is when |
| 94 | // we will check. (In milliseconds timestamp) |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 95 | optional int64 notify_long_scheduled_ms = 17; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 96 | // Last time we checked for long wake locks. (In milliseconds timestamp) |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 97 | optional int64 notify_long_dispatched_ms = 18; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 98 | // The time we decided to do next long check. (In milliseconds timestamp) |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 99 | optional int64 notify_long_next_check_ms = 19; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 100 | // Summarizes the effect of the user activity timer. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 101 | optional UserActivityProto user_activity = 20; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 102 | // If true, instructs the display controller to wait for the proximity |
| 103 | // sensor to go negative before turning the screen on. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 104 | optional bool is_request_wait_for_negative_proximity = 21; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 105 | // True if MSG_SANDMAN has been scheduled. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 106 | optional bool is_sandman_scheduled = 22; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 107 | // True if the sandman has just been summoned for the first time since entering |
| 108 | // the dreaming or dozing state. Indicates whether a new dream should begin. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 109 | optional bool is_sandman_summoned = 23; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 110 | // If true, the device is in low power mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 111 | optional bool is_low_power_mode_enabled = 24; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 112 | // True if the battery level is currently considered low. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 113 | optional bool is_battery_level_low = 25; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 114 | // True if we are currently in light device idle mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 115 | optional bool is_light_device_idle_mode = 26; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 116 | // True if we are currently in device idle mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 117 | optional bool is_device_idle_mode = 27; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 118 | // Set of app ids that we will always respect the wake locks for. |
| 119 | repeated int32 device_idle_whitelist = 28; |
| 120 | // Set of app ids that are temporarily allowed to acquire wakelocks due to |
| 121 | // high-pri message |
| 122 | repeated int32 device_idle_temp_whitelist = 29; |
| 123 | // Timestamp of the last time the device was awoken. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 124 | optional int64 last_wake_time_ms = 30; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 125 | // Timestamp of the last time the device was put to sleep. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 126 | optional int64 last_sleep_time_ms = 31; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 127 | // Timestamp of the last call to user activity. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 128 | optional int64 last_user_activity_time_ms = 32; |
| 129 | optional int64 last_user_activity_time_no_change_lights_ms = 33; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 130 | // Timestamp of last interactive power hint. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 131 | optional int64 last_interactive_power_hint_time_ms = 34; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 132 | // Timestamp of the last screen brightness boost. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 133 | optional int64 last_screen_brightness_boost_time_ms = 35; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 134 | // True if screen brightness boost is in progress. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 135 | optional bool is_screen_brightness_boost_in_progress = 36; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 136 | // True if the display power state has been fully applied, which means the |
| 137 | // display is actually on or actually off or whatever was requested. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 138 | optional bool is_display_ready = 37; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 139 | // True if the wake lock suspend blocker has been acquired. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 140 | optional bool is_holding_wake_lock_suspend_blocker = 38; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 141 | // The suspend blocker used to keep the CPU alive when the display is on, the |
| 142 | // display is getting ready or there is user activity (in which case the |
| 143 | // display must be on). |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 144 | optional bool is_holding_display_suspend_blocker = 39; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 145 | // Settings and configuration |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 146 | optional PowerServiceSettingsAndConfigurationDumpProto settings_and_configuration = 40; |
Kweku Adams | f21597c | 2017-11-13 19:49:37 -0800 | [diff] [blame] | 147 | // Sleep timeout in ms. This can be -1. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 148 | optional sint32 sleep_timeout_ms = 41; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 149 | // Screen off timeout in ms |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 150 | optional int32 screen_off_timeout_ms = 42; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 151 | // Screen dim duration in ms |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 152 | optional int32 screen_dim_duration_ms = 43; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 153 | // We are currently in the middle of a batch change of uids. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 154 | optional bool are_uids_changing = 44; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 155 | // Some uids have actually changed while mUidsChanging was true. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 156 | optional bool are_uids_changed = 45; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 157 | // List of UIDs and their states |
Kweku Adams | 3219852 | 2017-10-25 15:12:34 -0700 | [diff] [blame] | 158 | repeated UidStateProto uid_states = 46; |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 159 | optional .android.os.LooperProto looper = 47; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 160 | // List of all wake locks acquired by applications. |
| 161 | repeated WakeLockProto wake_locks = 48; |
| 162 | // List of all suspend blockers. |
| 163 | repeated SuspendBlockerProto suspend_blockers = 49; |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 164 | optional WirelessChargerDetectorProto wireless_charger_detector = 50; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 165 | } |
| 166 | |
Kweku Adams | 3219852 | 2017-10-25 15:12:34 -0700 | [diff] [blame] | 167 | // A com.android.server.power.PowerManagerService.SuspendBlockerImpl object. |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 168 | message SuspendBlockerProto { |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 169 | optional string name = 1; |
| 170 | optional int32 reference_count = 2; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 171 | } |
| 172 | |
Kweku Adams | 3219852 | 2017-10-25 15:12:34 -0700 | [diff] [blame] | 173 | // A com.android.server.power.PowerManagerService.WakeLock object. |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 174 | message WakeLockProto { |
| 175 | message WakeLockFlagsProto { |
| 176 | // Turn the screen on when the wake lock is acquired. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 177 | optional bool is_acquire_causes_wakeup = 1; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 178 | // When this wake lock is released, poke the user activity timer |
| 179 | // so the screen stays on for a little longer. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 180 | optional bool is_on_after_release = 2; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 181 | } |
| 182 | |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 183 | optional .android.os.PowerManagerProto.WakeLockLevel lock_level = 1; |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 184 | optional string tag = 2; |
| 185 | optional WakeLockFlagsProto flags = 3; |
| 186 | optional bool is_disabled = 4; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 187 | // Acquire time in ms |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 188 | optional int64 acq_ms = 5; |
| 189 | optional bool is_notified_long = 6; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 190 | // Owner UID |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 191 | optional int32 uid = 7; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 192 | // Owner PID |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 193 | optional int32 pid = 8; |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 194 | optional .android.os.WorkSourceProto work_source = 9; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 195 | } |
| 196 | |
| 197 | message PowerServiceSettingsAndConfigurationDumpProto { |
| 198 | message StayOnWhilePluggedInProto { |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 199 | optional bool is_stay_on_while_plugged_in_ac = 1; |
| 200 | optional bool is_stay_on_while_plugged_in_usb = 2; |
| 201 | optional bool is_stay_on_while_plugged_in_wireless = 3; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 202 | } |
| 203 | message ScreenBrightnessSettingLimitsProto { |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 204 | optional int32 setting_minimum = 1; |
| 205 | optional int32 setting_maximum = 2; |
| 206 | optional int32 setting_default = 3; |
| 207 | optional int32 setting_for_vr_default = 4; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 208 | } |
| 209 | |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 210 | // True to decouple auto-suspend mode from the display state. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 211 | optional bool is_decouple_hal_auto_suspend_mode_from_display_config = 1; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 212 | // True to decouple interactive mode from the display state. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 213 | optional bool is_decouple_hal_interactive_mode_from_display_config = 2; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 214 | // True if the device should wake up when plugged or unplugged. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 215 | optional bool is_wake_up_when_plugged_or_unplugged_config = 3; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 216 | // True if the device should wake up when plugged or unplugged in theater mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 217 | optional bool is_wake_up_when_plugged_or_unplugged_in_theater_mode_config = 4; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 218 | // True if theater mode is enabled |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 219 | optional bool is_theater_mode_enabled = 5; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 220 | // True if the device should suspend when the screen is off due to proximity. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 221 | optional bool is_suspend_when_screen_off_due_to_proximity_config = 6; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 222 | // True if dreams are supported on this device. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 223 | optional bool are_dreams_supported_config = 7; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 224 | // Default value for dreams enabled |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 225 | optional bool are_dreams_enabled_by_default_config = 8; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 226 | // Default value for dreams activate-on-sleep |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 227 | optional bool are_dreams_activated_on_sleep_by_default_config = 9; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 228 | // Default value for dreams activate-on-dock |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 229 | optional bool are_dreams_activated_on_dock_by_default_config = 10; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 230 | // True if dreams can run while not plugged in. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 231 | optional bool are_dreams_enabled_on_battery_config = 11; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 232 | // Minimum battery level to allow dreaming when powered. |
| 233 | // Use -1 to disable this safety feature. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 234 | optional sint32 dreams_battery_level_minimum_when_powered_config = 12; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 235 | // Minimum battery level to allow dreaming when not powered. |
| 236 | // Use -1 to disable this safety feature. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 237 | optional sint32 dreams_battery_level_minimum_when_not_powered_config = 13; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 238 | // If the battery level drops by this percentage and the user activity |
| 239 | // timeout has expired, then assume the device is receiving insufficient |
| 240 | // current to charge effectively and terminate the dream. Use -1 to disable |
| 241 | // this safety feature. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 242 | optional sint32 dreams_battery_level_drain_cutoff_config = 14; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 243 | // True if dreams are enabled by the user. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 244 | optional bool are_dreams_enabled_setting = 15; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 245 | // True if dreams should be activated on sleep. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 246 | optional bool are_dreams_activate_on_sleep_setting = 16; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 247 | // True if dreams should be activated on dock. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 248 | optional bool are_dreams_activate_on_dock_setting = 17; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 249 | // True if doze should not be started until after the screen off transition. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 250 | optional bool is_doze_after_screen_off_config = 18; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 251 | // If true, the device is in low power mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 252 | optional bool is_low_power_mode_setting = 19; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 253 | // Current state of whether the settings are allowing auto low power mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 254 | optional bool is_auto_low_power_mode_configured = 20; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 255 | // The user turned off low power mode below the trigger level |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 256 | optional bool is_auto_low_power_mode_snoozing = 21; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 257 | // The minimum screen off timeout, in milliseconds. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 258 | optional int32 minimum_screen_off_timeout_config_ms = 22; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 259 | // The screen dim duration, in milliseconds. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 260 | optional int32 maximum_screen_dim_duration_config_ms = 23; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 261 | // The maximum screen dim time expressed as a ratio relative to the screen off timeout. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 262 | optional float maximum_screen_dim_ratio_config = 24; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 263 | // The screen off timeout setting value in milliseconds. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 264 | optional int32 screen_off_timeout_setting_ms = 25; |
Kweku Adams | f21597c | 2017-11-13 19:49:37 -0800 | [diff] [blame] | 265 | // The sleep timeout setting value in milliseconds. Default value is -1. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 266 | optional sint32 sleep_timeout_setting_ms = 26; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 267 | // The maximum allowable screen off timeout according to the device administration policy. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 268 | optional int32 maximum_screen_off_timeout_from_device_admin_ms = 27; |
| 269 | optional bool is_maximum_screen_off_timeout_from_device_admin_enforced_locked = 28; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 270 | // The stay on while plugged in setting. |
| 271 | // A set of battery conditions under which to make the screen stay on. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 272 | optional StayOnWhilePluggedInProto stay_on_while_plugged_in = 29; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 273 | // The screen brightness setting, from 0 to 255. |
| 274 | // Use -1 if no value has been set. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 275 | optional sint32 screen_brightness_setting = 30; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 276 | // The screen auto-brightness adjustment setting, from -1 to 1. |
| 277 | // Use 0 if there is no adjustment. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 278 | optional float screen_auto_brightness_adjustment_setting = 31; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 279 | // The screen brightness mode. |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 280 | optional .android.providers.settings.SettingsProto.ScreenBrightnessMode screen_brightness_mode_setting = 32; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 281 | // The screen brightness setting override from the window manager |
| 282 | // to allow the current foreground activity to override the brightness. |
| 283 | // Use -1 to disable. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 284 | optional sint32 screen_brightness_override_from_window_manager = 33; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 285 | // The user activity timeout override from the window manager |
| 286 | // to allow the current foreground activity to override the user activity |
| 287 | // timeout. Use -1 to disable. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 288 | optional sint64 user_activity_timeout_override_from_window_manager_ms = 34; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 289 | // The window manager has determined the user to be inactive via other means. |
| 290 | // Set this to false to disable. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 291 | optional bool is_user_inactive_override_from_window_manager = 35; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 292 | // The screen brightness setting override from the settings application |
| 293 | // to temporarily adjust the brightness until next updated, |
| 294 | // Use -1 to disable. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 295 | optional sint32 temporary_screen_brightness_setting_override = 36; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 296 | // The screen brightness adjustment setting override from the settings |
| 297 | // application to temporarily adjust the auto-brightness adjustment factor |
| 298 | // until next updated, in the range -1..1. |
| 299 | // Use NaN to disable. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 300 | optional float temporary_screen_auto_brightness_adjustment_setting_override = 37; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 301 | // The screen state to use while dozing. |
Kweku Adams | e6b00c2 | 2017-10-23 16:46:45 -0700 | [diff] [blame] | 302 | optional .android.view.DisplayProto.DisplayState doze_screen_state_override_from_dream_manager = 38; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 303 | // The screen brightness to use while dozing. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 304 | optional float dozed_screen_brightness_override_from_dream_manager = 39; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 305 | // Screen brightness settings limits. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 306 | optional ScreenBrightnessSettingLimitsProto screen_brightness_setting_limits = 40; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 307 | // The screen brightness setting, from 0 to 255, to be used while in VR Mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 308 | optional int32 screen_brightness_for_vr_setting = 41; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 309 | // True if double tap to wake is enabled |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 310 | optional bool is_double_tap_wake_enabled = 42; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 311 | // True if we are currently in VR Mode. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 312 | optional bool is_vr_mode_enabled = 43; |
Netta P | 958d0a5 | 2017-02-07 11:20:55 -0800 | [diff] [blame] | 313 | } |