Merge "Fixed the IllegalStateException on removing account" into qt-dev am: 5a69fac694
am: bfffb2ae74

Change-Id: I51cbaf932b7dac50a2fd246d47f3fb69cd421c27
diff --git a/src/com/android/settings/accounts/RemoveAccountPreferenceController.java b/src/com/android/settings/accounts/RemoveAccountPreferenceController.java
index 1bc30d0..5c6e6bb 100644
--- a/src/com/android/settings/accounts/RemoveAccountPreferenceController.java
+++ b/src/com/android/settings/accounts/RemoveAccountPreferenceController.java
@@ -191,7 +191,11 @@
             }
             final RemoveAccountFailureDialog dialog = new RemoveAccountFailureDialog();
             dialog.setTargetFragment(parent, 0);
-            dialog.show(parent.getFragmentManager(), FAILED_REMOVAL_DIALOG);
+            try {
+                dialog.show(parent.getFragmentManager(), FAILED_REMOVAL_DIALOG);
+            } catch (IllegalStateException e) {
+                Log.w(TAG, "Can't show RemoveAccountFailureDialog. " +  e.getMessage());
+            }
         }
 
         @Override