make base service extend LifecycleService

This commit is contained in:
Marvin W 2020-10-12 21:27:37 +02:00
parent 981301e9c6
commit 7d54c4d4cb
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A

View File

@ -16,12 +16,13 @@
package org.microg.gms;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import androidx.lifecycle.LifecycleService;
import com.google.android.gms.common.internal.GetServiceRequest;
import com.google.android.gms.common.internal.IGmsCallbacks;
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.EnumSet;
public abstract class BaseService extends Service {
public abstract class BaseService extends LifecycleService {
private final IGmsServiceBroker broker;
protected final String TAG;
@ -55,6 +56,7 @@ public abstract class BaseService extends Service {
@Override
public IBinder onBind(Intent intent) {
super.onBind(intent);
Log.d(TAG, "onBind: " + intent);
return broker.asBinder();
}