Treat screen-on while pausing as pause timeout.

If an activity is started pausing when the screen turns off and
hasn't completed pausing by the time the screen turns back on then
we will end up showing the activity below it when the pause times
out.

In particular pausing the secure camera exposes the activity on
the top of the stack if you turn the screen off and back on
immediately.

Immediately forcing the existing pause to complete when the screen
comes back on allows the keyguard to obscure anything that might
otherwise be shown.

Fixes bug 17713150.

Change-Id: Ibe275991aa325a7d326bf2a24511aeb4dcbb7e1b
This commit is contained in:
Craig Mautner
2014-11-20 15:06:40 -08:00
parent c70a4ccf45
commit f49b0a45ae

View File

@@ -700,6 +700,10 @@ final class ActivityStack {
activities.get(activityNdx).setSleeping(false);
}
}
if (mPausingActivity != null) {
Slog.d(TAG, "awakeFromSleepingLocked: previously pausing activity didn't pause");
activityPausedLocked(mPausingActivity.appToken, true);
}
}
/**