am 6dab602f: am acfc96f1: am 53dcdeeb: Don\'t restore old brightness when cancelling brightness dialog in automatic mode.

Merge commit '6dab602fdf7cdb41bebfd027ff94ab3edaf2132c'

* commit '6dab602fdf7cdb41bebfd027ff94ab3edaf2132c':
  Don't restore old brightness when cancelling brightness dialog in automatic mode.
This commit is contained in:
Mike Lockwood
2009-10-29 14:43:12 -07:00
committed by Android Git Automerger

View File

@@ -120,8 +120,9 @@ public class BrightnessPreference extends SeekBarPreference implements
if (mAutomaticAvailable) {
setMode(mOldAutomatic);
}
// brightness needs to be restored after restoring ALS mode
setBrightness(mOldBrightness);
if (!mAutomaticAvailable || mOldAutomatic == 0) {
setBrightness(mOldBrightness);
}
}
}