From 7d54c4d4cba10f1743474a7126da6d89e04caaae Mon Sep 17 00:00:00 2001 From: Marvin W Date: Mon, 12 Oct 2020 21:27:37 +0200 Subject: [PATCH] make base service extend LifecycleService --- .../src/main/java/org/microg/gms/BaseService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/play-services-base-core/src/main/java/org/microg/gms/BaseService.java b/play-services-base-core/src/main/java/org/microg/gms/BaseService.java index 792aa151..df1b7288 100644 --- a/play-services-base-core/src/main/java/org/microg/gms/BaseService.java +++ b/play-services-base-core/src/main/java/org/microg/gms/BaseService.java @@ -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(); }