Fix issue #5355844: PowerManager does not call screenTurningOn after boot.

Be more explicit about initialization -- power manager never sends
screen update when first initializing, phone window manager retreives
current screen state and applies that itself when initializing.

Change-Id: I8294ed36d700e186c1637754df8c8183721c15dd
This commit is contained in:
Dianne Hackborn
2011-09-22 13:37:48 -07:00
parent e690f565fd
commit 400110902e
2 changed files with 47 additions and 23 deletions

View File

@ -564,6 +564,7 @@ public class PowerManagerService extends IPowerManager.Stub
// We make sure to start out with the screen on due to user activity.
// (They did just boot their device, after all.)
forceUserActivityLocked();
mInitialized = true;
}
}
@ -1330,6 +1331,13 @@ public class PowerManagerService extends IPowerManager.Stub
// (And also do not send needless broadcasts about the screen.)
return;
}
if (DEBUG_SCREEN_ON) {
RuntimeException here = new RuntimeException("here");
here.fillInStackTrace();
Slog.i(TAG, "sendNotificationLocked: " + on, here);
}
if (!on) {
mStillNeedSleepNotification = false;
}
@ -1845,8 +1853,6 @@ public class PowerManagerService extends IPowerManager.Stub
mPowerState = (mPowerState & ~LIGHTS_MASK) | (newState & LIGHTS_MASK);
updateNativePowerStateLocked();
mInitialized = true;
}
}