037c33eae7
Declare a new method, Display.getState() to retrieve the actual power state of a display. Improved documentation for Intent.ACTION_SCREEN_ON and Intent.ACTION_SCREEN_OFF to clarify what they really mean in terms of the interactive state of the device. Deprecated PowerManager.isScreenOn() and replaced it with PowerManager.isInteractive() with a more suggestive name and better documentation. Redirect display power state changes to go through the display manager first and only then head over to the power manager for legacy compatibility. Eliminated the bright here and woke here policy flags since they were unused. Simplified the input dispatch policy somewhat. Ensure that screen wake locks are respected up until the point when dozing really begins. Fixed a regression in DreamService where onDreamingStarted might be called before onWindowAttached. Bug: 13133142 Bug: 13472578 Bug: 13929355 Bug: 13760290 Change-Id: Iabef96921dd554ce3768fb18619cefc3230b5fb0