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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user