From cc19a53d6149491e58d2c2a749345a70b7492ec8 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Thu, 19 Nov 2009 14:19:17 -0800 Subject: [PATCH] Fix 2271080 - .lang.IllegalArgumentException: no dialog with id 1 was ever shown via Activity#showDialog on CreateShortcut I'm not sure how this can happen, but I think it's okay to just drop the exception. It's all just trying to clean up anyway. --- src/com/android/launcher2/Launcher.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index fb59017b8f..52d89c3ecf 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -1908,7 +1908,11 @@ public final class Launcher extends Activity } private void cleanup() { - dismissDialog(DIALOG_CREATE_SHORTCUT); + try { + dismissDialog(DIALOG_CREATE_SHORTCUT); + } catch (Exception e) { + // An exception is thrown if the dialog is not visible, which is fine + } } /**