Fix issue #6686339: 2 taps required to launch notification...
...or settings from lock screen When a window is drawn, the code to determine whether it should now be shown was calling WindowState.isReadyForDisplay(). Part of the condition of this function is that it is not ready if a policy is forcing the window to be hidden -- which is the case when the lock screen is shown. As a result, we wouldn't show the window at that point, so wouldn't tell the activity manager that the token's windows are visibible, and wouldn't tell the lock screen to go away. This adds a new variation WindowState.isReadyForDisplayIgnoringKeyguard(), which is the same as the original method but ignores the policy visibility for app windows. This allows windows to be go through the complete path of handling when the window is finally drawn and telling the activity manager about it, even if behind the lock screen. By making it a separate function, we don't impact any other code that is calling the old function and may be relying on its behavior. Also cleaned up a little of the dumpsys output. Most important, the new ANR section is now moved to the top, since we want "adb shell dumpsys window" to still give a nice summary of what we normally care about -- the window stack and important global state. Change-Id: Ica3ea85ce46f3f5f5cd2cc30fbd9de13d3885a57
Loading
Please register or sign in to comment