You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Git at Apache <gi...@git.apache.org> on 2012/02/21 08:33:14 UTC
incubator-cordova-android pull request: Added catch/throw around
dialog dismiss
GitHub user obrand synchronized the pull request at
https://github.com/apache/incubator-cordova-android/pull/1
----
Added catch/throw around dialog dismiss
I have noticed that when going back the stack in the browser, often it causes a crash due to the dialog being dismissed. This seems to be a well known issue in Android. For now I have added a try/catch with no-op around the dismiss.
The typical exception is:
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:486)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:306)
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:129)
at android.app.Dialog.dismissDialog(Dialog.java:306)
at android.app.Dialog.access$000(Dialog.java:73)
at android.app.Dialog$1.run(Dialog.java:110)
at android.app.Dialog.dismiss(Dialog.java:296)
at com.phonegap.DroidGap.spinnerStop(DroidGap.java:1067)
at com.phonegap.DroidGap$GapViewClient$1$1.run(DroidGap.java:1528)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4126)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
----
You can merge this pull request into a Git repository by running
$ git pull https://github.com/obrand/incubator-cordova-android dialog
Alternatively you can review and apply these changes as the patch at
https://github.com/apache/incubator-cordova-android/pull/1.patch