diff options
author | Dan Morrill <morrildl@google.com> | 2013-03-28 18:10:43 -0700 |
---|---|---|
committer | Dan Morrill <morrildl@google.com> | 2013-04-04 09:49:22 -0700 |
commit | e4d9a01bfc7451afff1ed399a5801c7aa2af2831 (patch) | |
tree | b30444a0b1a12eed9ad08bda1eff549453076a00 /services/java/com/android/server/content/ContentService.java | |
parent | 9bd94043837d40efe874df1f9b3ca66e192ed3d1 (diff) |
Phase 1 of refactoring SystemServer.
SystemServer is currently a monolithic class that brings up key system
services. This change is the first phase of refactoring it to be more
configurable. Specifically, it adds a set of on/off switches used to control
startup of individual services. Future plans include finer grained controls
and a more explicit and consistent startup sequence for these services.
Change-Id: I7299f5ce7d7b74a34eb56dffb788366fbc058532
Diffstat (limited to 'services/java/com/android/server/content/ContentService.java')
-rw-r--r-- | services/java/com/android/server/content/ContentService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/java/com/android/server/content/ContentService.java b/services/java/com/android/server/content/ContentService.java index 68cf5fcefa9b..30c32197ca04 100644 --- a/services/java/com/android/server/content/ContentService.java +++ b/services/java/com/android/server/content/ContentService.java @@ -36,6 +36,7 @@ import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.SystemProperties; import android.os.UserHandle; import android.util.Log; import android.util.Slog; @@ -61,6 +62,10 @@ public final class ContentService extends IContentService.Stub { private final Object mSyncManagerLock = new Object(); 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). |