Commit Graph

11 Commits

Author SHA1 Message Date
Steve Kondik 86cae92291 livedisplay: Add support for direct color balance control
* We currently use the DisplayColorCalibration API for setting display
   temperature which makes a lot of guesses about what temperature
   the display really is. Some devices will support the new ColorBalance
   API (via QDCM or other mechanism), which offers a calibrated
   alternative. Add support for this, which will supercede DCC if
   available.
 * Additionally, define the available color temperature range as a
   set of overlayable values so this can be specified per-device.
   This range will be mapped to balance values using the power curve
   calculations in the new MathUtils class.

Change-Id: I99608c09807b747d962680293c7b0cee8d669003
2016-07-20 10:07:31 -07:00
Diogo Ferreira 19de84cd1b cmsdk: LiveDisplay: Enforce dump permission
Fixes android.security.cts.ServicePermissionsTest#testDumpProtected.

Change-Id: I5641b42c56d9783b1edb8fb397d51040cadb1467
2016-06-07 10:55:45 -07:00
Adnan Begovic b51572d697 cmsdk: Create CMSystemServer to handle our platform init.
Change-Id: I7b62978e2a284a3a1ec1ffc1d8c72545d7b0c939
2016-05-31 17:28:48 -07:00
Steve Kondik 35315d3c0f cmsdk: Fix crash when getting LiveDisplay config
* If capabilities is empty, BitSet.toLongArray returns an empty array.

Change-Id: I17476438995b581050feda346d0348228519ff44
2016-04-26 01:17:30 -07:00
Steve Kondik b00c945e35 livedisplay: Bugfixes and cleanups
* Simplify the code and callback mechanisms
 * Fix bug where settings weren't applied at startup
 * Make stuff immutable where possible
 * Corrected the sunrise calculation to start on time
 * Fix issue where tile state could become out of sync
 * Don't spam the hardware on screen on/off
 * Stop trying to cache values in so many places, they get out of sync
   too easily.
 * Move the animator to the general display adjustments
 * Clean up outdoor mode state on screen toggle

Change-Id: Ic14425e5294d78698b9280dfb1237b222bb706cc
2016-04-21 00:26:40 -07:00
Adnan Begovic 18aa2f52eb cmsdk: Fix definition of live display tile, as its now dynamic.
Change-Id: I468e42b91996aad348fa0a1c85e0bc66597cf440
2016-04-18 12:27:47 -07:00
Danny Baumann 842344a358 livedisplay: Fix endless loop for devices that don't support outdoor
mode.

There was a logic mistake that caused _all_ modes to be skipped if
outdoor mode isn't supported. In order to avoid such mistakes in the
future, also simplify the logic and make it more easily understandable.

Change-Id: I5fe8edbb3c4d2dd05fc4b4a7f94ca05d4ecd408b
2016-04-15 12:48:07 +02:00
Steve Kondik 7cd7f79c75 livedisplay: Fix bad state after bootup
* Make sure all modules are updated, and clean up a little code.

Change-Id: Id02ddb1558deea4451783fbe27f495d63f63c910
2016-04-15 03:15:28 -07:00
Steve Kondik 0ec60c69a0 livedisplay: Don't explode if no modes are available
* Don't create the mode observer or try to publish tiles if none
   of the adaptive modes are supported.

Change-Id: Iee6fe8131b0614e10f35b5a03d65fb44c71c0da9
2016-04-15 02:38:42 -07:00
Steve Kondik 712426f249 livedisplay: Publish our own damn tile!
Change-Id: If765cb1fe1cbc34c857dc6237cd25a1fb27f848e
2016-04-14 20:35:15 -07:00
Steve Kondik 1dab5a0ca9 cmsdk: Refactoring LiveDisplay
* Moving LiveDisplay to CMSDK!
 * Completely redesigned the feature for future expansion.
 * No new features in this patch, but a proper API is being
   designed.

Change-Id: Ic8f55678f9141bf3386b2a1cf2fd1e8b3916c278
2016-04-13 01:37:08 -07:00