Merge "Enterprise slicing for profile blocking default"
diff --git a/Cronet/tests/cts/AndroidTest.xml b/Cronet/tests/cts/AndroidTest.xml
index 1f6bdb3..d2422f1 100644
--- a/Cronet/tests/cts/AndroidTest.xml
+++ b/Cronet/tests/cts/AndroidTest.xml
@@ -17,7 +17,8 @@
<configuration description="Config for CTS Cronet test cases">
<option name="test-suite-tag" value="cts" />
<option name="config-descriptor:metadata" key="component" value="networking" />
- <option name="config-descriptor:metadata" key="parameter" value="instant_app" />
+ <!-- Instant apps cannot create sockets. See b/264248246 -->
+ <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
<option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
<option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
diff --git a/Tethering/common/TetheringLib/Android.bp b/Tethering/common/TetheringLib/Android.bp
index 481557b..3f4da10 100644
--- a/Tethering/common/TetheringLib/Android.bp
+++ b/Tethering/common/TetheringLib/Android.bp
@@ -17,6 +17,18 @@
default_applicable_licenses: ["Android-Apache-2.0"],
}
+// TODO: This is currently not used, but is being merged early, so Cronet can be disabled in
+// tm-mainline-prod.
+// Both cronet_java_defaults and cronet_java_prejarjar_defaults can be used to
+// specify a java_defaults target that either enables or disables Cronet. This
+// is used to disable Cronet on tm-mainline-prod.
+// Note: they must either both be enabled or disabled.
+cronet_java_defaults = "CronetJavaDefaultsEnabled"
+cronet_java_prejarjar_defaults = "CronetJavaPrejarjarDefaultsEnabled"
+// This is a placeholder comment to avoid merge conflicts
+// as cronet_defaults may have different values
+// depending on the branch
+
java_sdk_library {
name: "framework-tethering",
defaults: ["framework-module-defaults"],
diff --git a/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java b/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
index 72f83fa..44d3ffc 100644
--- a/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
+++ b/Tethering/src/com/android/networkstack/tethering/BpfCoordinator.java
@@ -27,6 +27,7 @@
import static android.system.OsConstants.ETH_P_IP;
import static android.system.OsConstants.ETH_P_IPV6;
+import static com.android.net.module.util.NetworkStackConstants.IPV4_MIN_MTU;
import static com.android.net.module.util.ip.ConntrackMonitor.ConntrackEvent;
import static com.android.networkstack.tethering.BpfUtils.DOWNSTREAM;
import static com.android.networkstack.tethering.BpfUtils.UPSTREAM;
@@ -82,6 +83,8 @@
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -143,6 +146,8 @@
static final int NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED = 432_000;
@VisibleForTesting
static final int NF_CONNTRACK_UDP_TIMEOUT_STREAM = 180;
+ @VisibleForTesting
+ static final int INVALID_MTU = 0;
// List of TCP port numbers which aren't offloaded because the packets require the netfilter
// conntrack helper. See also TetherController::setForwardRules in netd.
@@ -263,6 +268,10 @@
// TODO: Support multi-upstream interfaces.
private int mLastIPv4UpstreamIfindex = 0;
+ // Tracks the IPv4 upstream interface information.
+ @Nullable
+ private UpstreamInfo mIpv4UpstreamInfo = null;
+
// Runnable that used by scheduling next polling of stats.
private final Runnable mScheduledPollingStats = () -> {
updateForwardedStats();
@@ -320,6 +329,19 @@
return SdkLevel.isAtLeastS();
}
+ /**
+ * Gets the MTU of the given interface.
+ */
+ public int getNetworkInterfaceMtu(@NonNull String iface) {
+ try {
+ final NetworkInterface networkInterface = NetworkInterface.getByName(iface);
+ return networkInterface == null ? INVALID_MTU : networkInterface.getMTU();
+ } catch (SocketException e) {
+ Log.e(TAG, "Could not get MTU for interface " + iface, e);
+ return INVALID_MTU;
+ }
+ }
+
/** Get downstream4 BPF map. */
@Nullable public IBpfMap<Tether4Key, Tether4Value> getBpfDownstream4Map() {
if (!isAtLeastS()) return null;
@@ -868,6 +890,7 @@
if (!isUsingBpf()) return;
int upstreamIndex = 0;
+ int mtu = INVALID_MTU;
// This will not work on a network that is using 464xlat because hasIpv4Address will not be
// true.
@@ -877,6 +900,17 @@
final String ifaceName = ns.linkProperties.getInterfaceName();
final InterfaceParams params = mDeps.getInterfaceParams(ifaceName);
final boolean isVcn = isVcnInterface(ifaceName);
+ mtu = ns.linkProperties.getMtu();
+ if (mtu == INVALID_MTU) {
+ // Get mtu via kernel if mtu is not found in LinkProperties.
+ mtu = mDeps.getNetworkInterfaceMtu(ifaceName);
+ }
+
+ // Use default mtu if can't find any.
+ if (mtu == INVALID_MTU) mtu = NetworkStackConstants.ETHER_MTU;
+ // Clamp to minimum ipv4 mtu
+ if (mtu < IPV4_MIN_MTU) mtu = IPV4_MIN_MTU;
+
if (!isVcn && params != null && !params.hasMacAddress /* raw ip upstream only */) {
upstreamIndex = params.index;
}
@@ -905,8 +939,11 @@
// after the upstream is lost do not incorrectly add rules pointing at the upstream.
if (upstreamIndex == 0) {
mIpv4UpstreamIndices.clear();
+ mIpv4UpstreamInfo = null;
return;
}
+
+ mIpv4UpstreamInfo = new UpstreamInfo(upstreamIndex, mtu);
Collection<InetAddress> addresses = ns.linkProperties.getAddresses();
for (final InetAddress addr: addresses) {
if (isValidUpstreamIpv4Address(addr)) {
@@ -1051,6 +1088,9 @@
}
pw.decreaseIndent();
+ pw.println("IPv4 Upstream Information: "
+ + (mIpv4UpstreamInfo != null ? mIpv4UpstreamInfo : "<empty>"));
+
pw.println();
pw.println("Forwarding counters:");
pw.increaseIndent();
@@ -1258,10 +1298,10 @@
final String ageStr = (value.lastUsed == 0) ? "-"
: String.format("%dms", (now - value.lastUsed) / 1_000_000);
- return String.format("%s [%s] %d(%s) %s:%d -> %d(%s) %s:%d -> %s:%d [%s] %s",
+ return String.format("%s [%s] %d(%s) %s:%d -> %d(%s) %s:%d -> %s:%d [%s] %d %s",
l4protoToString(key.l4proto), key.dstMac, key.iif, getIfName(key.iif),
src4, key.srcPort, value.oif, getIfName(value.oif),
- public4, publicPort, dst4, value.dstPort, value.ethDstMac, ageStr);
+ public4, publicPort, dst4, value.dstPort, value.ethDstMac, value.pmtu, ageStr);
}
private void dumpIpv4ForwardingRuleMap(long now, boolean downstream,
@@ -1283,13 +1323,13 @@
try (IBpfMap<Tether4Key, Tether4Value> upstreamMap = mDeps.getBpfUpstream4Map();
IBpfMap<Tether4Key, Tether4Value> downstreamMap = mDeps.getBpfDownstream4Map()) {
pw.println("IPv4 Upstream: proto [inDstMac] iif(iface) src -> nat -> "
- + "dst [outDstMac] age");
+ + "dst [outDstMac] pmtu age");
pw.increaseIndent();
dumpIpv4ForwardingRuleMap(now, UPSTREAM, upstreamMap, pw);
pw.decreaseIndent();
pw.println("IPv4 Downstream: proto [inDstMac] iif(iface) src -> nat -> "
- + "dst [outDstMac] age");
+ + "dst [outDstMac] pmtu age");
pw.increaseIndent();
dumpIpv4ForwardingRuleMap(now, DOWNSTREAM, downstreamMap, pw);
pw.decreaseIndent();
@@ -1540,6 +1580,28 @@
}
}
+ /** Upstream information class. */
+ private static final class UpstreamInfo {
+ // TODO: add clat interface information
+ public final int ifIndex;
+ public final int mtu;
+
+ private UpstreamInfo(final int ifIndex, final int mtu) {
+ this.ifIndex = ifIndex;
+ this.mtu = mtu;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(ifIndex, mtu);
+ }
+
+ @Override
+ public String toString() {
+ return String.format("ifIndex: %d, mtu: %d", ifIndex, mtu);
+ }
+ }
+
/**
* A BPF tethering stats provider to provide network statistics to the system.
* Note that this class' data may only be accessed on the handler thread.
@@ -1711,20 +1773,20 @@
@NonNull
private Tether4Value makeTetherUpstream4Value(@NonNull ConntrackEvent e,
- int upstreamIndex) {
- return new Tether4Value(upstreamIndex,
+ @NonNull UpstreamInfo upstreamInfo) {
+ return new Tether4Value(upstreamInfo.ifIndex,
NULL_MAC_ADDRESS /* ethDstMac (rawip) */,
NULL_MAC_ADDRESS /* ethSrcMac (rawip) */, ETH_P_IP,
- NetworkStackConstants.ETHER_MTU, toIpv4MappedAddressBytes(e.tupleReply.dstIp),
+ upstreamInfo.mtu, toIpv4MappedAddressBytes(e.tupleReply.dstIp),
toIpv4MappedAddressBytes(e.tupleReply.srcIp), e.tupleReply.dstPort,
e.tupleReply.srcPort, 0 /* lastUsed, filled by bpf prog only */);
}
@NonNull
private Tether4Value makeTetherDownstream4Value(@NonNull ConntrackEvent e,
- @NonNull ClientInfo c, int upstreamIndex) {
+ @NonNull ClientInfo c, @NonNull UpstreamInfo upstreamInfo) {
return new Tether4Value(c.downstreamIfindex,
- c.clientMac, c.downstreamMac, ETH_P_IP, NetworkStackConstants.ETHER_MTU,
+ c.clientMac, c.downstreamMac, ETH_P_IP, upstreamInfo.mtu,
toIpv4MappedAddressBytes(e.tupleOrig.dstIp),
toIpv4MappedAddressBytes(e.tupleOrig.srcIp),
e.tupleOrig.dstPort, e.tupleOrig.srcPort,
@@ -1773,9 +1835,11 @@
return;
}
- final Tether4Value upstream4Value = makeTetherUpstream4Value(e, upstreamIndex);
+ if (mIpv4UpstreamInfo == null || mIpv4UpstreamInfo.ifIndex != upstreamIndex) return;
+
+ final Tether4Value upstream4Value = makeTetherUpstream4Value(e, mIpv4UpstreamInfo);
final Tether4Value downstream4Value = makeTetherDownstream4Value(e, tetherClient,
- upstreamIndex);
+ mIpv4UpstreamInfo);
maybeAddDevMap(upstreamIndex, tetherClient.downstreamIfindex);
maybeSetLimit(upstreamIndex);
diff --git a/Tethering/src/com/android/networkstack/tethering/Tethering.java b/Tethering/src/com/android/networkstack/tethering/Tethering.java
index b3ec805..e1b7016 100644
--- a/Tethering/src/com/android/networkstack/tethering/Tethering.java
+++ b/Tethering/src/com/android/networkstack/tethering/Tethering.java
@@ -2407,6 +2407,9 @@
/** Unregister tethering event callback */
void unregisterTetheringEventCallback(ITetheringEventCallback callback) {
+ if (callback == null) {
+ throw new NullPointerException();
+ }
mHandler.post(() -> {
mTetheringEventCallbacks.unregister(callback);
});
diff --git a/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java b/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
index e5fe3f8..1978e99 100644
--- a/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
+++ b/Tethering/tests/unit/src/com/android/networkstack/tethering/BpfCoordinatorTest.java
@@ -32,6 +32,7 @@
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.staticMockMarker;
+import static com.android.net.module.util.NetworkStackConstants.IPV4_MIN_MTU;
import static com.android.net.module.util.ip.ConntrackMonitor.ConntrackEvent;
import static com.android.net.module.util.netlink.ConntrackMessage.DYING_MASK;
import static com.android.net.module.util.netlink.ConntrackMessage.ESTABLISHED_MASK;
@@ -41,6 +42,7 @@
import static com.android.net.module.util.netlink.NetlinkConstants.IPCTNL_MSG_CT_DELETE;
import static com.android.net.module.util.netlink.NetlinkConstants.IPCTNL_MSG_CT_NEW;
import static com.android.networkstack.tethering.BpfCoordinator.CONNTRACK_TIMEOUT_UPDATE_INTERVAL_MS;
+import static com.android.networkstack.tethering.BpfCoordinator.INVALID_MTU;
import static com.android.networkstack.tethering.BpfCoordinator.NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED;
import static com.android.networkstack.tethering.BpfCoordinator.NF_CONNTRACK_UDP_TIMEOUT_STREAM;
import static com.android.networkstack.tethering.BpfCoordinator.NON_OFFLOADED_UPSTREAM_IPV4_TCP_PORTS;
@@ -154,9 +156,9 @@
private static final int INVALID_IFINDEX = 0;
private static final int UPSTREAM_IFINDEX = 1001;
- private static final int UPSTREAM_IFINDEX2 = 1002;
- private static final int DOWNSTREAM_IFINDEX = 1003;
- private static final int DOWNSTREAM_IFINDEX2 = 1004;
+ private static final int UPSTREAM_IFINDEX2 = 1003;
+ private static final int DOWNSTREAM_IFINDEX = 2001;
+ private static final int DOWNSTREAM_IFINDEX2 = 2002;
private static final String UPSTREAM_IFACE = "rmnet0";
private static final String UPSTREAM_IFACE2 = "wlan0";
@@ -283,6 +285,11 @@
private int mDstPort = REMOTE_PORT;
private long mLastUsed = 0;
+ public Builder setPmtu(short pmtu) {
+ mPmtu = pmtu;
+ return this;
+ }
+
public Tether4Value build() {
return new Tether4Value(mOif, mEthDstMac, mEthSrcMac, mEthProto, mPmtu,
mSrc46, mDst46, mSrcPort, mDstPort, mLastUsed);
@@ -303,6 +310,11 @@
private int mDstPort = PRIVATE_PORT;
private long mLastUsed = 0;
+ public Builder setPmtu(short pmtu) {
+ mPmtu = pmtu;
+ return this;
+ }
+
public Tether4Value build() {
return new Tether4Value(mOif, mEthDstMac, mEthSrcMac, mEthProto, mPmtu,
mSrc46, mDst46, mSrcPort, mDstPort, mLastUsed);
@@ -375,6 +387,7 @@
private HashMap<IpServer, HashMap<Inet4Address, ClientInfo>> mTetherClients;
private long mElapsedRealtimeNanos = 0;
+ private int mMtu = NetworkStackConstants.ETHER_MTU;
private final ArgumentCaptor<ArrayList> mStringArrayCaptor =
ArgumentCaptor.forClass(ArrayList.class);
private final TestLooper mTestLooper = new TestLooper();
@@ -430,6 +443,10 @@
return mElapsedRealtimeNanos;
}
+ public int getNetworkInterfaceMtu(@NonNull String iface) {
+ return mMtu;
+ }
+
@Nullable
public IBpfMap<Tether4Key, Tether4Value> getBpfDownstream4Map() {
return mBpfDownstream4Map;
@@ -1518,6 +1535,7 @@
final LinkProperties lp = new LinkProperties();
lp.setInterfaceName(upstreamInfo.interfaceParams.name);
lp.addLinkAddress(new LinkAddress(upstreamInfo.address, 32 /* prefix length */));
+ lp.setMtu(mMtu);
final NetworkCapabilities capabilities = new NetworkCapabilities()
.addTransportType(upstreamInfo.transportType);
coordinator.updateUpstreamNetworkState(new UpstreamNetworkState(lp, capabilities,
@@ -2108,7 +2126,7 @@
@Test
public void testIpv6ForwardingRuleToString() throws Exception {
final Ipv6ForwardingRule rule = buildTestForwardingRule(UPSTREAM_IFINDEX, NEIGH_A, MAC_A);
- assertEquals("upstreamIfindex: 1001, downstreamIfindex: 1003, address: 2001:db8::1, "
+ assertEquals("upstreamIfindex: 1001, downstreamIfindex: 2001, address: 2001:db8::1, "
+ "srcMac: 12:34:56:78:90:ab, dstMac: 00:00:00:00:00:0a", rule.toString());
}
@@ -2195,4 +2213,72 @@
verifyDump(coordinator);
}
+
+ private void verifyAddTetherOffloadRule4Mtu(final int ifaceMtu, final boolean isKernelMtu,
+ final int expectedMtu) throws Exception {
+ // BpfCoordinator#updateUpstreamNetworkState geta mtu from LinkProperties. If not found,
+ // try to get from kernel.
+ if (isKernelMtu) {
+ // LinkProperties mtu is invalid and kernel mtu is valid.
+ mMtu = INVALID_MTU;
+ doReturn(ifaceMtu).when(mDeps).getNetworkInterfaceMtu(any());
+ } else {
+ // LinkProperties mtu is valid and kernel mtu is invalid.
+ mMtu = ifaceMtu;
+ doReturn(INVALID_MTU).when(mDeps).getNetworkInterfaceMtu(any());
+ }
+
+ final BpfCoordinator coordinator = makeBpfCoordinator();
+ initBpfCoordinatorForRule4(coordinator);
+
+ final Tether4Key expectedUpstream4KeyTcp = new TestUpstream4Key.Builder()
+ .setProto(IPPROTO_TCP)
+ .build();
+ final Tether4Key expectedDownstream4KeyTcp = new TestDownstream4Key.Builder()
+ .setProto(IPPROTO_TCP)
+ .build();
+ final Tether4Value expectedUpstream4ValueTcp = new TestUpstream4Value.Builder()
+ .setPmtu((short) expectedMtu)
+ .build();
+ final Tether4Value expectedDownstream4ValueTcp = new TestDownstream4Value.Builder()
+ .setPmtu((short) expectedMtu)
+ .build();
+
+ mConsumer.accept(new TestConntrackEvent.Builder()
+ .setMsgType(IPCTNL_MSG_CT_NEW)
+ .setProto(IPPROTO_TCP)
+ .build());
+ verify(mBpfUpstream4Map)
+ .insertEntry(eq(expectedUpstream4KeyTcp), eq(expectedUpstream4ValueTcp));
+ verify(mBpfDownstream4Map)
+ .insertEntry(eq(expectedDownstream4KeyTcp), eq(expectedDownstream4ValueTcp));
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.R)
+ public void testAddTetherOffloadRule4LowMtuFromLinkProperties() throws Exception {
+ verifyAddTetherOffloadRule4Mtu(
+ IPV4_MIN_MTU, false /* isKernelMtu */, IPV4_MIN_MTU /* expectedMtu */);
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.R)
+ public void testAddTetherOffloadRule4LowMtuFromKernel() throws Exception {
+ verifyAddTetherOffloadRule4Mtu(
+ IPV4_MIN_MTU, true /* isKernelMtu */, IPV4_MIN_MTU /* expectedMtu */);
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.R)
+ public void testAddTetherOffloadRule4LessThanIpv4MinMtu() throws Exception {
+ verifyAddTetherOffloadRule4Mtu(
+ IPV4_MIN_MTU - 1, false /* isKernelMtu */, IPV4_MIN_MTU /* expectedMtu */);
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.R)
+ public void testAddTetherOffloadRule4InvalidMtu() throws Exception {
+ verifyAddTetherOffloadRule4Mtu(INVALID_MTU, false /* isKernelMtu */,
+ NetworkStackConstants.ETHER_MTU /* expectedMtu */);
+ }
}
diff --git a/bpf_progs/clatd.c b/bpf_progs/clatd.c
index 14cddf6..7350209 100644
--- a/bpf_progs/clatd.c
+++ b/bpf_progs/clatd.c
@@ -52,9 +52,17 @@
__be32 identification;
};
+// constants for passing in to 'bool is_ethernet'
+static const bool RAWIP = false;
+static const bool ETHER = true;
+
+#define KVER_4_14 KVER(4, 14, 0)
+
DEFINE_BPF_MAP_GRW(clat_ingress6_map, HASH, ClatIngress6Key, ClatIngress6Value, 16, AID_SYSTEM)
-static inline __always_inline int nat64(struct __sk_buff* skb, bool is_ethernet) {
+static inline __always_inline int nat64(struct __sk_buff* skb,
+ const bool is_ethernet,
+ const unsigned kver) {
// Require ethernet dst mac address to be our unicast address.
if (is_ethernet && (skb->pkt_type != PACKET_HOST)) return TC_ACT_PIPE;
@@ -106,6 +114,9 @@
__u16 tot_len = ntohs(ip6->payload_len) + sizeof(struct iphdr); // cannot overflow, see above
if (proto == IPPROTO_FRAGMENT) {
+ // Fragment handling requires bpf_skb_adjust_room which is 4.14+
+ if (kver < KVER_4_14) return TC_ACT_PIPE;
+
// Must have (ethernet and) ipv6 header and ipv6 fragment extension header
if (data + l2_header_size + sizeof(*ip6) + sizeof(struct frag_hdr) > data_end)
return TC_ACT_PIPE;
@@ -208,7 +219,20 @@
// return -ENOTSUPP;
bpf_csum_update(skb, sum6);
- if (frag_off != htons(IP_DF)) {
+ // Technically 'kver < KVER_4_14' already implies 'frag_off == htons(IP_DF)' due to logic above,
+ // thus the initial 'kver >= KVER_4_14' check here is entirely superfluous.
+ //
+ // However, we *need* the compiler (when compiling the program for 4.9) to entirely
+ // optimize out the call to bpf_skb_adjust_room() bpf helper: it's not enough for it to emit
+ // an unreachable call to it, it must *not* emit it at all (otherwise the 4.9 kernel's
+ // bpf verifier will refuse to load a program with an unknown bpf helper call)
+ //
+ // This is easiest to achieve by being very explicit in the if clause,
+ // better safe than sorry...
+ //
+ // Note: we currently have no TreeHugger coverage for 4.9-T devices (there are no such
+ // Pixel or cuttlefish devices), so likely you won't notice for months if this breaks...
+ if (kver >= KVER_4_14 && frag_off != htons(IP_DF)) {
// If we're converting an IPv6 Fragment, we need to trim off 8 more bytes
// We're beyond recovery on error here... but hard to imagine how this could fail.
if (bpf_skb_adjust_room(skb, -(__s32)sizeof(struct frag_hdr), BPF_ADJ_ROOM_NET, /*flags*/0))
@@ -243,14 +267,24 @@
return TC_ACT_PIPE;
}
-DEFINE_BPF_PROG("schedcls/ingress6/clat_ether", AID_ROOT, AID_SYSTEM, sched_cls_ingress6_clat_ether)
+DEFINE_BPF_PROG_KVER("schedcls/ingress6/clat_ether$4_14", AID_ROOT, AID_SYSTEM, sched_cls_ingress6_clat_ether_4_14, KVER_4_14)
(struct __sk_buff* skb) {
- return nat64(skb, true);
+ return nat64(skb, ETHER, KVER_4_14);
}
-DEFINE_BPF_PROG("schedcls/ingress6/clat_rawip", AID_ROOT, AID_SYSTEM, sched_cls_ingress6_clat_rawip)
+DEFINE_BPF_PROG_KVER_RANGE("schedcls/ingress6/clat_ether$4_9", AID_ROOT, AID_SYSTEM, sched_cls_ingress6_clat_ether_4_9, KVER_NONE, KVER_4_14)
(struct __sk_buff* skb) {
- return nat64(skb, false);
+ return nat64(skb, ETHER, KVER_NONE);
+}
+
+DEFINE_BPF_PROG_KVER("schedcls/ingress6/clat_rawip$4_14", AID_ROOT, AID_SYSTEM, sched_cls_ingress6_clat_rawip_4_14, KVER_4_14)
+(struct __sk_buff* skb) {
+ return nat64(skb, RAWIP, KVER_4_14);
+}
+
+DEFINE_BPF_PROG_KVER_RANGE("schedcls/ingress6/clat_rawip$4_9", AID_ROOT, AID_SYSTEM, sched_cls_ingress6_clat_rawip_4_9, KVER_NONE, KVER_4_14)
+(struct __sk_buff* skb) {
+ return nat64(skb, RAWIP, KVER_NONE);
}
DEFINE_BPF_MAP_GRW(clat_egress4_map, HASH, ClatEgress4Key, ClatEgress4Value, 16, AID_SYSTEM)
diff --git a/bpf_progs/netd.c b/bpf_progs/netd.c
index 3eb4e02..43920d0 100644
--- a/bpf_progs/netd.c
+++ b/bpf_progs/netd.c
@@ -109,8 +109,9 @@
// (this is because these are currently attached by the mainline provided libnetd_updatable .so
// which is loaded into netd and thus runs as netd uid/gid/selinux context)
#define DEFINE_NETD_BPF_PROG_KVER_RANGE(SECTION_NAME, prog_uid, prog_gid, the_prog, minKV, maxKV) \
- DEFINE_BPF_PROG_EXT(SECTION_NAME, prog_uid, prog_gid, the_prog, \
- minKV, maxKV, false, "fs_bpf_netd_readonly", "")
+ DEFINE_BPF_PROG_EXT(SECTION_NAME, prog_uid, prog_gid, the_prog, \
+ minKV, maxKV, BPFLOADER_MIN_VER, BPFLOADER_MAX_VER, false, \
+ "fs_bpf_netd_readonly", "", false, false, false)
#define DEFINE_NETD_BPF_PROG_KVER(SECTION_NAME, prog_uid, prog_gid, the_prog, min_kv) \
DEFINE_NETD_BPF_PROG_KVER_RANGE(SECTION_NAME, prog_uid, prog_gid, the_prog, min_kv, KVER_INF)
@@ -120,8 +121,9 @@
// programs that only need to be usable by the system server
#define DEFINE_SYS_BPF_PROG(SECTION_NAME, prog_uid, prog_gid, the_prog) \
- DEFINE_BPF_PROG_EXT(SECTION_NAME, prog_uid, prog_gid, the_prog, \
- KVER_NONE, KVER_INF, false, "fs_bpf_net_shared", "")
+ DEFINE_BPF_PROG_EXT(SECTION_NAME, prog_uid, prog_gid, the_prog, KVER_NONE, KVER_INF, \
+ BPFLOADER_MIN_VER, BPFLOADER_MAX_VER, false, "fs_bpf_net_shared", \
+ "", false, false, false)
static __always_inline int is_system_uid(uint32_t uid) {
// MIN_SYSTEM_UID is AID_ROOT == 0, so uint32_t is *always* >= 0
@@ -194,19 +196,38 @@
DEFINE_UPDATE_STATS(stats_map_B, StatsKey)
// both of these return 0 on success or -EFAULT on failure (and zero out the buffer)
-static __always_inline inline int bpf_skb_load_bytes_net(const struct __sk_buff* skb, int off,
- void* to, int len, bool is_4_19) {
- return is_4_19
- ? bpf_skb_load_bytes_relative(skb, off, to, len, BPF_HDR_START_NET)
- : bpf_skb_load_bytes(skb, off, to, len);
+static __always_inline inline int bpf_skb_load_bytes_net(const struct __sk_buff* const skb,
+ const int L3_off,
+ void* const to,
+ const int len,
+ const unsigned kver) {
+ // 'kver' (here and throughout) is the compile time guaranteed minimum kernel version,
+ // ie. we're building (a version of) the bpf program for kver (or newer!) kernels.
+ //
+ // 4.19+ kernels support the 'bpf_skb_load_bytes_relative()' bpf helper function,
+ // so we can use it. On pre-4.19 kernels we cannot use the relative load helper,
+ // and thus will simply get things wrong if there's any L2 (ethernet) header in the skb.
+ //
+ // Luckily, for cellular traffic, there likely isn't any, as cell is usually 'rawip'.
+ //
+ // However, this does mean that wifi (and ethernet) on 4.14 is basically a lost cause:
+ // we'll be making decisions based on the *wrong* bytes (fetched from the wrong offset),
+ // because the 'L3_off' passed to bpf_skb_load_bytes() should be increased by l2_header_size,
+ // which for ethernet is 14 and not 0 like it is for rawip.
+ //
+ // For similar reasons this will fail with non-offloaded VLAN tags on < 4.19 kernels,
+ // since those extend the ethernet header from 14 to 18 bytes.
+ return kver >= KVER(4, 19, 0)
+ ? bpf_skb_load_bytes_relative(skb, L3_off, to, len, BPF_HDR_START_NET)
+ : bpf_skb_load_bytes(skb, L3_off, to, len);
}
-static __always_inline inline bool skip_owner_match(struct __sk_buff* skb, bool is_4_19) {
+static __always_inline inline bool skip_owner_match(struct __sk_buff* skb, const unsigned kver) {
uint32_t flag = 0;
if (skb->protocol == htons(ETH_P_IP)) {
uint8_t proto;
// no need to check for success, proto will be zeroed if bpf_skb_load_bytes_net() fails
- (void)bpf_skb_load_bytes_net(skb, IP_PROTO_OFF, &proto, sizeof(proto), is_4_19);
+ (void)bpf_skb_load_bytes_net(skb, IP_PROTO_OFF, &proto, sizeof(proto), kver);
if (proto == IPPROTO_ESP) return true;
if (proto != IPPROTO_TCP) return false; // handles read failure above
uint8_t ihl;
@@ -215,19 +236,19 @@
// (a little bit deeper in the packet in spite of ihl being zeroed) of the tcp flags
// field will also fail, and that failure we already handle correctly
// (we also don't check that ihl in [0x45,0x4F] nor that ipv4 header checksum is correct)
- (void)bpf_skb_load_bytes_net(skb, IPPROTO_IHL_OFF, &ihl, sizeof(ihl), is_4_19);
+ (void)bpf_skb_load_bytes_net(skb, IPPROTO_IHL_OFF, &ihl, sizeof(ihl), kver);
// if the read below fails, we'll just assume no TCP flags are set, which is fine.
(void)bpf_skb_load_bytes_net(skb, (ihl & 0xF) * 4 + TCP_FLAG32_OFF,
- &flag, sizeof(flag), is_4_19);
+ &flag, sizeof(flag), kver);
} else if (skb->protocol == htons(ETH_P_IPV6)) {
uint8_t proto;
// no need to check for success, proto will be zeroed if bpf_skb_load_bytes_net() fails
- (void)bpf_skb_load_bytes_net(skb, IPV6_PROTO_OFF, &proto, sizeof(proto), is_4_19);
+ (void)bpf_skb_load_bytes_net(skb, IPV6_PROTO_OFF, &proto, sizeof(proto), kver);
if (proto == IPPROTO_ESP) return true;
if (proto != IPPROTO_TCP) return false; // handles read failure above
// if the read below fails, we'll just assume no TCP flags are set, which is fine.
(void)bpf_skb_load_bytes_net(skb, sizeof(struct ipv6hdr) + TCP_FLAG32_OFF,
- &flag, sizeof(flag), is_4_19);
+ &flag, sizeof(flag), kver);
} else {
return false;
}
@@ -250,8 +271,8 @@
#define DROP_IF_UNSET (DOZABLE_MATCH | POWERSAVE_MATCH | RESTRICTED_MATCH | LOW_POWER_STANDBY_MATCH)
static __always_inline inline int bpf_owner_match(struct __sk_buff* skb, uint32_t uid,
- bool egress, bool is_4_19) {
- if (skip_owner_match(skb, is_4_19)) return PASS;
+ bool egress, const unsigned kver) {
+ if (skip_owner_match(skb, kver)) return PASS;
if (is_system_uid(uid)) return PASS;
@@ -288,13 +309,13 @@
StatsKey* key, uint32_t selectedMap) {
if (selectedMap == SELECT_MAP_A) {
update_stats_map_A(skb, egress, key);
- } else if (selectedMap == SELECT_MAP_B) {
+ } else {
update_stats_map_B(skb, egress, key);
}
}
static __always_inline inline int bpf_traffic_account(struct __sk_buff* skb, bool egress,
- bool is_4_19) {
+ const unsigned kver) {
uint32_t sock_uid = bpf_get_socket_uid(skb);
uint64_t cookie = bpf_get_socket_cookie(skb);
UidTagValue* utag = bpf_cookie_tag_map_lookup_elem(&cookie);
@@ -314,7 +335,7 @@
return PASS;
}
- int match = bpf_owner_match(skb, sock_uid, egress, is_4_19);
+ int match = bpf_owner_match(skb, sock_uid, egress, kver);
if (egress && (match == DROP)) {
// If an outbound packet is going to be dropped, we do not count that
// traffic.
@@ -362,25 +383,25 @@
DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/ingress/stats$4_19", AID_ROOT, AID_SYSTEM,
bpf_cgroup_ingress_4_19, KVER(4, 19, 0), KVER_INF)
(struct __sk_buff* skb) {
- return bpf_traffic_account(skb, INGRESS, /* is_4_19 */ true);
+ return bpf_traffic_account(skb, INGRESS, KVER(4, 19, 0));
}
DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/ingress/stats$4_14", AID_ROOT, AID_SYSTEM,
bpf_cgroup_ingress_4_14, KVER_NONE, KVER(4, 19, 0))
(struct __sk_buff* skb) {
- return bpf_traffic_account(skb, INGRESS, /* is_4_19 */ false);
+ return bpf_traffic_account(skb, INGRESS, KVER_NONE);
}
DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/egress/stats$4_19", AID_ROOT, AID_SYSTEM,
bpf_cgroup_egress_4_19, KVER(4, 19, 0), KVER_INF)
(struct __sk_buff* skb) {
- return bpf_traffic_account(skb, EGRESS, /* is_4_19 */ true);
+ return bpf_traffic_account(skb, EGRESS, KVER(4, 19, 0));
}
DEFINE_NETD_BPF_PROG_KVER_RANGE("cgroupskb/egress/stats$4_14", AID_ROOT, AID_SYSTEM,
bpf_cgroup_egress_4_14, KVER_NONE, KVER(4, 19, 0))
(struct __sk_buff* skb) {
- return bpf_traffic_account(skb, EGRESS, /* is_4_19 */ false);
+ return bpf_traffic_account(skb, EGRESS, KVER_NONE);
}
// WARNING: Android T's non-updatable netd depends on the name of this program.
diff --git a/framework-t/src/android/net/IpSecManager.java b/framework-t/src/android/net/IpSecManager.java
index 1c83e09..ff021d6 100644
--- a/framework-t/src/android/net/IpSecManager.java
+++ b/framework-t/src/android/net/IpSecManager.java
@@ -610,7 +610,7 @@
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
- mCloseGuard.open("constructor");
+ mCloseGuard.open("close");
}
/** Get the encapsulation socket's file descriptor. */
@@ -890,7 +890,7 @@
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
- mCloseGuard.open("constructor");
+ mCloseGuard.open("close");
}
/**
diff --git a/framework-t/src/android/net/NetworkTemplate.java b/framework-t/src/android/net/NetworkTemplate.java
index c0ae822..b2da371 100644
--- a/framework-t/src/android/net/NetworkTemplate.java
+++ b/framework-t/src/android/net/NetworkTemplate.java
@@ -52,7 +52,6 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.net.module.util.CollectionUtils;
import com.android.net.module.util.NetworkIdentityUtils;
-import com.android.net.module.util.NetworkStatsUtils;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -280,23 +279,21 @@
private final int mRoaming;
private final int mDefaultNetwork;
private final int mRatType;
- /**
- * The subscriber Id match rule defines how the template should match networks with
- * specific subscriberId(s). See NetworkTemplate#SUBSCRIBER_ID_MATCH_RULE_* for more detail.
- */
- private final int mSubscriberIdMatchRule;
// Bitfield containing OEM network properties{@code NetworkIdentity#OEM_*}.
private final int mOemManaged;
- private static void checkValidSubscriberIdMatchRule(int matchRule, int subscriberIdMatchRule) {
+ private static void checkValidMatchSubscriberIds(int matchRule, String[] matchSubscriberIds) {
switch (matchRule) {
case MATCH_MOBILE:
case MATCH_CARRIER:
// MOBILE and CARRIER templates must always specify a subscriber ID.
- if (subscriberIdMatchRule == NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_ALL) {
- throw new IllegalArgumentException("Invalid SubscriberIdMatchRule "
- + "on match rule: " + getMatchRuleName(matchRule));
+ if (matchSubscriberIds.length == 0) {
+ throw new IllegalArgumentException("checkValidMatchSubscriberIds with empty"
+ + " list of ids for rule" + getMatchRuleName(matchRule));
+ } else if (CollectionUtils.contains(matchSubscriberIds, null)) {
+ throw new IllegalArgumentException("checkValidMatchSubscriberIds list of ids"
+ + " may not contain null for rule " + getMatchRuleName(matchRule));
}
return;
default:
@@ -312,28 +309,21 @@
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.TIRAMISU,
publicAlternatives = "Use {@code Builder} instead.")
public NetworkTemplate(int matchRule, String subscriberId, String wifiNetworkKey) {
- this(matchRule, subscriberId, new String[] { subscriberId }, wifiNetworkKey);
- }
-
- /** @hide */
- public NetworkTemplate(int matchRule, String subscriberId, String[] matchSubscriberIds,
- String wifiNetworkKey) {
// Older versions used to only match MATCH_MOBILE and MATCH_MOBILE_WILDCARD templates
// to metered networks. It is now possible to match mobile with any meteredness, but
// in order to preserve backward compatibility of @UnsupportedAppUsage methods, this
//constructor passes METERED_YES for these types.
- this(matchRule, subscriberId, matchSubscriberIds,
+ this(matchRule, subscriberId, new String[] { subscriberId },
wifiNetworkKey != null ? new String[] { wifiNetworkKey } : new String[0],
(matchRule == MATCH_MOBILE || matchRule == MATCH_MOBILE_WILDCARD
|| matchRule == MATCH_CARRIER) ? METERED_YES : METERED_ALL,
- ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_EXACT);
+ ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, OEM_MANAGED_ALL);
}
/** @hide */
public NetworkTemplate(int matchRule, String subscriberId, String[] matchSubscriberIds,
String[] matchWifiNetworkKeys, int metered, int roaming,
- int defaultNetwork, int ratType, int oemManaged, int subscriberIdMatchRule) {
+ int defaultNetwork, int ratType, int oemManaged) {
Objects.requireNonNull(matchWifiNetworkKeys);
Objects.requireNonNull(matchSubscriberIds);
mMatchRule = matchRule;
@@ -345,8 +335,7 @@
mDefaultNetwork = defaultNetwork;
mRatType = ratType;
mOemManaged = oemManaged;
- mSubscriberIdMatchRule = subscriberIdMatchRule;
- checkValidSubscriberIdMatchRule(matchRule, subscriberIdMatchRule);
+ checkValidMatchSubscriberIds(matchRule, matchSubscriberIds);
if (!isKnownMatchRule(matchRule)) {
throw new IllegalArgumentException("Unknown network template rule " + matchRule
+ " will not match any identity.");
@@ -363,7 +352,6 @@
mDefaultNetwork = in.readInt();
mRatType = in.readInt();
mOemManaged = in.readInt();
- mSubscriberIdMatchRule = in.readInt();
}
@Override
@@ -377,7 +365,6 @@
dest.writeInt(mDefaultNetwork);
dest.writeInt(mRatType);
dest.writeInt(mOemManaged);
- dest.writeInt(mSubscriberIdMatchRule);
}
@Override
@@ -414,15 +401,13 @@
if (mOemManaged != OEM_MANAGED_ALL) {
builder.append(", oemManaged=").append(getOemManagedNames(mOemManaged));
}
- builder.append(", subscriberIdMatchRule=")
- .append(subscriberIdMatchRuleToString(mSubscriberIdMatchRule));
return builder.toString();
}
@Override
public int hashCode() {
return Objects.hash(mMatchRule, mSubscriberId, Arrays.hashCode(mMatchWifiNetworkKeys),
- mMetered, mRoaming, mDefaultNetwork, mRatType, mOemManaged, mSubscriberIdMatchRule);
+ mMetered, mRoaming, mDefaultNetwork, mRatType, mOemManaged);
}
@Override
@@ -436,23 +421,11 @@
&& mDefaultNetwork == other.mDefaultNetwork
&& mRatType == other.mRatType
&& mOemManaged == other.mOemManaged
- && mSubscriberIdMatchRule == other.mSubscriberIdMatchRule
&& Arrays.equals(mMatchWifiNetworkKeys, other.mMatchWifiNetworkKeys);
}
return false;
}
- private static String subscriberIdMatchRuleToString(int rule) {
- switch (rule) {
- case NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_EXACT:
- return "EXACT_MATCH";
- case NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_ALL:
- return "ALL";
- default:
- return "Unknown rule " + rule;
- }
- }
-
/** @hide */
public boolean isMatchRuleMobile() {
switch (mMatchRule) {
@@ -627,13 +600,13 @@
/**
* Check if this template matches {@code subscriberId}. Returns true if this
- * template was created with {@code SUBSCRIBER_ID_MATCH_RULE_ALL}, or with a
- * {@code mMatchSubscriberIds} array that contains {@code subscriberId}.
+ * template was created with a {@code mMatchSubscriberIds} array that contains
+ * {@code subscriberId} or if {@code mMatchSubscriberIds} is empty.
*
* @hide
*/
public boolean matchesSubscriberId(@Nullable String subscriberId) {
- return mSubscriberIdMatchRule == NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_ALL
+ return mMatchSubscriberIds.length == 0
|| CollectionUtils.contains(mMatchSubscriberIds, subscriberId);
}
@@ -812,7 +785,11 @@
// could handle incompatible subscriberIds. See b/217805241.
return new NetworkTemplate(template.mMatchRule, merged[0], merged,
CollectionUtils.isEmpty(matchWifiNetworkKeys)
- ? null : matchWifiNetworkKeys[0]);
+ ? new String[0] : new String[] { matchWifiNetworkKeys[0] },
+ (template.mMatchRule == MATCH_MOBILE
+ || template.mMatchRule == MATCH_MOBILE_WILDCARD
+ || template.mMatchRule == MATCH_CARRIER) ? METERED_YES : METERED_ALL,
+ ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, OEM_MANAGED_ALL);
}
return template;
@@ -1024,14 +1001,11 @@
@NonNull
public NetworkTemplate build() {
assertRequestableParameters();
- final int subscriberIdMatchRule = mMatchSubscriberIds.isEmpty()
- ? NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_ALL
- : NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_EXACT;
return new NetworkTemplate(getWildcardDeducedMatchRule(),
mMatchSubscriberIds.isEmpty() ? null : mMatchSubscriberIds.iterator().next(),
mMatchSubscriberIds.toArray(new String[0]),
mMatchWifiNetworkKeys.toArray(new String[0]), mMetered, mRoaming,
- mDefaultNetwork, mRatType, mOemManaged, subscriberIdMatchRule);
+ mDefaultNetwork, mRatType, mOemManaged);
}
}
}
diff --git a/service-t/src/com/android/server/net/NetworkStatsService.java b/service-t/src/com/android/server/net/NetworkStatsService.java
index cf53002..3a17bdd 100644
--- a/service-t/src/com/android/server/net/NetworkStatsService.java
+++ b/service-t/src/com/android/server/net/NetworkStatsService.java
@@ -69,6 +69,7 @@
import android.annotation.Nullable;
import android.annotation.TargetApi;
import android.app.AlarmManager;
+import android.app.BroadcastOptions;
import android.app.PendingIntent;
import android.app.usage.NetworkStatsManager;
import android.content.ApexEnvironment;
@@ -114,6 +115,7 @@
import android.net.netstats.provider.NetworkStatsProvider;
import android.os.Binder;
import android.os.Build;
+import android.os.Bundle;
import android.os.DropBoxManager;
import android.os.Environment;
import android.os.Handler;
@@ -149,6 +151,7 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.FileRotator;
+import com.android.modules.utils.build.SdkLevel;
import com.android.net.module.util.BaseNetdUnsolicitedEventListener;
import com.android.net.module.util.BestClock;
import com.android.net.module.util.BinderUtils;
@@ -166,6 +169,9 @@
import com.android.net.module.util.Struct.U8;
import com.android.net.module.util.bpf.CookieTagMapKey;
import com.android.net.module.util.bpf.CookieTagMapValue;
+import com.android.networkstack.apishim.BroadcastOptionsShimImpl;
+import com.android.networkstack.apishim.ConstantsShim;
+import com.android.networkstack.apishim.common.UnsupportedApiLevelException;
import com.android.server.BpfNetMaps;
import java.io.File;
@@ -526,8 +532,22 @@
case MSG_BROADCAST_NETWORK_STATS_UPDATED: {
final Intent updatedIntent = new Intent(ACTION_NETWORK_STATS_UPDATED);
updatedIntent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+ Bundle opts = null;
+ if (SdkLevel.isAtLeastU()) {
+ try {
+ // This allows us to discard older broadcasts still waiting to
+ // be delivered.
+ opts = BroadcastOptionsShimImpl.newInstance(
+ BroadcastOptions.makeBasic())
+ .setDeliveryGroupPolicy(
+ ConstantsShim.DELIVERY_GROUP_POLICY_MOST_RECENT)
+ .toBundle();
+ } catch (UnsupportedApiLevelException e) {
+ Log.wtf(TAG, "Using unsupported API" + e);
+ }
+ }
mContext.sendBroadcastAsUser(updatedIntent, UserHandle.ALL,
- READ_NETWORK_USAGE_HISTORY);
+ READ_NETWORK_USAGE_HISTORY, opts);
break;
}
}
diff --git a/service/Android.bp b/service/Android.bp
index 224fa19..8fa6436 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -206,6 +206,7 @@
libs: [
"framework-annotations-lib",
"framework-connectivity-pre-jarjar",
+ "framework-connectivity-t-pre-jarjar",
"framework-tethering",
"framework-wifi",
"service-connectivity-pre-jarjar",
diff --git a/service/mdns/com/android/server/connectivity/mdns/MdnsAdvertiser.java b/service/mdns/com/android/server/connectivity/mdns/MdnsAdvertiser.java
index dee78fd..185fac1 100644
--- a/service/mdns/com/android/server/connectivity/mdns/MdnsAdvertiser.java
+++ b/service/mdns/com/android/server/connectivity/mdns/MdnsAdvertiser.java
@@ -16,14 +16,401 @@
package com.android.server.connectivity.mdns;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.net.LinkAddress;
+import android.net.Network;
+import android.net.nsd.NsdManager;
+import android.net.nsd.NsdServiceInfo;
+import android.os.Looper;
+import android.util.ArrayMap;
import android.util.Log;
+import android.util.SparseArray;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Predicate;
/**
* MdnsAdvertiser manages advertising services per {@link com.android.server.NsdService} requests.
*
- * TODO: implement
+ * All methods except the constructor must be called on the looper thread.
*/
public class MdnsAdvertiser {
private static final String TAG = MdnsAdvertiser.class.getSimpleName();
- public static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
+ static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
+
+ private final Looper mLooper;
+ private final AdvertiserCallback mCb;
+
+ // Max-sized buffers to be used as temporary buffer to read/build packets. May be used by
+ // multiple components, but only for self-contained operations in the looper thread, so not
+ // concurrently.
+ // TODO: set according to MTU. 1300 should fit for ethernet MTU 1500 with some overhead.
+ private final byte[] mPacketCreationBuffer = new byte[1300];
+
+ private final MdnsSocketProvider mSocketProvider;
+ private final ArrayMap<Network, InterfaceAdvertiserRequest> mAdvertiserRequests =
+ new ArrayMap<>();
+ private final ArrayMap<MdnsInterfaceSocket, MdnsInterfaceAdvertiser> mAllAdvertisers =
+ new ArrayMap<>();
+ private final SparseArray<Registration> mRegistrations = new SparseArray<>();
+ private final Dependencies mDeps;
+
+ /**
+ * Dependencies for {@link MdnsAdvertiser}, useful for testing.
+ */
+ @VisibleForTesting
+ public static class Dependencies {
+ /**
+ * @see MdnsInterfaceAdvertiser
+ */
+ public MdnsInterfaceAdvertiser makeAdvertiser(@NonNull MdnsInterfaceSocket socket,
+ @NonNull List<LinkAddress> initialAddresses,
+ @NonNull Looper looper, @NonNull byte[] packetCreationBuffer,
+ @NonNull MdnsInterfaceAdvertiser.Callback cb) {
+ // Note NetworkInterface is final and not mockable
+ final String logTag = socket.getInterface().getName();
+ return new MdnsInterfaceAdvertiser(logTag, socket, initialAddresses, looper,
+ packetCreationBuffer, cb);
+ }
+ }
+
+ private final MdnsInterfaceAdvertiser.Callback mInterfaceAdvertiserCb =
+ new MdnsInterfaceAdvertiser.Callback() {
+ @Override
+ public void onRegisterServiceSucceeded(
+ @NonNull MdnsInterfaceAdvertiser advertiser, int serviceId) {
+ // Wait for all current interfaces to be done probing before notifying of success.
+ if (anyAdvertiser(a -> a.isProbing(serviceId))) return;
+ // The service may still be unregistered/renamed if a conflict is found on a later added
+ // interface, or if a conflicting announcement/reply is detected (RFC6762 9.)
+
+ final Registration registration = mRegistrations.get(serviceId);
+ if (registration == null) {
+ Log.wtf(TAG, "Register succeeded for unknown registration");
+ return;
+ }
+ if (!registration.mNotifiedRegistrationSuccess) {
+ mCb.onRegisterServiceSucceeded(serviceId, registration.getServiceInfo());
+ registration.mNotifiedRegistrationSuccess = true;
+ }
+ }
+
+ @Override
+ public void onServiceConflict(@NonNull MdnsInterfaceAdvertiser advertiser, int serviceId) {
+ // TODO: handle conflicts found after registration (during or after probing)
+ }
+
+ @Override
+ public void onDestroyed(@NonNull MdnsInterfaceSocket socket) {
+ for (int i = mAdvertiserRequests.size() - 1; i >= 0; i--) {
+ if (mAdvertiserRequests.valueAt(i).onAdvertiserDestroyed(socket)) {
+ mAdvertiserRequests.removeAt(i);
+ }
+ }
+ mAllAdvertisers.remove(socket);
+ }
+ };
+
+ /**
+ * A request for a {@link MdnsInterfaceAdvertiser}.
+ *
+ * This class tracks services to be advertised on all sockets provided via a registered
+ * {@link MdnsSocketProvider.SocketCallback}.
+ */
+ private class InterfaceAdvertiserRequest implements MdnsSocketProvider.SocketCallback {
+ /** Registrations to add to newer MdnsInterfaceAdvertisers when sockets are created. */
+ @NonNull
+ private final SparseArray<Registration> mPendingRegistrations = new SparseArray<>();
+ @NonNull
+ private final ArrayMap<MdnsInterfaceSocket, MdnsInterfaceAdvertiser> mAdvertisers =
+ new ArrayMap<>();
+
+ InterfaceAdvertiserRequest(@Nullable Network requestedNetwork) {
+ mSocketProvider.requestSocket(requestedNetwork, this);
+ }
+
+ /**
+ * Called when an advertiser was destroyed, after all services were unregistered and it sent
+ * exit announcements, or the interface is gone.
+ *
+ * @return true if this {@link InterfaceAdvertiserRequest} should now be deleted.
+ */
+ boolean onAdvertiserDestroyed(@NonNull MdnsInterfaceSocket socket) {
+ mAdvertisers.remove(socket);
+ if (mAdvertisers.size() == 0 && mPendingRegistrations.size() == 0) {
+ // No advertiser is using sockets from this request anymore (in particular for exit
+ // announcements), and there is no registration so newer sockets will not be
+ // necessary, so the request can be unregistered.
+ mSocketProvider.unrequestSocket(this);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get the ID of a conflicting service, or -1 if none.
+ */
+ int getConflictingService(@NonNull NsdServiceInfo info) {
+ for (int i = 0; i < mPendingRegistrations.size(); i++) {
+ final NsdServiceInfo other = mPendingRegistrations.valueAt(i).getServiceInfo();
+ if (info.getServiceName().equals(other.getServiceName())
+ && info.getServiceType().equals(other.getServiceType())) {
+ return mPendingRegistrations.keyAt(i);
+ }
+ }
+ return -1;
+ }
+
+ void addService(int id, Registration registration)
+ throws NameConflictException {
+ final int conflicting = getConflictingService(registration.getServiceInfo());
+ if (conflicting >= 0) {
+ throw new NameConflictException(conflicting);
+ }
+
+ mPendingRegistrations.put(id, registration);
+ for (int i = 0; i < mAdvertisers.size(); i++) {
+ mAdvertisers.valueAt(i).addService(id, registration.getServiceInfo());
+ }
+ }
+
+ void removeService(int id) {
+ mPendingRegistrations.remove(id);
+ for (int i = 0; i < mAdvertisers.size(); i++) {
+ mAdvertisers.valueAt(i).removeService(id);
+ }
+ }
+
+ @Override
+ public void onSocketCreated(@NonNull Network network,
+ @NonNull MdnsInterfaceSocket socket,
+ @NonNull List<LinkAddress> addresses) {
+ MdnsInterfaceAdvertiser advertiser = mAllAdvertisers.get(socket);
+ if (advertiser == null) {
+ advertiser = mDeps.makeAdvertiser(socket, addresses, mLooper, mPacketCreationBuffer,
+ mInterfaceAdvertiserCb);
+ mAllAdvertisers.put(socket, advertiser);
+ advertiser.start();
+ }
+ mAdvertisers.put(socket, advertiser);
+ for (int i = 0; i < mPendingRegistrations.size(); i++) {
+ try {
+ advertiser.addService(mPendingRegistrations.keyAt(i),
+ mPendingRegistrations.valueAt(i).getServiceInfo());
+ } catch (NameConflictException e) {
+ Log.wtf(TAG, "Name conflict adding services that should have unique names", e);
+ }
+ }
+ }
+
+ @Override
+ public void onInterfaceDestroyed(@NonNull Network network,
+ @NonNull MdnsInterfaceSocket socket) {
+ final MdnsInterfaceAdvertiser advertiser = mAdvertisers.get(socket);
+ if (advertiser != null) advertiser.destroyNow();
+ }
+
+ @Override
+ public void onAddressesChanged(@NonNull Network network,
+ @NonNull MdnsInterfaceSocket socket, @NonNull List<LinkAddress> addresses) {
+ final MdnsInterfaceAdvertiser advertiser = mAdvertisers.get(socket);
+ if (advertiser != null) advertiser.updateAddresses(addresses);
+ }
+ }
+
+ private static class Registration {
+ @NonNull
+ final String mOriginalName;
+ boolean mNotifiedRegistrationSuccess;
+ private int mConflictCount;
+ @NonNull
+ private NsdServiceInfo mServiceInfo;
+
+ private Registration(@NonNull NsdServiceInfo serviceInfo) {
+ this.mOriginalName = serviceInfo.getServiceName();
+ this.mServiceInfo = serviceInfo;
+ }
+
+ /**
+ * Update the registration to use a different service name, after a conflict was found.
+ *
+ * If a name conflict was found during probing or because different advertising requests
+ * used the same name, the registration is attempted again with a new name (here using
+ * a number suffix, (1), (2) etc). Registration success is notified once probing succeeds
+ * with a new name. This matches legacy behavior based on mdnsresponder, and appendix D of
+ * RFC6763.
+ * @return The new service info with the updated name.
+ */
+ @NonNull
+ private NsdServiceInfo updateForConflict() {
+ mConflictCount++;
+ // In case of conflict choose a different service name. After the first conflict use
+ // "Name (2)", then "Name (3)" etc.
+ // TODO: use a hidden method in NsdServiceInfo once MdnsAdvertiser is moved to service-t
+ final NsdServiceInfo newInfo = new NsdServiceInfo();
+ newInfo.setServiceName(mOriginalName + " (" + (mConflictCount + 1) + ")");
+ newInfo.setServiceType(mServiceInfo.getServiceType());
+ for (Map.Entry<String, byte[]> attr : mServiceInfo.getAttributes().entrySet()) {
+ newInfo.setAttribute(attr.getKey(), attr.getValue());
+ }
+ newInfo.setHost(mServiceInfo.getHost());
+ newInfo.setPort(mServiceInfo.getPort());
+ newInfo.setNetwork(mServiceInfo.getNetwork());
+ // interfaceIndex is not set when registering
+
+ mServiceInfo = newInfo;
+ return mServiceInfo;
+ }
+
+ @NonNull
+ public NsdServiceInfo getServiceInfo() {
+ return mServiceInfo;
+ }
+ }
+
+ /**
+ * Callbacks for advertising services.
+ *
+ * Every method is called on the MdnsAdvertiser looper thread.
+ */
+ public interface AdvertiserCallback {
+ /**
+ * Called when a service was successfully registered, after probing.
+ *
+ * @param serviceId ID of the service provided when registering.
+ * @param registeredInfo Registered info, which may be different from the requested info,
+ * after probing and possibly choosing alternative service names.
+ */
+ void onRegisterServiceSucceeded(int serviceId, NsdServiceInfo registeredInfo);
+
+ /**
+ * Called when service registration failed.
+ *
+ * @param serviceId ID of the service provided when registering.
+ * @param errorCode One of {@code NsdManager.FAILURE_*}
+ */
+ void onRegisterServiceFailed(int serviceId, int errorCode);
+
+ // Unregistration is notified immediately as success in NsdService so no callback is needed
+ // here.
+ }
+
+ public MdnsAdvertiser(@NonNull Looper looper, @NonNull MdnsSocketProvider socketProvider,
+ @NonNull AdvertiserCallback cb) {
+ this(looper, socketProvider, cb, new Dependencies());
+ }
+
+ @VisibleForTesting
+ MdnsAdvertiser(@NonNull Looper looper, @NonNull MdnsSocketProvider socketProvider,
+ @NonNull AdvertiserCallback cb, @NonNull Dependencies deps) {
+ mLooper = looper;
+ mCb = cb;
+ mSocketProvider = socketProvider;
+ mDeps = deps;
+ }
+
+ private void checkThread() {
+ if (Thread.currentThread() != mLooper.getThread()) {
+ throw new IllegalStateException("This must be called on the looper thread");
+ }
+ }
+
+ /**
+ * Add a service to advertise.
+ * @param id A unique ID for the service.
+ * @param service The service info to advertise.
+ */
+ public void addService(int id, NsdServiceInfo service) {
+ checkThread();
+ if (mRegistrations.get(id) != null) {
+ Log.e(TAG, "Adding duplicate registration for " + service);
+ // TODO (b/264986328): add a more specific error code
+ mCb.onRegisterServiceFailed(id, NsdManager.FAILURE_INTERNAL_ERROR);
+ return;
+ }
+
+ if (DBG) {
+ Log.i(TAG, "Adding service " + service + " with ID " + id);
+ }
+
+ try {
+ final Registration registration = new Registration(service);
+ while (!tryAddRegistration(id, registration)) {
+ registration.updateForConflict();
+ }
+
+ mRegistrations.put(id, registration);
+ } catch (IOException e) {
+ Log.e(TAG, "Error adding service " + service, e);
+ removeService(id);
+ // TODO (b/264986328): add a more specific error code
+ mCb.onRegisterServiceFailed(id, NsdManager.FAILURE_INTERNAL_ERROR);
+ }
+ }
+
+ private boolean tryAddRegistration(int id, @NonNull Registration registration)
+ throws IOException {
+ final NsdServiceInfo serviceInfo = registration.getServiceInfo();
+ final Network network = serviceInfo.getNetwork();
+ try {
+ InterfaceAdvertiserRequest advertiser = mAdvertiserRequests.get(network);
+ if (advertiser == null) {
+ advertiser = new InterfaceAdvertiserRequest(network);
+ mAdvertiserRequests.put(network, advertiser);
+ }
+ advertiser.addService(id, registration);
+ } catch (NameConflictException e) {
+ if (DBG) {
+ Log.i(TAG, "Service name conflicts: " + serviceInfo.getServiceName());
+ }
+ removeService(id);
+ return false;
+ }
+
+ // When adding a service to a specific network, check that it does not conflict with other
+ // registrations advertising on all networks
+ final InterfaceAdvertiserRequest allNetworksAdvertiser = mAdvertiserRequests.get(null);
+ if (network != null && allNetworksAdvertiser != null
+ && allNetworksAdvertiser.getConflictingService(serviceInfo) >= 0) {
+ if (DBG) {
+ Log.i(TAG, "Service conflicts with advertisement on all networks: "
+ + serviceInfo.getServiceName());
+ }
+ removeService(id);
+ return false;
+ }
+
+ mRegistrations.put(id, registration);
+ return true;
+ }
+
+ /**
+ * Remove a previously added service.
+ * @param id ID used when registering.
+ */
+ public void removeService(int id) {
+ checkThread();
+ if (DBG) {
+ Log.i(TAG, "Removing service with ID " + id);
+ }
+ for (int i = mAdvertiserRequests.size() - 1; i >= 0; i--) {
+ final InterfaceAdvertiserRequest advertiser = mAdvertiserRequests.valueAt(i);
+ advertiser.removeService(id);
+ }
+ mRegistrations.remove(id);
+ }
+
+ private boolean anyAdvertiser(@NonNull Predicate<MdnsInterfaceAdvertiser> predicate) {
+ for (int i = 0; i < mAllAdvertisers.size(); i++) {
+ if (predicate.test(mAllAdvertisers.valueAt(i))) {
+ return true;
+ }
+ }
+ return false;
+ }
}
diff --git a/service/mdns/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java b/service/mdns/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java
new file mode 100644
index 0000000..644bdad
--- /dev/null
+++ b/service/mdns/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity.mdns;
+
+import android.annotation.NonNull;
+import android.net.LinkAddress;
+import android.net.nsd.NsdServiceInfo;
+import android.os.Looper;
+
+import java.util.List;
+
+/**
+ * A class that handles advertising services on a {@link MdnsInterfaceSocket} tied to an interface.
+ */
+public class MdnsInterfaceAdvertiser {
+ private static final boolean DBG = MdnsAdvertiser.DBG;
+ @NonNull
+ private final String mTag;
+ @NonNull
+ private final ProbingCallback mProbingCallback = new ProbingCallback();
+ @NonNull
+ private final AnnouncingCallback mAnnouncingCallback = new AnnouncingCallback();
+ @NonNull
+ private final Callback mCb;
+ @NonNull
+ private final MdnsInterfaceSocket mSocket;
+ @NonNull
+ private final MdnsAnnouncer mAnnouncer;
+ @NonNull
+ private final MdnsProber mProber;
+ @NonNull
+ private final MdnsReplySender mReplySender;
+
+ /**
+ * Callbacks called by {@link MdnsInterfaceAdvertiser} to report status updates.
+ */
+ interface Callback {
+ /**
+ * Called by the advertiser after it successfully registered a service, after probing.
+ */
+ void onRegisterServiceSucceeded(@NonNull MdnsInterfaceAdvertiser advertiser, int serviceId);
+
+ /**
+ * Called by the advertiser when a conflict was found, during or after probing.
+ *
+ * If a conflict is found during probing, the {@link #renameServiceForConflict} must be
+ * called to restart probing and attempt registration with a different name.
+ */
+ void onServiceConflict(@NonNull MdnsInterfaceAdvertiser advertiser, int serviceId);
+
+ /**
+ * Called by the advertiser when it destroyed itself.
+ *
+ * This can happen after a call to {@link #destroyNow()}, or after all services were
+ * unregistered and the advertiser finished sending exit announcements.
+ */
+ void onDestroyed(@NonNull MdnsInterfaceSocket socket);
+ }
+
+ /**
+ * Callbacks from {@link MdnsProber}.
+ */
+ private class ProbingCallback implements
+ MdnsPacketRepeater.PacketRepeaterCallback<MdnsProber.ProbingInfo> {
+ @Override
+ public void onFinished(MdnsProber.ProbingInfo info) {
+ // TODO: probing finished, start announcements
+ }
+ }
+
+ /**
+ * Callbacks from {@link MdnsAnnouncer}.
+ */
+ private class AnnouncingCallback
+ implements MdnsPacketRepeater.PacketRepeaterCallback<MdnsAnnouncer.AnnouncementInfo> {
+ // TODO: implement
+ }
+
+ public MdnsInterfaceAdvertiser(@NonNull String logTag,
+ @NonNull MdnsInterfaceSocket socket, @NonNull List<LinkAddress> initialAddresses,
+ @NonNull Looper looper, @NonNull byte[] packetCreationBuffer, @NonNull Callback cb) {
+ mTag = MdnsInterfaceAdvertiser.class.getSimpleName() + "/" + logTag;
+ mSocket = socket;
+ mCb = cb;
+ mReplySender = new MdnsReplySender(looper, socket, packetCreationBuffer);
+ mAnnouncer = new MdnsAnnouncer(logTag, looper, mReplySender,
+ mAnnouncingCallback);
+ mProber = new MdnsProber(logTag, looper, mReplySender, mProbingCallback);
+ }
+
+ /**
+ * Start the advertiser.
+ *
+ * The advertiser will stop itself when all services are removed and exit announcements sent,
+ * notifying via {@link Callback#onDestroyed}. This can also be triggered manually via
+ * {@link #destroyNow()}.
+ */
+ public void start() {
+ // TODO: implement
+ }
+
+ /**
+ * Start advertising a service.
+ *
+ * @throws NameConflictException There is already a service being advertised with that name.
+ */
+ public void addService(int id, NsdServiceInfo service) throws NameConflictException {
+ // TODO: implement
+ }
+
+ /**
+ * Stop advertising a service.
+ *
+ * This will trigger exit announcements for the service.
+ */
+ public void removeService(int id) {
+ // TODO: implement
+ }
+
+ /**
+ * Update interface addresses used to advertise.
+ *
+ * This causes new address records to be announced.
+ */
+ public void updateAddresses(@NonNull List<LinkAddress> newAddresses) {
+ // TODO: implement
+ }
+
+ /**
+ * Destroy the advertiser immediately, not sending any exit announcement.
+ *
+ * <p>Useful when the underlying network went away. This will trigger an onDestroyed callback.
+ */
+ public void destroyNow() {
+ // TODO: implement
+ }
+
+ /**
+ * Reset a service to the probing state due to a conflict found on the network.
+ */
+ public void restartProbingForConflict(int serviceId) {
+ // TODO: implement
+ }
+
+ /**
+ * Rename a service following a conflict found on the network, and restart probing.
+ */
+ public void renameServiceForConflict(int serviceId, NsdServiceInfo newInfo) {
+ // TODO: implement
+ }
+
+ /**
+ * Indicates whether probing is in progress for the given service on this interface.
+ *
+ * Also returns false if the specified service is not registered.
+ */
+ public boolean isProbing(int serviceId) {
+ // TODO: implement
+ return true;
+ }
+}
diff --git a/service/mdns/com/android/server/connectivity/mdns/MdnsInterfaceSocket.java b/service/mdns/com/android/server/connectivity/mdns/MdnsInterfaceSocket.java
index 6090415..67c893d 100644
--- a/service/mdns/com/android/server/connectivity/mdns/MdnsInterfaceSocket.java
+++ b/service/mdns/com/android/server/connectivity/mdns/MdnsInterfaceSocket.java
@@ -154,13 +154,12 @@
}
/**
- * Returns the index of the network interface that this socket is bound to. If the interface
- * cannot be determined, returns -1.
+ * Returns the network interface that this socket is bound to.
*
* <p>This method could be used on any thread.
*/
- public int getInterfaceIndex() {
- return mNetworkInterface.getIndex();
+ public NetworkInterface getInterface() {
+ return mNetworkInterface;
}
/*** Returns whether this socket has joined IPv4 group */
diff --git a/service/mdns/com/android/server/connectivity/mdns/MdnsReplySender.java b/service/mdns/com/android/server/connectivity/mdns/MdnsReplySender.java
index 1fdbc5c..adf6f4d 100644
--- a/service/mdns/com/android/server/connectivity/mdns/MdnsReplySender.java
+++ b/service/mdns/com/android/server/connectivity/mdns/MdnsReplySender.java
@@ -32,14 +32,14 @@
*/
public class MdnsReplySender {
@NonNull
- private final MulticastSocket mSocket;
+ private final MdnsInterfaceSocket mSocket;
@NonNull
private final Looper mLooper;
@NonNull
private final byte[] mPacketCreationBuffer;
public MdnsReplySender(@NonNull Looper looper,
- @NonNull MulticastSocket socket, @NonNull byte[] packetCreationBuffer) {
+ @NonNull MdnsInterfaceSocket socket, @NonNull byte[] packetCreationBuffer) {
mLooper = looper;
mSocket = socket;
mPacketCreationBuffer = packetCreationBuffer;
diff --git a/service/mdns/com/android/server/connectivity/mdns/MdnsSocketProvider.java b/service/mdns/com/android/server/connectivity/mdns/MdnsSocketProvider.java
index b8c324e..d3bf060 100644
--- a/service/mdns/com/android/server/connectivity/mdns/MdnsSocketProvider.java
+++ b/service/mdns/com/android/server/connectivity/mdns/MdnsSocketProvider.java
@@ -244,7 +244,7 @@
// Try to join the group again.
socketInfo.mSocket.joinGroup(addresses);
- notifyAddressesChanged(network, lp);
+ notifyAddressesChanged(network, socketInfo.mSocket, lp);
}
}
@@ -355,12 +355,13 @@
}
}
- private void notifyAddressesChanged(Network network, LinkProperties lp) {
+ private void notifyAddressesChanged(Network network, MdnsInterfaceSocket socket,
+ LinkProperties lp) {
for (int i = 0; i < mCallbacksToRequestedNetworks.size(); i++) {
final Network requestedNetwork = mCallbacksToRequestedNetworks.valueAt(i);
if (isNetworkMatched(requestedNetwork, network)) {
mCallbacksToRequestedNetworks.keyAt(i)
- .onAddressesChanged(network, lp.getLinkAddresses());
+ .onAddressesChanged(network, socket, lp.getLinkAddresses());
}
}
}
@@ -455,6 +456,6 @@
@NonNull MdnsInterfaceSocket socket) {}
/*** Notify the addresses is changed on the network */
default void onAddressesChanged(@NonNull Network network,
- @NonNull List<LinkAddress> addresses) {}
+ @NonNull MdnsInterfaceSocket socket, @NonNull List<LinkAddress> addresses) {}
}
}
diff --git a/service/mdns/com/android/server/connectivity/mdns/NameConflictException.java b/service/mdns/com/android/server/connectivity/mdns/NameConflictException.java
new file mode 100644
index 0000000..c123d02
--- /dev/null
+++ b/service/mdns/com/android/server/connectivity/mdns/NameConflictException.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity.mdns;
+
+/**
+ * An exception thrown when a service name conflicts with an existing service.
+ */
+public class NameConflictException extends Exception {
+ /**
+ * ID of the existing service that conflicted.
+ */
+ public final int conflictingServiceId;
+ public NameConflictException(int conflictingServiceId) {
+ this.conflictingServiceId = conflictingServiceId;
+ }
+}
diff --git a/service/src/com/android/server/BpfNetMaps.java b/service/src/com/android/server/BpfNetMaps.java
index bce9f53..26ec37a 100644
--- a/service/src/com/android/server/BpfNetMaps.java
+++ b/service/src/com/android/server/BpfNetMaps.java
@@ -279,9 +279,10 @@
private static synchronized void ensureInitialized(final Context context) {
if (sInitialized) return;
if (sEnableJavaBpfMap == null) {
- sEnableJavaBpfMap = DeviceConfigUtils.isFeatureEnabled(context,
+ sEnableJavaBpfMap = SdkLevel.isAtLeastU() ||
+ DeviceConfigUtils.isFeatureEnabled(context,
DeviceConfig.NAMESPACE_TETHERING, BPF_NET_MAPS_ENABLE_JAVA_BPF_MAP,
- false /* defaultValue */) || SdkLevel.isAtLeastU();
+ false /* defaultValue */);
}
Log.d(TAG, "BpfNetMaps is initialized with sEnableJavaBpfMap=" + sEnableJavaBpfMap);
diff --git a/tests/common/java/android/net/netstats/NetworkTemplateTest.kt b/tests/common/java/android/net/netstats/NetworkTemplateTest.kt
index cdf32a4..3c2340c 100644
--- a/tests/common/java/android/net/netstats/NetworkTemplateTest.kt
+++ b/tests/common/java/android/net/netstats/NetworkTemplateTest.kt
@@ -19,8 +19,8 @@
import android.net.NetworkStats.DEFAULT_NETWORK_ALL
import android.net.NetworkStats.METERED_ALL
import android.net.NetworkStats.METERED_YES
-import android.net.NetworkStats.ROAMING_YES
import android.net.NetworkStats.ROAMING_ALL
+import android.net.NetworkStats.ROAMING_YES
import android.net.NetworkTemplate
import android.net.NetworkTemplate.MATCH_BLUETOOTH
import android.net.NetworkTemplate.MATCH_CARRIER
@@ -33,8 +33,6 @@
import android.net.NetworkTemplate.NETWORK_TYPE_ALL
import android.net.NetworkTemplate.OEM_MANAGED_ALL
import android.telephony.TelephonyManager
-import com.android.net.module.util.NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_ALL
-import com.android.net.module.util.NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_EXACT
import com.android.testutils.ConnectivityModuleTest
import com.android.testutils.DevSdkIgnoreRule
import com.android.testutils.SC_V2
@@ -80,7 +78,7 @@
val expectedTemplate = NetworkTemplate(matchRule, TEST_IMSI1,
arrayOf(TEST_IMSI1), emptyArray<String>(), METERED_YES,
ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
}
@@ -93,7 +91,7 @@
val expectedTemplate = NetworkTemplate(matchRule, TEST_IMSI1,
arrayOf(TEST_IMSI1), emptyArray<String>(), METERED_YES,
ROAMING_YES, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
}
@@ -109,7 +107,7 @@
val expectedTemplate = NetworkTemplate(MATCH_MOBILE_WILDCARD, null /*subscriberId*/,
emptyArray<String>() /*subscriberIds*/, emptyArray<String>(),
METERED_YES, ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_ALL)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
@@ -121,7 +119,7 @@
val expectedTemplate = NetworkTemplate(MATCH_MOBILE, TEST_IMSI1,
arrayOf(TEST_IMSI1), emptyArray<String>(), METERED_YES,
ROAMING_ALL, DEFAULT_NETWORK_ALL, TelephonyManager.NETWORK_TYPE_UMTS,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
@@ -131,7 +129,7 @@
val expectedTemplate = NetworkTemplate(MATCH_WIFI_WILDCARD, null /*subscriberId*/,
emptyArray<String>() /*subscriberIds*/, emptyArray<String>(),
METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_ALL)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
@@ -141,7 +139,7 @@
val expectedTemplate = NetworkTemplate(MATCH_WIFI, null /*subscriberId*/,
emptyArray<String>() /*subscriberIds*/, arrayOf(TEST_WIFI_KEY1),
METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_ALL)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
@@ -152,7 +150,7 @@
val expectedTemplate = NetworkTemplate(MATCH_WIFI, TEST_IMSI1,
arrayOf(TEST_IMSI1), arrayOf(TEST_WIFI_KEY1),
METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
@@ -163,7 +161,7 @@
val expectedTemplate = NetworkTemplate(matchRule, null /*subscriberId*/,
emptyArray<String>() /*subscriberIds*/, emptyArray<String>(),
METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_ALL)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
}
@@ -198,7 +196,7 @@
val expectedTemplate = NetworkTemplate(MATCH_WIFI_WILDCARD, null /*subscriberId*/,
emptyArray<String>() /*subscriberIds*/, emptyArray<String>(),
METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_ALL)
+ OEM_MANAGED_ALL)
assertEquals(expectedTemplate, it)
}
}
diff --git a/tests/cts/OWNERS b/tests/cts/OWNERS
index 089d06f..50842a8 100644
--- a/tests/cts/OWNERS
+++ b/tests/cts/OWNERS
@@ -5,3 +5,6 @@
# Only temporary ownership to improve ethernet code quality (b/236280707)
# TODO: remove by 12/31/2022
per-file net/src/android/net/cts/EthernetManagerTest.kt = prohr@google.com #{LAST_RESORT_SUGGESTION}
+
+# IPsec
+per-file **IpSec* = benedictwong@google.com, nharold@google.com
diff --git a/tests/unit/java/android/net/NetworkTemplateTest.kt b/tests/unit/java/android/net/NetworkTemplateTest.kt
index 3cf0228..c3440c5 100644
--- a/tests/unit/java/android/net/NetworkTemplateTest.kt
+++ b/tests/unit/java/android/net/NetworkTemplateTest.kt
@@ -49,7 +49,6 @@
import android.net.wifi.WifiInfo
import android.os.Build
import android.telephony.TelephonyManager
-import com.android.net.module.util.NetworkStatsUtils.SUBSCRIBER_ID_MATCH_RULE_EXACT
import com.android.testutils.DevSdkIgnoreRule
import com.android.testutils.DevSdkIgnoreRunner
import com.android.testutils.assertParcelSane
@@ -448,19 +447,18 @@
@Test
fun testParcelUnparcel() {
- val templateMobile = NetworkTemplate(MATCH_MOBILE, TEST_IMSI1, emptyArray<String>(),
+ val templateMobile = NetworkTemplate(MATCH_MOBILE, TEST_IMSI1, arrayOf(TEST_IMSI1),
emptyArray<String>(), METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL,
- TelephonyManager.NETWORK_TYPE_LTE, OEM_MANAGED_ALL,
- SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ TelephonyManager.NETWORK_TYPE_LTE, OEM_MANAGED_ALL)
val templateWifi = NetworkTemplate(MATCH_WIFI, null, emptyArray<String>(),
arrayOf(TEST_WIFI_KEY1), METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, 0,
- OEM_MANAGED_ALL, SUBSCRIBER_ID_MATCH_RULE_EXACT)
- val templateOem = NetworkTemplate(MATCH_MOBILE, null, emptyArray<String>(),
+ OEM_MANAGED_ALL)
+ val templateOem = NetworkTemplate(MATCH_MOBILE_WILDCARD, null, emptyArray<String>(),
emptyArray<String>(), METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, 0,
- OEM_MANAGED_YES, SUBSCRIBER_ID_MATCH_RULE_EXACT)
- assertParcelSane(templateMobile, 10)
- assertParcelSane(templateWifi, 10)
- assertParcelSane(templateOem, 10)
+ OEM_MANAGED_YES)
+ assertParcelSane(templateMobile, 9)
+ assertParcelSane(templateWifi, 9)
+ assertParcelSane(templateOem, 9)
}
// Verify NETWORK_TYPE_* constants in NetworkTemplate do not conflict with
@@ -514,12 +512,10 @@
val templateOemYes = NetworkTemplate(matchType, subscriberId, matchSubscriberIds,
matchWifiNetworkKeys, METERED_ALL, ROAMING_ALL,
- DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, OEM_MANAGED_YES,
- SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, OEM_MANAGED_YES)
val templateOemAll = NetworkTemplate(matchType, subscriberId, matchSubscriberIds,
matchWifiNetworkKeys, METERED_ALL, ROAMING_ALL,
- DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, OEM_MANAGED_ALL,
- SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, OEM_MANAGED_ALL)
for (identityOemManagedState in oemManagedStates) {
val ident = buildNetworkIdentity(mockContext, buildNetworkState(networkType,
@@ -530,8 +526,7 @@
for (templateOemManagedState in oemManagedStates) {
val template = NetworkTemplate(matchType, subscriberId, matchSubscriberIds,
matchWifiNetworkKeys, METERED_ALL, ROAMING_ALL,
- DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, templateOemManagedState,
- SUBSCRIBER_ID_MATCH_RULE_EXACT)
+ DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL, templateOemManagedState)
if (identityOemManagedState == templateOemManagedState) {
template.assertMatches(ident)
} else {
diff --git a/tests/unit/java/com/android/server/ConnectivityServiceTest.java b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
index e6e2d60..ca6a14b 100755
--- a/tests/unit/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
@@ -1059,15 +1059,30 @@
* @param validated Indicate if network should pretend to be validated.
*/
public void connect(boolean validated) {
- connect(validated, true, false /* isStrictMode */);
+ connect(validated, true, false /* privateDnsProbeSent */);
}
/**
* Transition this NetworkAgent to CONNECTED state.
+ *
* @param validated Indicate if network should pretend to be validated.
+ * Note that if this is true, this method will mock the NetworkMonitor
+ * probes to pretend the network is invalid after it validated once,
+ * so that subsequent attempts (with mNetworkMonitor.forceReevaluation)
+ * will fail unless setNetworkValid is called again manually.
* @param hasInternet Indicate if network should pretend to have NET_CAPABILITY_INTERNET.
+ * @param privateDnsProbeSent whether the private DNS probe should be considered to have
+ * been sent, assuming |validated| is true.
+ * If |validated| is false, |privateDnsProbeSent| is not used.
+ * If |validated| is true and |privateDnsProbeSent| is false,
+ * the probe has not been sent.
+ * If |validated| is true and |privateDnsProbeSent| is true,
+ * the probe has been sent and has succeeded. When the NM probes
+ * are mocked to be invalid, private DNS is the reason this
+ * network is invalid ; see @param |validated|.
*/
- public void connect(boolean validated, boolean hasInternet, boolean isStrictMode) {
+ public void connect(boolean validated, boolean hasInternet,
+ boolean privateDnsProbeSent) {
final ConditionVariable validatedCv = new ConditionVariable();
final ConditionVariable capsChangedCv = new ConditionVariable();
final NetworkRequest request = new NetworkRequest.Builder()
@@ -1075,7 +1090,7 @@
.clearCapabilities()
.build();
if (validated) {
- setNetworkValid(isStrictMode);
+ setNetworkValid(privateDnsProbeSent);
}
final NetworkCallback callback = new NetworkCallback() {
public void onCapabilitiesChanged(Network network,
@@ -1100,14 +1115,15 @@
if (validated) {
// Wait for network to validate.
waitFor(validatedCv);
- setNetworkInvalid(isStrictMode);
+ setNetworkInvalid(privateDnsProbeSent);
}
mCm.unregisterNetworkCallback(callback);
}
- public void connectWithCaptivePortal(String redirectUrl, boolean isStrictMode) {
- setNetworkPortal(redirectUrl, isStrictMode);
- connect(false, true /* hasInternet */, isStrictMode);
+ public void connectWithCaptivePortal(String redirectUrl,
+ boolean privateDnsProbeSent) {
+ setNetworkPortal(redirectUrl, privateDnsProbeSent);
+ connect(false, true /* hasInternet */, privateDnsProbeSent);
}
public void connectWithPartialConnectivity() {
@@ -1115,16 +1131,16 @@
connect(false);
}
- public void connectWithPartialValidConnectivity(boolean isStrictMode) {
- setNetworkPartialValid(isStrictMode);
- connect(false, true /* hasInternet */, isStrictMode);
+ public void connectWithPartialValidConnectivity(boolean privateDnsProbeSent) {
+ setNetworkPartialValid(privateDnsProbeSent);
+ connect(false, true /* hasInternet */, privateDnsProbeSent);
}
- void setNetworkValid(boolean isStrictMode) {
+ void setNetworkValid(boolean privateDnsProbeSent) {
mNmValidationResult = NETWORK_VALIDATION_RESULT_VALID;
mNmValidationRedirectUrl = null;
int probesSucceeded = NETWORK_VALIDATION_PROBE_DNS | NETWORK_VALIDATION_PROBE_HTTPS;
- if (isStrictMode) {
+ if (privateDnsProbeSent) {
probesSucceeded |= NETWORK_VALIDATION_PROBE_PRIVDNS;
}
// The probesCompleted equals to probesSucceeded for the case of valid network, so put
@@ -1132,15 +1148,16 @@
setProbesStatus(probesSucceeded, probesSucceeded);
}
- void setNetworkInvalid(boolean isStrictMode) {
+ void setNetworkInvalid(boolean invalidBecauseOfPrivateDns) {
mNmValidationResult = VALIDATION_RESULT_INVALID;
mNmValidationRedirectUrl = null;
int probesCompleted = NETWORK_VALIDATION_PROBE_DNS | NETWORK_VALIDATION_PROBE_HTTPS
| NETWORK_VALIDATION_PROBE_HTTP;
int probesSucceeded = 0;
- // If the isStrictMode is true, it means the network is invalid when NetworkMonitor
- // tried to validate the private DNS but failed.
- if (isStrictMode) {
+ // If |invalidBecauseOfPrivateDns| is true, it means the network is invalid because
+ // NetworkMonitor tried to validate the private DNS but failed. Therefore it
+ // didn't get a chance to try the HTTP probe.
+ if (invalidBecauseOfPrivateDns) {
probesCompleted &= ~NETWORK_VALIDATION_PROBE_HTTP;
probesSucceeded = probesCompleted;
probesCompleted |= NETWORK_VALIDATION_PROBE_PRIVDNS;
@@ -1148,14 +1165,14 @@
setProbesStatus(probesCompleted, probesSucceeded);
}
- void setNetworkPortal(String redirectUrl, boolean isStrictMode) {
- setNetworkInvalid(isStrictMode);
+ void setNetworkPortal(String redirectUrl, boolean privateDnsProbeSent) {
+ setNetworkInvalid(privateDnsProbeSent);
mNmValidationRedirectUrl = redirectUrl;
// Suppose the portal is found when NetworkMonitor probes NETWORK_VALIDATION_PROBE_HTTP
// in the beginning, so the NETWORK_VALIDATION_PROBE_HTTPS hasn't probed yet.
int probesCompleted = NETWORK_VALIDATION_PROBE_DNS | NETWORK_VALIDATION_PROBE_HTTP;
int probesSucceeded = VALIDATION_RESULT_INVALID;
- if (isStrictMode) {
+ if (privateDnsProbeSent) {
probesCompleted |= NETWORK_VALIDATION_PROBE_PRIVDNS;
}
setProbesStatus(probesCompleted, probesSucceeded);
@@ -1170,7 +1187,7 @@
setProbesStatus(probesCompleted, probesSucceeded);
}
- void setNetworkPartialValid(boolean isStrictMode) {
+ void setNetworkPartialValid(boolean privateDnsProbeSent) {
setNetworkPartial();
mNmValidationResult |= NETWORK_VALIDATION_RESULT_VALID;
mNmValidationRedirectUrl = null;
@@ -1179,7 +1196,7 @@
int probesSucceeded = NETWORK_VALIDATION_PROBE_DNS | NETWORK_VALIDATION_PROBE_HTTP;
// Assume the partial network cannot pass the private DNS validation as well, so only
// add NETWORK_VALIDATION_PROBE_DNS in probesCompleted but not probesSucceeded.
- if (isStrictMode) {
+ if (privateDnsProbeSent) {
probesCompleted |= NETWORK_VALIDATION_PROBE_PRIVDNS;
}
setProbesStatus(probesCompleted, probesSucceeded);
@@ -1474,8 +1491,9 @@
registerAgent(false /* isAlwaysMetered */, uids, makeLinkProperties());
}
- private void connect(boolean validated, boolean hasInternet, boolean isStrictMode) {
- mMockNetworkAgent.connect(validated, hasInternet, isStrictMode);
+ private void connect(boolean validated, boolean hasInternet,
+ boolean privateDnsProbeSent) {
+ mMockNetworkAgent.connect(validated, hasInternet, privateDnsProbeSent);
}
private void connect(boolean validated) {
@@ -1492,10 +1510,10 @@
}
public void establish(LinkProperties lp, int uid, Set<UidRange> ranges, boolean validated,
- boolean hasInternet, boolean isStrictMode) throws Exception {
+ boolean hasInternet, boolean privateDnsProbeSent) throws Exception {
setOwnerAndAdminUid(uid);
registerAgent(false, ranges, lp);
- connect(validated, hasInternet, isStrictMode);
+ connect(validated, hasInternet, privateDnsProbeSent);
waitForIdle();
}
@@ -1508,11 +1526,11 @@
establish(lp, uid, uidRangesForUids(uid), true, true, false);
}
- public void establishForMyUid(boolean validated, boolean hasInternet, boolean isStrictMode)
- throws Exception {
+ public void establishForMyUid(boolean validated, boolean hasInternet,
+ boolean privateDnsProbeSent) throws Exception {
final int uid = Process.myUid();
establish(makeLinkProperties(), uid, uidRangesForUids(uid), validated, hasInternet,
- isStrictMode);
+ privateDnsProbeSent);
}
public void establishForMyUid() throws Exception {
@@ -4220,7 +4238,7 @@
// With HTTPS probe disabled, NetworkMonitor should pass the network validation with http
// probe.
- mWiFiNetworkAgent.setNetworkPartialValid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkPartialValid(false /* privateDnsProbeSent */);
// If the user chooses yes to use this partial connectivity wifi, switch the default
// network to wifi and check if wifi becomes valid or not.
mCm.setAcceptPartialConnectivity(mWiFiNetworkAgent.getNetwork(), true /* accept */,
@@ -4307,7 +4325,7 @@
callback.expectCapabilitiesWith(NET_CAPABILITY_PARTIAL_CONNECTIVITY, mWiFiNetworkAgent);
expectUnvalidationCheckWillNotNotify(mWiFiNetworkAgent);
- mWiFiNetworkAgent.setNetworkValid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(false /* privateDnsProbeSent */);
// Need a trigger point to let NetworkMonitor tell ConnectivityService that the network is
// validated.
@@ -4325,7 +4343,8 @@
// NetworkMonitor will immediately (once the HTTPS probe fails...) report the network as
// valid, because ConnectivityService calls setAcceptPartialConnectivity before it calls
// notifyNetworkConnected.
- mWiFiNetworkAgent.connectWithPartialValidConnectivity(false /* isStrictMode */);
+ mWiFiNetworkAgent.connectWithPartialValidConnectivity(
+ false /* privateDnsProbeSent */);
callback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
verify(mWiFiNetworkAgent.mNetworkMonitor, times(1)).setAcceptPartialConnectivity();
callback.expectLosing(mCellNetworkAgent);
@@ -4354,7 +4373,8 @@
// Expect onAvailable callback of listen for NET_CAPABILITY_CAPTIVE_PORTAL.
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
String redirectUrl = "http://android.com/path";
- mWiFiNetworkAgent.connectWithCaptivePortal(redirectUrl, false /* isStrictMode */);
+ mWiFiNetworkAgent.connectWithCaptivePortal(redirectUrl,
+ false /* privateDnsProbeSent */);
wifiCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
assertEquals(mWiFiNetworkAgent.waitForRedirectUrl(), redirectUrl);
@@ -4379,7 +4399,7 @@
&& !nc.hasCapability(NET_CAPABILITY_CAPTIVE_PORTAL));
// Report partial connectivity is accepted.
- mWiFiNetworkAgent.setNetworkPartialValid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkPartialValid(false /* privateDnsProbeSent */);
mCm.setAcceptPartialConnectivity(mWiFiNetworkAgent.getNetwork(), true /* accept */,
false /* always */);
waitForIdle();
@@ -4409,7 +4429,8 @@
// Expect onAvailable callback of listen for NET_CAPABILITY_CAPTIVE_PORTAL.
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
String firstRedirectUrl = "http://example.com/firstPath";
- mWiFiNetworkAgent.connectWithCaptivePortal(firstRedirectUrl, false /* isStrictMode */);
+ mWiFiNetworkAgent.connectWithCaptivePortal(firstRedirectUrl,
+ false /* privateDnsProbeSent */);
captivePortalCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
assertEquals(mWiFiNetworkAgent.waitForRedirectUrl(), firstRedirectUrl);
@@ -4422,13 +4443,14 @@
// Expect onAvailable callback of listen for NET_CAPABILITY_CAPTIVE_PORTAL.
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
String secondRedirectUrl = "http://example.com/secondPath";
- mWiFiNetworkAgent.connectWithCaptivePortal(secondRedirectUrl, false /* isStrictMode */);
+ mWiFiNetworkAgent.connectWithCaptivePortal(secondRedirectUrl,
+ false /* privateDnsProbeSent */);
captivePortalCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
assertEquals(mWiFiNetworkAgent.waitForRedirectUrl(), secondRedirectUrl);
// Make captive portal disappear then revalidate.
// Expect onLost callback because network no longer provides NET_CAPABILITY_CAPTIVE_PORTAL.
- mWiFiNetworkAgent.setNetworkValid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(false /* privateDnsProbeSent */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), true);
captivePortalCallback.expect(CallbackEntry.LOST, mWiFiNetworkAgent);
@@ -4437,7 +4459,7 @@
// Break network connectivity.
// Expect NET_CAPABILITY_VALIDATED onLost callback.
- mWiFiNetworkAgent.setNetworkInvalid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(false /* invalidBecauseOfPrivateDns */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), false);
validatedCallback.expect(CallbackEntry.LOST, mWiFiNetworkAgent);
}
@@ -4489,7 +4511,8 @@
mServiceContext.expectNoStartActivityIntent(fastTimeoutMs);
// Turn into a captive portal.
- mWiFiNetworkAgent.setNetworkPortal("http://example.com", false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkPortal("http://example.com",
+ false /* privateDnsProbeSent */);
mCm.reportNetworkConnectivity(wifiNetwork, false);
captivePortalCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
validatedCallback.expect(CallbackEntry.LOST, mWiFiNetworkAgent);
@@ -4502,7 +4525,7 @@
startCaptivePortalApp(mWiFiNetworkAgent);
// Report that the captive portal is dismissed, and check that callbacks are fired
- mWiFiNetworkAgent.setNetworkValid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(false /* privateDnsProbeSent */);
mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid());
validatedCallback.expectAvailableCallbacksValidated(mWiFiNetworkAgent);
captivePortalCallback.expect(CallbackEntry.LOST, mWiFiNetworkAgent);
@@ -4560,7 +4583,8 @@
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
String firstRedirectUrl = "http://example.com/firstPath";
- mWiFiNetworkAgent.connectWithCaptivePortal(firstRedirectUrl, false /* isStrictMode */);
+ mWiFiNetworkAgent.connectWithCaptivePortal(firstRedirectUrl,
+ false /* privateDnsProbeSent */);
mWiFiNetworkAgent.expectDisconnected();
mWiFiNetworkAgent.expectPreventReconnectReceived();
@@ -4579,7 +4603,8 @@
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
final String redirectUrl = "http://example.com/firstPath";
- mWiFiNetworkAgent.connectWithCaptivePortal(redirectUrl, false /* isStrictMode */);
+ mWiFiNetworkAgent.connectWithCaptivePortal(redirectUrl,
+ false /* privateDnsProbeSent */);
captivePortalCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
final CaptivePortalData testData = new CaptivePortalData.Builder()
@@ -4612,7 +4637,8 @@
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
- mWiFiNetworkAgent.connectWithCaptivePortal(TEST_REDIRECT_URL, false /* isStrictMode */);
+ mWiFiNetworkAgent.connectWithCaptivePortal(TEST_REDIRECT_URL,
+ false /* privateDnsProbeSent */);
captivePortalCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
return captivePortalCallback;
}
@@ -5813,7 +5839,7 @@
wifiCallback.assertNoCallback();
// Wifi validates. Cell is no longer needed, because it's outscored.
- mWiFiNetworkAgent.setNetworkValid(true /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(true /* privateDnsProbeSent */);
// Have CS reconsider the network (see testPartialConnectivity)
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), true);
wifiNetworkCallback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
@@ -5821,7 +5847,7 @@
wifiCallback.assertNoCallback();
// Wifi is no longer validated. Cell is needed again.
- mWiFiNetworkAgent.setNetworkInvalid(true /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(true /* invalidBecauseOfPrivateDns */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), false);
wifiNetworkCallback.expectCapabilitiesWithout(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
cellCallback.expectOnNetworkNeeded(defaultCaps);
@@ -5843,7 +5869,7 @@
wifiNetworkCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
cellCallback.assertNoCallback();
wifiCallback.assertNoCallback();
- mWiFiNetworkAgent.setNetworkValid(true /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(true /* privateDnsProbeSent */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), true);
wifiNetworkCallback.expectCapabilitiesWith(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
cellCallback.expectOnNetworkUnneeded(defaultCaps);
@@ -5851,7 +5877,7 @@
// Wifi loses validation. Because the device doesn't avoid bad wifis, cell is
// not needed.
- mWiFiNetworkAgent.setNetworkInvalid(true /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(true /* invalidBecauseOfPrivateDns */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), false);
wifiNetworkCallback.expectCapabilitiesWithout(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
cellCallback.assertNoCallback();
@@ -5946,7 +5972,7 @@
Network wifiNetwork = mWiFiNetworkAgent.getNetwork();
// Fail validation on wifi.
- mWiFiNetworkAgent.setNetworkInvalid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(false /* invalidBecauseOfPrivateDns */);
mCm.reportNetworkConnectivity(wifiNetwork, false);
defaultCallback.expectCapabilitiesWithout(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
validatedWifiCallback.expect(CallbackEntry.LOST, mWiFiNetworkAgent);
@@ -5997,7 +6023,7 @@
wifiNetwork = mWiFiNetworkAgent.getNetwork();
// Fail validation on wifi and expect the dialog to appear.
- mWiFiNetworkAgent.setNetworkInvalid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(false /* invalidBecauseOfPrivateDns */);
mCm.reportNetworkConnectivity(wifiNetwork, false);
defaultCallback.expectCapabilitiesWithout(NET_CAPABILITY_VALIDATED, mWiFiNetworkAgent);
validatedWifiCallback.expect(CallbackEntry.LOST, mWiFiNetworkAgent);
@@ -7156,7 +7182,7 @@
mCm.registerNetworkCallback(request, callback);
// Bring up wifi aware network.
- wifiAware.connect(false, false, false /* isStrictMode */);
+ wifiAware.connect(false, false, false /* privateDnsProbeSent */);
callback.expectAvailableCallbacksUnvalidated(wifiAware);
assertNull(mCm.getActiveNetworkInfo());
@@ -7734,7 +7760,7 @@
mWiFiNetworkAgent.connect(false);
callback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
// Private DNS resolution failed, checking if the notification will be shown or not.
- mWiFiNetworkAgent.setNetworkInvalid(true /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(true /* invalidBecauseOfPrivateDns */);
mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid());
waitForIdle();
// If network validation failed, NetworkMonitor will re-evaluate the network.
@@ -7746,14 +7772,14 @@
eq(NotificationType.PRIVATE_DNS_BROKEN.eventId), any());
// If private DNS resolution successful, the PRIVATE_DNS_BROKEN notification shouldn't be
// shown.
- mWiFiNetworkAgent.setNetworkValid(true /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(true /* privateDnsProbeSent */);
mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid());
waitForIdle();
verify(mNotificationManager, timeout(TIMEOUT_MS).times(1)).cancel(anyString(),
eq(NotificationType.PRIVATE_DNS_BROKEN.eventId));
// If private DNS resolution failed again, the PRIVATE_DNS_BROKEN notification should be
// shown again.
- mWiFiNetworkAgent.setNetworkInvalid(true /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(true /* invalidBecauseOfPrivateDns */);
mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid());
waitForIdle();
verify(mNotificationManager, timeout(TIMEOUT_MS).times(2)).notify(anyString(),
@@ -8215,7 +8241,7 @@
// Connect a VPN.
mMockVpn.establishForMyUid(false /* validated */, true /* hasInternet */,
- false /* isStrictMode */);
+ false /* privateDnsProbeSent */);
callback.expectAvailableCallbacksUnvalidated(mMockVpn);
// Connect cellular data.
@@ -8371,7 +8397,7 @@
NetworkAgentConfigShimImpl.newInstance(mMockVpn.getNetworkAgentConfig())
.isVpnValidationRequired(),
mMockVpn.getAgent().getNetworkCapabilities()));
- mMockVpn.getAgent().setNetworkValid(false /* isStrictMode */);
+ mMockVpn.getAgent().setNetworkValid(false /* privateDnsProbeSent */);
mMockVpn.connect(false);
@@ -8454,7 +8480,7 @@
assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mMockVpn.establishForMyUid(true /* validated */, false /* hasInternet */,
- false /* isStrictMode */);
+ false /* privateDnsProbeSent */);
assertUidRangesUpdatedForMyUid(true);
defaultCallback.assertNoCallback();
@@ -8480,7 +8506,7 @@
assertEquals(defaultCallback.getLastAvailableNetwork(), mCm.getActiveNetwork());
mMockVpn.establishForMyUid(true /* validated */, true /* hasInternet */,
- false /* isStrictMode */);
+ false /* privateDnsProbeSent */);
assertUidRangesUpdatedForMyUid(true);
defaultCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
@@ -8506,7 +8532,7 @@
// Bring up a VPN that has the INTERNET capability, initially unvalidated.
mMockVpn.establishForMyUid(false /* validated */, true /* hasInternet */,
- false /* isStrictMode */);
+ false /* privateDnsProbeSent */);
assertUidRangesUpdatedForMyUid(true);
// Even though the VPN is unvalidated, it becomes the default network for our app.
@@ -8528,7 +8554,7 @@
mMockVpn.getAgent().getNetworkCapabilities()));
// Pretend that the VPN network validates.
- mMockVpn.getAgent().setNetworkValid(false /* isStrictMode */);
+ mMockVpn.getAgent().setNetworkValid(false /* privateDnsProbeSent */);
mMockVpn.getAgent().mNetworkMonitor.forceReevaluation(Process.myUid());
// Expect to see the validated capability, but no other changes, because the VPN is already
// the default network for the app.
@@ -8559,7 +8585,7 @@
mCellNetworkAgent.connect(true);
mMockVpn.establishForMyUid(true /* validated */, false /* hasInternet */,
- false /* isStrictMode */);
+ false /* privateDnsProbeSent */);
assertUidRangesUpdatedForMyUid(true);
vpnNetworkCallback.expectAvailableCallbacks(mMockVpn.getNetwork(),
@@ -8603,7 +8629,7 @@
vpnNetworkCallback.assertNoCallback();
mMockVpn.establishForMyUid(true /* validated */, false /* hasInternet */,
- false /* isStrictMode */);
+ false /* privateDnsProbeSent */);
assertUidRangesUpdatedForMyUid(true);
vpnNetworkCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
@@ -8768,7 +8794,7 @@
vpnNetworkCallback.assertNoCallback();
mMockVpn.establishForMyUid(true /* validated */, false /* hasInternet */,
- false /* isStrictMode */);
+ false /* privateDnsProbeSent */);
assertUidRangesUpdatedForMyUid(true);
vpnNetworkCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
@@ -12315,7 +12341,8 @@
b1.expectNoBroadcast(500);
final ExpectedBroadcast b2 = registerPacProxyBroadcast();
- mMockVpn.connect(true /* validated */, true /* hasInternet */, false /* isStrictMode */);
+ mMockVpn.connect(true /* validated */, true /* hasInternet */,
+ false /* privateDnsProbeSent */);
waitForIdle();
assertVpnUidRangesUpdated(true, vpnRanges, VPN_UID);
// Vpn is connected with proxy, so the proxy broadcast will be sent to inform the apps to
@@ -14813,7 +14840,7 @@
// Make sure changes to the work agent send callbacks to the app in the work profile, but
// not to the other apps.
- workAgent.setNetworkValid(true /* isStrictMode */);
+ workAgent.setNetworkValid(true /* privateDnsProbeSent */);
workAgent.mNetworkMonitor.forceReevaluation(Process.myUid());
profileDefaultNetworkCallback.expectCapabilitiesThat(workAgent,
nc -> nc.hasCapability(NET_CAPABILITY_VALIDATED)
@@ -14926,7 +14953,7 @@
workAgent2.getNetwork().netId,
uidRangeFor(testHandle, profileNetworkPreference), PREFERENCE_ORDER_PROFILE));
- workAgent2.setNetworkValid(true /* isStrictMode */);
+ workAgent2.setNetworkValid(true /* privateDnsProbeSent */);
workAgent2.mNetworkMonitor.forceReevaluation(Process.myUid());
profileDefaultNetworkCallback.expectCapabilitiesThat(workAgent2,
nc -> nc.hasCapability(NET_CAPABILITY_ENTERPRISE)
@@ -17091,7 +17118,8 @@
mWiFiNetworkAgent);
mDefaultNetworkCallback.expect(CallbackEntry.NETWORK_CAPS_UPDATED,
mWiFiNetworkAgent);
- mWiFiNetworkAgent.setNetworkPortal(TEST_REDIRECT_URL, false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkPortal(TEST_REDIRECT_URL,
+ false /* privateDnsProbeSent */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), false);
// Wi-Fi is now detected to have a portal : cell should become the default network.
mDefaultNetworkCallback.expectAvailableCallbacksValidated(mCellNetworkAgent);
@@ -17101,7 +17129,7 @@
mWiFiNetworkAgent);
// Wi-Fi becomes valid again. The default network goes back to Wi-Fi.
- mWiFiNetworkAgent.setNetworkValid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(false /* privateDnsProbeSent */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), true);
mDefaultNetworkCallback.expectAvailableCallbacksValidated(mWiFiNetworkAgent);
wifiNetworkCallback.expectCapabilitiesWithout(NET_CAPABILITY_CAPTIVE_PORTAL,
@@ -17122,7 +17150,7 @@
mWiFiNetworkAgent);
// Wi-Fi becomes valid again. The default network goes back to Wi-Fi.
- mWiFiNetworkAgent.setNetworkValid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkValid(false /* privateDnsProbeSent */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), true);
mDefaultNetworkCallback.expectAvailableCallbacksValidated(mWiFiNetworkAgent);
wifiNetworkCallback.expectCapabilitiesWithout(NET_CAPABILITY_PARTIAL_CONNECTIVITY,
@@ -17136,7 +17164,7 @@
mWiFiNetworkAgent.setNetworkCapabilities(wifiNc2, true);
mDefaultNetworkCallback.expect(CallbackEntry.NETWORK_CAPS_UPDATED,
mWiFiNetworkAgent);
- mWiFiNetworkAgent.setNetworkInvalid(false /* isStrictMode */);
+ mWiFiNetworkAgent.setNetworkInvalid(false /* invalidBecauseOfPrivateDns */);
mCm.reportNetworkConnectivity(mWiFiNetworkAgent.getNetwork(), false);
if (enabled) {
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsAdvertiserTest.kt b/tests/unit/java/com/android/server/connectivity/mdns/MdnsAdvertiserTest.kt
new file mode 100644
index 0000000..e2babb1
--- /dev/null
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsAdvertiserTest.kt
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.connectivity.mdns
+
+import android.net.InetAddresses.parseNumericAddress
+import android.net.LinkAddress
+import android.net.Network
+import android.net.nsd.NsdServiceInfo
+import android.os.Build
+import android.os.Handler
+import android.os.HandlerThread
+import com.android.server.connectivity.mdns.MdnsAdvertiser.AdvertiserCallback
+import com.android.server.connectivity.mdns.MdnsSocketProvider.SocketCallback
+import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo
+import com.android.testutils.DevSdkIgnoreRunner
+import com.android.testutils.waitForIdle
+import java.util.Objects
+import org.junit.After
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.eq
+import org.mockito.Mockito.any
+import org.mockito.Mockito.anyInt
+import org.mockito.Mockito.argThat
+import org.mockito.Mockito.doReturn
+import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.verify
+
+private const val SERVICE_ID_1 = 1
+private const val SERVICE_ID_2 = 2
+private const val TIMEOUT_MS = 10_000L
+private val TEST_ADDR = parseNumericAddress("2001:db8::123")
+private val TEST_LINKADDR = LinkAddress(TEST_ADDR, 64 /* prefixLength */)
+private val TEST_NETWORK_1 = mock(Network::class.java)
+private val TEST_NETWORK_2 = mock(Network::class.java)
+
+private val SERVICE_1 = NsdServiceInfo("TestServiceName", "_advertisertest._tcp").apply {
+ port = 12345
+ host = TEST_ADDR
+ network = TEST_NETWORK_1
+}
+
+private val ALL_NETWORKS_SERVICE = NsdServiceInfo("TestServiceName", "_advertisertest._tcp").apply {
+ port = 12345
+ host = TEST_ADDR
+ network = null
+}
+
+@RunWith(DevSdkIgnoreRunner::class)
+@IgnoreUpTo(Build.VERSION_CODES.S_V2)
+class MdnsAdvertiserTest {
+ private val thread = HandlerThread(MdnsAdvertiserTest::class.simpleName)
+ private val handler by lazy { Handler(thread.looper) }
+ private val socketProvider = mock(MdnsSocketProvider::class.java)
+ private val cb = mock(AdvertiserCallback::class.java)
+
+ private val mockSocket1 = mock(MdnsInterfaceSocket::class.java)
+ private val mockSocket2 = mock(MdnsInterfaceSocket::class.java)
+ private val mockInterfaceAdvertiser1 = mock(MdnsInterfaceAdvertiser::class.java)
+ private val mockInterfaceAdvertiser2 = mock(MdnsInterfaceAdvertiser::class.java)
+ private val mockDeps = mock(MdnsAdvertiser.Dependencies::class.java)
+
+ @Before
+ fun setUp() {
+ thread.start()
+ doReturn(mockInterfaceAdvertiser1).`when`(mockDeps).makeAdvertiser(eq(mockSocket1),
+ any(), any(), any(), any())
+ doReturn(mockInterfaceAdvertiser2).`when`(mockDeps).makeAdvertiser(eq(mockSocket2),
+ any(), any(), any(), any())
+ doReturn(true).`when`(mockInterfaceAdvertiser1).isProbing(anyInt())
+ doReturn(true).`when`(mockInterfaceAdvertiser2).isProbing(anyInt())
+ }
+
+ @After
+ fun tearDown() {
+ thread.quitSafely()
+ }
+
+ @Test
+ fun testAddService_OneNetwork() {
+ val advertiser = MdnsAdvertiser(thread.looper, socketProvider, cb, mockDeps)
+ postSync { advertiser.addService(SERVICE_ID_1, SERVICE_1) }
+
+ val socketCbCaptor = ArgumentCaptor.forClass(SocketCallback::class.java)
+ verify(socketProvider).requestSocket(eq(TEST_NETWORK_1), socketCbCaptor.capture())
+
+ val socketCb = socketCbCaptor.value
+ postSync { socketCb.onSocketCreated(TEST_NETWORK_1, mockSocket1, listOf(TEST_LINKADDR)) }
+
+ val intAdvCbCaptor = ArgumentCaptor.forClass(MdnsInterfaceAdvertiser.Callback::class.java)
+ verify(mockDeps).makeAdvertiser(eq(mockSocket1),
+ eq(listOf(TEST_LINKADDR)), eq(thread.looper), any(), intAdvCbCaptor.capture())
+
+ doReturn(false).`when`(mockInterfaceAdvertiser1).isProbing(SERVICE_ID_1)
+ postSync { intAdvCbCaptor.value.onRegisterServiceSucceeded(
+ mockInterfaceAdvertiser1, SERVICE_ID_1) }
+ verify(cb).onRegisterServiceSucceeded(eq(SERVICE_ID_1), argThat { it.matches(SERVICE_1) })
+
+ postSync { socketCb.onInterfaceDestroyed(TEST_NETWORK_1, mockSocket1) }
+ verify(mockInterfaceAdvertiser1).destroyNow()
+ }
+
+ @Test
+ fun testAddService_AllNetworks() {
+ val advertiser = MdnsAdvertiser(thread.looper, socketProvider, cb, mockDeps)
+ postSync { advertiser.addService(SERVICE_ID_1, ALL_NETWORKS_SERVICE) }
+
+ val socketCbCaptor = ArgumentCaptor.forClass(SocketCallback::class.java)
+ verify(socketProvider).requestSocket(eq(ALL_NETWORKS_SERVICE.network),
+ socketCbCaptor.capture())
+
+ val socketCb = socketCbCaptor.value
+ postSync { socketCb.onSocketCreated(TEST_NETWORK_1, mockSocket1, listOf(TEST_LINKADDR)) }
+ postSync { socketCb.onSocketCreated(TEST_NETWORK_2, mockSocket2, listOf(TEST_LINKADDR)) }
+
+ val intAdvCbCaptor1 = ArgumentCaptor.forClass(MdnsInterfaceAdvertiser.Callback::class.java)
+ val intAdvCbCaptor2 = ArgumentCaptor.forClass(MdnsInterfaceAdvertiser.Callback::class.java)
+ verify(mockDeps).makeAdvertiser(eq(mockSocket1), eq(listOf(TEST_LINKADDR)),
+ eq(thread.looper), any(), intAdvCbCaptor1.capture())
+ verify(mockDeps).makeAdvertiser(eq(mockSocket2), eq(listOf(TEST_LINKADDR)),
+ eq(thread.looper), any(), intAdvCbCaptor2.capture())
+
+ doReturn(false).`when`(mockInterfaceAdvertiser1).isProbing(SERVICE_ID_1)
+ postSync { intAdvCbCaptor1.value.onRegisterServiceSucceeded(
+ mockInterfaceAdvertiser1, SERVICE_ID_1) }
+
+ // Need both advertisers to finish probing and call onRegisterServiceSucceeded
+ verify(cb, never()).onRegisterServiceSucceeded(anyInt(), any())
+ doReturn(false).`when`(mockInterfaceAdvertiser2).isProbing(SERVICE_ID_1)
+ postSync { intAdvCbCaptor2.value.onRegisterServiceSucceeded(
+ mockInterfaceAdvertiser2, SERVICE_ID_1) }
+ verify(cb).onRegisterServiceSucceeded(eq(SERVICE_ID_1),
+ argThat { it.matches(ALL_NETWORKS_SERVICE) })
+
+ // Unregister the service
+ postSync { advertiser.removeService(SERVICE_ID_1) }
+ verify(mockInterfaceAdvertiser1).removeService(SERVICE_ID_1)
+ verify(mockInterfaceAdvertiser2).removeService(SERVICE_ID_1)
+
+ // Interface advertisers call onDestroyed after sending exit announcements
+ postSync { intAdvCbCaptor1.value.onDestroyed(mockSocket1) }
+ verify(socketProvider, never()).unrequestSocket(any())
+ postSync { intAdvCbCaptor2.value.onDestroyed(mockSocket2) }
+ verify(socketProvider).unrequestSocket(socketCb)
+ }
+
+ private fun postSync(r: () -> Unit) {
+ handler.post(r)
+ handler.waitForIdle(TIMEOUT_MS)
+ }
+}
+
+// NsdServiceInfo does not implement equals; this is useful to use in argument matchers
+private fun NsdServiceInfo.matches(other: NsdServiceInfo): Boolean {
+ return Objects.equals(serviceName, other.serviceName) &&
+ Objects.equals(serviceType, other.serviceType) &&
+ Objects.equals(attributes, other.attributes) &&
+ Objects.equals(host, other.host) &&
+ port == other.port &&
+ Objects.equals(network, other.network)
+}
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsAnnouncerTest.kt b/tests/unit/java/com/android/server/connectivity/mdns/MdnsAnnouncerTest.kt
index e9325d5..2051e0c 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsAnnouncerTest.kt
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsAnnouncerTest.kt
@@ -28,7 +28,6 @@
import java.net.Inet6Address
import java.net.InetAddress
import java.net.InetSocketAddress
-import java.net.MulticastSocket
import kotlin.test.assertEquals
import kotlin.test.assertTrue
import org.junit.After
@@ -55,7 +54,7 @@
class MdnsAnnouncerTest {
private val thread = HandlerThread(MdnsAnnouncerTest::class.simpleName)
- private val socket = mock(MulticastSocket::class.java)
+ private val socket = mock(MdnsInterfaceSocket::class.java)
private val buffer = ByteArray(1500)
@Before
@@ -71,8 +70,7 @@
private class TestAnnouncementInfo(
announcedRecords: List<MdnsRecord>,
additionalRecords: List<MdnsRecord>
- )
- : AnnouncementInfo(announcedRecords, additionalRecords, destinationsSupplier) {
+ ) : AnnouncementInfo(announcedRecords, additionalRecords, destinationsSupplier) {
override fun getDelayMs(nextIndex: Int) =
if (nextIndex < FIRST_ANNOUNCES_COUNT) {
FIRST_ANNOUNCES_DELAY
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsProberTest.kt b/tests/unit/java/com/android/server/connectivity/mdns/MdnsProberTest.kt
index 419121c..a98a4b2 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsProberTest.kt
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsProberTest.kt
@@ -26,7 +26,6 @@
import com.android.testutils.DevSdkIgnoreRunner
import java.net.DatagramPacket
import java.net.InetSocketAddress
-import java.net.MulticastSocket
import java.util.concurrent.CompletableFuture
import java.util.concurrent.TimeUnit
import kotlin.test.assertEquals
@@ -57,7 +56,7 @@
@IgnoreUpTo(Build.VERSION_CODES.S_V2)
class MdnsProberTest {
private val thread = HandlerThread(MdnsProberTest::class.simpleName)
- private val socket = mock(MulticastSocket::class.java)
+ private val socket = mock(MdnsInterfaceSocket::class.java)
@Suppress("UNCHECKED_CAST")
private val cb = mock(MdnsPacketRepeater.PacketRepeaterCallback::class.java)
as MdnsPacketRepeater.PacketRepeaterCallback<ProbingInfo>
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketProviderTest.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketProviderTest.java
index 2bb61a6a..ef73030 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketProviderTest.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketProviderTest.java
@@ -159,7 +159,8 @@
}
@Override
- public void onAddressesChanged(Network network, List<LinkAddress> addresses) {
+ public void onAddressesChanged(Network network, MdnsInterfaceSocket socket,
+ List<LinkAddress> addresses) {
mHistory.add(new AddressesChangedEvent(network, addresses));
}
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 917da93..f96d39f 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -14,6 +14,57 @@
//
// This file is automatically generated by gen_android_bp. Do not edit.
+// GN: //components/cronet/android:cronet_api_java
+java_library {
+ name: "cronet_aml_api_java",
+ srcs: [
+ ":cronet_aml_api_sources",
+ ],
+ libs: [
+ "androidx.annotation_annotation",
+ ],
+ sdk_version: "module_current",
+}
+
+// GN: //components/cronet/android:cronet_api_java
+filegroup {
+ name: "cronet_aml_api_sources",
+ srcs: [
+ ":cronet_aml_components_cronet_android_interface_api_version",
+ "components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java",
+ "components/cronet/android/api/src/org/chromium/net/CallbackException.java",
+ "components/cronet/android/api/src/org/chromium/net/CronetEngine.java",
+ "components/cronet/android/api/src/org/chromium/net/CronetException.java",
+ "components/cronet/android/api/src/org/chromium/net/ExperimentalBidirectionalStream.java",
+ "components/cronet/android/api/src/org/chromium/net/ExperimentalCronetEngine.java",
+ "components/cronet/android/api/src/org/chromium/net/ExperimentalUrlRequest.java",
+ "components/cronet/android/api/src/org/chromium/net/ICronetEngineBuilder.java",
+ "components/cronet/android/api/src/org/chromium/net/InlineExecutionProhibitedException.java",
+ "components/cronet/android/api/src/org/chromium/net/NetworkException.java",
+ "components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java",
+ "components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java",
+ "components/cronet/android/api/src/org/chromium/net/QuicException.java",
+ "components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java",
+ "components/cronet/android/api/src/org/chromium/net/UploadDataProvider.java",
+ "components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java",
+ "components/cronet/android/api/src/org/chromium/net/UploadDataSink.java",
+ "components/cronet/android/api/src/org/chromium/net/UrlRequest.java",
+ "components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/ByteArrayCronetCallback.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/ContentTypeParametersParser.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetRequestCompletionListener.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetResponse.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/ImplicitFlowControlCallback.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/JsonCronetCallback.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandler.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandlers.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/StringCronetCallback.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/UploadDataProviders.java",
+ "components/cronet/android/api/src/org/chromium/net/apihelpers/UrlRequestCallbacks.java",
+ ],
+}
+
// GN: //base/allocator:buildflags
cc_genrule {
name: "cronet_aml_base_allocator_buildflags",
@@ -1597,48 +1648,6 @@
],
}
-// GN: //base/numerics:base_numerics
-cc_object {
- name: "cronet_aml_base_numerics_base_numerics",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //base:orderfile_buildflags
cc_genrule {
name: "cronet_aml_base_orderfile_buildflags",
@@ -2018,48 +2027,6 @@
],
}
-// GN: //build:buildflag_header_h
-cc_object {
- name: "cronet_aml_build_buildflag_header_h",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //build:chromecast_buildflags
cc_genrule {
name: "cronet_aml_build_chromecast_buildflags",
@@ -2731,38 +2698,6 @@
"build/android/java/src/org/chromium/build/annotations/MainDex.java",
"build/android/java/src/org/chromium/build/annotations/MockedInTests.java",
"build/android/java/src/org/chromium/build/annotations/UsedByReflection.java",
- "components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java",
- "components/cronet/android/api/src/org/chromium/net/CallbackException.java",
- "components/cronet/android/api/src/org/chromium/net/CronetEngine.java",
- "components/cronet/android/api/src/org/chromium/net/CronetException.java",
- "components/cronet/android/api/src/org/chromium/net/CronetProvider.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalBidirectionalStream.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalCronetEngine.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalUrlRequest.java",
- "components/cronet/android/api/src/org/chromium/net/ICronetEngineBuilder.java",
- "components/cronet/android/api/src/org/chromium/net/InlineExecutionProhibitedException.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkException.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java",
- "components/cronet/android/api/src/org/chromium/net/QuicException.java",
- "components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataProvider.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataSink.java",
- "components/cronet/android/api/src/org/chromium/net/UrlRequest.java",
- "components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ByteArrayCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ContentTypeParametersParser.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetRequestCompletionListener.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetResponse.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ImplicitFlowControlCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/JsonCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandler.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandlers.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/StringCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/UploadDataProviders.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/UrlRequestCallbacks.java",
"components/cronet/android/java/src/org/chromium/net/impl/BidirectionalStreamBuilderImpl.java",
"components/cronet/android/java/src/org/chromium/net/impl/BidirectionalStreamNetworkException.java",
"components/cronet/android/java/src/org/chromium/net/impl/CallbackExceptionImpl.java",
@@ -2778,16 +2713,9 @@
"components/cronet/android/java/src/org/chromium/net/impl/CronetUploadDataStream.java",
"components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequest.java",
"components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java",
- "components/cronet/android/java/src/org/chromium/net/impl/InputStreamChannel.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngine.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngineBuilderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetProvider.java",
"components/cronet/android/java/src/org/chromium/net/impl/JavaUploadDataSinkBase.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequest.java",
"components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequestUtils.java",
"components/cronet/android/java/src/org/chromium/net/impl/NativeCronetEngineBuilderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/NativeCronetEngineBuilderWithLibraryLoaderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/NativeCronetProvider.java",
"components/cronet/android/java/src/org/chromium/net/impl/NetworkExceptionImpl.java",
"components/cronet/android/java/src/org/chromium/net/impl/NoOpLogger.java",
"components/cronet/android/java/src/org/chromium/net/impl/Preconditions.java",
@@ -3037,38 +2965,6 @@
"build/android/java/src/org/chromium/build/annotations/MainDex.java",
"build/android/java/src/org/chromium/build/annotations/MockedInTests.java",
"build/android/java/src/org/chromium/build/annotations/UsedByReflection.java",
- "components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java",
- "components/cronet/android/api/src/org/chromium/net/CallbackException.java",
- "components/cronet/android/api/src/org/chromium/net/CronetEngine.java",
- "components/cronet/android/api/src/org/chromium/net/CronetException.java",
- "components/cronet/android/api/src/org/chromium/net/CronetProvider.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalBidirectionalStream.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalCronetEngine.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalUrlRequest.java",
- "components/cronet/android/api/src/org/chromium/net/ICronetEngineBuilder.java",
- "components/cronet/android/api/src/org/chromium/net/InlineExecutionProhibitedException.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkException.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java",
- "components/cronet/android/api/src/org/chromium/net/QuicException.java",
- "components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataProvider.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataSink.java",
- "components/cronet/android/api/src/org/chromium/net/UrlRequest.java",
- "components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ByteArrayCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ContentTypeParametersParser.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetRequestCompletionListener.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetResponse.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ImplicitFlowControlCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/JsonCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandler.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandlers.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/StringCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/UploadDataProviders.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/UrlRequestCallbacks.java",
"components/cronet/android/java/src/org/chromium/net/impl/BidirectionalStreamBuilderImpl.java",
"components/cronet/android/java/src/org/chromium/net/impl/BidirectionalStreamNetworkException.java",
"components/cronet/android/java/src/org/chromium/net/impl/CallbackExceptionImpl.java",
@@ -3084,16 +2980,9 @@
"components/cronet/android/java/src/org/chromium/net/impl/CronetUploadDataStream.java",
"components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequest.java",
"components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java",
- "components/cronet/android/java/src/org/chromium/net/impl/InputStreamChannel.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngine.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngineBuilderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetProvider.java",
"components/cronet/android/java/src/org/chromium/net/impl/JavaUploadDataSinkBase.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequest.java",
"components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequestUtils.java",
"components/cronet/android/java/src/org/chromium/net/impl/NativeCronetEngineBuilderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/NativeCronetEngineBuilderWithLibraryLoaderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/NativeCronetProvider.java",
"components/cronet/android/java/src/org/chromium/net/impl/NetworkExceptionImpl.java",
"components/cronet/android/java/src/org/chromium/net/impl/NoOpLogger.java",
"components/cronet/android/java/src/org/chromium/net/impl/Preconditions.java",
@@ -3632,51 +3521,6 @@
},
}
-// GN: //components/cronet:cronet_version_header
-cc_object {
- name: "cronet_aml_components_cronet_cronet_version_header",
- generated_headers: [
- "cronet_aml_components_cronet_cronet_version_header_action",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //components/cronet:cronet_version_header_action
cc_genrule {
name: "cronet_aml_components_cronet_cronet_version_header_action",
@@ -3765,69 +3609,6 @@
},
}
-// GN: //components/cronet/native:cronet_native_headers
-cc_object {
- name: "cronet_aml_components_cronet_native_cronet_native_headers",
- shared_libs: [
- "libandroid",
- "liblog",
- ],
- static_libs: [
- "cronet_aml_base_allocator_partition_allocator_partition_alloc",
- "cronet_aml_base_base",
- "cronet_aml_base_base_static",
- "cronet_aml_base_third_party_double_conversion_double_conversion",
- "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
- "cronet_aml_third_party_boringssl_boringssl",
- "cronet_aml_third_party_icu_icui18n",
- "cronet_aml_third_party_icu_icuuc_private",
- "cronet_aml_third_party_libevent_libevent",
- "cronet_aml_third_party_modp_b64_modp_b64",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "components/cronet/native/generated/",
- "components/cronet/native/include/",
- "components/grpc_support/include/",
- "third_party/abseil-cpp/",
- "third_party/boringssl/src/include/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //components/cronet/native:cronet_native_impl
cc_object {
name: "cronet_aml_components_cronet_native_cronet_native_impl",
@@ -4008,48 +3789,6 @@
},
}
-// GN: //components/grpc_support:headers
-cc_object {
- name: "cronet_aml_components_grpc_support_headers",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //components/metrics:library_support
cc_object {
name: "cronet_aml_components_metrics_library_support",
@@ -4391,9 +4130,11 @@
min_sdk_version: "29",
target: {
android: {
+ shared_libs: [
+ "libmediandk",
+ ],
header_libs: [
"jni_headers",
- "media_ndk_headers",
],
},
host: {
@@ -4404,48 +4145,6 @@
},
}
-// GN: //ipc:param_traits
-cc_object {
- name: "cronet_aml_ipc_param_traits",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //gn:java
java_library {
name: "cronet_aml_java",
@@ -4639,38 +4338,6 @@
"build/android/java/src/org/chromium/build/annotations/MainDex.java",
"build/android/java/src/org/chromium/build/annotations/MockedInTests.java",
"build/android/java/src/org/chromium/build/annotations/UsedByReflection.java",
- "components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java",
- "components/cronet/android/api/src/org/chromium/net/CallbackException.java",
- "components/cronet/android/api/src/org/chromium/net/CronetEngine.java",
- "components/cronet/android/api/src/org/chromium/net/CronetException.java",
- "components/cronet/android/api/src/org/chromium/net/CronetProvider.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalBidirectionalStream.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalCronetEngine.java",
- "components/cronet/android/api/src/org/chromium/net/ExperimentalUrlRequest.java",
- "components/cronet/android/api/src/org/chromium/net/ICronetEngineBuilder.java",
- "components/cronet/android/api/src/org/chromium/net/InlineExecutionProhibitedException.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkException.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkQualityRttListener.java",
- "components/cronet/android/api/src/org/chromium/net/NetworkQualityThroughputListener.java",
- "components/cronet/android/api/src/org/chromium/net/QuicException.java",
- "components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataProvider.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataProviders.java",
- "components/cronet/android/api/src/org/chromium/net/UploadDataSink.java",
- "components/cronet/android/api/src/org/chromium/net/UrlRequest.java",
- "components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ByteArrayCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ContentTypeParametersParser.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetRequestCompletionListener.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/CronetResponse.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/ImplicitFlowControlCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/JsonCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandler.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/RedirectHandlers.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/StringCronetCallback.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/UploadDataProviders.java",
- "components/cronet/android/api/src/org/chromium/net/apihelpers/UrlRequestCallbacks.java",
"components/cronet/android/java/src/org/chromium/net/impl/BidirectionalStreamBuilderImpl.java",
"components/cronet/android/java/src/org/chromium/net/impl/BidirectionalStreamNetworkException.java",
"components/cronet/android/java/src/org/chromium/net/impl/CallbackExceptionImpl.java",
@@ -4686,16 +4353,9 @@
"components/cronet/android/java/src/org/chromium/net/impl/CronetUploadDataStream.java",
"components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequest.java",
"components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java",
- "components/cronet/android/java/src/org/chromium/net/impl/InputStreamChannel.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngine.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngineBuilderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaCronetProvider.java",
"components/cronet/android/java/src/org/chromium/net/impl/JavaUploadDataSinkBase.java",
- "components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequest.java",
"components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequestUtils.java",
"components/cronet/android/java/src/org/chromium/net/impl/NativeCronetEngineBuilderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/NativeCronetEngineBuilderWithLibraryLoaderImpl.java",
- "components/cronet/android/java/src/org/chromium/net/impl/NativeCronetProvider.java",
"components/cronet/android/java/src/org/chromium/net/impl/NetworkExceptionImpl.java",
"components/cronet/android/java/src/org/chromium/net/impl/NoOpLogger.java",
"components/cronet/android/java/src/org/chromium/net/impl/Preconditions.java",
@@ -4739,8 +4399,10 @@
"net/android/java/src/org/chromium/net/X509Util.java",
"url/android/java/src/org/chromium/url/IDNStringUtil.java",
],
+ static_libs: [
+ "modules-utils-build_system",
+ ],
apex_available: [
- "//apex_available:platform",
"com.android.tethering",
],
libs: [
@@ -4749,6 +4411,7 @@
"androidx.annotation_annotation-experimental-nodeps",
"androidx.collection_collection",
"androidx.core_core-nodeps",
+ "cronet_aml_api_java",
"framework-connectivity-t.stubs.module_lib",
"framework-connectivity.stubs.module_lib",
"framework-mediaprovider.stubs.module_lib",
@@ -4983,92 +4646,6 @@
],
}
-// GN: //net:constants
-cc_object {
- name: "cronet_aml_net_constants",
- shared_libs: [
- "libandroid",
- "liblog",
- ],
- static_libs: [
- "cronet_aml_base_allocator_partition_allocator_partition_alloc",
- "cronet_aml_base_base",
- "cronet_aml_base_base_static",
- "cronet_aml_base_third_party_double_conversion_double_conversion",
- "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
- "cronet_aml_third_party_boringssl_boringssl",
- "cronet_aml_third_party_icu_icui18n",
- "cronet_aml_third_party_icu_icuuc_private",
- "cronet_aml_third_party_libevent_libevent",
- "cronet_aml_third_party_modp_b64_modp_b64",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- "third_party/boringssl/src/include/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //net/data/ssl/chrome_root_store:gen_root_store_inc
-cc_genrule {
- name: "cronet_aml_net_data_ssl_chrome_root_store_gen_root_store_inc",
- cmd: "$(location build/gn_run_binary.py) clang_x64/root_store_tool " +
- "--root-store " +
- "../../net/data/ssl/chrome_root_store/root_store.textproto " +
- "--certs " +
- "../../net/data/ssl/chrome_root_store/root_store.certs " +
- "--write-cpp-root-store " +
- "gen/net/data/ssl/chrome_root_store/chrome-root-store-inc.cc " +
- "--write-cpp-ev-roots " +
- "gen/net/data/ssl/chrome_root_store/chrome-ev-roots-inc.cc",
- out: [
- "net/data/ssl/chrome_root_store/chrome-ev-roots-inc.cc",
- "net/data/ssl/chrome_root_store/chrome-root-store-inc.cc",
- ],
- tool_files: [
- "build/gn_run_binary.py",
- "net/data/ssl/chrome_root_store/root_store.certs",
- "net/data/ssl/chrome_root_store/root_store.textproto",
- ],
- apex_available: [
- "com.android.tethering",
- ],
-}
-
// GN: //net/dns:dns
cc_object {
name: "cronet_aml_net_dns_dns",
@@ -5200,374 +4777,6 @@
},
}
-// GN: //net/dns:dns_client
-cc_object {
- name: "cronet_aml_net_dns_dns_client",
- shared_libs: [
- "libandroid",
- "liblog",
- "libz",
- ],
- static_libs: [
- "cronet_aml_base_allocator_partition_allocator_partition_alloc",
- "cronet_aml_base_base",
- "cronet_aml_base_base_static",
- "cronet_aml_base_third_party_double_conversion_double_conversion",
- "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
- "cronet_aml_crypto_crypto",
- "cronet_aml_net_preload_decoder",
- "cronet_aml_net_third_party_quiche_quiche",
- "cronet_aml_net_uri_template",
- "cronet_aml_third_party_boringssl_boringssl",
- "cronet_aml_third_party_brotli_common",
- "cronet_aml_third_party_brotli_dec",
- "cronet_aml_third_party_icu_icui18n",
- "cronet_aml_third_party_icu_icuuc_private",
- "cronet_aml_third_party_libevent_libevent",
- "cronet_aml_third_party_modp_b64_modp_b64",
- "cronet_aml_third_party_protobuf_protobuf_lite",
- "cronet_aml_url_url",
- ],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
- "cronet_aml_build_chromeos_buildflags",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
- "cronet_aml_net_buildflags",
- "cronet_aml_net_isolation_info_proto_gen_headers",
- "cronet_aml_net_net_jni_headers",
- "cronet_aml_net_net_nqe_proto_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
- "cronet_aml_url_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DENABLE_BUILT_IN_DNS",
- "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
- "-DGOOGLE_PROTOBUF_NO_RTTI",
- "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
- "-DHAVE_PTHREAD",
- "-DHAVE_SYS_UIO_H",
- "-DNET_IMPLEMENTATION",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "net/third_party/quiche/overrides/",
- "net/third_party/quiche/src/",
- "net/third_party/quiche/src/quiche/common/platform/default/",
- "third_party/abseil-cpp/",
- "third_party/boringssl/src/include/",
- "third_party/brotli/include/",
- "third_party/protobuf/src/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //net/dns:host_resolver
-cc_object {
- name: "cronet_aml_net_dns_host_resolver",
- shared_libs: [
- "libandroid",
- "liblog",
- "libz",
- ],
- static_libs: [
- "cronet_aml_base_allocator_partition_allocator_partition_alloc",
- "cronet_aml_base_base",
- "cronet_aml_base_base_static",
- "cronet_aml_base_third_party_double_conversion_double_conversion",
- "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
- "cronet_aml_crypto_crypto",
- "cronet_aml_net_preload_decoder",
- "cronet_aml_net_third_party_quiche_quiche",
- "cronet_aml_net_uri_template",
- "cronet_aml_third_party_boringssl_boringssl",
- "cronet_aml_third_party_brotli_common",
- "cronet_aml_third_party_brotli_dec",
- "cronet_aml_third_party_icu_icui18n",
- "cronet_aml_third_party_icu_icuuc_private",
- "cronet_aml_third_party_libevent_libevent",
- "cronet_aml_third_party_modp_b64_modp_b64",
- "cronet_aml_third_party_protobuf_protobuf_lite",
- "cronet_aml_url_url",
- ],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
- "cronet_aml_build_chromeos_buildflags",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
- "cronet_aml_net_buildflags",
- "cronet_aml_net_isolation_info_proto_gen_headers",
- "cronet_aml_net_net_jni_headers",
- "cronet_aml_net_net_nqe_proto_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
- "cronet_aml_url_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DENABLE_BUILT_IN_DNS",
- "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
- "-DGOOGLE_PROTOBUF_NO_RTTI",
- "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
- "-DHAVE_PTHREAD",
- "-DHAVE_SYS_UIO_H",
- "-DNET_IMPLEMENTATION",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "net/third_party/quiche/overrides/",
- "net/third_party/quiche/src/",
- "net/third_party/quiche/src/quiche/common/platform/default/",
- "third_party/abseil-cpp/",
- "third_party/boringssl/src/include/",
- "third_party/brotli/include/",
- "third_party/protobuf/src/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //net/dns:host_resolver_manager
-cc_object {
- name: "cronet_aml_net_dns_host_resolver_manager",
- shared_libs: [
- "libandroid",
- "liblog",
- "libz",
- ],
- static_libs: [
- "cronet_aml_base_allocator_partition_allocator_partition_alloc",
- "cronet_aml_base_base",
- "cronet_aml_base_base_static",
- "cronet_aml_base_third_party_double_conversion_double_conversion",
- "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
- "cronet_aml_crypto_crypto",
- "cronet_aml_net_preload_decoder",
- "cronet_aml_net_third_party_quiche_quiche",
- "cronet_aml_net_uri_template",
- "cronet_aml_third_party_boringssl_boringssl",
- "cronet_aml_third_party_brotli_common",
- "cronet_aml_third_party_brotli_dec",
- "cronet_aml_third_party_icu_icui18n",
- "cronet_aml_third_party_icu_icuuc_private",
- "cronet_aml_third_party_libevent_libevent",
- "cronet_aml_third_party_modp_b64_modp_b64",
- "cronet_aml_third_party_protobuf_protobuf_lite",
- "cronet_aml_url_url",
- ],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
- "cronet_aml_build_chromeos_buildflags",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
- "cronet_aml_net_buildflags",
- "cronet_aml_net_isolation_info_proto_gen_headers",
- "cronet_aml_net_net_jni_headers",
- "cronet_aml_net_net_nqe_proto_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
- "cronet_aml_url_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DENABLE_BUILT_IN_DNS",
- "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
- "-DGOOGLE_PROTOBUF_NO_RTTI",
- "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
- "-DHAVE_PTHREAD",
- "-DHAVE_SYS_UIO_H",
- "-DNET_IMPLEMENTATION",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "net/third_party/quiche/overrides/",
- "net/third_party/quiche/src/",
- "net/third_party/quiche/src/quiche/common/platform/default/",
- "third_party/abseil-cpp/",
- "third_party/boringssl/src/include/",
- "third_party/brotli/include/",
- "third_party/protobuf/src/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //net/dns:mdns_client
-cc_object {
- name: "cronet_aml_net_dns_mdns_client",
- shared_libs: [
- "libandroid",
- "liblog",
- "libz",
- ],
- static_libs: [
- "cronet_aml_base_allocator_partition_allocator_partition_alloc",
- "cronet_aml_base_base",
- "cronet_aml_base_base_static",
- "cronet_aml_base_third_party_double_conversion_double_conversion",
- "cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
- "cronet_aml_crypto_crypto",
- "cronet_aml_net_preload_decoder",
- "cronet_aml_net_third_party_quiche_quiche",
- "cronet_aml_net_uri_template",
- "cronet_aml_third_party_boringssl_boringssl",
- "cronet_aml_third_party_brotli_common",
- "cronet_aml_third_party_brotli_dec",
- "cronet_aml_third_party_icu_icui18n",
- "cronet_aml_third_party_icu_icuuc_private",
- "cronet_aml_third_party_libevent_libevent",
- "cronet_aml_third_party_modp_b64_modp_b64",
- "cronet_aml_third_party_protobuf_protobuf_lite",
- "cronet_aml_url_url",
- ],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
- "cronet_aml_build_chromeos_buildflags",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
- "cronet_aml_net_buildflags",
- "cronet_aml_net_isolation_info_proto_gen_headers",
- "cronet_aml_net_net_jni_headers",
- "cronet_aml_net_net_nqe_proto_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
- "cronet_aml_url_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DENABLE_BUILT_IN_DNS",
- "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
- "-DGOOGLE_PROTOBUF_NO_RTTI",
- "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
- "-DHAVE_PTHREAD",
- "-DHAVE_SYS_UIO_H",
- "-DNET_IMPLEMENTATION",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "net/third_party/quiche/overrides/",
- "net/third_party/quiche/src/",
- "net/third_party/quiche/src/quiche/common/platform/default/",
- "third_party/abseil-cpp/",
- "third_party/boringssl/src/include/",
- "third_party/brotli/include/",
- "third_party/protobuf/src/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //net/dns/public:public
cc_object {
name: "cronet_aml_net_dns_public_public",
@@ -6553,48 +5762,6 @@
},
}
-// GN: //net:net_export_header
-cc_object {
- name: "cronet_aml_net_net_export_header",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //net:net_jni_headers
cc_genrule {
name: "cronet_aml_net_net_jni_headers",
@@ -7520,178 +6687,6 @@
},
}
-// GN: //third_party/abseil-cpp:absl
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl",
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/algorithm:algorithm
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_algorithm_algorithm",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/algorithm:container
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_algorithm_container",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:atomic_hook
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_atomic_hook",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/base:base
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_base_base",
@@ -7741,342 +6736,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/base:base_internal
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_base_internal",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:config
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_config",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:core_headers
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_core_headers",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:cycleclock_internal
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_cycleclock_internal",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:dynamic_annotations
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_dynamic_annotations",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:endian
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_endian",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:errno_saver
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_errno_saver",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/base:fast_type_id
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_fast_type_id",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/base:log_severity
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
@@ -8167,48 +6826,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/base:prefetch
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_base_prefetch",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/base:raw_logging_internal
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
@@ -8389,552 +7006,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/cleanup:cleanup
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/cleanup:cleanup_internal
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_cleanup_cleanup_internal",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:btree
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_btree",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:common
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_common",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:common_policy_traits
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_common_policy_traits",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:compressed_tuple
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_compressed_tuple",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:container_memory
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_container_memory",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:fixed_array
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_fixed_array",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:flat_hash_map
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_map",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:flat_hash_set
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_flat_hash_set",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:hash_function_defaults
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_hash_function_defaults",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:hash_policy_traits
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_hash_policy_traits",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:hashtable_debug_hooks
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtable_debug_hooks",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/container:hashtablez_sampler
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
@@ -8981,300 +7052,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/container:inlined_vector
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:inlined_vector_internal
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_inlined_vector_internal",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:layout
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_layout",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:node_hash_map
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_map",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:node_hash_set
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_node_hash_set",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:node_slot_policy
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_node_slot_policy",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/container:raw_hash_map
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_map",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/container:raw_hash_set
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
@@ -9592,132 +7369,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/functional:any_invocable
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_functional_any_invocable",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/functional:bind_front
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_functional_bind_front",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/functional:function_ref
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_functional_function_ref",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/hash:city
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_hash_city",
@@ -9853,132 +7504,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/memory:memory
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_memory_memory",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/meta:type_traits
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_meta_type_traits",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/numeric:bits
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_numeric_bits",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/numeric:int128
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
@@ -10024,48 +7549,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/numeric:representation
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_numeric_representation",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/profiling:exponential_biased
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
@@ -10111,48 +7594,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/profiling:sample_recorder
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_profiling_sample_recorder",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/random:distributions
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
@@ -10199,303 +7640,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/random/internal:distribution_caller
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_distribution_caller",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:fast_uniform_bits
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_fast_uniform_bits",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:fastmath
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_fastmath",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:generate_real
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_generate_real",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:iostream_state_saver
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_iostream_state_saver",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:nonsecure_base
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_nonsecure_base",
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:pcg_engine
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_pcg_engine",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/random/internal:platform
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
@@ -10640,51 +7784,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/random/internal:randen_engine
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_engine",
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
@@ -10829,48 +7928,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/random/internal:salted_seed_seq
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_salted_seed_seq",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/random/internal:seed_material
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
@@ -10916,177 +7973,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/random/internal:traits
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_traits",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:uniform_helper
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_uniform_helper",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random/internal:wide_multiply
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_wide_multiply",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/random:random
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_random_random",
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
- ],
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/random:seed_gen_exception
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
@@ -11504,132 +8390,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/strings:cordz_statistics
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_statistics",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/strings:cordz_update_scope
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_scope",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/strings:cordz_update_tracker
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_update_tracker",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/strings:internal
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
@@ -11677,48 +8437,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/strings:str_format
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/strings:str_format_internal
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
@@ -11871,48 +8589,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/synchronization:kernel_timeout_internal
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_kernel_timeout_internal",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/abseil-cpp/absl/synchronization:synchronization
cc_object {
name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
@@ -12201,216 +8877,6 @@
},
}
-// GN: //third_party/abseil-cpp/absl/types:compare
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_types_compare",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/types:optional
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_types_optional",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/types:span
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_types_span",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/types:variant
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_types_variant",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
-// GN: //third_party/abseil-cpp/absl/utility:utility
-cc_object {
- name: "cronet_aml_third_party_abseil_cpp_absl_utility_utility",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DABSL_ALLOCATOR_NOTHROW=1",
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- "third_party/abseil-cpp/",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/android_ndk:cpu_features
cc_object {
name: "cronet_aml_third_party_android_ndk_cpu_features",
@@ -12928,48 +9394,6 @@
},
}
-// GN: //third_party/boringssl/src/third_party/fiat:fiat_license
-cc_object {
- name: "cronet_aml_third_party_boringssl_src_third_party_fiat_fiat_license",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/brotli:common
cc_library_static {
name: "cronet_aml_third_party_brotli_common",
@@ -13071,48 +9495,6 @@
},
}
-// GN: //third_party/brotli:headers
-cc_object {
- name: "cronet_aml_third_party_brotli_headers",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/icu:icui18n
cc_library_static {
name: "cronet_aml_third_party_icu_icui18n",
@@ -13670,48 +10052,6 @@
},
}
-// GN: //third_party/icu:icuuc_public
-cc_object {
- name: "cronet_aml_third_party_icu_icuuc_public",
- defaults: [
- "cronet_aml_defaults",
- ],
- cflags: [
- "-DANDROID",
- "-DANDROID_NDK_VERSION_ROLL=r23_1",
- "-DCR_CLANG_REVISION=\"llvmorg-16-init-6578-g0d30e92f-2\"",
- "-DCR_LIBCXX_REVISION=64d36e572d3f9719c5d75011a718f33f11126851",
- "-DDCHECK_ALWAYS_ON=1",
- "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
- "-DHAVE_SYS_UIO_H",
- "-D_DEBUG",
- "-D_GNU_SOURCE",
- "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
- "-D__STDC_CONSTANT_MACROS",
- "-D__STDC_FORMAT_MACROS",
- ],
- local_include_dirs: [
- "./",
- "buildtools/third_party/libc++/",
- "buildtools/third_party/libc++/trunk/include",
- "buildtools/third_party/libc++abi/trunk/include",
- ],
- cpp_std: "c++17",
- target: {
- android_x86: {
- cflags: [
- "-msse3",
- ],
- },
- android_x86_64: {
- cflags: [
- "-msse3",
- ],
- },
- },
-}
-
// GN: //third_party/libevent:libevent
cc_library_static {
name: "cronet_aml_third_party_libevent_libevent",
diff --git a/tools/gn2bp/desc_arm.json b/tools/gn2bp/desc_arm.json
index d3e9ecd..dcfcd63 100644
--- a/tools/gn2bp/desc_arm.json
+++ b/tools/gn2bp/desc_arm.json
Binary files differ
diff --git a/tools/gn2bp/desc_arm64.json b/tools/gn2bp/desc_arm64.json
index 980a7a1..6a26578 100644
--- a/tools/gn2bp/desc_arm64.json
+++ b/tools/gn2bp/desc_arm64.json
Binary files differ
diff --git a/tools/gn2bp/desc_x64.json b/tools/gn2bp/desc_x64.json
index d0d9954..f69f50f 100644
--- a/tools/gn2bp/desc_x64.json
+++ b/tools/gn2bp/desc_x64.json
Binary files differ
diff --git a/tools/gn2bp/desc_x86.json b/tools/gn2bp/desc_x86.json
index 6d02af7..4f30229 100644
--- a/tools/gn2bp/desc_x86.json
+++ b/tools/gn2bp/desc_x86.json
Binary files differ
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index d1d1d1c..f4520e8 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -190,6 +190,8 @@
builtin_deps = {
'//buildtools/third_party/libunwind:libunwind':
lambda m, a: None, # disable libunwind
+ '//net/data/ssl/chrome_root_store:gen_root_store_inc':
+ lambda m, a: None,
'//net/tools/root_store_tool:root_store_tool':
lambda m, a: None,
'//third_party/zlib:zlib':
@@ -213,6 +215,9 @@
# Name of tethering apex module
tethering_apex = "com.android.tethering"
+# Name of cronet api target
+java_api_target_name = "//components/cronet/android:cronet_api_java"
+
# ----------------------------------------------------------------------------
# End of configuration.
# ----------------------------------------------------------------------------
@@ -528,7 +533,12 @@
def to_string(self, output):
for m in sorted(self.modules.values(), key=lambda m: m.name):
- m.to_string(output)
+ if m.type != "cc_object" or m.has_input_files():
+ # Don't print cc_object with empty srcs. These attributes are already
+ # propagated up the tree. Printing them messes the presubmits because
+ # every module is compiled while those targets are not reachable in
+ # a normal compilation path.
+ m.to_string(output)
def label_to_module_name(label):
@@ -1237,8 +1247,7 @@
# aosp / soong builds and b) the include directory should already be
# configured via library dependency.
module.local_include_dirs.update([gn_utils.label_to_path(d)
- for d in include_dirs
- if not re.match('^//out/.*', d)])
+ for d in include_dirs if not d.startswith('//out')])
# Remove prohibited include directories
module.local_include_dirs = [d for d in module.local_include_dirs
if d not in local_include_dirs_denylist]
@@ -1300,17 +1309,13 @@
blueprint.add_module(module)
module.init_rc = target_initrc.get(target.name, [])
- module.srcs.update(
- gn_utils.label_to_path(src)
- for src in target.sources
- if is_supported_source_file(src) and not src.startswith("//out/test"))
+ module.srcs.update(gn_utils.label_to_path(src)
+ for src in target.sources if is_supported_source_file(src))
# Add arch-specific properties
for arch_name, arch in target.arch.items():
- module.target[arch_name].srcs.update(
- gn_utils.label_to_path(src)
- for src in arch.sources
- if is_supported_source_file(src) and not src.startswith("//out/test"))
+ module.target[arch_name].srcs.update(gn_utils.label_to_path(src)
+ for src in arch.sources if is_supported_source_file(src))
module.rtti = target.rtti
@@ -1476,10 +1481,36 @@
blueprint.add_module(module)
return module
+def get_java_sources(gn, predicate):
+ java_sources = set()
+ for target_name, sources in gn.java_sources.items():
+ if predicate(target_name):
+ java_sources.update(sources)
+ return java_sources
+
+def get_java_actions(gn, predicate):
+ java_actions = set()
+ for target_name, actions in gn.java_actions.items():
+ if predicate(target_name):
+ java_actions.update(actions)
+ return java_actions
+
+def get_non_api_java_sources(gn):
+ return get_java_sources(gn, lambda name: name != java_api_target_name)
+
+def get_non_api_java_actions(gn):
+ return get_java_actions(gn, lambda name: name != java_api_target_name)
+
+def get_api_java_sources(gn):
+ return get_java_sources(gn, lambda name: name == java_api_target_name)
+
+def get_api_java_actions(gn):
+ return get_java_actions(gn, lambda name: name == java_api_target_name)
+
def create_java_module(blueprint, gn):
bp_module_name = module_prefix + 'java'
module = Module('java_library', bp_module_name, '//gn:java')
- module.srcs.update([gn_utils.label_to_path(source) for source in gn.java_sources])
+ module.srcs.update([gn_utils.label_to_path(source) for source in get_non_api_java_sources(gn)])
module.libs = {
"androidx.annotation_annotation",
"jsr305",
@@ -1493,6 +1524,9 @@
"framework-wifi.stubs.module_lib",
"framework-mediaprovider.stubs.module_lib",
}
+ module.static_libs = {
+ "modules-utils-build_system",
+ }
module.aidl["include_dirs"] = {"frameworks/base/core/java/"}
module.aidl["local_include_dirs"] = {"base/android/java/src/"}
module.sdk_version = "module_current"
@@ -1503,9 +1537,7 @@
# would be less likely to conflict with upstream changes if the revert is not
# accepted.
module.javacflags.add("-Aorg.chromium.chrome.skipGenJni")
- # TODO: remove following workaround required to make this module visible to make (b/203203405)
- module.apex_available.add("//apex_available:platform")
- for dep in gn.java_actions:
+ for dep in get_non_api_java_actions(gn):
target = gn.get_target(dep)
if target.script == '//build/android/gyp/gcc_preprocess.py':
module.srcs.add(':' + create_gcc_preprocess_modules(blueprint, target).name)
@@ -1514,11 +1546,30 @@
preprocessor_module = create_java_jni_preprocessor(blueprint)
module.plugins.add(preprocessor_module.name)
blueprint.add_module(module)
+ return module
+
+def create_java_api_module(blueprint, gn):
+ source_module = Module('filegroup', module_prefix + 'api_sources', java_api_target_name)
+ source_module.srcs.update([gn_utils.label_to_path(source)
+ for source in get_api_java_sources(gn)])
+ source_module.srcs.update([
+ ':' + create_action_module(blueprint, gn.get_target(dep), 'java_genrule').name
+ for dep in get_api_java_actions(gn)])
+ blueprint.add_module(source_module)
+
+ java_module = Module('java_library', module_prefix + 'api_java', java_api_target_name)
+ java_module.srcs.add(":" + source_module.name)
+ java_module.sdk_version = "module_current"
+ java_module.libs = {
+ "androidx.annotation_annotation",
+ }
+ blueprint.add_module(java_module)
+ return java_module
def update_jni_registration_module(module, gn):
# TODO: java_sources might not contain all the required java files
module.srcs.update([gn_utils.label_to_path(source)
- for source in gn.java_sources
+ for source in get_non_api_java_sources(gn)
if source.endswith('.java')])
def create_blueprint_for_targets(gn, targets):
@@ -1547,9 +1598,11 @@
# Chromium builds do not add a dependency for headers found inside the
# sysroot, so they are added globally via defaults.
defaults.target['android'].header_libs = [
- 'media_ndk_headers',
'jni_headers',
]
+ defaults.target['android'].shared_libs = [
+ 'libmediandk'
+ ]
defaults.target['host'].cflags = [
# -DANDROID is added by default but target.defines contain -DANDROID if
# it's required. So adding -UANDROID to cancel default -DANDROID if it's
@@ -1566,7 +1619,9 @@
for target in targets:
create_modules_from_target(blueprint, gn, target)
- create_java_module(blueprint, gn)
+ java_api_module = create_java_api_module(blueprint, gn)
+ java_module = create_java_module(blueprint, gn)
+ java_module.libs.add(java_api_module.name)
for module in blueprint.modules.values():
if 'cronet_jni_registration' in module.name:
update_jni_registration_module(module, gn)
diff --git a/tools/gn2bp/gen_desc_json.sh b/tools/gn2bp/gen_desc_json.sh
new file mode 100755
index 0000000..510b967
--- /dev/null
+++ b/tools/gn2bp/gen_desc_json.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+set -x
+
+# Run this script inside a full chromium checkout.
+# TODO: add support for applying local patches.
+
+OUT_PATH="out/cronet"
+
+#######################################
+# Generate desc.json for a specified architecture.
+# Globals:
+# OUT_PATH
+# Arguments:
+# target_cpu, string
+#######################################
+function gn_desc() {
+ local -a gn_args=(
+ "target_os = \"android\""
+ "enable_websockets = false"
+ "disable_file_support = true"
+ "disable_brotli_filter = false"
+ "is_component_build = false"
+ "use_crash_key_stubs = true"
+ "use_partition_alloc = false"
+ "include_transport_security_state_preload_list = false"
+ "use_platform_icu_alternatives = true"
+ "default_min_sdk_version = 19"
+ "use_errorprone_java_compiler = true"
+ "enable_reporting = true"
+ "use_hashed_jni_names = true"
+ "treat_warnings_as_errors = false"
+ "enable_base_tracing = false"
+ )
+ gn_args+=("target_cpu = \"${1}\"")
+
+ # Only set arm_use_neon on arm architectures to prevent warning from being
+ # written to json output.
+ if [[ "$1" =~ ^arm ]]; then
+ gn_args+=("arm_use_neon = false")
+ fi
+
+ # Configure gn args.
+ gn gen "${OUT_PATH}" --args="${gn_args[*]}"
+
+ # Generate desc.json.
+ local -r out_file="desc_${1}.json"
+ gn desc "${OUT_PATH}" --format=json --all-toolchains "//*" > "${out_file}"
+}
+
+gn_desc x86
+gn_desc x64
+gn_desc arm
+gn_desc arm64
+
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index 9d732e5..3d709e5 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -20,6 +20,7 @@
import logging as log
import os
import re
+import collections
BUILDFLAGS_TARGET = '//gn:gen_buildflags'
GEN_VERSION_TARGET = '//src/base:version_gen_h'
@@ -77,7 +78,7 @@
return name
def _is_java_source(src):
- return os.path.splitext(src)[1] == '.java' and not src.startswith("//out/test/gen/")
+ return os.path.splitext(src)[1] == '.java' and not src.startswith("//out/")
def is_java_action(script, outputs):
return (script != "" and script not in JAVA_BANNED_SCRIPTS) and any(
@@ -260,8 +261,8 @@
self.source_sets = {}
self.actions = {}
self.proto_libs = {}
- self.java_sources = set()
- self.java_actions = set()
+ self.java_sources = collections.defaultdict(set)
+ self.java_actions = collections.defaultdict(set)
def _get_response_file_contents(self, action_desc):
# response_file_contents are formatted as:
@@ -307,7 +308,7 @@
return self.all_targets[label_without_toolchain(gn_target_name)]
- def parse_gn_desc(self, gn_desc, gn_target_name, is_java_target = False):
+ def parse_gn_desc(self, gn_desc, gn_target_name, java_group_name=None):
"""Parses a gn desc tree and resolves all target dependencies.
It bubbles up variables from source_set dependencies as described in the
@@ -320,7 +321,8 @@
type_ = desc['type']
arch = self._get_arch(desc['toolchain'])
- is_java_target |= self._is_java_group(type_, target_name)
+ if self._is_java_group(type_, target_name):
+ java_group_name = target_name
target = self.all_targets.get(target_name)
if target is None:
@@ -399,7 +401,7 @@
# Recurse in dependencies.
for gn_dep_name in desc.get('deps', []):
- dep = self.parse_gn_desc(gn_desc, gn_dep_name, is_java_target)
+ dep = self.parse_gn_desc(gn_desc, gn_dep_name, java_group_name)
if dep.type == 'proto_library':
target.proto_deps.add(dep.name)
target.transitive_proto_deps.add(dep.name)
@@ -410,6 +412,8 @@
target.arch[arch].source_set_deps.update(dep.arch[arch].source_set_deps)
# flatten source_set deps
if target.is_linker_unit_type():
+ # This ensure that all transitive source set dependencies are
+ # propagated upward to the linker units.
target.arch[arch].deps.update(target.arch[arch].source_set_deps)
elif dep.type == 'group':
target.update(dep, arch) # Bubble up groups's cflags/ldflags etc.
@@ -447,15 +451,15 @@
if dep.name.endswith('__compile_java'):
log.debug('Adding java sources for %s', dep.name)
java_srcs = [src for src in dep.inputs if _is_java_source(src)]
- self.java_sources.update(java_srcs)
+ self.java_sources[java_group_name].update(java_srcs)
if dep.type in ["action"] and target.type == "java_group":
# //base:base_java_aidl generates srcjar from .aidl files. But java_library in soong can
# directly have .aidl files in srcs. So adding .aidl files to the java_sources.
# TODO: Find a better way/place to do this.
if dep.name == '//base:base_java_aidl':
- self.java_sources.update(dep.arch[arch].sources)
+ self.java_sources[java_group_name].update(dep.arch[arch].sources)
else:
- self.java_actions.add(dep.name)
+ self.java_actions[java_group_name].add(dep.name)
return target
def get_proto_exports(self, proto_desc):