From 85cfc9c0bdaea35177db2440c00aa41029db95c8 Mon Sep 17 00:00:00 2001 From: Ben Komalo Date: Thu, 30 Jun 2011 11:47:39 -0700 Subject: [PATCH] Fix b/4905749 using workaround We suspect the underlying bug is b/4981556 but it is a framework issue which needs time to fix. Some fragment state is not restored properly when going through orientation change, so navigation shortly after that will always crash. Change-Id: Id6b8714c2aeac5f6bf09e82aea5459bb19d0054d --- src/com/android/email/activity/UIControllerBase.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/com/android/email/activity/UIControllerBase.java b/src/com/android/email/activity/UIControllerBase.java index f883278ab..e7f043903 100644 --- a/src/com/android/email/activity/UIControllerBase.java +++ b/src/com/android/email/activity/UIControllerBase.java @@ -348,15 +348,14 @@ abstract class UIControllerBase implements MailboxListFragment.Callback, return; } if (!mRemovedFragments.contains(fragment)) { - // STOPSHIP Remove log/catch. b/4905749. + // STOPSHIP Remove log/catch. b/4905749 - b/4981556 Log.d(Logging.LOG_TAG, "Removing " + fragment); try { ft.remove(fragment); - } catch (RuntimeException ex) { - Log.e(Logging.LOG_TAG, "Got RuntimeException trying to remove fragment: " - + fragment, ex); + } catch (IllegalStateException ex) { + Log.e(Logging.LOG_TAG, "Swalling IllegalStateException due to known bug for " + + " fragment: " + fragment, ex); Log.e(Logging.LOG_TAG, Utility.dumpFragment(fragment)); - throw ex; } addFragmentToRemovalList(fragment); }