Merge "Move SystemService code to frameworks/base/core" into klp-modular-dev

This commit is contained in:
Adam Lesinski
2014-01-07 20:53:20 +00:00
committed by Android (Google) Code Review
3 changed files with 28 additions and 2 deletions

View File

@@ -24,6 +24,8 @@ import android.util.ArrayMap;
*
* Once all services are converted to the SystemService interface, this class can be absorbed
* into SystemServiceManager.
*
* {@hide}
*/
public final class LocalServices {
private LocalServices() {}

View File

@@ -21,7 +21,28 @@ import android.os.IBinder;
import android.os.ServiceManager;
/**
* System services respond to lifecycle events that help the services know what
* The base class for services running in the system process. Override and implement
* the lifecycle event callback methods as needed.
*
* The lifecycle of a SystemService:
*
* {@link #onCreate(android.content.Context)} is called to initialize the
* service.
*
* {@link #onStart()} is called to get the service running. It is common
* for services to publish their Binder interface at this point. All required
* dependencies are also assumed to be ready to use.
*
* Then {@link #onBootPhase(int)} is called as many times as there are boot phases
* until {@link #PHASE_BOOT_COMPLETE} is sent, which is the last boot phase. Each phase
* is an opportunity to do special work, like acquiring optional service dependencies,
* waiting to see if SafeMode is enabled, or registering with a service that gets
* started after this one.
*
* NOTE: All lifecycle methods are called from the same thread that created the
* SystemService.
*
* {@hide}
*/
public abstract class SystemService {
/*

View File

@@ -23,7 +23,10 @@ import android.util.Slog;
import java.util.ArrayList;
/**
* Manages creating, starting, and other lifecycle events of system services.
* Manages creating, starting, and other lifecycle events of
* {@link com.android.server.SystemService}s.
*
* {@hide}
*/
public class SystemServiceManager {
private static final String TAG = "SystemServiceManager";