summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/SystemServiceRegistry.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-03-18 11:27:19 -0700
committerJeff Sharkey <jsharkey@android.com>2015-03-30 19:46:23 -0700
commit4887789e44cdb16b042a35e8ec03983213e88ac6 (patch)
treeb50f9d4adfdd1ee6fa7eca7c5a4db7cac8107e73 /core/java/android/app/SystemServiceRegistry.java
parent607f1f09c3da3a52557394d2e764326a29151173 (diff)
downloadframeworks_base-4887789e44cdb16b042a35e8ec03983213e88ac6.zip
frameworks_base-4887789e44cdb16b042a35e8ec03983213e88ac6.tar.gz
frameworks_base-4887789e44cdb16b042a35e8ec03983213e88ac6.tar.bz2
Progress towards dynamic storage support.
Storage devices are no longer hard-coded, and instead bubble up from whatever Disk and VolumeBase that vold uncovered, turning into sibling Java objects in MountService. We now treat vold events as the source-of-truth for state, and synchronize our state by asking vold to "reset" whenever we reconnect. We've now moved to a model where all storage devices are mounted in the root mount namespace (user boundaries protected with GIDs), so we no longer need app-to-vold path translation. This also means that zygote only needs to bind mount the user-specific /mnt/user/n/ path onto /storage/self/ to make legacy paths like /sdcard work. This grealy simplifies a lot of system code. Many parts of the platform depend on a primary storage device always being present, so we hack together a stub StorageVolume when vold doesn't have a volume ready yet. StorageVolume isn't really a volume anymore; it's the user-specific view onto a volume, so MountService now filters and builds them based on the calling user. StorageVolume is now immutable, making it easier to reason about. Environment now builds all of its paths dynamically based on active volumes. Adds utility methods to turn int types and flags into user-readable strings for debugging purposes. Remove UMS sharing support for now, since no current devices support it; MTP is the recommended solution going forward because it offers better multi-user support. Simplify unmount logic, since vold will now gladly trigger EJECTING broadcast and kill stubborn processes. Bug: 19993667 Change-Id: I9842280e61974c91bae15d764e386969aedcd338
Diffstat (limited to 'core/java/android/app/SystemServiceRegistry.java')
-rw-r--r--core/java/android/app/SystemServiceRegistry.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 59fe490..a0f40f6 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -402,13 +402,7 @@ final class SystemServiceRegistry {
new CachedServiceFetcher<StorageManager>() {
@Override
public StorageManager createService(ContextImpl ctx) {
- try {
- return new StorageManager(
- ctx.getContentResolver(), ctx.mMainThread.getHandler().getLooper());
- } catch (RemoteException rex) {
- Log.e(TAG, "Failed to create StorageManager", rex);
- return null;
- }
+ return new StorageManager(ctx, ctx.mMainThread.getHandler().getLooper());
}});
registerService(Context.TELEPHONY_SERVICE, TelephonyManager.class,