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

Commit 67f9d32e authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Fix monkey NullPointerException"

parents 1302d329 1fa26cbf
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -768,9 +768,13 @@ import junit.framework.Assert;
            imm.hideSoftInputFromWindow(getWindowToken(), 0);
        }
        mInsideRemove = true;
        boolean isFocused = hasFocus();
        mWebView.removeView(this);
        if (isFocused) {
            mWebView.requestFocus();
        }
        mInsideRemove = false;
        mHandler.removeCallbacksAndMessages(null);
    }

    @Override
+9 −0
Original line number Diff line number Diff line
@@ -1581,6 +1581,11 @@ public class WebView extends AbsoluteLayout
            mListBoxDialog.dismiss();
            mListBoxDialog = null;
        }
        // remove so that it doesn't cause events
        if (mWebTextView != null) {
            mWebTextView.remove();
            mWebTextView = null;
        }
        if (mNativeClass != 0) nativeStopGL();
        if (mWebViewCore != null) {
            // Set the handlers to null before destroying WebViewCore so no
@@ -7636,6 +7641,10 @@ public class WebView extends AbsoluteLayout
    }

    /* package */ void passToJavaScript(String currentText, KeyEvent event) {
        // check if mWebViewCore has been destroyed
        if (mWebViewCore == null) {
            return;
        }
        WebViewCore.JSKeyData arg = new WebViewCore.JSKeyData();
        arg.mEvent = event;
        arg.mCurrentText = currentText;