Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f4d30a2 authored by John Reck's avatar John Reck
Browse files

Prevent pause/resuming a destroyed WebViewCore

 Bug: 5246901

Change-Id: I697cd26b74ffb0584bb992d8caa6bae1e6eee0fd
parent 62bb0cdc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2085,6 +2085,10 @@ public final class WebViewCore {
            if (!core.getSettings().enableSmoothTransition()) return;

            synchronized (core) {
                if (core.mNativeClass == 0) {
                    Log.w(LOGTAG, "Cannot pauseUpdatePicture, core destroyed or not initialized!");
                    return;
                }
                core.nativeSetIsPaused(true);
                core.mDrawIsPaused = true;
            }
@@ -2099,6 +2103,10 @@ public final class WebViewCore {
                return;

            synchronized (core) {
                if (core.mNativeClass == 0) {
                    Log.w(LOGTAG, "Cannot resumeUpdatePicture, core destroyed!");
                    return;
                }
                core.nativeSetIsPaused(false);
                core.mDrawIsPaused = false;
                // always redraw on resume to reenable gif animations