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

Commit 8a2f4b9f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove unused argument from ServiceWatcher"

parents 0a7177bd f3c1b274
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ public class ServiceWatcher implements ServiceConnection {
    private volatile ServiceInfo mServiceInfo;
    private volatile IBinder mBinder;

    public ServiceWatcher(Context context, Handler handler, String action,
    public ServiceWatcher(Context context, String action,
            @Nullable BinderRunner onBind, @Nullable Runnable onUnbind,
            @BoolRes int enableOverlayResId, @StringRes int nonOverlayPackageResId) {
        mContext = context;
+1 −3
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.location.IGeocodeProvider;
import android.os.IBinder;
import android.os.RemoteException;

import com.android.internal.os.BackgroundThread;
import com.android.server.ServiceWatcher;

import java.util.Collections;
@@ -55,8 +54,7 @@ public class GeocoderProxy {
    private final ServiceWatcher mServiceWatcher;

    private GeocoderProxy(Context context) {
        mServiceWatcher = new ServiceWatcher(context, BackgroundThread.getHandler(), SERVICE_ACTION,
                null, null,
        mServiceWatcher = new ServiceWatcher(context, SERVICE_ACTION, null, null,
                com.android.internal.R.bool.config_enableGeocoderOverlay,
                com.android.internal.R.string.config_geocoderProviderPackageName);
    }
+1 −2
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;

import com.android.server.FgThread;
import com.android.server.ServiceWatcher;

import java.util.Objects;
@@ -59,7 +58,7 @@ public final class GeofenceProxy {

    private GeofenceProxy(Context context, IGpsGeofenceHardware gpsGeofence) {
        mGpsGeofenceHardware = Objects.requireNonNull(gpsGeofence);
        mServiceWatcher = new ServiceWatcher(context, FgThread.getHandler(), SERVICE_ACTION,
        mServiceWatcher = new ServiceWatcher(context, SERVICE_ACTION,
                this::updateGeofenceHardware, null,
                com.android.internal.R.bool.config_enableGeofenceOverlay,
                com.android.internal.R.string.config_geofenceProviderPackageName);
+0 −2
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

import com.android.server.FgThread;
import com.android.server.ServiceWatcher;

/**
@@ -67,7 +66,6 @@ public class HardwareActivityRecognitionProxy {
        }

        mServiceWatcher = new ServiceWatcher(context,
                FgThread.getHandler(),
                SERVICE_ACTION,
                this::onBind,
                null,
+1 −2
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import com.android.internal.location.ILocationProvider;
import com.android.internal.location.ILocationProviderManager;
import com.android.internal.location.ProviderProperties;
import com.android.internal.location.ProviderRequest;
import com.android.server.FgThread;
import com.android.server.ServiceWatcher;

import java.io.FileDescriptor;
@@ -75,7 +74,7 @@ public class LocationProviderProxy extends AbstractLocationProvider {
        super(DIRECT_EXECUTOR);

        mContext = context;
        mServiceWatcher = new ServiceWatcher(context, FgThread.getHandler(), action, this::onBind,
        mServiceWatcher = new ServiceWatcher(context, action, this::onBind,
                this::onUnbind, enableOverlayResId, nonOverlayPackageResId);

        mProxy = null;