Merge "Fix crash when removing an account." into jb-dev

This commit is contained in:
Amith Yamasani
2012-05-23 14:34:15 -07:00
committed by Android (Google) Code Review

View File

@@ -98,6 +98,10 @@ public class AccountSyncSettings extends AccountPreferenceBase {
.removeAccount(mAccount,
new AccountManagerCallback<Boolean>() {
public void run(AccountManagerFuture<Boolean> future) {
// If already out of this screen, don't proceed.
if (!AccountSyncSettings.this.isResumed()) {
return;
}
boolean failed = true;
try {
if (future.getResult() == true) {