Commit f61d9c3d authored by Piotr Bialecki's avatar Piotr Bialecki Committed by Commit Bot

Check if activity is finishing / destroyed prior to using fullscreen mgr

Prior to calling into ChromeActivity's getFullScreenManager(), we should
check whether the activity is not finishing or already destroyed to
protect ourselves from IllegalStateException.

Fixed: 1038736
Change-Id: Ic8f25f5e839535031d92055b424cd624db4b2704
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985168
Auto-Submit: Piotr Bialecki <bialpio@chromium.org>
Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731688}
parent d9e8b0d2
......@@ -292,7 +292,7 @@ public class ArImmersiveOverlay
// The JS app may have put an element into fullscreen mode during the immersive session,
// even if this wasn't visible to the user. Ensure that we fully exit out of any active
// fullscreen state on session end to avoid being left in a confusing state.
if (mActivity.getActivityTab() != null) {
if (mActivity.getActivityTab() != null && !mActivity.isActivityFinishingOrDestroyed()) {
mActivity.getFullscreenManager().onExitFullscreen(mActivity.getActivityTab());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment