summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-03-22 20:03:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-22 20:03:55 +0000
commitbf2673384cdea54eef2ca1c3e6ee35f5a3ce0e8a (patch)
tree0439a8402f2e2bd7c33235abb0f62b05f2797a53 /services/java
parentafa10ad39a7effd964d6afc83dab891e98856e1d (diff)
parent56e629322f0739a04c8ff48915226ecf36a13b44 (diff)
downloadframeworks_base-bf2673384cdea54eef2ca1c3e6ee35f5a3ce0e8a.zip
frameworks_base-bf2673384cdea54eef2ca1c3e6ee35f5a3ce0e8a.tar.gz
frameworks_base-bf2673384cdea54eef2ca1c3e6ee35f5a3ce0e8a.tar.bz2
Merge "Bring MountService into the SystemService world."
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/SystemServer.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index ed55c56..bcd8d42 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -39,6 +39,7 @@ import android.os.StrictMode;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
+import android.os.storage.IMountService;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Slog;
@@ -131,6 +132,8 @@ public final class SystemServer {
"com.android.server.ethernet.EthernetService";
private static final String JOB_SCHEDULER_SERVICE_CLASS =
"com.android.server.job.JobSchedulerService";
+ private static final String MOUNT_SERVICE_CLASS =
+ "com.android.server.MountService$Lifecycle";
private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";
private final int mFactoryTestMode;
@@ -384,7 +387,7 @@ public final class SystemServer {
ContentService contentService = null;
VibratorService vibrator = null;
IAlarmManager alarm = null;
- MountService mountService = null;
+ IMountService mountService = null;
NetworkManagementService networkManagement = null;
NetworkStatsService networkStats = null;
NetworkPolicyManagerService networkPolicy = null;
@@ -552,9 +555,9 @@ public final class SystemServer {
* NotificationManagerService is dependant on MountService,
* (for media / usb notifications) so we must start MountService first.
*/
- Slog.i(TAG, "Mount Service");
- mountService = new MountService(context);
- ServiceManager.addService("mount", mountService);
+ mSystemServiceManager.startService(MOUNT_SERVICE_CLASS);
+ mountService = IMountService.Stub.asInterface(
+ ServiceManager.getService("mount"));
} catch (Throwable e) {
reportWtf("starting Mount Service", e);
}
@@ -711,7 +714,10 @@ public final class SystemServer {
* first before continuing.
*/
if (mountService != null && !mOnlyCore) {
- mountService.waitForAsecScan();
+ try {
+ mountService.waitForAsecScan();
+ } catch (RemoteException ignored) {
+ }
}
try {
@@ -1039,7 +1045,6 @@ public final class SystemServer {
}
// These are needed to propagate to the runnable below.
- final MountService mountServiceF = mountService;
final NetworkManagementService networkManagementF = networkManagement;
final NetworkStatsService networkStatsF = networkStats;
final NetworkPolicyManagerService networkPolicyF = networkPolicy;
@@ -1087,11 +1092,6 @@ public final class SystemServer {
reportWtf("starting System UI", e);
}
try {
- if (mountServiceF != null) mountServiceF.systemReady();
- } catch (Throwable e) {
- reportWtf("making Mount Service ready", e);
- }
- try {
if (networkScoreF != null) networkScoreF.systemReady();
} catch (Throwable e) {
reportWtf("making Network Score Service ready", e);