diff --git a/staticlibs/device/com/android/net/module/util/BpfMap.java b/staticlibs/device/com/android/net/module/util/BpfMap.java index d4ce83b48e..f1420c2131 100644 --- a/staticlibs/device/com/android/net/module/util/BpfMap.java +++ b/staticlibs/device/com/android/net/module/util/BpfMap.java @@ -39,7 +39,7 @@ import java.util.Objects; * @param the key of the map. * @param the value of the map. */ -public class BpfMap implements IBpfMap, AutoCloseable { +public class BpfMap implements IBpfMap { static { System.loadLibrary(JniUtil.getJniLibraryName(BpfMap.class.getPackage())); } diff --git a/staticlibs/device/com/android/net/module/util/IBpfMap.java b/staticlibs/device/com/android/net/module/util/IBpfMap.java index d43b22c619..dce369a25c 100644 --- a/staticlibs/device/com/android/net/module/util/IBpfMap.java +++ b/staticlibs/device/com/android/net/module/util/IBpfMap.java @@ -20,7 +20,6 @@ import android.system.ErrnoException; import androidx.annotation.NonNull; import java.util.NoSuchElementException; -import java.util.function.BiConsumer; /** * The interface of BpfMap. This could be used to inject for testing. @@ -29,7 +28,7 @@ import java.util.function.BiConsumer; * @param the key of the map. * @param the value of the map. */ -public interface IBpfMap { +public interface IBpfMap extends AutoCloseable { /** Update an existing or create a new key -> value entry in an eBbpf map. */ void updateEntry(K key, V value) throws ErrnoException;