Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f836acf2 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I067d55ea into eclair

* changes:
  Fix issue #2179931: Power key to wake up frequently ignored when in dock app
parents 6dc3f4e5 aa80b60b
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1531,9 +1531,10 @@ class PowerManagerService extends IPowerManager.Stub
                } finally {
                    Binder.restoreCallingIdentity(identity);
                }
                mScreenBrightness.setTargetLocked(brightness,
                        steps, INITIAL_SCREEN_BRIGHTNESS, nominalCurrentValue);
                if (mScreenBrightness.setTargetLocked(brightness,
                        steps, INITIAL_SCREEN_BRIGHTNESS, nominalCurrentValue)) {
                    startAnimation = true;
                }
            } else {
                if ((newState & SCREEN_BRIGHT_BIT) == 0) {
                    // dim or turn off backlight, depending on if the screen is on
@@ -1612,11 +1613,13 @@ class PowerManagerService extends IPowerManager.Stub
                    + " delta=" + delta);
        }
        
        void setTargetLocked(int target, int stepsToTarget, int initialValue,
        boolean setTargetLocked(int target, int stepsToTarget, int initialValue,
                int nominalCurrentValue) {
            if (!initialized) {
                initialized = true;
                curValue = (float)initialValue;
            } else if (targetValue == target) {
                return false;
            }
            targetValue = target;
            delta = (targetValue -
@@ -1630,6 +1633,7 @@ class PowerManagerService extends IPowerManager.Stub
                        + noticeMe);
            }
            animating = true;
            return true;
        }
        
        boolean stepLocked() {