Loading src/com/android/settings/Utils.java +6 −5 Original line number Diff line number Diff line Loading @@ -372,7 +372,7 @@ public final class Utils extends com.android.settingslib.Utils { } public static boolean hasMultipleUsers(Context context) { return ((UserManager) context.getSystemService(Context.USER_SERVICE)) return context.getSystemService(UserManager.class) .getUsers().size() > 1; } Loading Loading @@ -666,7 +666,7 @@ public final class Utils extends com.android.settingslib.Utils { * @throws SecurityException if the given userId does not belong to the current user group. */ public static int enforceSameOwner(Context context, int userId) { final UserManager um = UserManager.get(context); final UserManager um = context.getSystemService(UserManager.class); final int[] profileIds = um.getProfileIdsWithDisabled(UserHandle.myUserId()); if (ArrayUtils.contains(profileIds, userId)) { return userId; Loading @@ -686,7 +686,7 @@ public final class Utils extends com.android.settingslib.Utils { * Returns the user id of the credential owner of the given user id. */ public static int getCredentialOwnerUserId(Context context, int userId) { final UserManager um = UserManager.get(context); final UserManager um = context.getSystemService(UserManager.class); return um.getCredentialOwnerProfile(userId); } Loading Loading @@ -823,7 +823,8 @@ public final class Utils extends com.android.settingslib.Utils { } public static boolean isDemoUser(Context context) { return UserManager.isDeviceInDemoMode(context) && UserManager.get(context).isDemoUser(); return UserManager.isDeviceInDemoMode(context) && context.getSystemService(UserManager.class).isDemoUser(); } public static ComponentName getDeviceOwnerComponent(Context context) { Loading Loading @@ -1051,7 +1052,7 @@ public final class Utils extends com.android.settingslib.Utils { final boolean isWork = args != null ? args.getInt(ProfileSelectFragment.EXTRA_PROFILE) == ProfileSelectFragment.ProfileType.WORK : false; if (FeatureFlagUtils.isEnabled(activity, FeatureFlags.PERSONAL_WORK_PROFILE) && UserManager.get(activity).getUserProfiles().size() > 1 && activity.getSystemService(UserManager.class).getUserProfiles().size() > 1 && ProfileFragmentBridge.FRAGMENT_MAP.get(fragmentName) != null && !isWork && !isPersonal) { f = Fragment.instantiate(activity, ProfileFragmentBridge.FRAGMENT_MAP.get(fragmentName), Loading src/com/android/settings/network/telephony/CellInfoUtil.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public final class CellInfoUtil { /** * Returns the title of the network obtained in the manual search. * * @param cellId contains the information of the network. * @param cellId contains the identity of the network. * @param networkMccMnc contains the MCCMNC string of the network * @return Long Name if not null/empty, otherwise Short Name if not null/empty, * else MCCMNC string. Loading Loading
src/com/android/settings/Utils.java +6 −5 Original line number Diff line number Diff line Loading @@ -372,7 +372,7 @@ public final class Utils extends com.android.settingslib.Utils { } public static boolean hasMultipleUsers(Context context) { return ((UserManager) context.getSystemService(Context.USER_SERVICE)) return context.getSystemService(UserManager.class) .getUsers().size() > 1; } Loading Loading @@ -666,7 +666,7 @@ public final class Utils extends com.android.settingslib.Utils { * @throws SecurityException if the given userId does not belong to the current user group. */ public static int enforceSameOwner(Context context, int userId) { final UserManager um = UserManager.get(context); final UserManager um = context.getSystemService(UserManager.class); final int[] profileIds = um.getProfileIdsWithDisabled(UserHandle.myUserId()); if (ArrayUtils.contains(profileIds, userId)) { return userId; Loading @@ -686,7 +686,7 @@ public final class Utils extends com.android.settingslib.Utils { * Returns the user id of the credential owner of the given user id. */ public static int getCredentialOwnerUserId(Context context, int userId) { final UserManager um = UserManager.get(context); final UserManager um = context.getSystemService(UserManager.class); return um.getCredentialOwnerProfile(userId); } Loading Loading @@ -823,7 +823,8 @@ public final class Utils extends com.android.settingslib.Utils { } public static boolean isDemoUser(Context context) { return UserManager.isDeviceInDemoMode(context) && UserManager.get(context).isDemoUser(); return UserManager.isDeviceInDemoMode(context) && context.getSystemService(UserManager.class).isDemoUser(); } public static ComponentName getDeviceOwnerComponent(Context context) { Loading Loading @@ -1051,7 +1052,7 @@ public final class Utils extends com.android.settingslib.Utils { final boolean isWork = args != null ? args.getInt(ProfileSelectFragment.EXTRA_PROFILE) == ProfileSelectFragment.ProfileType.WORK : false; if (FeatureFlagUtils.isEnabled(activity, FeatureFlags.PERSONAL_WORK_PROFILE) && UserManager.get(activity).getUserProfiles().size() > 1 && activity.getSystemService(UserManager.class).getUserProfiles().size() > 1 && ProfileFragmentBridge.FRAGMENT_MAP.get(fragmentName) != null && !isWork && !isPersonal) { f = Fragment.instantiate(activity, ProfileFragmentBridge.FRAGMENT_MAP.get(fragmentName), Loading
src/com/android/settings/network/telephony/CellInfoUtil.java +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public final class CellInfoUtil { /** * Returns the title of the network obtained in the manual search. * * @param cellId contains the information of the network. * @param cellId contains the identity of the network. * @param networkMccMnc contains the MCCMNC string of the network * @return Long Name if not null/empty, otherwise Short Name if not null/empty, * else MCCMNC string. Loading