diff options
author | Amith Yamasani <yamasani@google.com> | 2015-08-07 18:21:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-07 18:21:30 +0000 |
commit | 1fbc1b3b4b742cdba25d32d65a9813933a37005f (patch) | |
tree | 73ae2492c7efd4cfd786c0af0df1fe29462de9e8 | |
parent | c376afb472d1d4f0fba4a03ac4cf05b498866d64 (diff) | |
parent | a7892486c2100d99abef355f2bd2c919e6516a6d (diff) | |
download | frameworks_base-1fbc1b3b4b742cdba25d32d65a9813933a37005f.zip frameworks_base-1fbc1b3b4b742cdba25d32d65a9813933a37005f.tar.gz frameworks_base-1fbc1b3b4b742cdba25d32d65a9813933a37005f.tar.bz2 |
Merge "Fix partial user cleanup on restart" into mnc-dev
-rw-r--r-- | services/core/java/com/android/server/MountService.java | 18 | ||||
-rw-r--r-- | services/core/java/com/android/server/pm/UserManagerService.java | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java index 53e8d14..d10a457 100644 --- a/services/core/java/com/android/server/MountService.java +++ b/services/core/java/com/android/server/MountService.java @@ -766,6 +766,15 @@ class MountService extends IMountService.Stub } } + private void addInternalVolume() { + // Create a stub volume that represents internal storage + final VolumeInfo internal = new VolumeInfo(VolumeInfo.ID_PRIVATE_INTERNAL, + VolumeInfo.TYPE_PRIVATE, null, null); + internal.state = VolumeInfo.STATE_MOUNTED; + internal.path = Environment.getDataDirectory().getAbsolutePath(); + mVolumes.put(internal.id, internal); + } + private void resetIfReadyAndConnectedLocked() { Slog.d(TAG, "Thinking about reset, mSystemReady=" + mSystemReady + ", mDaemonConnected=" + mDaemonConnected); @@ -775,12 +784,7 @@ class MountService extends IMountService.Stub mDisks.clear(); mVolumes.clear(); - // Create a stub volume that represents internal storage - final VolumeInfo internal = new VolumeInfo(VolumeInfo.ID_PRIVATE_INTERNAL, - VolumeInfo.TYPE_PRIVATE, null, null); - internal.state = VolumeInfo.STATE_MOUNTED; - internal.path = Environment.getDataDirectory().getAbsolutePath(); - mVolumes.put(internal.id, internal); + addInternalVolume(); try { mConnector.execute("volume", "reset"); @@ -1412,6 +1416,8 @@ class MountService extends IMountService.Stub userFilter.addAction(Intent.ACTION_USER_REMOVED); mContext.registerReceiver(mUserReceiver, userFilter, null, mHandler); + addInternalVolume(); + // Add ourself to the Watchdog monitors if enabled. if (WATCHDOG_ENABLE) { Watchdog.getInstance().addMonitor(this); diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index ebcbecd..264170c 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -246,7 +246,7 @@ public class UserManagerService extends IUserManager.Stub { } for (int i = 0; i < partials.size(); i++) { UserInfo ui = partials.get(i); - Slog.w(LOG_TAG, "Removing partially created user #" + i + Slog.w(LOG_TAG, "Removing partially created user " + ui.id + " (name=" + ui.name + ")"); removeUserStateLocked(ui.id); } |