package com.xixun.xixunplayer;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class RestartService extends Service {

    @Override
    public void onCreate() {
        super.onCreate();
        Util.println("---- RestartService onCreate");
        if(MainActivity.ins!=null) return;
        var intent = new Intent(this, MainActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
    }

    @Override
    public IBinder onBind(Intent intent) {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}