Loading core/java/android/app/ActivityManager.java +52 −61 Original line number Diff line number Diff line Loading @@ -716,8 +716,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getFrontActivityScreenCompatMode(); } catch (RemoteException e) { // System dead, we will be dead too soon! return 0; throw e.rethrowAsRuntimeException(); } } Loading @@ -726,7 +725,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setFrontActivityScreenCompatMode(mode); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading @@ -735,8 +734,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getPackageScreenCompatMode(packageName); } catch (RemoteException e) { // System dead, we will be dead too soon! return 0; throw e.rethrowAsRuntimeException(); } } Loading @@ -745,7 +743,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setPackageScreenCompatMode(packageName, mode); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading @@ -754,8 +752,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getPackageAskScreenCompat(packageName); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -764,7 +761,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setPackageAskScreenCompat(packageName, ask); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1049,6 +1046,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getTaskDescriptionIcon(iconFilename, userId); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } return null; Loading Loading @@ -1429,8 +1427,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getRecentTasks(maxNum, flags, UserHandle.myUserId()); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -1455,8 +1452,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getRecentTasks(maxNum, flags, userId); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1591,8 +1587,7 @@ public class ActivityManager { try { appTasks = ActivityManagerNative.getDefault().getAppTasks(mContext.getPackageName()); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } int numAppTasks = appTasks.size(); for (int i = 0; i < numAppTasks; i++) { Loading @@ -1617,7 +1612,7 @@ public class ActivityManager { try { mAppTaskThumbnailSize = ActivityManagerNative.getDefault().getAppTaskThumbnailSize(); } catch (RemoteException e) { throw new IllegalStateException("System dead?", e); throw e.rethrowAsRuntimeException(); } } } Loading Loading @@ -1683,7 +1678,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().addAppTask(activity.getActivityToken(), intent, description, thumbnail); } catch (RemoteException e) { throw new IllegalStateException("System dead?", e); throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1725,8 +1720,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getTasks(maxNum, 0); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -1742,8 +1736,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().removeTask(taskId); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1902,8 +1895,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getTaskThumbnail(id); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -1912,8 +1904,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().isInHomeStack(taskId); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1962,7 +1953,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().moveTaskToFront(taskId, flags, options); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2148,8 +2139,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault() .getServices(maxNum, 0); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -2164,8 +2154,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault() .getRunningServiceControlPanel(service); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2269,6 +2258,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().getMemoryInfo(outInfo); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2387,7 +2377,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().clearApplicationUserData(packageName, observer, UserHandle.myUserId()); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2421,8 +2411,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getGrantedUriPermissions(packageName, UserHandle.myUserId()); } catch (RemoteException e) { Log.e(TAG, "Couldn't get granted URI permissions for :" + packageName, e); return ParceledListSlice.emptyList(); throw e.rethrowAsRuntimeException(); } } Loading @@ -2440,7 +2429,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().clearGrantedUriPermissions(packageName, UserHandle.myUserId()); } catch (RemoteException e) { Log.e(TAG, "Couldn't clear granted URI permissions for :" + packageName, e); throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2560,7 +2549,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getProcessesInErrorState(); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2874,7 +2863,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getRunningExternalApplications(); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -2891,7 +2880,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().setProcessMemoryTrimLevel(process, userId, level); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -2909,7 +2898,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getRunningAppProcesses(); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -2928,7 +2917,7 @@ public class ActivityManager { mContext.getOpPackageName()); return RunningAppProcessInfo.procStateToImportance(procState); } catch (RemoteException e) { return RunningAppProcessInfo.IMPORTANCE_GONE; throw e.rethrowAsRuntimeException(); } } Loading @@ -2947,6 +2936,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().getMyMemoryState(outState); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -2965,7 +2955,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getProcessMemoryInfo(pids); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2999,6 +2989,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().killBackgroundProcesses(packageName, UserHandle.myUserId()); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3015,7 +3006,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().killUid(UserHandle.getAppId(uid), UserHandle.getUserId(uid), reason); } catch (RemoteException e) { Log.e(TAG, "Couldn't kill uid:" + uid, e); throw e.rethrowAsRuntimeException(); } } Loading @@ -3042,6 +3033,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().forceStopPackage(packageName, userId); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3060,8 +3052,8 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getDeviceConfigurationInfo(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } return null; } /** Loading Loading @@ -3150,8 +3142,8 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().isUserAMonkey(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } return false; } /** Loading Loading @@ -3226,10 +3218,8 @@ public class ActivityManager { return AppGlobals.getPackageManager() .checkUidPermission(permission, uid); } catch (RemoteException e) { // Should never happen, but if it does... deny! Slog.e(TAG, "PackageManager is dead?!?", e); throw e.rethrowAsRuntimeException(); } return PackageManager.PERMISSION_DENIED; } /** @hide */ Loading @@ -3238,10 +3228,8 @@ public class ActivityManager { return AppGlobals.getPackageManager() .checkUidPermission(permission, uid); } catch (RemoteException e) { // Should never happen, but if it does... deny! Slog.e(TAG, "PackageManager is dead?!?", e); throw e.rethrowAsRuntimeException(); } return PackageManager.PERMISSION_DENIED; } /** Loading Loading @@ -3277,7 +3265,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().handleIncomingUser(callingPid, callingUid, userId, allowAll, requireFull, name, callerPackage); } catch (RemoteException e) { throw new SecurityException("Failed calling activity manager", e); throw e.rethrowAsRuntimeException(); } } Loading @@ -3292,7 +3280,7 @@ public class ActivityManager { ui = ActivityManagerNative.getDefault().getCurrentUser(); return ui != null ? ui.id : 0; } catch (RemoteException e) { return 0; throw e.rethrowAsRuntimeException(); } } Loading @@ -3304,7 +3292,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().switchUser(userid); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -3328,7 +3316,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().isUserRunning(userId, 0); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -3338,7 +3326,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().isUserRunning(userId, ActivityManager.FLAG_AND_LOCKED); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -3348,7 +3336,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().isUserRunning(userId, ActivityManager.FLAG_AND_UNLOCKED); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -3433,6 +3421,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, pssSize, mContext.getPackageName()); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3451,6 +3440,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, 0, null); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3461,6 +3451,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().startLockTaskMode(taskId); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3471,6 +3462,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().stopLockTaskMode(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3497,7 +3489,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getLockTaskModeState(); } catch (RemoteException e) { return ActivityManager.LOCK_TASK_MODE_NONE; throw e.rethrowAsRuntimeException(); } } Loading @@ -3520,7 +3512,7 @@ public class ActivityManager { try { mAppTaskImpl.finishAndRemoveTask(); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); throw e.rethrowAsRuntimeException(); } } Loading @@ -3533,8 +3525,7 @@ public class ActivityManager { try { return mAppTaskImpl.getTaskInfo(); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -3548,7 +3539,7 @@ public class ActivityManager { try { mAppTaskImpl.moveToFront(); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -3590,7 +3581,7 @@ public class ActivityManager { try { mAppTaskImpl.setExcludeFromRecents(exclude); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); throw e.rethrowAsRuntimeException(); } } } Loading core/java/android/app/ApplicationPackageManager.java +110 −132 File changed.Preview size limit exceeded, changes collapsed. Show changes core/java/android/os/UserManager.java +59 −95 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.storage.StorageManager; import android.provider.Settings; import android.util.Log; import android.view.WindowManager.LayoutParams; import com.android.internal.R; Loading Loading @@ -700,8 +699,7 @@ public class UserManager { try { return mService.getUserInfo(getUserHandle()).name; } catch (RemoteException re) { Log.w(TAG, "Could not get user name", re); return ""; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -771,8 +769,7 @@ public class UserManager { try { return mService.isRestricted(); } catch (RemoteException re) { Log.w(TAG, "Could not check if user is limited ", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -784,8 +781,7 @@ public class UserManager { try { return mService.canHaveRestrictedProfile(userId); } catch (RemoteException re) { Log.w(TAG, "Could not check if user can have restricted profile", re); return false; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -847,8 +843,8 @@ public class UserManager { public boolean isUserRunning(int userId) { try { return ActivityManagerNative.getDefault().isUserRunning(userId, 0); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading @@ -864,8 +860,8 @@ public class UserManager { // TODO: reconcile stopped vs stopping? return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_OR_STOPPED); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -893,8 +889,8 @@ public class UserManager { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_AND_LOCKED); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -922,8 +918,8 @@ public class UserManager { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_AND_UNLOCKED); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -968,8 +964,7 @@ public class UserManager { try { return mService.getUserInfo(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get user info", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -990,8 +985,7 @@ public class UserManager { try { return mService.getUserRestrictions(userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get user restrictions", re); return Bundle.EMPTY; throw re.rethrowAsRuntimeException(); } } Loading @@ -1007,9 +1001,7 @@ public class UserManager { try { return mService.hasBaseUserRestriction(restrictionKey, userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get base user restrictions for user " + userHandle.getIdentifier(), re); return false; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -1065,7 +1057,7 @@ public class UserManager { try { mService.setUserRestriction(key, value, userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not set user restriction", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1092,8 +1084,7 @@ public class UserManager { return mService.hasUserRestriction(restrictionKey, userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not check user restrictions", re); return false; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -1147,7 +1138,7 @@ public class UserManager { mService.setUserRestriction(DISALLOW_OUTGOING_CALLS, true, user.id); } } catch (RemoteException re) { Log.w(TAG, "Could not create a user", re); throw re.rethrowAsRuntimeException(); } return user; } Loading @@ -1167,7 +1158,7 @@ public class UserManager { Settings.Secure.SKIP_FIRST_USE_HINTS, "1", guest.id); } } catch (RemoteException re) { Log.w(TAG, "Could not create a user", re); throw re.rethrowAsRuntimeException(); } return guest; } Loading @@ -1188,8 +1179,7 @@ public class UserManager { try { return mService.createProfileForUser(name, flags, userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not create a user", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1211,10 +1201,9 @@ public class UserManager { UserHandle.of(user.id)); } return user; } catch (RemoteException e) { Log.w(TAG, "Could not create a restricted profile", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } return null; } /** Loading Loading @@ -1282,8 +1271,7 @@ public class UserManager { try { return mService.getSeedAccountName(); } catch (RemoteException re) { Log.w(TAG, "Could not get the seed account name", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1297,8 +1285,7 @@ public class UserManager { try { return mService.getSeedAccountType(); } catch (RemoteException re) { Log.w(TAG, "Could not get the seed account type", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1314,8 +1301,7 @@ public class UserManager { try { return mService.getSeedAccountOptions(); } catch (RemoteException re) { Log.w(TAG, "Could not get the seed account options", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1336,7 +1322,7 @@ public class UserManager { mService.setSeedAccountData(userId, accountName, accountType, accountOptions, /* persist= */ true); } catch (RemoteException re) { Log.w(TAG, "Could not set the seed account data", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1349,7 +1335,7 @@ public class UserManager { try { mService.clearSeedAccountData(); } catch (RemoteException re) { Log.w(TAG, "Could not clear the seed account data", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1364,8 +1350,7 @@ public class UserManager { try { return mService.markGuestForDeletion(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not mark guest for deletion", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1384,8 +1369,8 @@ public class UserManager { public void setUserEnabled(@UserIdInt int userHandle) { try { mService.setUserEnabled(userHandle); } catch (RemoteException e) { Log.w(TAG, "Could not enable the profile", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading @@ -1407,8 +1392,7 @@ public class UserManager { try { return mService.getUsers(false); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1430,8 +1414,7 @@ public class UserManager { } return result; } catch (RemoteException re) { Log.w(TAG, "Could not get users list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1447,8 +1430,7 @@ public class UserManager { try { return mService.getUserAccount(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get user account", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1464,7 +1446,7 @@ public class UserManager { try { mService.setUserAccount(userHandle, accountName); } catch (RemoteException re) { Log.w(TAG, "Could not set user account", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1479,8 +1461,7 @@ public class UserManager { try { return mService.getPrimaryUser(); } catch (RemoteException re) { Log.w(TAG, "Could not get Primary user", re); return null; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -1517,8 +1498,7 @@ public class UserManager { try { return mService.canAddMoreManagedProfiles(userId, allowedToRemoveOne); } catch (RemoteException re) { Log.w(TAG, "Could not check if we can add more managed profiles", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1537,8 +1517,7 @@ public class UserManager { try { return mService.getProfiles(userHandle, false /* enabledOnly */); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1553,8 +1532,7 @@ public class UserManager { try { return mService.isSameProfileGroup(userId, otherUserId); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1572,8 +1550,7 @@ public class UserManager { try { return mService.getProfiles(userHandle, true /* enabledOnly */); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1589,8 +1566,7 @@ public class UserManager { try { users = mService.getProfiles(UserHandle.myUserId(), true /* enabledOnly */); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } for (UserInfo info : users) { UserHandle userHandle = new UserHandle(info.id); Loading @@ -1610,8 +1586,7 @@ public class UserManager { try { return mService.getCredentialOwnerProfile(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get credential owner", re); return -1; throw re.rethrowAsRuntimeException(); } } Loading @@ -1625,8 +1600,7 @@ public class UserManager { try { return mService.getProfileParent(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get profile parent", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1640,8 +1614,8 @@ public class UserManager { public void setQuietModeEnabled(@UserIdInt int userHandle, boolean enableQuietMode) { try { mService.setQuietModeEnabled(userHandle, enableQuietMode); } catch (RemoteException e) { Log.w(TAG, "Could not change the profile's quiet mode", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading @@ -1654,10 +1628,9 @@ public class UserManager { public boolean isQuietModeEnabled(UserHandle userHandle) { try { return mService.isQuietModeEnabled(userHandle.getIdentifier()); } catch (RemoteException e) { Log.w(TAG, "Could not query the profile's quiet mode", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } return false; } /** Loading Loading @@ -1742,8 +1715,7 @@ public class UserManager { try { return mService.getUsers(excludeDying); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1757,8 +1729,7 @@ public class UserManager { try { return mService.removeUser(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not remove user ", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1774,7 +1745,7 @@ public class UserManager { try { mService.setUserName(userHandle, name); } catch (RemoteException re) { Log.w(TAG, "Could not set the user name ", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1788,7 +1759,7 @@ public class UserManager { try { mService.setUserIcon(userHandle, icon); } catch (RemoteException re) { Log.w(TAG, "Could not set the user icon ", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1813,7 +1784,7 @@ public class UserManager { } } } catch (RemoteException re) { Log.w(TAG, "Could not get the user icon ", re); throw re.rethrowAsRuntimeException(); } return null; } Loading Loading @@ -1869,9 +1840,8 @@ public class UserManager { try { return mService.getUserSerialNumber(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get serial number for user " + userHandle); throw re.rethrowAsRuntimeException(); } return -1; } /** Loading @@ -1887,9 +1857,8 @@ public class UserManager { try { return mService.getUserHandle(userSerialNumber); } catch (RemoteException re) { Log.w(TAG, "Could not get userHandle for user " + userSerialNumber); throw re.rethrowAsRuntimeException(); } return -1; } /** Loading @@ -1915,9 +1884,8 @@ public class UserManager { try { return mService.getApplicationRestrictions(packageName); } catch (RemoteException re) { Log.w(TAG, "Could not get application restrictions for package " + packageName); throw re.rethrowAsRuntimeException(); } return null; } /** Loading @@ -1927,9 +1895,8 @@ public class UserManager { try { return mService.getApplicationRestrictionsForUser(packageName, user.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get application restrictions for user " + user.getIdentifier()); throw re.rethrowAsRuntimeException(); } return null; } /** Loading @@ -1940,7 +1907,7 @@ public class UserManager { try { mService.setApplicationRestrictions(packageName, restrictions, user.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not set application restrictions for user " + user.getIdentifier()); throw re.rethrowAsRuntimeException(); } } Loading @@ -1964,7 +1931,7 @@ public class UserManager { try { mService.setDefaultGuestRestrictions(restrictions); } catch (RemoteException re) { Log.w(TAG, "Could not set guest restrictions"); throw re.rethrowAsRuntimeException(); } } Loading @@ -1976,9 +1943,8 @@ public class UserManager { try { return mService.getDefaultGuestRestrictions(); } catch (RemoteException re) { Log.w(TAG, "Could not set guest restrictions"); throw re.rethrowAsRuntimeException(); } return new Bundle(); } /** Loading @@ -1991,8 +1957,7 @@ public class UserManager { try { return mService.getUserCreationTime(userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get user creation time", re); return 0; throw re.rethrowAsRuntimeException(); } } Loading @@ -2008,8 +1973,7 @@ public class UserManager { try { return mService.someUserHasSeedAccount(accountName, accountType); } catch (RemoteException re) { Log.w(TAG, "Could not check seed accounts", re); return false; throw re.rethrowAsRuntimeException(); } } } Loading
core/java/android/app/ActivityManager.java +52 −61 Original line number Diff line number Diff line Loading @@ -716,8 +716,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getFrontActivityScreenCompatMode(); } catch (RemoteException e) { // System dead, we will be dead too soon! return 0; throw e.rethrowAsRuntimeException(); } } Loading @@ -726,7 +725,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setFrontActivityScreenCompatMode(mode); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading @@ -735,8 +734,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getPackageScreenCompatMode(packageName); } catch (RemoteException e) { // System dead, we will be dead too soon! return 0; throw e.rethrowAsRuntimeException(); } } Loading @@ -745,7 +743,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setPackageScreenCompatMode(packageName, mode); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading @@ -754,8 +752,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getPackageAskScreenCompat(packageName); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -764,7 +761,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setPackageAskScreenCompat(packageName, ask); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1049,6 +1046,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getTaskDescriptionIcon(iconFilename, userId); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } return null; Loading Loading @@ -1429,8 +1427,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getRecentTasks(maxNum, flags, UserHandle.myUserId()); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -1455,8 +1452,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getRecentTasks(maxNum, flags, userId); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1591,8 +1587,7 @@ public class ActivityManager { try { appTasks = ActivityManagerNative.getDefault().getAppTasks(mContext.getPackageName()); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } int numAppTasks = appTasks.size(); for (int i = 0; i < numAppTasks; i++) { Loading @@ -1617,7 +1612,7 @@ public class ActivityManager { try { mAppTaskThumbnailSize = ActivityManagerNative.getDefault().getAppTaskThumbnailSize(); } catch (RemoteException e) { throw new IllegalStateException("System dead?", e); throw e.rethrowAsRuntimeException(); } } } Loading Loading @@ -1683,7 +1678,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().addAppTask(activity.getActivityToken(), intent, description, thumbnail); } catch (RemoteException e) { throw new IllegalStateException("System dead?", e); throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1725,8 +1720,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getTasks(maxNum, 0); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -1742,8 +1736,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().removeTask(taskId); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1902,8 +1895,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getTaskThumbnail(id); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -1912,8 +1904,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().isInHomeStack(taskId); } catch (RemoteException e) { // System dead, we will be dead too soon! return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -1962,7 +1953,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().moveTaskToFront(taskId, flags, options); } catch (RemoteException e) { // System dead, we will be dead too soon! throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2148,8 +2139,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault() .getServices(maxNum, 0); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -2164,8 +2154,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault() .getRunningServiceControlPanel(service); } catch (RemoteException e) { // System dead, we will be dead too soon! return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2269,6 +2258,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().getMemoryInfo(outInfo); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2387,7 +2377,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().clearApplicationUserData(packageName, observer, UserHandle.myUserId()); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2421,8 +2411,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().getGrantedUriPermissions(packageName, UserHandle.myUserId()); } catch (RemoteException e) { Log.e(TAG, "Couldn't get granted URI permissions for :" + packageName, e); return ParceledListSlice.emptyList(); throw e.rethrowAsRuntimeException(); } } Loading @@ -2440,7 +2429,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().clearGrantedUriPermissions(packageName, UserHandle.myUserId()); } catch (RemoteException e) { Log.e(TAG, "Couldn't clear granted URI permissions for :" + packageName, e); throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2560,7 +2549,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getProcessesInErrorState(); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2874,7 +2863,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getRunningExternalApplications(); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -2891,7 +2880,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().setProcessMemoryTrimLevel(process, userId, level); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -2909,7 +2898,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getRunningAppProcesses(); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -2928,7 +2917,7 @@ public class ActivityManager { mContext.getOpPackageName()); return RunningAppProcessInfo.procStateToImportance(procState); } catch (RemoteException e) { return RunningAppProcessInfo.IMPORTANCE_GONE; throw e.rethrowAsRuntimeException(); } } Loading @@ -2947,6 +2936,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().getMyMemoryState(outState); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -2965,7 +2955,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getProcessMemoryInfo(pids); } catch (RemoteException e) { return null; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -2999,6 +2989,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().killBackgroundProcesses(packageName, UserHandle.myUserId()); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3015,7 +3006,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().killUid(UserHandle.getAppId(uid), UserHandle.getUserId(uid), reason); } catch (RemoteException e) { Log.e(TAG, "Couldn't kill uid:" + uid, e); throw e.rethrowAsRuntimeException(); } } Loading @@ -3042,6 +3033,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().forceStopPackage(packageName, userId); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3060,8 +3052,8 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getDeviceConfigurationInfo(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } return null; } /** Loading Loading @@ -3150,8 +3142,8 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().isUserAMonkey(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } return false; } /** Loading Loading @@ -3226,10 +3218,8 @@ public class ActivityManager { return AppGlobals.getPackageManager() .checkUidPermission(permission, uid); } catch (RemoteException e) { // Should never happen, but if it does... deny! Slog.e(TAG, "PackageManager is dead?!?", e); throw e.rethrowAsRuntimeException(); } return PackageManager.PERMISSION_DENIED; } /** @hide */ Loading @@ -3238,10 +3228,8 @@ public class ActivityManager { return AppGlobals.getPackageManager() .checkUidPermission(permission, uid); } catch (RemoteException e) { // Should never happen, but if it does... deny! Slog.e(TAG, "PackageManager is dead?!?", e); throw e.rethrowAsRuntimeException(); } return PackageManager.PERMISSION_DENIED; } /** Loading Loading @@ -3277,7 +3265,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().handleIncomingUser(callingPid, callingUid, userId, allowAll, requireFull, name, callerPackage); } catch (RemoteException e) { throw new SecurityException("Failed calling activity manager", e); throw e.rethrowAsRuntimeException(); } } Loading @@ -3292,7 +3280,7 @@ public class ActivityManager { ui = ActivityManagerNative.getDefault().getCurrentUser(); return ui != null ? ui.id : 0; } catch (RemoteException e) { return 0; throw e.rethrowAsRuntimeException(); } } Loading @@ -3304,7 +3292,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().switchUser(userid); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -3328,7 +3316,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().isUserRunning(userId, 0); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -3338,7 +3326,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().isUserRunning(userId, ActivityManager.FLAG_AND_LOCKED); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading @@ -3348,7 +3336,7 @@ public class ActivityManager { return ActivityManagerNative.getDefault().isUserRunning(userId, ActivityManager.FLAG_AND_UNLOCKED); } catch (RemoteException e) { return false; throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -3433,6 +3421,7 @@ public class ActivityManager { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, pssSize, mContext.getPackageName()); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3451,6 +3440,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().setDumpHeapDebugLimit(null, 0, 0, null); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3461,6 +3451,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().startLockTaskMode(taskId); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3471,6 +3462,7 @@ public class ActivityManager { try { ActivityManagerNative.getDefault().stopLockTaskMode(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } Loading @@ -3497,7 +3489,7 @@ public class ActivityManager { try { return ActivityManagerNative.getDefault().getLockTaskModeState(); } catch (RemoteException e) { return ActivityManager.LOCK_TASK_MODE_NONE; throw e.rethrowAsRuntimeException(); } } Loading @@ -3520,7 +3512,7 @@ public class ActivityManager { try { mAppTaskImpl.finishAndRemoveTask(); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); throw e.rethrowAsRuntimeException(); } } Loading @@ -3533,8 +3525,7 @@ public class ActivityManager { try { return mAppTaskImpl.getTaskInfo(); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); return null; throw e.rethrowAsRuntimeException(); } } Loading @@ -3548,7 +3539,7 @@ public class ActivityManager { try { mAppTaskImpl.moveToFront(); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); throw e.rethrowAsRuntimeException(); } } Loading Loading @@ -3590,7 +3581,7 @@ public class ActivityManager { try { mAppTaskImpl.setExcludeFromRecents(exclude); } catch (RemoteException e) { Slog.e(TAG, "Invalid AppTask", e); throw e.rethrowAsRuntimeException(); } } } Loading
core/java/android/app/ApplicationPackageManager.java +110 −132 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/java/android/os/UserManager.java +59 −95 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.storage.StorageManager; import android.provider.Settings; import android.util.Log; import android.view.WindowManager.LayoutParams; import com.android.internal.R; Loading Loading @@ -700,8 +699,7 @@ public class UserManager { try { return mService.getUserInfo(getUserHandle()).name; } catch (RemoteException re) { Log.w(TAG, "Could not get user name", re); return ""; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -771,8 +769,7 @@ public class UserManager { try { return mService.isRestricted(); } catch (RemoteException re) { Log.w(TAG, "Could not check if user is limited ", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -784,8 +781,7 @@ public class UserManager { try { return mService.canHaveRestrictedProfile(userId); } catch (RemoteException re) { Log.w(TAG, "Could not check if user can have restricted profile", re); return false; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -847,8 +843,8 @@ public class UserManager { public boolean isUserRunning(int userId) { try { return ActivityManagerNative.getDefault().isUserRunning(userId, 0); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading @@ -864,8 +860,8 @@ public class UserManager { // TODO: reconcile stopped vs stopping? return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_OR_STOPPED); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -893,8 +889,8 @@ public class UserManager { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_AND_LOCKED); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -922,8 +918,8 @@ public class UserManager { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), ActivityManager.FLAG_AND_UNLOCKED); } catch (RemoteException e) { return false; } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -968,8 +964,7 @@ public class UserManager { try { return mService.getUserInfo(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get user info", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -990,8 +985,7 @@ public class UserManager { try { return mService.getUserRestrictions(userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get user restrictions", re); return Bundle.EMPTY; throw re.rethrowAsRuntimeException(); } } Loading @@ -1007,9 +1001,7 @@ public class UserManager { try { return mService.hasBaseUserRestriction(restrictionKey, userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get base user restrictions for user " + userHandle.getIdentifier(), re); return false; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -1065,7 +1057,7 @@ public class UserManager { try { mService.setUserRestriction(key, value, userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not set user restriction", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1092,8 +1084,7 @@ public class UserManager { return mService.hasUserRestriction(restrictionKey, userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not check user restrictions", re); return false; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -1147,7 +1138,7 @@ public class UserManager { mService.setUserRestriction(DISALLOW_OUTGOING_CALLS, true, user.id); } } catch (RemoteException re) { Log.w(TAG, "Could not create a user", re); throw re.rethrowAsRuntimeException(); } return user; } Loading @@ -1167,7 +1158,7 @@ public class UserManager { Settings.Secure.SKIP_FIRST_USE_HINTS, "1", guest.id); } } catch (RemoteException re) { Log.w(TAG, "Could not create a user", re); throw re.rethrowAsRuntimeException(); } return guest; } Loading @@ -1188,8 +1179,7 @@ public class UserManager { try { return mService.createProfileForUser(name, flags, userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not create a user", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1211,10 +1201,9 @@ public class UserManager { UserHandle.of(user.id)); } return user; } catch (RemoteException e) { Log.w(TAG, "Could not create a restricted profile", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } return null; } /** Loading Loading @@ -1282,8 +1271,7 @@ public class UserManager { try { return mService.getSeedAccountName(); } catch (RemoteException re) { Log.w(TAG, "Could not get the seed account name", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1297,8 +1285,7 @@ public class UserManager { try { return mService.getSeedAccountType(); } catch (RemoteException re) { Log.w(TAG, "Could not get the seed account type", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1314,8 +1301,7 @@ public class UserManager { try { return mService.getSeedAccountOptions(); } catch (RemoteException re) { Log.w(TAG, "Could not get the seed account options", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1336,7 +1322,7 @@ public class UserManager { mService.setSeedAccountData(userId, accountName, accountType, accountOptions, /* persist= */ true); } catch (RemoteException re) { Log.w(TAG, "Could not set the seed account data", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1349,7 +1335,7 @@ public class UserManager { try { mService.clearSeedAccountData(); } catch (RemoteException re) { Log.w(TAG, "Could not clear the seed account data", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1364,8 +1350,7 @@ public class UserManager { try { return mService.markGuestForDeletion(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not mark guest for deletion", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1384,8 +1369,8 @@ public class UserManager { public void setUserEnabled(@UserIdInt int userHandle) { try { mService.setUserEnabled(userHandle); } catch (RemoteException e) { Log.w(TAG, "Could not enable the profile", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading @@ -1407,8 +1392,7 @@ public class UserManager { try { return mService.getUsers(false); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1430,8 +1414,7 @@ public class UserManager { } return result; } catch (RemoteException re) { Log.w(TAG, "Could not get users list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1447,8 +1430,7 @@ public class UserManager { try { return mService.getUserAccount(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get user account", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1464,7 +1446,7 @@ public class UserManager { try { mService.setUserAccount(userHandle, accountName); } catch (RemoteException re) { Log.w(TAG, "Could not set user account", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1479,8 +1461,7 @@ public class UserManager { try { return mService.getPrimaryUser(); } catch (RemoteException re) { Log.w(TAG, "Could not get Primary user", re); return null; throw re.rethrowAsRuntimeException(); } } Loading Loading @@ -1517,8 +1498,7 @@ public class UserManager { try { return mService.canAddMoreManagedProfiles(userId, allowedToRemoveOne); } catch (RemoteException re) { Log.w(TAG, "Could not check if we can add more managed profiles", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1537,8 +1517,7 @@ public class UserManager { try { return mService.getProfiles(userHandle, false /* enabledOnly */); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1553,8 +1532,7 @@ public class UserManager { try { return mService.isSameProfileGroup(userId, otherUserId); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1572,8 +1550,7 @@ public class UserManager { try { return mService.getProfiles(userHandle, true /* enabledOnly */); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1589,8 +1566,7 @@ public class UserManager { try { users = mService.getProfiles(UserHandle.myUserId(), true /* enabledOnly */); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } for (UserInfo info : users) { UserHandle userHandle = new UserHandle(info.id); Loading @@ -1610,8 +1586,7 @@ public class UserManager { try { return mService.getCredentialOwnerProfile(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get credential owner", re); return -1; throw re.rethrowAsRuntimeException(); } } Loading @@ -1625,8 +1600,7 @@ public class UserManager { try { return mService.getProfileParent(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get profile parent", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1640,8 +1614,8 @@ public class UserManager { public void setQuietModeEnabled(@UserIdInt int userHandle, boolean enableQuietMode) { try { mService.setQuietModeEnabled(userHandle, enableQuietMode); } catch (RemoteException e) { Log.w(TAG, "Could not change the profile's quiet mode", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } } Loading @@ -1654,10 +1628,9 @@ public class UserManager { public boolean isQuietModeEnabled(UserHandle userHandle) { try { return mService.isQuietModeEnabled(userHandle.getIdentifier()); } catch (RemoteException e) { Log.w(TAG, "Could not query the profile's quiet mode", e); } catch (RemoteException re) { throw re.rethrowAsRuntimeException(); } return false; } /** Loading Loading @@ -1742,8 +1715,7 @@ public class UserManager { try { return mService.getUsers(excludeDying); } catch (RemoteException re) { Log.w(TAG, "Could not get user list", re); return null; throw re.rethrowAsRuntimeException(); } } Loading @@ -1757,8 +1729,7 @@ public class UserManager { try { return mService.removeUser(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not remove user ", re); return false; throw re.rethrowAsRuntimeException(); } } Loading @@ -1774,7 +1745,7 @@ public class UserManager { try { mService.setUserName(userHandle, name); } catch (RemoteException re) { Log.w(TAG, "Could not set the user name ", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1788,7 +1759,7 @@ public class UserManager { try { mService.setUserIcon(userHandle, icon); } catch (RemoteException re) { Log.w(TAG, "Could not set the user icon ", re); throw re.rethrowAsRuntimeException(); } } Loading @@ -1813,7 +1784,7 @@ public class UserManager { } } } catch (RemoteException re) { Log.w(TAG, "Could not get the user icon ", re); throw re.rethrowAsRuntimeException(); } return null; } Loading Loading @@ -1869,9 +1840,8 @@ public class UserManager { try { return mService.getUserSerialNumber(userHandle); } catch (RemoteException re) { Log.w(TAG, "Could not get serial number for user " + userHandle); throw re.rethrowAsRuntimeException(); } return -1; } /** Loading @@ -1887,9 +1857,8 @@ public class UserManager { try { return mService.getUserHandle(userSerialNumber); } catch (RemoteException re) { Log.w(TAG, "Could not get userHandle for user " + userSerialNumber); throw re.rethrowAsRuntimeException(); } return -1; } /** Loading @@ -1915,9 +1884,8 @@ public class UserManager { try { return mService.getApplicationRestrictions(packageName); } catch (RemoteException re) { Log.w(TAG, "Could not get application restrictions for package " + packageName); throw re.rethrowAsRuntimeException(); } return null; } /** Loading @@ -1927,9 +1895,8 @@ public class UserManager { try { return mService.getApplicationRestrictionsForUser(packageName, user.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get application restrictions for user " + user.getIdentifier()); throw re.rethrowAsRuntimeException(); } return null; } /** Loading @@ -1940,7 +1907,7 @@ public class UserManager { try { mService.setApplicationRestrictions(packageName, restrictions, user.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not set application restrictions for user " + user.getIdentifier()); throw re.rethrowAsRuntimeException(); } } Loading @@ -1964,7 +1931,7 @@ public class UserManager { try { mService.setDefaultGuestRestrictions(restrictions); } catch (RemoteException re) { Log.w(TAG, "Could not set guest restrictions"); throw re.rethrowAsRuntimeException(); } } Loading @@ -1976,9 +1943,8 @@ public class UserManager { try { return mService.getDefaultGuestRestrictions(); } catch (RemoteException re) { Log.w(TAG, "Could not set guest restrictions"); throw re.rethrowAsRuntimeException(); } return new Bundle(); } /** Loading @@ -1991,8 +1957,7 @@ public class UserManager { try { return mService.getUserCreationTime(userHandle.getIdentifier()); } catch (RemoteException re) { Log.w(TAG, "Could not get user creation time", re); return 0; throw re.rethrowAsRuntimeException(); } } Loading @@ -2008,8 +1973,7 @@ public class UserManager { try { return mService.someUserHasSeedAccount(accountName, accountType); } catch (RemoteException re) { Log.w(TAG, "Could not check seed accounts", re); return false; throw re.rethrowAsRuntimeException(); } } }