Loading api/current.txt +2 −1 Original line number Original line Diff line number Diff line Loading @@ -2203,6 +2203,7 @@ package android.accounts { method public android.accounts.Account[] getAccounts(); method public android.accounts.Account[] getAccounts(); method public android.accounts.Account[] getAccountsByType(java.lang.String); method public android.accounts.Account[] getAccountsByType(java.lang.String); method public android.accounts.AccountManagerFuture<android.accounts.Account[]> getAccountsByTypeAndFeatures(java.lang.String, java.lang.String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.accounts.Account[]> getAccountsByTypeAndFeatures(java.lang.String, java.lang.String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler); method public android.accounts.Account[] getAccountsByTypeForPackage(java.lang.String, java.lang.String); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public deprecated android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public deprecated android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); Loading Loading @@ -4363,7 +4364,7 @@ package android.app.admin { method public boolean hasGrantedPolicy(android.content.ComponentName, int); method public boolean hasGrantedPolicy(android.content.ComponentName, int); method public boolean isActivePasswordSufficient(); method public boolean isActivePasswordSufficient(); method public boolean isAdminActive(android.content.ComponentName); method public boolean isAdminActive(android.content.ComponentName); method public boolean isDeviceOwner(java.lang.String); method public boolean isDeviceOwnerApp(java.lang.String); method public void lockNow(); method public void lockNow(); method public void removeActiveAdmin(android.content.ComponentName); method public void removeActiveAdmin(android.content.ComponentName); method public boolean resetPassword(java.lang.String, int); method public boolean resetPassword(java.lang.String, int); core/java/android/accounts/AccountManager.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -404,6 +404,23 @@ public class AccountManager { } } } } /** * Returns the accounts visible to the specified package, in an environment where some apps * are not authorized to view all accounts. This method can only be called by system apps. * @param type The type of accounts to return, null to retrieve all accounts * @param packageName The package name of the app for which the accounts are to be returned * @return An array of {@link Account}, one per matching account. Empty * (never null) if no accounts of the specified type have been added. */ public Account[] getAccountsByTypeForPackage(String type, String packageName) { try { return mService.getAccountsByTypeForPackage(type, packageName); } catch (RemoteException re) { // possible security exception throw new RuntimeException(re); } } /** /** * Lists all accounts of a particular type. The account type is a * Lists all accounts of a particular type. The account type is a * string token corresponding to the authenticator and useful domain * string token corresponding to the authenticator and useful domain Loading core/java/android/accounts/IAccountManager.aidl +1 −0 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,7 @@ interface IAccountManager { AuthenticatorDescription[] getAuthenticatorTypes(); AuthenticatorDescription[] getAuthenticatorTypes(); Account[] getAccounts(String accountType); Account[] getAccounts(String accountType); Account[] getAccountsForPackage(String packageName, int uid); Account[] getAccountsForPackage(String packageName, int uid); Account[] getAccountsByTypeForPackage(String type, String packageName); Account[] getAccountsAsUser(String accountType, int userId); Account[] getAccountsAsUser(String accountType, int userId); void hasFeatures(in IAccountManagerResponse response, in Account account, in String[] features); void hasFeatures(in IAccountManagerResponse response, in Account account, in String[] features); void getAccountsByFeatures(in IAccountManagerResponse response, String accountType, in String[] features); void getAccountsByFeatures(in IAccountManagerResponse response, String accountType, in String[] features); Loading core/java/android/app/admin/DevicePolicyManager.java +21 −6 Original line number Original line Diff line number Diff line Loading @@ -1537,14 +1537,21 @@ public class DevicePolicyManager { return false; return false; } } /** /** * Used to determine if a particular package has been registered as a Device Owner admin. * Used to determine if a particular package has been registered as a Device Owner app. * Device Owner admins cannot be deactivated by the user unless the Device Owner itself allows * A device owner app is a special device admin that cannot be deactivated by the user, once * it. And Device Owner packages cannot be uninstalled, once registered. * activated as a device admin. It also cannot be uninstalled. To check if a particular * @param packageName the package name to check against the registered device owner. * package is currently registered as the device owner app, pass in the package name from * @return whether or not the package is registered as the Device Owner. * {@link Context#getPackageName()} to this method.<p/>This is useful for device * admin apps that want to check if they are also registered as the device owner app. The * exact mechanism by which a device admin app is registered as a device owner app is defined by * the setup process. * @param packageName the package name of the app, to compare with the registered device owner * app, if any. * @return whether or not the package is registered as the device owner app. */ */ public boolean isDeviceOwner(String packageName) { public boolean isDeviceOwnerApp(String packageName) { if (mService != null) { if (mService != null) { try { try { return mService.isDeviceOwner(packageName); return mService.isDeviceOwner(packageName); Loading @@ -1555,6 +1562,14 @@ public class DevicePolicyManager { return false; return false; } } /** * @hide * Redirect to isDeviceOwnerApp. */ public boolean isDeviceOwner(String packageName) { return isDeviceOwnerApp(packageName); } /** @hide */ /** @hide */ public String getDeviceOwner() { public String getDeviceOwner() { if (mService != null) { if (mService != null) { Loading core/java/android/content/Intent.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2424,8 +2424,8 @@ public class Intent implements Parcelable, Cloneable { * which is of type <code>ArrayList<RestrictionEntry></code>. It can also * which is of type <code>ArrayList<RestrictionEntry></code>. It can also * contain an extra {@link #EXTRA_RESTRICTIONS_INTENT}, which is of type <code>Intent</code>. * contain an extra {@link #EXTRA_RESTRICTIONS_INTENT}, which is of type <code>Intent</code>. * The activity specified by that intent will be launched for a result which must contain * The activity specified by that intent will be launched for a result which must contain * the extra {@link #EXTRA_RESTRICTIONS_LIST}. The keys and values of the returned restrictions * one of the extras {@link #EXTRA_RESTRICTIONS_LIST} or {@link #EXTRA_RESTRICTIONS_BUNDLE}. * will be persisted. * The keys and values of the returned restrictions will be persisted. * @see RestrictionEntry * @see RestrictionEntry */ */ public static final String ACTION_GET_RESTRICTION_ENTRIES = public static final String ACTION_GET_RESTRICTION_ENTRIES = Loading Loading
api/current.txt +2 −1 Original line number Original line Diff line number Diff line Loading @@ -2203,6 +2203,7 @@ package android.accounts { method public android.accounts.Account[] getAccounts(); method public android.accounts.Account[] getAccounts(); method public android.accounts.Account[] getAccountsByType(java.lang.String); method public android.accounts.Account[] getAccountsByType(java.lang.String); method public android.accounts.AccountManagerFuture<android.accounts.Account[]> getAccountsByTypeAndFeatures(java.lang.String, java.lang.String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.accounts.Account[]> getAccountsByTypeAndFeatures(java.lang.String, java.lang.String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler); method public android.accounts.Account[] getAccountsByTypeForPackage(java.lang.String, java.lang.String); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public deprecated android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public deprecated android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); Loading Loading @@ -4363,7 +4364,7 @@ package android.app.admin { method public boolean hasGrantedPolicy(android.content.ComponentName, int); method public boolean hasGrantedPolicy(android.content.ComponentName, int); method public boolean isActivePasswordSufficient(); method public boolean isActivePasswordSufficient(); method public boolean isAdminActive(android.content.ComponentName); method public boolean isAdminActive(android.content.ComponentName); method public boolean isDeviceOwner(java.lang.String); method public boolean isDeviceOwnerApp(java.lang.String); method public void lockNow(); method public void lockNow(); method public void removeActiveAdmin(android.content.ComponentName); method public void removeActiveAdmin(android.content.ComponentName); method public boolean resetPassword(java.lang.String, int); method public boolean resetPassword(java.lang.String, int);
core/java/android/accounts/AccountManager.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -404,6 +404,23 @@ public class AccountManager { } } } } /** * Returns the accounts visible to the specified package, in an environment where some apps * are not authorized to view all accounts. This method can only be called by system apps. * @param type The type of accounts to return, null to retrieve all accounts * @param packageName The package name of the app for which the accounts are to be returned * @return An array of {@link Account}, one per matching account. Empty * (never null) if no accounts of the specified type have been added. */ public Account[] getAccountsByTypeForPackage(String type, String packageName) { try { return mService.getAccountsByTypeForPackage(type, packageName); } catch (RemoteException re) { // possible security exception throw new RuntimeException(re); } } /** /** * Lists all accounts of a particular type. The account type is a * Lists all accounts of a particular type. The account type is a * string token corresponding to the authenticator and useful domain * string token corresponding to the authenticator and useful domain Loading
core/java/android/accounts/IAccountManager.aidl +1 −0 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,7 @@ interface IAccountManager { AuthenticatorDescription[] getAuthenticatorTypes(); AuthenticatorDescription[] getAuthenticatorTypes(); Account[] getAccounts(String accountType); Account[] getAccounts(String accountType); Account[] getAccountsForPackage(String packageName, int uid); Account[] getAccountsForPackage(String packageName, int uid); Account[] getAccountsByTypeForPackage(String type, String packageName); Account[] getAccountsAsUser(String accountType, int userId); Account[] getAccountsAsUser(String accountType, int userId); void hasFeatures(in IAccountManagerResponse response, in Account account, in String[] features); void hasFeatures(in IAccountManagerResponse response, in Account account, in String[] features); void getAccountsByFeatures(in IAccountManagerResponse response, String accountType, in String[] features); void getAccountsByFeatures(in IAccountManagerResponse response, String accountType, in String[] features); Loading
core/java/android/app/admin/DevicePolicyManager.java +21 −6 Original line number Original line Diff line number Diff line Loading @@ -1537,14 +1537,21 @@ public class DevicePolicyManager { return false; return false; } } /** /** * Used to determine if a particular package has been registered as a Device Owner admin. * Used to determine if a particular package has been registered as a Device Owner app. * Device Owner admins cannot be deactivated by the user unless the Device Owner itself allows * A device owner app is a special device admin that cannot be deactivated by the user, once * it. And Device Owner packages cannot be uninstalled, once registered. * activated as a device admin. It also cannot be uninstalled. To check if a particular * @param packageName the package name to check against the registered device owner. * package is currently registered as the device owner app, pass in the package name from * @return whether or not the package is registered as the Device Owner. * {@link Context#getPackageName()} to this method.<p/>This is useful for device * admin apps that want to check if they are also registered as the device owner app. The * exact mechanism by which a device admin app is registered as a device owner app is defined by * the setup process. * @param packageName the package name of the app, to compare with the registered device owner * app, if any. * @return whether or not the package is registered as the device owner app. */ */ public boolean isDeviceOwner(String packageName) { public boolean isDeviceOwnerApp(String packageName) { if (mService != null) { if (mService != null) { try { try { return mService.isDeviceOwner(packageName); return mService.isDeviceOwner(packageName); Loading @@ -1555,6 +1562,14 @@ public class DevicePolicyManager { return false; return false; } } /** * @hide * Redirect to isDeviceOwnerApp. */ public boolean isDeviceOwner(String packageName) { return isDeviceOwnerApp(packageName); } /** @hide */ /** @hide */ public String getDeviceOwner() { public String getDeviceOwner() { if (mService != null) { if (mService != null) { Loading
core/java/android/content/Intent.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2424,8 +2424,8 @@ public class Intent implements Parcelable, Cloneable { * which is of type <code>ArrayList<RestrictionEntry></code>. It can also * which is of type <code>ArrayList<RestrictionEntry></code>. It can also * contain an extra {@link #EXTRA_RESTRICTIONS_INTENT}, which is of type <code>Intent</code>. * contain an extra {@link #EXTRA_RESTRICTIONS_INTENT}, which is of type <code>Intent</code>. * The activity specified by that intent will be launched for a result which must contain * The activity specified by that intent will be launched for a result which must contain * the extra {@link #EXTRA_RESTRICTIONS_LIST}. The keys and values of the returned restrictions * one of the extras {@link #EXTRA_RESTRICTIONS_LIST} or {@link #EXTRA_RESTRICTIONS_BUNDLE}. * will be persisted. * The keys and values of the returned restrictions will be persisted. * @see RestrictionEntry * @see RestrictionEntry */ */ public static final String ACTION_GET_RESTRICTION_ENTRIES = public static final String ACTION_GET_RESTRICTION_ENTRIES = Loading