Merge "Clear apex.go entries for bluetooth libs"
diff --git a/common/device/com/android/net/module/util/TcUtils.java b/common/device/com/android/net/module/util/TcUtils.java
index cf01490..9d2fb7f 100644
--- a/common/device/com/android/net/module/util/TcUtils.java
+++ b/common/device/com/android/net/module/util/TcUtils.java
@@ -90,4 +90,15 @@
      */
     public static native void tcFilterDelDev(int ifIndex, boolean ingress, short prio,
             short proto) throws IOException;
+
+    /**
+     * Add a clsact qdisc.
+     *
+     * Equivalent to the following 'tc' command:
+     * tc qdisc add dev .. clsact
+     *
+     * @param ifIndex the network interface index.
+     * @throws IOException
+     */
+    public static native void tcQdiscAddDevClsact(int ifIndex) throws IOException;
 }
diff --git a/common/native/bpfmapjni/com_android_net_module_util_TcUtils.cpp b/common/native/bpfmapjni/com_android_net_module_util_TcUtils.cpp
index 2307a6b..073a46f 100644
--- a/common/native/bpfmapjni/com_android_net_module_util_TcUtils.cpp
+++ b/common/native/bpfmapjni/com_android_net_module_util_TcUtils.cpp
@@ -84,6 +84,18 @@
   }
 }
 
+// tc qdisc add dev .. clsact
+static void com_android_net_module_util_TcUtils_tcQdiscAddDevClsact(JNIEnv *env,
+                                                                    jobject clazz,
+                                                                    jint ifIndex) {
+  int error = tcAddQdiscClsact(ifIndex);
+  if (error) {
+    throwIOException(
+        env,
+        "com_android_net_module_util_TcUtils_tcQdiscAddDevClsact error: ", error);
+  }
+}
+
 /*
  * JNI registration.
  */
@@ -97,6 +109,8 @@
      (void *)com_android_net_module_util_TcUtils_tcFilterAddDevIngressPolice},
     {"tcFilterDelDev", "(IZSS)V",
      (void *)com_android_net_module_util_TcUtils_tcFilterDelDev},
+    {"tcQdiscAddDevClsact", "(I)V",
+     (void *)com_android_net_module_util_TcUtils_tcQdiscAddDevClsact},
 };
 
 int register_com_android_net_module_util_TcUtils(JNIEnv *env,