mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-11-30 23:23:01 +00:00
make base service extend LifecycleService
This commit is contained in:
parent
981301e9c6
commit
7d54c4d4cb
1 changed files with 4 additions and 2 deletions
|
@ -16,12 +16,13 @@
|
||||||
|
|
||||||
package org.microg.gms;
|
package org.microg.gms;
|
||||||
|
|
||||||
import android.app.Service;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LifecycleService;
|
||||||
|
|
||||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||||
import com.google.android.gms.common.internal.IGmsServiceBroker;
|
import com.google.android.gms.common.internal.IGmsServiceBroker;
|
||||||
|
@ -31,7 +32,7 @@ import org.microg.gms.common.GmsService;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
public abstract class BaseService extends Service {
|
public abstract class BaseService extends LifecycleService {
|
||||||
private final IGmsServiceBroker broker;
|
private final IGmsServiceBroker broker;
|
||||||
protected final String TAG;
|
protected final String TAG;
|
||||||
|
|
||||||
|
@ -55,6 +56,7 @@ public abstract class BaseService extends Service {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBinder onBind(Intent intent) {
|
public IBinder onBind(Intent intent) {
|
||||||
|
super.onBind(intent);
|
||||||
Log.d(TAG, "onBind: " + intent);
|
Log.d(TAG, "onBind: " + intent);
|
||||||
return broker.asBinder();
|
return broker.asBinder();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue