OSDN Git Service

Fix issue #6603152: User-adjustable autobrightness broken?
authorDianne Hackborn <hackbod@google.com>
Mon, 4 Jun 2012 22:32:54 +0000 (15:32 -0700)
committerDianne Hackborn <hackbod@google.com>
Mon, 4 Jun 2012 22:32:54 +0000 (15:32 -0700)
commit883329ca1376054228ff67a923252121b5531265
tree8f5ee490e9d904552cc3efdacd6ead29a87fd84f
parent98894ed4106222b79c7ca67d5b3995878e8ae98d
Fix issue #6603152: User-adjustable autobrightness broken?

Two issues:
- The new brightness was not being applied when switching out
  of auto-brightness mode.
- We were resetting to the last brightness level when switching
  modes.  This is because at that point we read the current
  brightness setting, but that isn't changed as the user adjusts
  only when the final value is committed.  To fix this, we have
  a new local variable keeping track of the last brightness value
  we have shown and use that when we haven't committed the
  brightness to settings.

Change-Id: I7cc02c9f90128eacec427587a3f6b8f25ede4bd3
src/com/android/settings/BrightnessPreference.java