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

Commit a76e2766 authored by Patrick Rohr's avatar Patrick Rohr Committed by Gerrit Code Review
Browse files

Merge "Add shim for EthernetManager#getInterfaceList."

parents 07978fe5 526ccd7a
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ import androidx.annotation.RequiresApi;


import com.android.networkstack.apishim.common.EthernetManagerShim;
import com.android.networkstack.apishim.common.EthernetManagerShim;


import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executor;


@@ -95,4 +96,10 @@ public class EthernetManagerShimImpl
    public void setIncludeTestInterfaces(boolean include) {
    public void setIncludeTestInterfaces(boolean include) {
        mEm.setIncludeTestInterfaces(include);
        mEm.setIncludeTestInterfaces(include);
    }
    }

    @Override
    @NonNull
    public List<String> getInterfaceList() {
        return mEm.getInterfaceList();
    }
}
}
+6 −1
Original line number Original line Diff line number Diff line
@@ -21,7 +21,7 @@ import android.net.IpConfiguration;
import androidx.annotation.NonNull;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.Nullable;



import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.Executor;


/** API shim for EthernetManager */
/** API shim for EthernetManager */
@@ -55,4 +55,9 @@ public interface EthernetManagerShim {
    default void setIncludeTestInterfaces(boolean include) throws UnsupportedApiLevelException {
    default void setIncludeTestInterfaces(boolean include) throws UnsupportedApiLevelException {
        throw new UnsupportedApiLevelException("Not supported until API 30");
        throw new UnsupportedApiLevelException("Not supported until API 30");
    }
    }

    /** Shim for EthernetManager#getInterfaceList */
    default List<String> getInterfaceList() throws UnsupportedApiLevelException {
        throw new UnsupportedApiLevelException("Not supported until API 33");
    }
}
}