diff options
| author | Jeff Brown <jeffbrown@google.com> | 2014-02-10 19:47:07 -0800 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2014-02-10 20:01:43 -0800 |
| commit | b880d880c6cd989eacc28c365fc9a41d31900da1 (patch) | |
| tree | 660d93bbe7f1b74aa9eac16ac69efe16f67f346e /services/java/com/android/server/SystemServer.java | |
| parent | d9f9da396b41f394991f676bc74dcfc59c7070a8 (diff) | |
| download | frameworks_base-b880d880c6cd989eacc28c365fc9a41d31900da1.zip frameworks_base-b880d880c6cd989eacc28c365fc9a41d31900da1.tar.gz frameworks_base-b880d880c6cd989eacc28c365fc9a41d31900da1.tar.bz2 | |
Make SystemService constructor take a Context.
This change simplifies the process of initializing a SystemService
by folding the onCreate() step back into the constructor. It removes
some ambuiguity about what work should happen in the constructor and
should make it possible for services to retain most of their final
fields after refactoring into the new pattern.
Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 269c056..f941ffe 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -106,9 +106,9 @@ public final class SystemServer { * them from the build system somehow. */ private static final String BACKUP_MANAGER_SERVICE_CLASS = - "com.android.server.backup.BackupManagerSystemService"; + "com.android.server.backup.BackupManagerService$Lifecycle"; private static final String DEVICE_POLICY_MANAGER_SERVICE_CLASS = - "com.android.server.devicepolicy.DevicePolicyManagerSystemService"; + "com.android.server.devicepolicy.DevicePolicyManagerService$Lifecycle"; private static final String APPWIDGET_SERVICE_CLASS = "com.android.server.appwidget.AppWidgetService"; private static final String PRINT_MANAGER_SERVICE_CLASS = @@ -211,6 +211,7 @@ public final class SystemServer { // Create the system service manager. mSystemServiceManager = new SystemServiceManager(mSystemContext); + LocalServices.addService(SystemServiceManager.class, mSystemServiceManager); // Start services. try { |
