Merge "Remove hidden shared account methods from AccountManager.java" into qt-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
eab74f8e20
@@ -1942,35 +1942,6 @@ public class AccountManager {
|
|||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @hide
|
|
||||||
* Removes the shared account.
|
|
||||||
* @param account the account to remove
|
|
||||||
* @param user the user to remove the account from
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean removeSharedAccount(final Account account, UserHandle user) {
|
|
||||||
try {
|
|
||||||
boolean val = mService.removeSharedAccountAsUser(account, user.getIdentifier());
|
|
||||||
return val;
|
|
||||||
} catch (RemoteException re) {
|
|
||||||
throw re.rethrowFromSystemServer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @hide
|
|
||||||
* @param user
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Account[] getSharedAccounts(UserHandle user) {
|
|
||||||
try {
|
|
||||||
return mService.getSharedAccountsAsUser(user.getIdentifier());
|
|
||||||
} catch (RemoteException re) {
|
|
||||||
throw re.rethrowFromSystemServer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Confirms that the user knows the password for an account to make extra
|
* Confirms that the user knows the password for an account to make extra
|
||||||
* sure they are the owner of the account. The user-entered password can
|
* sure they are the owner of the account. The user-entered password can
|
||||||
|
|||||||
@@ -80,14 +80,11 @@ interface IAccountManager {
|
|||||||
String authTokenType);
|
String authTokenType);
|
||||||
|
|
||||||
/* Shared accounts */
|
/* Shared accounts */
|
||||||
Account[] getSharedAccountsAsUser(int userId);
|
|
||||||
boolean removeSharedAccountAsUser(in Account account, int userId);
|
|
||||||
void addSharedAccountsFromParentUser(int parentUserId, int userId, String opPackageName);
|
void addSharedAccountsFromParentUser(int parentUserId, int userId, String opPackageName);
|
||||||
|
|
||||||
/* Account renaming. */
|
/* Account renaming. */
|
||||||
void renameAccount(in IAccountManagerResponse response, in Account accountToRename, String newName);
|
void renameAccount(in IAccountManagerResponse response, in Account accountToRename, String newName);
|
||||||
String getPreviousName(in Account account);
|
String getPreviousName(in Account account);
|
||||||
boolean renameSharedAccountAsUser(in Account accountToRename, String newName, int userId);
|
|
||||||
|
|
||||||
/* Add account in two steps. */
|
/* Add account in two steps. */
|
||||||
void startAddAccountSession(in IAccountManagerResponse response, String accountType,
|
void startAddAccountSession(in IAccountManagerResponse response, String accountType,
|
||||||
|
|||||||
@@ -4404,7 +4404,6 @@ public class AccountManagerService
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renameSharedAccountAsUser(Account account, String newName, int userId) {
|
public boolean renameSharedAccountAsUser(Account account, String newName, int userId) {
|
||||||
userId = handleIncomingUser(userId);
|
userId = handleIncomingUser(userId);
|
||||||
UserAccounts accounts = getUserAccounts(userId);
|
UserAccounts accounts = getUserAccounts(userId);
|
||||||
@@ -4420,7 +4419,6 @@ public class AccountManagerService
|
|||||||
return r > 0;
|
return r > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean removeSharedAccountAsUser(Account account, int userId) {
|
public boolean removeSharedAccountAsUser(Account account, int userId) {
|
||||||
return removeSharedAccountAsUser(account, userId, getCallingUid());
|
return removeSharedAccountAsUser(account, userId, getCallingUid());
|
||||||
}
|
}
|
||||||
@@ -4438,7 +4436,6 @@ public class AccountManagerService
|
|||||||
return deleted;
|
return deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Account[] getSharedAccountsAsUser(int userId) {
|
public Account[] getSharedAccountsAsUser(int userId) {
|
||||||
userId = handleIncomingUser(userId);
|
userId = handleIncomingUser(userId);
|
||||||
UserAccounts accounts = getUserAccounts(userId);
|
UserAccounts accounts = getUserAccounts(userId);
|
||||||
|
|||||||
Reference in New Issue
Block a user