Fix crash when removing an account.

Bug: 6494527
Change-Id: I9ab3b54ac4e4d679fd9ec22ab438b9e1ea0be2b1
This commit is contained in:
Amith Yamasani
2012-05-23 14:13:13 -07:00
parent be4a032581
commit e88be4f620

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) {