diff options
author | Amit Kumar <amitkecian@gmail.com> | 2013-02-24 13:22:45 +0000 |
---|---|---|
committer | Amit Kumar <amitkecian@gmail.com> | 2013-02-24 09:20:26 +0000 |
commit | fe6c30e44e706cfd8f2c359d394a1dbe16d1b80f (patch) | |
tree | 3d64b19cd971a0f789c0dc5318b933dcb9576885 /core | |
parent | d61ff77ee10b2c956df153e08b850e852ff5df57 (diff) | |
download | frameworks_base-fe6c30e44e706cfd8f2c359d394a1dbe16d1b80f.zip frameworks_base-fe6c30e44e706cfd8f2c359d394a1dbe16d1b80f.tar.gz frameworks_base-fe6c30e44e706cfd8f2c359d394a1dbe16d1b80f.tar.bz2 |
FIX Null Pointer Exception on dialog cancel
Null Pointer Exception occurs because mWebViewCore instance
is made to null while calling destroyJava(). When
1.webview hosting activity goest to background, without calling webview onPause().
2. If app is launched again (having launchmode:singletask ) and another activity (not webview hosting) comes on top top.
3. It destorys the previous activity holding webview which internally tries to cancel the dialog, but webviewcore instance is null.
Null pointer exception is raised.
Change-Id: Idbcd30d0b0d4a35819444bbaa5c73cced8bb35a3
Signed-off-by: Amit Kumar <amitkecian@gmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/webkit/WebViewClassic.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java index 7154f95..0024fd3 100644 --- a/core/java/android/webkit/WebViewClassic.java +++ b/core/java/android/webkit/WebViewClassic.java @@ -8368,8 +8368,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mListBoxDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { + if (mWebViewCore != null) { mWebViewCore.sendMessage( EventHub.SINGLE_LISTBOX_CHOICE, -2, 0); + } mListBoxDialog = null; } }); |