From 2703a13f11c27c36d1354e49fb70dd663cdf397c Mon Sep 17 00:00:00 2001 From: Kenny Guy Date: Mon, 29 Jun 2015 13:24:24 +0000 Subject: [PATCH] Revert "Deprecate APIs for admin to create users." This reverts commit ea864c4d4d7ca390d3b67868fd2a640411bff020. Change-Id: I827e6364b61eeb9e1b2d3205b5e93e10b1df4bfe --- api/current.txt | 4 ++-- api/system-current.txt | 4 ++-- core/java/android/app/admin/DevicePolicyManager.java | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/api/current.txt b/api/current.txt index e0712deed2108..8c32371846746 100644 --- a/api/current.txt +++ b/api/current.txt @@ -5713,8 +5713,8 @@ package android.app.admin { method public void clearDeviceOwnerApp(java.lang.String); method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String); method public void clearUserRestriction(android.content.ComponentName, java.lang.String); - method public deprecated android.os.UserHandle createAndInitializeUser(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle); - method public deprecated android.os.UserHandle createUser(android.content.ComponentName, java.lang.String); + method public android.os.UserHandle createAndInitializeUser(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle); + method public android.os.UserHandle createUser(android.content.ComponentName, java.lang.String); method public void enableSystemApp(android.content.ComponentName, java.lang.String); method public int enableSystemApp(android.content.ComponentName, android.content.Intent); method public java.lang.String[] getAccountTypesWithManagementDisabled(); diff --git a/api/system-current.txt b/api/system-current.txt index 13bff9877929d..2b5c9d81dabd4 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5820,8 +5820,8 @@ package android.app.admin { method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String); method public void clearProfileOwner(android.content.ComponentName); method public void clearUserRestriction(android.content.ComponentName, java.lang.String); - method public deprecated android.os.UserHandle createAndInitializeUser(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle); - method public deprecated android.os.UserHandle createUser(android.content.ComponentName, java.lang.String); + method public android.os.UserHandle createAndInitializeUser(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle); + method public android.os.UserHandle createUser(android.content.ComponentName, java.lang.String); method public void enableSystemApp(android.content.ComponentName, java.lang.String); method public int enableSystemApp(android.content.ComponentName, android.content.Intent); method public java.lang.String[] getAccountTypesWithManagementDisabled(); diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index beda94d2e6974..b9862ca1d9262 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -3601,10 +3601,7 @@ public class DevicePolicyManager { * @see UserHandle * @return the {@link android.os.UserHandle} object for the created user, or {@code null} if the * user could not be created. - * - * @deprecated */ - @Deprecated public UserHandle createUser(@NonNull ComponentName admin, String name) { try { return mService.createUser(admin, name); @@ -3638,10 +3635,7 @@ public class DevicePolicyManager { * @see UserHandle * @return the {@link android.os.UserHandle} object for the created user, or {@code null} if the * user could not be created. - * - * @deprecated */ - @Deprecated public UserHandle createAndInitializeUser(@NonNull ComponentName admin, String name, String ownerName, @NonNull ComponentName profileOwnerComponent, Bundle adminExtras) { try {