Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 7d54c4d4 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

make base service extend LifecycleService

parent 981301e9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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();
    }