am 047cf604: am 88a1a700: Migrate to new removeAccount method
* commit '047cf604d25eb87653bf3d900ce5f31b1aaa9c2a':
Migrate to new removeAccount method
diff --git a/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java b/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java
index f2b0b9c..a785b09 100644
--- a/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java
+++ b/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java
@@ -301,7 +301,9 @@
private void removeAccount(Account account) {
try {
- if (mAccountManager.removeAccount(account, null, null).getResult()) {
+ AccountManagerFuture<Bundle> bundle = mAccountManager.removeAccount(account,
+ this, null /* callback */, null /* handler */);
+ if (bundle.getResult().getBoolean(AccountManager.KEY_BOOLEAN_RESULT, false)) {
ProvisionLogger.logw("Account removed from the primary user.");
} else {
ProvisionLogger.logw("Could not remove account from the primary user.");