Loading core/java/android/os/UserManager.java +6 −2 Original line number Diff line number Diff line Loading @@ -766,9 +766,13 @@ public class UserManager { * @param user The user to retrieve the running state for. */ public boolean isUserRunning(UserHandle user) { return isUserRunning(user.getIdentifier()); } /** {@hide} */ public boolean isUserRunning(int userId) { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), 0); return ActivityManagerNative.getDefault().isUserRunning(userId, 0); } catch (RemoteException e) { return false; } Loading services/core/java/com/android/server/am/ActivityManagerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -12684,7 +12684,6 @@ public final class ActivityManagerService extends ActivityManagerNative if (goingCallback != null) goingCallback.run(); mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_USER_RUNNING_START, Integer.toString(currentUserId), currentUserId); mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_USER_FOREGROUND_START, services/core/java/com/android/server/am/UserController.java +5 −1 Original line number Diff line number Diff line Loading @@ -249,6 +249,9 @@ final class UserController { if (uss.state == UserState.STATE_RUNNING_LOCKED) { uss.setState(UserState.STATE_RUNNING); // Give user manager a chance to prepare app storage mUserManager.onBeforeUnlockUser(userId); mHandler.sendMessage(mHandler.obtainMessage(SYSTEM_USER_UNLOCK_MSG, userId, 0)); final Intent unlockedIntent = new Intent(Intent.ACTION_USER_UNLOCKED); Loading Loading @@ -651,7 +654,8 @@ final class UserController { } if (uss.state == UserState.STATE_BOOTING) { // Let user manager propagate user restrictions to other services. // Give user manager a chance to propagate user restrictions // to other services and prepare app storage getUserManager().onBeforeStartUser(userId); // Booting up a new user, need to tell system services about it. Loading services/core/java/com/android/server/pm/Installer.java +13 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.pm; import android.annotation.IntDef; import android.annotation.Nullable; import android.content.Context; import android.content.pm.PackageStats; Loading @@ -28,6 +29,9 @@ import com.android.server.SystemService; import dalvik.system.VMRuntime; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public final class Installer extends SystemService { private static final String TAG = "Installer"; Loading @@ -46,8 +50,17 @@ public final class Installer extends SystemService { /** Run the application with the JIT compiler */ public static final int DEXOPT_USEJIT = 1 << 5; /** @hide */ @IntDef(flag = true, value = { FLAG_DE_STORAGE, FLAG_CE_STORAGE, }) @Retention(RetentionPolicy.SOURCE) public @interface StorageFlags {} public static final int FLAG_DE_STORAGE = 1 << 0; public static final int FLAG_CE_STORAGE = 1 << 1; public static final int FLAG_CLEAR_CACHE_ONLY = 1 << 2; public static final int FLAG_CLEAR_CODE_CACHE_ONLY = 1 << 3; Loading services/core/java/com/android/server/pm/PackageManagerException.java +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ import com.android.internal.os.InstallerConnection.InstallerException; public class PackageManagerException extends Exception { public final int error; public PackageManagerException(String detailMessage) { super(detailMessage); this.error = PackageManager.INSTALL_FAILED_INTERNAL_ERROR; } public PackageManagerException(int error, String detailMessage) { super(detailMessage); this.error = error; Loading Loading
core/java/android/os/UserManager.java +6 −2 Original line number Diff line number Diff line Loading @@ -766,9 +766,13 @@ public class UserManager { * @param user The user to retrieve the running state for. */ public boolean isUserRunning(UserHandle user) { return isUserRunning(user.getIdentifier()); } /** {@hide} */ public boolean isUserRunning(int userId) { try { return ActivityManagerNative.getDefault().isUserRunning( user.getIdentifier(), 0); return ActivityManagerNative.getDefault().isUserRunning(userId, 0); } catch (RemoteException e) { return false; } Loading
services/core/java/com/android/server/am/ActivityManagerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -12684,7 +12684,6 @@ public final class ActivityManagerService extends ActivityManagerNative if (goingCallback != null) goingCallback.run(); mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_USER_RUNNING_START, Integer.toString(currentUserId), currentUserId); mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_USER_FOREGROUND_START,
services/core/java/com/android/server/am/UserController.java +5 −1 Original line number Diff line number Diff line Loading @@ -249,6 +249,9 @@ final class UserController { if (uss.state == UserState.STATE_RUNNING_LOCKED) { uss.setState(UserState.STATE_RUNNING); // Give user manager a chance to prepare app storage mUserManager.onBeforeUnlockUser(userId); mHandler.sendMessage(mHandler.obtainMessage(SYSTEM_USER_UNLOCK_MSG, userId, 0)); final Intent unlockedIntent = new Intent(Intent.ACTION_USER_UNLOCKED); Loading Loading @@ -651,7 +654,8 @@ final class UserController { } if (uss.state == UserState.STATE_BOOTING) { // Let user manager propagate user restrictions to other services. // Give user manager a chance to propagate user restrictions // to other services and prepare app storage getUserManager().onBeforeStartUser(userId); // Booting up a new user, need to tell system services about it. Loading
services/core/java/com/android/server/pm/Installer.java +13 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.pm; import android.annotation.IntDef; import android.annotation.Nullable; import android.content.Context; import android.content.pm.PackageStats; Loading @@ -28,6 +29,9 @@ import com.android.server.SystemService; import dalvik.system.VMRuntime; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public final class Installer extends SystemService { private static final String TAG = "Installer"; Loading @@ -46,8 +50,17 @@ public final class Installer extends SystemService { /** Run the application with the JIT compiler */ public static final int DEXOPT_USEJIT = 1 << 5; /** @hide */ @IntDef(flag = true, value = { FLAG_DE_STORAGE, FLAG_CE_STORAGE, }) @Retention(RetentionPolicy.SOURCE) public @interface StorageFlags {} public static final int FLAG_DE_STORAGE = 1 << 0; public static final int FLAG_CE_STORAGE = 1 << 1; public static final int FLAG_CLEAR_CACHE_ONLY = 1 << 2; public static final int FLAG_CLEAR_CODE_CACHE_ONLY = 1 << 3; Loading
services/core/java/com/android/server/pm/PackageManagerException.java +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,11 @@ import com.android.internal.os.InstallerConnection.InstallerException; public class PackageManagerException extends Exception { public final int error; public PackageManagerException(String detailMessage) { super(detailMessage); this.error = PackageManager.INSTALL_FAILED_INTERNAL_ERROR; } public PackageManagerException(int error, String detailMessage) { super(detailMessage); this.error = error; Loading