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

Commit 779d10c7 authored by Hugo Benichi's avatar Hugo Benichi
Browse files

wifi: Update AbstractWifiService to be concrete.

This patch removes the abstract qualifier from AbstractWifiService and
change its name to BaseWifiService for consistency.

This checks at compile time that all base methods defined in
IWifiManager.aidl are stubbed in AbstractWifiService. Previously since
AbstractWifiService was an abstract class, any new method added to
IWifiManager.aidl would not force an update to AbstractWifiService.

Bug: 112338174
Test: Checked that removing a stub from BaseWifiService causes an
error at compilation.

Change-Id: I3f71aae51adfe5775bec25e1133876b975cf0515
parent 6ef1b7e2
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -38,14 +38,13 @@ import android.os.IBinder;
import android.os.Messenger;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.RemoteException;
import android.os.WorkSource;

import java.util.List;
import java.util.Map;

/**
 * Abstract class implementing IWifiManager with stub methods throwing runtime exceptions.
 * Empty concrete class implementing IWifiManager with stub methods throwing runtime exceptions.
 *
 * This class is meant to be extended by real implementations of IWifiManager in order to facilitate
 * cross-repo changes to WiFi internal APIs, including the introduction of new APIs, the removal of
@@ -56,10 +55,13 @@ import java.util.Map;
 * then given a short grace period to update themselves before the @Deprecated stub is removed for
 * good. If the API scheduled for removal has a replacement or an overload (signature change),
 * these should be introduced before the stub is removed to allow children to migrate.
 *
 * When a new API is added to IWifiManager.aidl, a stub should be added in BaseWifiService as
 * well otherwise compilation will fail.
 */
public abstract class AbstractWifiService extends IWifiManager.Stub {
public class BaseWifiService extends IWifiManager.Stub {

    private static final String TAG = AbstractWifiService.class.getSimpleName();
    private static final String TAG = BaseWifiService.class.getSimpleName();

    @Override
    public int getSupportedFeatures() {