Steven Moreland | 84dd3b7 | 2019-07-25 17:13:52 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 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 | package android.hardware.light; |
| 17 | |
| 18 | @VintfStability |
| 19 | enum BrightnessMode { |
| 20 | /** |
| 21 | * Light brightness is managed by a user setting. |
| 22 | */ |
| 23 | USER = 0, |
| 24 | |
| 25 | /** |
| 26 | * Light brightness is managed by a light sensor. This is typically used |
| 27 | * to control the display backlight, but not limited to it. HALs and |
| 28 | * hardware implementations are free to support sensor for other lights or |
| 29 | * none whatsoever. |
| 30 | */ |
| 31 | SENSOR = 1, |
| 32 | |
| 33 | /** |
| 34 | * Use a low-persistence mode for display backlights, where the pixel |
| 35 | * color transition times are lowered. |
| 36 | * |
| 37 | * When set, the device driver must switch to a mode optimized for low display |
| 38 | * persistence that is intended to be used when the device is being treated as a |
| 39 | * head mounted display (HMD). The actual display brightness in this mode is |
| 40 | * implementation dependent, and any value set for color in LightState may be |
| 41 | * overridden by the HAL implementation. |
| 42 | * |
| 43 | * For an optimal HMD viewing experience, the display must meet the following |
| 44 | * criteria in this mode: |
| 45 | * - Gray-to-Gray, White-to-Black, and Black-to-White switching time must be ≤ 3 ms. |
| 46 | * - The display must support low-persistence with ≤ 3.5 ms persistence. |
| 47 | * Persistence is defined as the amount of time for which a pixel is |
| 48 | * emitting light for a single frame. |
| 49 | * - Any "smart panel" or other frame buffering options that increase display |
| 50 | * latency are disabled. |
| 51 | * - Display brightness is set so that the display is still visible to the user |
| 52 | * under normal indoor lighting. |
| 53 | * - The display must update at 60 Hz at least, but higher refresh rates are |
| 54 | * recommended for low latency. |
| 55 | * |
| 56 | */ |
| 57 | LOW_PERSISTENCE = 2, |
| 58 | } |