Merge "Add SocketUtils for NetworkStack" am: 75546d4e9d am: 68a0c1de33
am: dae2e37ce0
Change-Id: I6d059f9cd1a694659bfd7ac09a32022d29c03f85
This commit is contained in:
@@ -18,6 +18,9 @@ package android.net.apf;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.internal.R;
|
||||
|
||||
/**
|
||||
* APF program support capabilities.
|
||||
@@ -74,4 +77,18 @@ public class ApfCapabilities {
|
||||
public boolean hasDataAccess() {
|
||||
return apfVersionSupported >= 4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether the APF Filter in the device should filter out IEEE 802.3 Frames.
|
||||
*/
|
||||
public boolean getApfDrop8023Frames(Context context) {
|
||||
return context.getResources().getBoolean(R.bool.config_apfDrop802_3Frames);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return An array of blacklisted EtherType, packets with EtherTypes within it will be dropped.
|
||||
*/
|
||||
public int[] getApfEthTypeBlackList(Context context) {
|
||||
return context.getResources().getIntArray(R.array.config_apfEthTypeBlackList);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user