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
This commit is contained in:
Ben Komalo 2011-06-30 11:47:39 -07:00
parent 698aa92e6f
commit 85cfc9c0bd

View File

@ -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);
}