Loading core/java/android/os/Environment.java +0 −5 Original line number Diff line number Diff line Loading @@ -836,7 +836,6 @@ public class Environment { * physically removed. */ public static boolean isExternalStorageRemovable() { if (isStorageDisabled()) return false; final File externalDir = sCurrentUser.getExternalDirs()[0]; return isExternalStorageRemovable(externalDir); } Loading Loading @@ -875,7 +874,6 @@ public class Environment { * boolean) */ public static boolean isExternalStorageEmulated() { if (isStorageDisabled()) return false; final File externalDir = sCurrentUser.getExternalDirs()[0]; return isExternalStorageEmulated(externalDir); } Loading Loading @@ -951,9 +949,6 @@ public class Environment { return cur; } private static boolean isStorageDisabled() { return SystemProperties.getBoolean("config.disable_storage", false); } /** * If the given path exists on emulated external storage, return the Loading services/core/java/com/android/server/content/ContentService.java +0 −4 Original line number Diff line number Diff line Loading @@ -163,10 +163,6 @@ public final class ContentService extends IContentService.Stub { }; private SyncManager getSyncManager() { if (SystemProperties.getBoolean("config.disable_network", false)) { return null; } synchronized(mSyncManagerLock) { try { // Try to create the SyncManager, return null if it fails (e.g. the disk is full). Loading services/java/com/android/server/SystemServer.java +290 −331 Original line number Diff line number Diff line Loading @@ -545,11 +545,9 @@ public final class SystemServer { traceEnd(); // Bring up recovery system in case a rescue party needs a reboot if (!SystemProperties.getBoolean("config.disable_noncore", false)) { traceBeginAndSlog("StartRecoverySystemService"); mSystemServiceManager.startService(RecoverySystemService.class); traceEnd(); } // Now that we have the bare essentials of the OS up and running, take // note that we just booted, which might send out a rescue party if Loading Loading @@ -708,13 +706,7 @@ public final class SystemServer { MmsServiceBroker mmsService = null; HardwarePropertiesManagerService hardwarePropertiesService = null; boolean disableStorage = SystemProperties.getBoolean("config.disable_storage", false); boolean disableBluetooth = SystemProperties.getBoolean("config.disable_bluetooth", false); boolean disableLocation = SystemProperties.getBoolean("config.disable_location", false); boolean disableSystemUI = SystemProperties.getBoolean("config.disable_systemui", false); boolean disableNonCoreServices = SystemProperties.getBoolean("config.disable_noncore", false); boolean disableNetwork = SystemProperties.getBoolean("config.disable_network", false); boolean disableNetworkTime = SystemProperties.getBoolean("config.disable_networktime", false); boolean disableRtt = SystemProperties.getBoolean("config.disable_rtt", false); boolean disableMediaProjection = SystemProperties.getBoolean("config.disable_mediaproj", false); Loading Loading @@ -878,8 +870,6 @@ public final class SystemServer { } else if (!context.getPackageManager().hasSystemFeature (PackageManager.FEATURE_BLUETOOTH)) { Slog.i(TAG, "No Bluetooth Service (Bluetooth Hardware Not Present)"); } else if (disableBluetooth) { Slog.i(TAG, "Bluetooth Service disabled by config"); } else { traceBeginAndSlog("StartBluetoothService"); mSystemServiceManager.startService(BluetoothService.class); Loading Loading @@ -930,8 +920,7 @@ public final class SystemServer { traceEnd(); if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) { if (!disableStorage && !"0".equals(SystemProperties.get("system_init.startmountservice"))) { if (!"0".equals(SystemProperties.get("system_init.startmountservice"))) { traceBeginAndSlog("StartStorageManagerService"); try { /* Loading Loading @@ -981,7 +970,6 @@ public final class SystemServer { traceEnd(); if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) { if (!disableNonCoreServices) { traceBeginAndSlog("StartLockSettingsService"); try { mSystemServiceManager.startService(LOCK_SETTINGS_SERVICE_CLASS); Loading Loading @@ -1015,7 +1003,6 @@ public final class SystemServer { traceBeginAndSlog("StartDevicePolicyManager"); mSystemServiceManager.startService(DevicePolicyManagerService.Lifecycle.class); traceEnd(); } if (!disableSystemUI) { traceBeginAndSlog("StartStatusBarManagerService"); Loading @@ -1028,13 +1015,10 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartClipboardService"); mSystemServiceManager.startService(ClipboardService.class); traceEnd(); } if (!disableNetwork) { traceBeginAndSlog("StartNetworkManagementService"); try { networkManagement = NetworkManagementService.create(context); Loading @@ -1052,15 +1036,13 @@ public final class SystemServer { reportWtf("starting IpSec Service", e); } traceEnd(); } if (!disableNonCoreServices && !disableTextServices) { if (!disableTextServices) { traceBeginAndSlog("StartTextServicesManager"); mSystemServiceManager.startService(TextServicesManagerService.Lifecycle.class); traceEnd(); } if (!disableNetwork) { traceBeginAndSlog("StartNetworkScoreService"); try { networkScore = new NetworkScoreService(context); Loading Loading @@ -1163,9 +1145,7 @@ public final class SystemServer { reportWtf("starting Service Discovery Service", e); } traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartUpdateLockService"); try { ServiceManager.addService(Context.UPDATE_LOCK_SERVICE, Loading @@ -1174,7 +1154,6 @@ public final class SystemServer { reportWtf("starting UpdateLockService", e); } traceEnd(); } traceBeginAndSlog("StartNotificationManager"); mSystemServiceManager.startService(NotificationManagerService.class); Loading @@ -1188,7 +1167,6 @@ public final class SystemServer { mSystemServiceManager.startService(DeviceStorageMonitorService.class); traceEnd(); if (!disableLocation) { traceBeginAndSlog("StartLocationManagerService"); try { location = new LocationManagerService(context); Loading @@ -1206,9 +1184,8 @@ public final class SystemServer { reportWtf("starting Country Detector", e); } traceEnd(); } if (!disableNonCoreServices && !disableSearchManager) { if (!disableSearchManager) { traceBeginAndSlog("StartSearchManagerService"); try { mSystemServiceManager.startService(SEARCH_MANAGER_SERVICE_CLASS); Loading @@ -1218,8 +1195,7 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices && context.getResources().getBoolean( R.bool.config_enableWallpaperService)) { if (context.getResources().getBoolean(R.bool.config_enableWallpaperService)) { traceBeginAndSlog("StartWallpaperManagerService"); mSystemServiceManager.startService(WALLPAPER_SERVICE_CLASS); traceEnd(); Loading @@ -1235,7 +1211,6 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartDockObserver"); mSystemServiceManager.startService(DockObserver.class); traceEnd(); Loading @@ -1245,7 +1220,6 @@ public final class SystemServer { mSystemServiceManager.startService(THERMAL_OBSERVER_CLASS); traceEnd(); } } traceBeginAndSlog("StartWiredAccessoryManager"); try { Loading @@ -1257,7 +1231,6 @@ public final class SystemServer { } traceEnd(); if (!disableNonCoreServices) { if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_MIDI)) { // Start MIDI Manager service traceBeginAndSlog("StartMidiManager"); Loading Loading @@ -1295,7 +1268,6 @@ public final class SystemServer { Slog.e(TAG, "Failure starting HardwarePropertiesManagerService", e); } traceEnd(); } traceBeginAndSlog("StartTwilightService"); mSystemServiceManager.startService(TwilightService.class); Loading @@ -1315,7 +1287,6 @@ public final class SystemServer { mSystemServiceManager.startService(SoundTriggerService.class); traceEnd(); if (!disableNonCoreServices) { if (!disableTrustManager) { traceBeginAndSlog("StartTrustManager"); mSystemServiceManager.startService(TrustManagerService.class); Loading Loading @@ -1355,7 +1326,6 @@ public final class SystemServer { traceBeginAndSlog("StartContextHubSystemService"); mSystemServiceManager.startService(ContextHubSystemService.class); traceEnd(); } traceBeginAndSlog("StartDiskStatsService"); try { Loading @@ -1378,7 +1348,6 @@ public final class SystemServer { traceEnd(); } if (!disableNetwork && !disableNetworkTime) { traceBeginAndSlog("StartNetworkTimeUpdateService"); try { networkTimeUpdater = new NetworkTimeUpdateService(context); Loading @@ -1387,7 +1356,6 @@ public final class SystemServer { reportWtf("starting NetworkTimeUpdate service", e); } traceEnd(); } traceBeginAndSlog("StartCommonTimeManagementService"); try { Loading @@ -1398,7 +1366,6 @@ public final class SystemServer { } traceEnd(); if (!disableNetwork) { traceBeginAndSlog("CertBlacklister"); try { CertBlacklister blacklister = new CertBlacklister(context); Loading @@ -1406,30 +1373,25 @@ public final class SystemServer { reportWtf("starting CertBlacklister", e); } traceEnd(); } if (!disableNetwork && !disableNonCoreServices && EmergencyAffordanceManager.ENABLED) { if (EmergencyAffordanceManager.ENABLED) { // EmergencyMode service traceBeginAndSlog("StartEmergencyAffordanceService"); mSystemServiceManager.startService(EmergencyAffordanceService.class); traceEnd(); } if (!disableNonCoreServices) { // Dreams (interactive idle-time views, a/k/a screen savers, and doze mode) traceBeginAndSlog("StartDreamManager"); mSystemServiceManager.startService(DreamManagerService.class); traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("AddGraphicsStatsService"); ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, new GraphicsStatsService(context)); traceEnd(); } if (!disableNonCoreServices && CoverageService.ENABLED) { if (CoverageService.ENABLED) { traceBeginAndSlog("AddCoverageService"); ServiceManager.addService(CoverageService.COVERAGE_SERVICE, new CoverageService()); traceEnd(); Loading Loading @@ -1480,7 +1442,6 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartMediaRouterService"); try { mediaRouter = new MediaRouterService(context); Loading Loading @@ -1511,7 +1472,7 @@ public final class SystemServer { reportWtf("StartPruneInstantAppsJobService", e); } traceEnd(); } // LauncherAppsService uses ShortcutService. traceBeginAndSlog("StartShortcutServiceLifecycle"); mSystemServiceManager.startService(ShortcutService.Lifecycle.class); Loading @@ -1522,7 +1483,7 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices && !disableMediaProjection) { if (!disableMediaProjection) { traceBeginAndSlog("StartMediaProjectionManager"); mSystemServiceManager.startService(MediaProjectionManagerService.class); traceEnd(); Loading @@ -1533,7 +1494,6 @@ public final class SystemServer { mSystemServiceManager.startService(WEAR_CONNECTIVITY_SERVICE_CLASS); traceEnd(); if (!disableNonCoreServices) { traceBeginAndSlog("StartWearTimeService"); mSystemServiceManager.startService(WEAR_DISPLAY_SERVICE_CLASS); mSystemServiceManager.startService(WEAR_TIME_SERVICE_CLASS); Loading @@ -1545,7 +1505,6 @@ public final class SystemServer { traceEnd(); } } } if (!disableCameraService) { traceBeginAndSlog("StartCameraServiceProxy"); Loading Loading
core/java/android/os/Environment.java +0 −5 Original line number Diff line number Diff line Loading @@ -836,7 +836,6 @@ public class Environment { * physically removed. */ public static boolean isExternalStorageRemovable() { if (isStorageDisabled()) return false; final File externalDir = sCurrentUser.getExternalDirs()[0]; return isExternalStorageRemovable(externalDir); } Loading Loading @@ -875,7 +874,6 @@ public class Environment { * boolean) */ public static boolean isExternalStorageEmulated() { if (isStorageDisabled()) return false; final File externalDir = sCurrentUser.getExternalDirs()[0]; return isExternalStorageEmulated(externalDir); } Loading Loading @@ -951,9 +949,6 @@ public class Environment { return cur; } private static boolean isStorageDisabled() { return SystemProperties.getBoolean("config.disable_storage", false); } /** * If the given path exists on emulated external storage, return the Loading
services/core/java/com/android/server/content/ContentService.java +0 −4 Original line number Diff line number Diff line Loading @@ -163,10 +163,6 @@ public final class ContentService extends IContentService.Stub { }; private SyncManager getSyncManager() { if (SystemProperties.getBoolean("config.disable_network", false)) { return null; } synchronized(mSyncManagerLock) { try { // Try to create the SyncManager, return null if it fails (e.g. the disk is full). Loading
services/java/com/android/server/SystemServer.java +290 −331 Original line number Diff line number Diff line Loading @@ -545,11 +545,9 @@ public final class SystemServer { traceEnd(); // Bring up recovery system in case a rescue party needs a reboot if (!SystemProperties.getBoolean("config.disable_noncore", false)) { traceBeginAndSlog("StartRecoverySystemService"); mSystemServiceManager.startService(RecoverySystemService.class); traceEnd(); } // Now that we have the bare essentials of the OS up and running, take // note that we just booted, which might send out a rescue party if Loading Loading @@ -708,13 +706,7 @@ public final class SystemServer { MmsServiceBroker mmsService = null; HardwarePropertiesManagerService hardwarePropertiesService = null; boolean disableStorage = SystemProperties.getBoolean("config.disable_storage", false); boolean disableBluetooth = SystemProperties.getBoolean("config.disable_bluetooth", false); boolean disableLocation = SystemProperties.getBoolean("config.disable_location", false); boolean disableSystemUI = SystemProperties.getBoolean("config.disable_systemui", false); boolean disableNonCoreServices = SystemProperties.getBoolean("config.disable_noncore", false); boolean disableNetwork = SystemProperties.getBoolean("config.disable_network", false); boolean disableNetworkTime = SystemProperties.getBoolean("config.disable_networktime", false); boolean disableRtt = SystemProperties.getBoolean("config.disable_rtt", false); boolean disableMediaProjection = SystemProperties.getBoolean("config.disable_mediaproj", false); Loading Loading @@ -878,8 +870,6 @@ public final class SystemServer { } else if (!context.getPackageManager().hasSystemFeature (PackageManager.FEATURE_BLUETOOTH)) { Slog.i(TAG, "No Bluetooth Service (Bluetooth Hardware Not Present)"); } else if (disableBluetooth) { Slog.i(TAG, "Bluetooth Service disabled by config"); } else { traceBeginAndSlog("StartBluetoothService"); mSystemServiceManager.startService(BluetoothService.class); Loading Loading @@ -930,8 +920,7 @@ public final class SystemServer { traceEnd(); if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) { if (!disableStorage && !"0".equals(SystemProperties.get("system_init.startmountservice"))) { if (!"0".equals(SystemProperties.get("system_init.startmountservice"))) { traceBeginAndSlog("StartStorageManagerService"); try { /* Loading Loading @@ -981,7 +970,6 @@ public final class SystemServer { traceEnd(); if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) { if (!disableNonCoreServices) { traceBeginAndSlog("StartLockSettingsService"); try { mSystemServiceManager.startService(LOCK_SETTINGS_SERVICE_CLASS); Loading Loading @@ -1015,7 +1003,6 @@ public final class SystemServer { traceBeginAndSlog("StartDevicePolicyManager"); mSystemServiceManager.startService(DevicePolicyManagerService.Lifecycle.class); traceEnd(); } if (!disableSystemUI) { traceBeginAndSlog("StartStatusBarManagerService"); Loading @@ -1028,13 +1015,10 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartClipboardService"); mSystemServiceManager.startService(ClipboardService.class); traceEnd(); } if (!disableNetwork) { traceBeginAndSlog("StartNetworkManagementService"); try { networkManagement = NetworkManagementService.create(context); Loading @@ -1052,15 +1036,13 @@ public final class SystemServer { reportWtf("starting IpSec Service", e); } traceEnd(); } if (!disableNonCoreServices && !disableTextServices) { if (!disableTextServices) { traceBeginAndSlog("StartTextServicesManager"); mSystemServiceManager.startService(TextServicesManagerService.Lifecycle.class); traceEnd(); } if (!disableNetwork) { traceBeginAndSlog("StartNetworkScoreService"); try { networkScore = new NetworkScoreService(context); Loading Loading @@ -1163,9 +1145,7 @@ public final class SystemServer { reportWtf("starting Service Discovery Service", e); } traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartUpdateLockService"); try { ServiceManager.addService(Context.UPDATE_LOCK_SERVICE, Loading @@ -1174,7 +1154,6 @@ public final class SystemServer { reportWtf("starting UpdateLockService", e); } traceEnd(); } traceBeginAndSlog("StartNotificationManager"); mSystemServiceManager.startService(NotificationManagerService.class); Loading @@ -1188,7 +1167,6 @@ public final class SystemServer { mSystemServiceManager.startService(DeviceStorageMonitorService.class); traceEnd(); if (!disableLocation) { traceBeginAndSlog("StartLocationManagerService"); try { location = new LocationManagerService(context); Loading @@ -1206,9 +1184,8 @@ public final class SystemServer { reportWtf("starting Country Detector", e); } traceEnd(); } if (!disableNonCoreServices && !disableSearchManager) { if (!disableSearchManager) { traceBeginAndSlog("StartSearchManagerService"); try { mSystemServiceManager.startService(SEARCH_MANAGER_SERVICE_CLASS); Loading @@ -1218,8 +1195,7 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices && context.getResources().getBoolean( R.bool.config_enableWallpaperService)) { if (context.getResources().getBoolean(R.bool.config_enableWallpaperService)) { traceBeginAndSlog("StartWallpaperManagerService"); mSystemServiceManager.startService(WALLPAPER_SERVICE_CLASS); traceEnd(); Loading @@ -1235,7 +1211,6 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartDockObserver"); mSystemServiceManager.startService(DockObserver.class); traceEnd(); Loading @@ -1245,7 +1220,6 @@ public final class SystemServer { mSystemServiceManager.startService(THERMAL_OBSERVER_CLASS); traceEnd(); } } traceBeginAndSlog("StartWiredAccessoryManager"); try { Loading @@ -1257,7 +1231,6 @@ public final class SystemServer { } traceEnd(); if (!disableNonCoreServices) { if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_MIDI)) { // Start MIDI Manager service traceBeginAndSlog("StartMidiManager"); Loading Loading @@ -1295,7 +1268,6 @@ public final class SystemServer { Slog.e(TAG, "Failure starting HardwarePropertiesManagerService", e); } traceEnd(); } traceBeginAndSlog("StartTwilightService"); mSystemServiceManager.startService(TwilightService.class); Loading @@ -1315,7 +1287,6 @@ public final class SystemServer { mSystemServiceManager.startService(SoundTriggerService.class); traceEnd(); if (!disableNonCoreServices) { if (!disableTrustManager) { traceBeginAndSlog("StartTrustManager"); mSystemServiceManager.startService(TrustManagerService.class); Loading Loading @@ -1355,7 +1326,6 @@ public final class SystemServer { traceBeginAndSlog("StartContextHubSystemService"); mSystemServiceManager.startService(ContextHubSystemService.class); traceEnd(); } traceBeginAndSlog("StartDiskStatsService"); try { Loading @@ -1378,7 +1348,6 @@ public final class SystemServer { traceEnd(); } if (!disableNetwork && !disableNetworkTime) { traceBeginAndSlog("StartNetworkTimeUpdateService"); try { networkTimeUpdater = new NetworkTimeUpdateService(context); Loading @@ -1387,7 +1356,6 @@ public final class SystemServer { reportWtf("starting NetworkTimeUpdate service", e); } traceEnd(); } traceBeginAndSlog("StartCommonTimeManagementService"); try { Loading @@ -1398,7 +1366,6 @@ public final class SystemServer { } traceEnd(); if (!disableNetwork) { traceBeginAndSlog("CertBlacklister"); try { CertBlacklister blacklister = new CertBlacklister(context); Loading @@ -1406,30 +1373,25 @@ public final class SystemServer { reportWtf("starting CertBlacklister", e); } traceEnd(); } if (!disableNetwork && !disableNonCoreServices && EmergencyAffordanceManager.ENABLED) { if (EmergencyAffordanceManager.ENABLED) { // EmergencyMode service traceBeginAndSlog("StartEmergencyAffordanceService"); mSystemServiceManager.startService(EmergencyAffordanceService.class); traceEnd(); } if (!disableNonCoreServices) { // Dreams (interactive idle-time views, a/k/a screen savers, and doze mode) traceBeginAndSlog("StartDreamManager"); mSystemServiceManager.startService(DreamManagerService.class); traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("AddGraphicsStatsService"); ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, new GraphicsStatsService(context)); traceEnd(); } if (!disableNonCoreServices && CoverageService.ENABLED) { if (CoverageService.ENABLED) { traceBeginAndSlog("AddCoverageService"); ServiceManager.addService(CoverageService.COVERAGE_SERVICE, new CoverageService()); traceEnd(); Loading Loading @@ -1480,7 +1442,6 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices) { traceBeginAndSlog("StartMediaRouterService"); try { mediaRouter = new MediaRouterService(context); Loading Loading @@ -1511,7 +1472,7 @@ public final class SystemServer { reportWtf("StartPruneInstantAppsJobService", e); } traceEnd(); } // LauncherAppsService uses ShortcutService. traceBeginAndSlog("StartShortcutServiceLifecycle"); mSystemServiceManager.startService(ShortcutService.Lifecycle.class); Loading @@ -1522,7 +1483,7 @@ public final class SystemServer { traceEnd(); } if (!disableNonCoreServices && !disableMediaProjection) { if (!disableMediaProjection) { traceBeginAndSlog("StartMediaProjectionManager"); mSystemServiceManager.startService(MediaProjectionManagerService.class); traceEnd(); Loading @@ -1533,7 +1494,6 @@ public final class SystemServer { mSystemServiceManager.startService(WEAR_CONNECTIVITY_SERVICE_CLASS); traceEnd(); if (!disableNonCoreServices) { traceBeginAndSlog("StartWearTimeService"); mSystemServiceManager.startService(WEAR_DISPLAY_SERVICE_CLASS); mSystemServiceManager.startService(WEAR_TIME_SERVICE_CLASS); Loading @@ -1545,7 +1505,6 @@ public final class SystemServer { traceEnd(); } } } if (!disableCameraService) { traceBeginAndSlog("StartCameraServiceProxy"); Loading