Loading core/java/android/accounts/AccountManager.java +10 −3 Original line number Diff line number Diff line Loading @@ -288,7 +288,8 @@ public class AccountManager { } /** * Account visibility was not set. * Account visibility was not set. Default visibility value will be used. * See {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE}, {@link #PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE} */ public static final int VISIBILITY_UNDEFINED = 0; Loading Loading @@ -919,7 +920,14 @@ public class AccountManager { * Package name must match installed application, or be equal to * {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE} or {@link #PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE}. * <p> * See {@link #getAccountVisibility} for possible values. * Possible visibility values: * <ul> * <li>{@link #VISIBILITY_UNDEFINED}</li> * <li>{@link #VISIBILITY_VISIBLE}</li> * <li>{@link #VISIBILITY_USER_MANAGED_VISIBLE}</li> * <li>{@link #VISIBILITY_NOT_VISIBLE} * <li>{@link #VISIBILITY_USER_MANAGED_NOT_VISIBLE}</li> * </ul> * <p> * This method requires the caller to have a signature match with the authenticator that owns * the specified account. Loading @@ -944,7 +952,6 @@ public class AccountManager { /** * Get visibility of certain account for given application. 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 services/core/java/com/android/server/accounts/AccountManagerService.java +8 −3 Original line number Diff line number Diff line Loading @@ -481,8 +481,13 @@ public class AccountManagerService managedTypes.add(accountType); } long identityToken = clearCallingIdentity(); try { return getAccountsAndVisibilityForPackage(packageName, managedTypes, callingUid, getUserAccounts(UserHandle.getUserId(callingUid))); } finally { restoreCallingIdentity(identityToken); } } /* Loading Loading @@ -560,7 +565,7 @@ public class AccountManagerService a.type); throw new SecurityException(msg); } return getAccountVisibility(a, packageName, return resolveAccountVisibility(a, packageName, getUserAccounts(UserHandle.getUserId(callingUid))); } Loading Loading
core/java/android/accounts/AccountManager.java +10 −3 Original line number Diff line number Diff line Loading @@ -288,7 +288,8 @@ public class AccountManager { } /** * Account visibility was not set. * Account visibility was not set. Default visibility value will be used. * See {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE}, {@link #PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE} */ public static final int VISIBILITY_UNDEFINED = 0; Loading Loading @@ -919,7 +920,14 @@ public class AccountManager { * Package name must match installed application, or be equal to * {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE} or {@link #PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE}. * <p> * See {@link #getAccountVisibility} for possible values. * Possible visibility values: * <ul> * <li>{@link #VISIBILITY_UNDEFINED}</li> * <li>{@link #VISIBILITY_VISIBLE}</li> * <li>{@link #VISIBILITY_USER_MANAGED_VISIBLE}</li> * <li>{@link #VISIBILITY_NOT_VISIBLE} * <li>{@link #VISIBILITY_USER_MANAGED_NOT_VISIBLE}</li> * </ul> * <p> * This method requires the caller to have a signature match with the authenticator that owns * the specified account. Loading @@ -944,7 +952,6 @@ public class AccountManager { /** * Get visibility of certain account for given application. 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
services/core/java/com/android/server/accounts/AccountManagerService.java +8 −3 Original line number Diff line number Diff line Loading @@ -481,8 +481,13 @@ public class AccountManagerService managedTypes.add(accountType); } long identityToken = clearCallingIdentity(); try { return getAccountsAndVisibilityForPackage(packageName, managedTypes, callingUid, getUserAccounts(UserHandle.getUserId(callingUid))); } finally { restoreCallingIdentity(identityToken); } } /* Loading Loading @@ -560,7 +565,7 @@ public class AccountManagerService a.type); throw new SecurityException(msg); } return getAccountVisibility(a, packageName, return resolveAccountVisibility(a, packageName, getUserAccounts(UserHandle.getUserId(callingUid))); } Loading