diff options
author | Robin Lee <rgl@google.com> | 2016-09-12 16:25:28 +0900 |
---|---|---|
committer | Robin Lee <rgl@google.com> | 2016-09-12 16:25:28 +0900 |
commit | 788671647c6d615684d159a94ffb5b4367df6896 (patch) | |
tree | 7f87360c63515e2bc3b289dabedee4a5b3d0575d /src/com/android/settings/Utils.java | |
parent | 162aa53133676450a3337d80c419b1040ef415cd (diff) | |
download | packages_apps_Settings-788671647c6d615684d159a94ffb5b4367df6896.tar.gz packages_apps_Settings-788671647c6d615684d159a94ffb5b4367df6896.tar.bz2 packages_apps_Settings-788671647c6d615684d159a94ffb5b4367df6896.zip |
Eliminate useless 'isManagedProfile' utils method
This exists in UserManager now
Change-Id: If35326a1fe0de3c7bfde842c5c170899dc5d819b
Diffstat (limited to 'src/com/android/settings/Utils.java')
-rw-r--r-- | src/com/android/settings/Utils.java | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java index cd9215cb26..9e86688012 100644 --- a/src/com/android/settings/Utils.java +++ b/src/com/android/settings/Utils.java @@ -613,15 +613,6 @@ public final class Utils extends com.android.settingslib.Utils { } /** - * Returns true if the current profile is a managed one. - * - * @throws IllegalArgumentException if userManager is null. - */ - public static boolean isManagedProfile(@NonNull UserManager userManager) { - return isManagedProfile(userManager, UserHandle.myUserId()); - } - - /** * Retrieves the id for the given user's managed profile. * * @return the managed profile id or UserHandle.USER_NULL if there is none. @@ -637,19 +628,6 @@ public final class Utils extends com.android.settingslib.Utils { } /** - * Returns true if the userId passed in is a managed profile. - * - * @throws IllegalArgumentException if userManager is null. - */ - public static boolean isManagedProfile(@NonNull UserManager userManager, int userId) { - if (userManager == null) { - throw new IllegalArgumentException("userManager must not be null"); - } - UserInfo userInfo = userManager.getUserInfo(userId); - return (userInfo != null) ? userInfo.isManagedProfile() : false; - } - - /** * Returns the target user for a Settings activity. * * The target user can be either the current user, the user that launched this activity or |