FileDocCategorySizeDatePackage
TelecomLoaderService.javaAPI DocAndroid 5.1 API3657Thu Mar 12 22:22:42 GMT 2015com.android.server.telecom

TelecomLoaderService

public class TelecomLoaderService extends com.android.server.SystemService
Starts the telecom component by binding to its ITelecomService implementation. Telecom is setup to run in the system-server process so once it is loaded into memory it will stay running.
hide

Fields Summary
private static final String
TAG
private static final android.content.ComponentName
SERVICE_COMPONENT
private static final String
SERVICE_ACTION
private final android.content.Context
mContext
private TelecomServiceConnection
mServiceConnection
Constructors Summary
public TelecomLoaderService(android.content.Context context)


       
        super(context);
        mContext = context;
    
Methods Summary
private voidconnectToTelecom()

        if (mServiceConnection != null) {
            // TODO: Is unbinding worth doing or wait for system to rebind?
            mContext.unbindService(mServiceConnection);
            mServiceConnection = null;
        }

        TelecomServiceConnection serviceConnection = new TelecomServiceConnection();
        Intent intent = new Intent(SERVICE_ACTION);
        intent.setComponent(SERVICE_COMPONENT);
        int flags = Context.BIND_IMPORTANT | Context.BIND_AUTO_CREATE;

        // Bind to Telecom and register the service
        if (mContext.bindServiceAsUser(intent, serviceConnection, flags, UserHandle.OWNER)) {
            mServiceConnection = serviceConnection;
        }
    
public voidonBootPhase(int phase)

        if (phase == PHASE_ACTIVITY_MANAGER_READY) {
            connectToTelecom();
        }
    
public voidonStart()