summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/accounts
diff options
context:
space:
mode:
authorSimranjit Singh Kohli <simranjit@google.com>2014-11-19 15:13:12 -0800
committerSimranjit Singh Kohli <simranjit@google.com>2014-11-19 17:01:32 -0800
commit7df0b799a8db70ce0676ace1c17e19b56e28d322 (patch)
tree2ae3f1bf0d5af8b2836447280224892301aae07e /src/com/android/settings/accounts
parent3a84d40133e7a4f74fd1df091ba43fb85859b169 (diff)
downloadpackages_apps_Settings-7df0b799a8db70ce0676ace1c17e19b56e28d322.zip
packages_apps_Settings-7df0b799a8db70ce0676ace1c17e19b56e28d322.tar.gz
packages_apps_Settings-7df0b799a8db70ce0676ace1c17e19b56e28d322.tar.bz2
[New RemoveAccount API in Settings App]:
Modify Settings app to use the new account remove API Bug: 18292092 Change-Id: I5f02d71bc0c7ca3e38157d38dea077c6fe6eb34e
Diffstat (limited to 'src/com/android/settings/accounts')
-rw-r--r--src/com/android/settings/accounts/AccountSyncSettings.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/com/android/settings/accounts/AccountSyncSettings.java b/src/com/android/settings/accounts/AccountSyncSettings.java
index fe45299..858880b 100644
--- a/src/com/android/settings/accounts/AccountSyncSettings.java
+++ b/src/com/android/settings/accounts/AccountSyncSettings.java
@@ -91,20 +91,20 @@ public class AccountSyncSettings extends AccountPreferenceBase {
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- // TODO: We need an API to remove an account from a different user.
- // See: http://b/15466880
- AccountManager.get(AccountSyncSettings.this.getActivity())
- .removeAccountAsUser(mAccount,
- new AccountManagerCallback<Boolean>() {
+ Activity activity = getActivity();
+ AccountManager.get(activity)
+ .removeAccountAsUser(mAccount, activity,
+ new AccountManagerCallback<Bundle>() {
@Override
- public void run(AccountManagerFuture<Boolean> future) {
+ public void run(AccountManagerFuture<Bundle> future) {
// If already out of this screen, don't proceed.
if (!AccountSyncSettings.this.isResumed()) {
return;
}
boolean failed = true;
try {
- if (future.getResult() == true) {
+ if (future.getResult()
+ .getBoolean(AccountManager.KEY_BOOLEAN_RESULT)) {
failed = false;
}
} catch (OperationCanceledException e) {