forked from Juby210/discord-jadx
52 lines
1.4 KiB
Java
52 lines
1.4 KiB
Java
package androidx.lifecycle;
|
|
|
|
import android.app.Service;
|
|
import android.content.Intent;
|
|
import android.os.IBinder;
|
|
import androidx.annotation.CallSuper;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
public class LifecycleService extends Service implements LifecycleOwner {
|
|
private final ServiceLifecycleDispatcher mDispatcher = new ServiceLifecycleDispatcher(this);
|
|
|
|
@Override // androidx.lifecycle.LifecycleOwner
|
|
@NonNull
|
|
public Lifecycle getLifecycle() {
|
|
return this.mDispatcher.getLifecycle();
|
|
}
|
|
|
|
@Override // android.app.Service
|
|
@Nullable
|
|
@CallSuper
|
|
public IBinder onBind(@NonNull Intent intent) {
|
|
this.mDispatcher.onServicePreSuperOnBind();
|
|
return null;
|
|
}
|
|
|
|
@Override // android.app.Service
|
|
@CallSuper
|
|
public void onCreate() {
|
|
this.mDispatcher.onServicePreSuperOnCreate();
|
|
super.onCreate();
|
|
}
|
|
|
|
@Override // android.app.Service
|
|
@CallSuper
|
|
public void onDestroy() {
|
|
this.mDispatcher.onServicePreSuperOnDestroy();
|
|
super.onDestroy();
|
|
}
|
|
|
|
@Override // android.app.Service
|
|
@CallSuper
|
|
public void onStart(@NonNull Intent intent, int i) {
|
|
this.mDispatcher.onServicePreSuperOnStart();
|
|
super.onStart(intent, i);
|
|
}
|
|
|
|
@Override // android.app.Service
|
|
@CallSuper
|
|
public int onStartCommand(@NonNull Intent intent, int i, int i2) {
|
|
return super.onStartCommand(intent, i, i2);
|
|
}
|
|
}
|