FileDocCategorySizeDatePackage
PlayerService.javaAPI DocAndroid 5.1 API5224Thu Mar 12 22:22:44 GMT 2015com.android.onemedia

PlayerService

public class PlayerService extends android.app.Service

Fields Summary
private static final String
TAG
private PlayerBinder
mBinder
private PlayerSession
mSession
private NotificationHelper
mNotifyHelper
private android.content.Intent
mIntent
private boolean
mStarted
private ArrayList
mCbs
private final PlayerSession.Listener
mPlayerListener
Constructors Summary
Methods Summary
protected java.util.ArrayListgetAllowedPackages()

        return null;
    
public android.os.IBinderonBind(android.content.Intent intent)

        if (mBinder == null) {
            mBinder = new PlayerBinder();
        }
        return mBinder;
    
public voidonCreate()


    
       
        Log.d(TAG, "onCreate");
        mIntent = onCreateServiceIntent();
        if (mSession == null) {
            mSession = onCreatePlayerController();
            mSession.createSession();
            mSession.setListener(mPlayerListener);
            mNotifyHelper = new NotificationHelper(this, mSession.mSession);
        }
    
protected PlayerSessiononCreatePlayerController()

        return new PlayerSession(this);
    
protected android.content.IntentonCreateServiceIntent()

        return new Intent(this, PlayerService.class).setPackage(getBasePackageName());
    
public voidonDestroy()

        Log.d(TAG, "onDestroy");
        mSession.onDestroy();
        mSession = null;
    
public voidonPlaybackEnded()

        if (mStarted) {
            Log.d(TAG, "Stopping self");
            mNotifyHelper.onStop();
            stopSelf();
            mStarted = false;
        }
    
public voidonPlaybackStarted()

        if (!mStarted) {
            Log.d(TAG, "Starting self");
            startService(onCreateServiceIntent());
            mNotifyHelper.onStart();
            mStarted = true;
        }
    
public intonStartCommand(android.content.Intent intent, int flags, int startId)

        Log.d(TAG, "onStartCommand");
        return START_STICKY;