summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Fiona Campbell <flc@google.com> 2023-02-09 12:41:28 +0000
committer Fiona Campbell <flc@google.com> 2023-04-04 20:20:45 +0000
commitc9bad2432f6e9296f29c17f129bb2abce82e1dd5 (patch)
treed9afb642d7e974ad049688b928814c37c82713d3 /libs/androidfw/FileStream.cpp
parent8b3f7da4a30b0914c791583210225c71288c9907 (diff)
Add throttlingDataId to deviceConfig
Currently, we don't have the ability to specify the brightnessThrottlingDataModeId when overriding values in BrightnessThrottler through the DeviceConfig. If we do use the DeviceConfig to override values, any mode-specific throttling policies will be overwritten and lost, since we do not pick and choose between the DeviceConfig values and the DisplayDeviceConfig values. This change allows us to specify the brightness throttling id in the DeviceConfig strings, in order to change the throttling policy based on the id chosen based on the current display layout. Strings passed used by the display config must specify the uniqueDisplayId, and may specify the throttling id, if unspecified, "default" will be used. Valid strings can include: 123,1,critical,0.8;456,2,moderate,0.9,critical,0.7 123,1,critical,0.8,default;123,1,moderate,0.6,mode_2;456,2,moderate,0.9,critical,0.7 Given that one BrightnessThrottler is currently created for each DisplayPowerController, the values stored for the current mode are just per display, but the String & derived data passed in via DeviceConfig will continue to be global, since this is more effective for debugging purposes. DeviceConfig values take top priority, however, throttling Id specific values take priority over default values, so an Id-specific value set from the DisplayDeviceConfig, will take priority over a default throttling id value from DeviceConfig. Bug: 267623520 Test: atest com.server.android.display Test: atest BrightnessThrottlerTest DisplayModeDirectorTest LogicalDisplayMapperTest Test: adb shell cmd device_state state 4 && adb shell device_config put display_manager brightness_throttling_data "local:4619827677550801152,3,moderate,0.5,severe,0.379518072,emergency,0.248995984\;local:4619827677550801153,1,moderate,0.75\;local:4619827677550801153,1,moderate,0.11,concurrent" Change-Id: I90bd673c794bdcf4b6522997bacd924d7e122c09
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions