Loading core/java/android/accounts/AccountManager.java +5 −4 Original line number Diff line number Diff line Loading @@ -328,7 +328,6 @@ public class AccountManager { /** * Token type for the special case where a UID has access only to an account * but no authenticator specific auth token types. * * @hide */ public static final String ACCOUNT_ACCESS_TOKEN_TYPE = Loading @@ -354,9 +353,9 @@ public class AccountManager { * the applications are added, accounts are removed, or an account's credentials (saved * password, etc) are changed. List of supported account types shoud be specified in the * Manifest file using {@link #SUPPORTED_ACCOUNT_TYPES} * * @see #addOnAccountsUpdatedListener * @hide * @see #addOnAccountsUpdatedListener * */ public static final String ACTION_VISIBLE_ACCOUNTS_CHANGED = "android.accounts.action.VISIBLE_ACCOUNTS_CHANGED"; Loading @@ -364,6 +363,7 @@ public class AccountManager { /** * Authenticators may subscribe to get notifications about apps interested in their managed account * types using {@link #SUPPORTED_ACCOUNT_TYPES}. * Package name will be specified using {@link Intent.EXTRA_PACKAGE_NAME} * @hide */ public static final String ACTION_ACCOUNTS_LISTENER_PACKAGE_INSTALLED = Loading Loading @@ -1024,7 +1024,7 @@ public class AccountManager { public boolean isAccountVisible(Account account, int uid) { try { Integer visibility = mService.getAccountVisibility(account, uid); return visibility == VISIBILITY_USER_MANAGED_NOT_VISIBLE return visibility == VISIBILITY_USER_MANAGED_VISIBLE || visibility == VISIBILITY_VISIBLE; } catch (RemoteException re) { throw re.rethrowFromSystemServer(); Loading Loading @@ -1058,6 +1058,7 @@ public class AccountManager { /** * Gets visibility of certain account for given UID. Possible returned values are: * <ul> * <li>{@link #VISIBILITY_UNDEFINED}</li> * <li>{@link #VISIBILITY_VISIBLE}</li> * <li>{@link #VISIBILITY_USER_MANAGED_VISIBLE}</li> * <li>{@link #VISIBILITY_NOT_VISIBLE} Loading core/java/android/accounts/ChooseAccountActivity.java +3 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,9 @@ public class ChooseAccountActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO This activity is only used by getAuthTokenByFeatures and can not see // VISIBILITY_USER_MANAGED_NOT_VISIBLE accounts. It should be moved to account managed // service. mAccounts = getIntent().getParcelableArrayExtra(AccountManager.KEY_ACCOUNTS); mAccountManagerResponse = getIntent().getParcelableExtra(AccountManager.KEY_ACCOUNT_MANAGER_RESPONSE); Loading core/res/AndroidManifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,9 @@ <protected-broadcast android:name="android.intent.action.ACTION_RADIO_OFF" /> <protected-broadcast android:name="android.accounts.LOGIN_ACCOUNTS_CHANGED" /> <protected-broadcast android:name="android.accounts.action.VISIBLE_ACCOUNTS_CHANGED" /> <protected-broadcast android:name="android.accounts.action.ACCOUNTS_LISTENER_PACKAGE_INSTALLED" /> <protected-broadcast android:name="com.android.sync.SYNC_CONN_STATUS_CHANGED" /> <protected-broadcast android:name="com.android.phone.SIP_INCOMING_CALL" /> Loading services/core/java/com/android/server/accounts/AccountManagerService.java +720 −144 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/accounts/AccountsDb.java +2 −2 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ class AccountsDb implements AutoCloseable { boolean deleteAuthtokensByAccountIdAndType(long accountId, String authtokenType) { SQLiteDatabase db = mDeDatabase.getWritableDatabaseUserIsUnlocked(); return db.delete(CE_TABLE_AUTHTOKENS, AUTHTOKENS_ACCOUNTS_ID + "=?" + accountId + " AND " + AUTHTOKENS_TYPE + "=?", AUTHTOKENS_ACCOUNTS_ID + "=?" + " AND " + AUTHTOKENS_TYPE + "=?", new String[]{String.valueOf(accountId), authtokenType}) > 0; } Loading Loading
core/java/android/accounts/AccountManager.java +5 −4 Original line number Diff line number Diff line Loading @@ -328,7 +328,6 @@ public class AccountManager { /** * Token type for the special case where a UID has access only to an account * but no authenticator specific auth token types. * * @hide */ public static final String ACCOUNT_ACCESS_TOKEN_TYPE = Loading @@ -354,9 +353,9 @@ public class AccountManager { * the applications are added, accounts are removed, or an account's credentials (saved * password, etc) are changed. List of supported account types shoud be specified in the * Manifest file using {@link #SUPPORTED_ACCOUNT_TYPES} * * @see #addOnAccountsUpdatedListener * @hide * @see #addOnAccountsUpdatedListener * */ public static final String ACTION_VISIBLE_ACCOUNTS_CHANGED = "android.accounts.action.VISIBLE_ACCOUNTS_CHANGED"; Loading @@ -364,6 +363,7 @@ public class AccountManager { /** * Authenticators may subscribe to get notifications about apps interested in their managed account * types using {@link #SUPPORTED_ACCOUNT_TYPES}. * Package name will be specified using {@link Intent.EXTRA_PACKAGE_NAME} * @hide */ public static final String ACTION_ACCOUNTS_LISTENER_PACKAGE_INSTALLED = Loading Loading @@ -1024,7 +1024,7 @@ public class AccountManager { public boolean isAccountVisible(Account account, int uid) { try { Integer visibility = mService.getAccountVisibility(account, uid); return visibility == VISIBILITY_USER_MANAGED_NOT_VISIBLE return visibility == VISIBILITY_USER_MANAGED_VISIBLE || visibility == VISIBILITY_VISIBLE; } catch (RemoteException re) { throw re.rethrowFromSystemServer(); Loading Loading @@ -1058,6 +1058,7 @@ public class AccountManager { /** * Gets visibility of certain account for given UID. Possible returned values are: * <ul> * <li>{@link #VISIBILITY_UNDEFINED}</li> * <li>{@link #VISIBILITY_VISIBLE}</li> * <li>{@link #VISIBILITY_USER_MANAGED_VISIBLE}</li> * <li>{@link #VISIBILITY_NOT_VISIBLE} Loading
core/java/android/accounts/ChooseAccountActivity.java +3 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,9 @@ public class ChooseAccountActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO This activity is only used by getAuthTokenByFeatures and can not see // VISIBILITY_USER_MANAGED_NOT_VISIBLE accounts. It should be moved to account managed // service. mAccounts = getIntent().getParcelableArrayExtra(AccountManager.KEY_ACCOUNTS); mAccountManagerResponse = getIntent().getParcelableExtra(AccountManager.KEY_ACCOUNT_MANAGER_RESPONSE); Loading
core/res/AndroidManifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -480,6 +480,9 @@ <protected-broadcast android:name="android.intent.action.ACTION_RADIO_OFF" /> <protected-broadcast android:name="android.accounts.LOGIN_ACCOUNTS_CHANGED" /> <protected-broadcast android:name="android.accounts.action.VISIBLE_ACCOUNTS_CHANGED" /> <protected-broadcast android:name="android.accounts.action.ACCOUNTS_LISTENER_PACKAGE_INSTALLED" /> <protected-broadcast android:name="com.android.sync.SYNC_CONN_STATUS_CHANGED" /> <protected-broadcast android:name="com.android.phone.SIP_INCOMING_CALL" /> Loading
services/core/java/com/android/server/accounts/AccountManagerService.java +720 −144 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/accounts/AccountsDb.java +2 −2 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ class AccountsDb implements AutoCloseable { boolean deleteAuthtokensByAccountIdAndType(long accountId, String authtokenType) { SQLiteDatabase db = mDeDatabase.getWritableDatabaseUserIsUnlocked(); return db.delete(CE_TABLE_AUTHTOKENS, AUTHTOKENS_ACCOUNTS_ID + "=?" + accountId + " AND " + AUTHTOKENS_TYPE + "=?", AUTHTOKENS_ACCOUNTS_ID + "=?" + " AND " + AUTHTOKENS_TYPE + "=?", new String[]{String.valueOf(accountId), authtokenType}) > 0; } Loading