Skip to content
Snippets Groups Projects
Commit 50ad9135 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Gerrit Code Review
Browse files

Merge "BpfMap.java - add requires S+ annotation" into main

parents 77f9fb30 6f776f5a
No related branches found
No related tags found
No related merge requests found
......@@ -16,9 +16,11 @@
package com.android.net.module.util;
import android.os.Build;
import android.system.ErrnoException;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
/**
*
......@@ -26,6 +28,7 @@ import androidx.annotation.NonNull;
* array type with key->int and value->uint64_t defined in the bpf program.
*
*/
@RequiresApi(Build.VERSION_CODES.S)
public class BpfBitmap {
private BpfMap<Struct.S32, Struct.S64> mBpfMap;
......
......@@ -18,12 +18,14 @@ package com.android.net.module.util;
import static android.system.OsConstants.EEXIST;
import static android.system.OsConstants.ENOENT;
import android.os.Build;
import android.os.ParcelFileDescriptor;
import android.system.ErrnoException;
import android.util.Pair;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.io.IOException;
import java.nio.ByteBuffer;
......@@ -40,6 +42,7 @@ import java.util.concurrent.ConcurrentHashMap;
* @param <K> the key of the map.
* @param <V> the value of the map.
*/
@RequiresApi(Build.VERSION_CODES.S)
public class BpfMap<K extends Struct, V extends Struct> implements IBpfMap<K, V> {
static {
System.loadLibrary(JniUtil.getJniLibraryName(BpfMap.class.getPackage()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment