Merge "gn2bp: Add _is_java_source method"
diff --git a/Tethering/Android.bp b/Tethering/Android.bp
index f203191..b1bee32 100644
--- a/Tethering/Android.bp
+++ b/Tethering/Android.bp
@@ -34,6 +34,7 @@
     // Libraries not including Tethering's own framework-tethering (different flavors of that one
     // are needed depending on the build rule)
     libs: [
+        "framework-configinfrastructure",
         "framework-connectivity.stubs.module_lib",
         "framework-connectivity-t.stubs.module_lib",
         "framework-statsd.stubs.module_lib",
diff --git a/Tethering/src/android/net/ip/IpServer.java b/Tethering/src/android/net/ip/IpServer.java
index 438b592..0a34669 100644
--- a/Tethering/src/android/net/ip/IpServer.java
+++ b/Tethering/src/android/net/ip/IpServer.java
@@ -1146,9 +1146,6 @@
                 case CMD_INTERFACE_DOWN:
                     transitionTo(mUnavailableState);
                     break;
-                case CMD_IPV6_TETHER_UPDATE:
-                    updateUpstreamIPv6LinkProperties((LinkProperties) message.obj, message.arg1);
-                    break;
                 default:
                     return NOT_HANDLED;
             }
diff --git a/Tethering/tests/unit/Android.bp b/Tethering/tests/unit/Android.bp
index fd1166c..d78fbfd 100644
--- a/Tethering/tests/unit/Android.bp
+++ b/Tethering/tests/unit/Android.bp
@@ -68,6 +68,7 @@
         "framework-minus-apex",
         "framework-res",
         "framework-bluetooth.stubs.module_lib",
+        "framework-configinfrastructure",
         "framework-connectivity.impl",
         "framework-connectivity-t.impl",
         "framework-tethering.impl",
diff --git a/bpf_progs/clatd.c b/bpf_progs/clatd.c
index 22726ac..fc10d09 100644
--- a/bpf_progs/clatd.c
+++ b/bpf_progs/clatd.c
@@ -111,8 +111,9 @@
             return TC_ACT_PIPE;
         const struct frag_hdr *frag = (const struct frag_hdr *)(ip6 + 1);
         proto = frag->nexthdr;
-        // Per RFC6145 use bottom 16-bits of 32-bit IPv6 ID field for 16-bit IPv4 field.
-        ip_id = frag->identification;
+        // RFC6145: use bottom 16-bits of network endian 32-bit IPv6 ID field for 16-bit IPv4 field.
+        // this is equivalent to: ip_id = htons(ntohl(frag->identification));
+        ip_id = frag->identification >> 16;
         // Conversion of 16-bit IPv6 frag offset to 16-bit IPv4 frag offset field.
         // IPv6 is '13 bits of offset in multiples of 8' + 2 zero bits + more fragment bit
         // IPv4 is zero bit + don't frag bit + more frag bit + '13 bits of offset in multiples of 8'
diff --git a/nearby/service/Android.bp b/nearby/service/Android.bp
index 6065f7f..ef07bb9 100644
--- a/nearby/service/Android.bp
+++ b/nearby/service/Android.bp
@@ -87,6 +87,7 @@
         "androidx.annotation_annotation",
         "framework-bluetooth",
         "error_prone_annotations",
+        "framework-configinfrastructure",
         "framework-connectivity-t.impl",
         "framework-statsd",
     ],
diff --git a/nearby/tests/cts/fastpair/Android.bp b/nearby/tests/cts/fastpair/Android.bp
index 845ed84..0410cd5 100644
--- a/nearby/tests/cts/fastpair/Android.bp
+++ b/nearby/tests/cts/fastpair/Android.bp
@@ -31,6 +31,7 @@
     libs: [
         "android.test.base",
         "framework-bluetooth.stubs.module_lib",
+        "framework-configinfrastructure",
         "framework-connectivity-t.impl",
     ],
     srcs: ["src/**/*.java"],
diff --git a/service-t/Android.bp b/service-t/Android.bp
index 9bf9135..2e7a4f3 100644
--- a/service-t/Android.bp
+++ b/service-t/Android.bp
@@ -47,6 +47,7 @@
     ],
     libs: [
         "framework-annotations-lib",
+        "framework-configinfrastructure",
         "framework-connectivity-pre-jarjar",
         "framework-connectivity-t-pre-jarjar",
         "framework-tethering",
diff --git a/service/Android.bp b/service/Android.bp
index 691c1ad..50fb4f5 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -146,6 +146,7 @@
     ],
     libs: [
         "framework-annotations-lib",
+        "framework-configinfrastructure",
         "framework-connectivity-pre-jarjar",
         // The framework-connectivity-t library is only available on T+ platforms
         // so any calls to it must be protected with a check to ensure that it is
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 70e4466..ef6b014 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -1183,14 +1183,6 @@
   module.srcs.update([gn_utils.label_to_path(source)
                       for source in gn.java_sources if source not in deny_list])
 
-  # TODO: Remove hardcoded file addition to srcs
-  # jni_registration_generator.py generates empty .h file if native methods are not found in the
-  # java files. But android:cronet depends on `RegisterNonMainDexNatives` which is in the template
-  # of .h file. To make script generate non empty .h file, adding java file which contains native
-  # method. Once all the required java files are added to the srcs, this can be removed.
-  module.srcs.update([
-    "components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequest.java"])
-
 def create_blueprint_for_targets(gn, targets):
   """Generate a blueprint for a list of GN targets."""
   blueprint = Blueprint()