Skip to content
Commit 54478d9c authored by Dan Gittik's avatar Dan Gittik
Browse files

Added app context to smart screen brightness.

Smart screen brightness learns the user brightness preferences from
user interactions with the brightness slider, but doesn't take into
account the foreground app's package name or category.
This CL adds:
- A BrightnessCorrection class,
- A mapping of package names and categories to brightness corrections
  in the BrightnessConfiguration,
- Tracking of the foreground app's package name and category in the
  AutomaticBrightnessController,
- Brightness correction depending on the foreground app's package
  name and category in the BrightnessMappingStrategy.

Test: manual - force turbo app to learn brightness preferences for
      specific packages/categories and see that they are applied.

      To make sure package/category switches are handled correctly,
      you can actually hardcode corrections and simulate edge cases
      such as rapid switches, multiple windows, etc.

Fixes: 111425369

Change-Id: Ic9516c75dbf63ea21f0ae780f9c35e8c85dbbe5b
parent 66daf214
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment