History log of /frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
540c2a9195e8c683b81a65ee39c60999327dad57 16-May-2018 Michael Wright <michaelwr@google.com> Set DEBUG to false for BrightnessMappingStrategy.

Accidentally enabled when checking in other code.

Bug: 78909876
Test: manual
Change-Id: Ic1341bcb14c9e9a29b75a598aeb735aa36bd657e
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
95f77e1ba2883b584c6af57daa76aa1e043e2ad4 15-May-2018 Michael Wright <michaelwr@google.com> Decrease the inferred auto-brightness adjustment at the extremes.

Now that the brightness slider always represents the brightness of the
panel, rather than the auto-brightness adjustments like it did prior to
P, we need to infer the adjustment by comparing the old and new
brightness values. At the extremes, this inferred brightness increases
dramatically towards (+/-) infinity, so we use a different strategy.
Based on dogfood feedback, the current inference seems to have too
strong of an effect, so we're cutting it in half in the hopes that this
is more reasonable.

Change-Id: If6a6c3355f9dcce8588512f1d969c871149ec299
Fixes: 79153846
Test: manual
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
c8a6db8c1070a2e970083a93ac2de916608536d9 03-Apr-2018 Dan Gittik <dangittik@google.com> Added gamma correction tests.

Test: atest BrightnessMappingStrategy

Fixes: 77578319

Change-Id: Ic8a693a71cf8de14fb5bfdf0325f3aefe537438d
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
57d6f11d6ab5d409f3291923ea34f9be709925bc 27-Mar-2018 Dan Gittik <dangittik@google.com> Added gamma correction to autobrightness.

Moved the gamma correction determined by the brightness adjustment to the brightness mapping
strategy, and added a best-effort attempt to gamma correct the curve to meet user data points
before resorting to spline-bending.

Test: manual (see https://drive.google.com/file/d/1VH6LpnmFYTAdRB1Rh_tNmu7xQxEaKlqe/view?usp=sharing
for instructions).

Fixes: 72734580

Change-Id: I74063f262a5559c048280b6f1d04ac84b0004160
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
e5cd25ec0a11784ef9b13b6ea99f32036a64ee8f 28-Mar-2018 Artem Iglikov <artikz@google.com> Revert "Added safeguards for pushed brighntess curve."

This reverts commit f1e673649e11b98f537489b7889f1d6efa6e7ff9.

Reason for revert: crashes system server

Bug: 77176207
Change-Id: I574e6e1f60d83f14701a643a1c7b8f7ef8659ed5
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
f1e673649e11b98f537489b7889f1d6efa6e7ff9 23-Mar-2018 Dan Gittik <dangittik@google.com> Added safeguards for pushed brighntess curve.

Currently, the only safeguard is making sure the brightness curve isn't too dark to turn
auto-brightness off (or connect the phone to a computer and reset the curve with ADB).

Test: atest BrightnessMappingStrategyTest.

Change-Id: Ic87292fe51639a0001d0d5643ca24cda37de5753
Fixes: 74439069
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
6d1009f882f1b0234e77ec3bb583a58090bfff39 14-Mar-2018 Kenny Guy <kennyguy@google.com> Get current and default brightness configs.

Getter System API to match existing setter for
the bightness configurations.
Getter System API to read the default brightness
configuration.

Bug: 74105596
Test: atest BrightnessTest

Change-Id: If0a0effad6a4ba6da2e5391dd6bde91dc04bad9c
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
53d0661f38d6ada39aefaac5ce016f802e74bd44 30-Jan-2018 Kenny Guy <kennyguy@google.com> Add information about brightness config to slider events.

Whether the config is using the default curve.
Whether the config has a user data point.
Whether the config has a power save offset.

Bug: 72482479
Test: atest BrightnessTrackerTest
Change-Id: I137a919ae2604244b0b2f78e00e31b7a72df4967
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
617564ff2cdee2e9a50339544129283503ae71a8 25-Jan-2018 Michael Wright <michaelwr@google.com> Reset brightness adjustment when user sets brightness directly.

If the user has a non-zero brightness adjustment then short-term model
returns an incorrect value after they make a direct change to the
brightness with auto-brightness on, which then looks like the
auto-brightness is ignoring their input. To avoid this , if they're
making a direct change to auto-brightness go ahead and reset the
brightness adjustment.

Change-Id: I257a6ecc7ca3df0e610710df19d81a65b009af45
Fixes: 72506596
Test: manual
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
d846023804ddadcd692666152db420c54594ddb9 16-Jan-2018 Michael Wright <michaelwr@google.com> Slider always represents absolute brightness

Currently the slider represents a gamma adjustment to the brightness
curve when auto brightness is enabled and the absolute screen brightness
when it's not. This is a fairly confusing behavior to most people, so
this consolidates them to a single behavior: the slider always
represents the current brightness and auto-brightness will automatically
adjust it.

This also moves a bunch of the brightness methods from PowerManager over
to DisplayManager, since it's really the DisplayPowerController that's
responsible for determining and setting the display brightness.

Test: atest com.android.server.display.BrightnessMappingStrategyTest
Bug: 69406898
Change-Id: I73b5982809a94cd50d563426a72d7965e923c994
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
d5df361ae1bc7e6cd8b171585b59b86e327ef46e 02-Jan-2018 Michael Wright <michaelwr@google.com> Clean-up brightness configuration.

Remove unused default config since that's now stored in the mapping
strategy and eliminate erroneous error logging on devices that don't
support brightness configurations.

Fixes: 71527790
Test: atest com.android.server.display.BrightnessMappingStrategyTest
Change-Id: I9b2eeb5270200af8b59e4374e1afc9fd9447a73f
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
144aac9dfeb4e3f48af874b438a84261202affe1 21-Dec-2017 Michael Wright <michaelwr@google.com> Track brightness changes in nits rather than backlight values.

For the moment, the only one that actually knows the true brightness
value is the DisplayPowerController, so have that tell the
BrightnessTracker directly when brightness changes.

Bug: 69405990
Test: atest com.android.server.display.BrightnessTrackerTest
atest com.android.server.display.BrightnessMappingStrategyTest

Change-Id: Ibf4e501ce2f7b071360bfac501dbbafb3ba55fa5
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
eef0e13f018f33bf3db2f8311bbb429369e13394 21-Nov-2017 Michael Wright <michaelwr@google.com> Add an API for setting a new brightness curve.

In addition, this also provides multiple strategies for mapping from
ambient room brightness in lux to display brightness. The default one is
the classic strategy, where we map directly from lux to backlight
brightness in an arbitrary unit. The newer and preferred strategy is to
use the physical brightness of the display, but requires that the
brightness properties of the display are appropriately configured.

Bug: 69406783
Test: atest com.android.server.display.BrightnessMappingStrategyTest &&
atest android.hardware.display.BrightnessConfigurationTest &&
atest android.hardware.display.PersistentDataStoreTeset

Change-Id: I60227bdb6c299d0fa92686cbf3e5994b336a3a79
/frameworks/base/services/core/java/com/android/server/display/BrightnessMappingStrategy.java