Merge changes I2e05b016,I8ff36f37,I302bbe8d
* changes:
cronet import: let script create upstream-import branch
cronet import: add flag to set --force
cronet import: make last_rev optional
diff --git a/Cronet/tests/common/Android.bp b/Cronet/tests/common/Android.bp
index f8bdb08..939a81c 100644
--- a/Cronet/tests/common/Android.bp
+++ b/Cronet/tests/common/Android.bp
@@ -27,7 +27,9 @@
android_test {
name: "NetHttpCoverageTests",
defaults: ["CronetTestJavaDefaults"],
+ enforce_default_target_sdk_version: true,
sdk_version: "test_current",
+ min_sdk_version: "30",
test_suites: ["general-tests", "mts-tethering"],
static_libs: [
"modules-utils-native-coverage-listener",
diff --git a/Cronet/tests/common/AndroidManifest.xml b/Cronet/tests/common/AndroidManifest.xml
index efe880c..b00fc90 100644
--- a/Cronet/tests/common/AndroidManifest.xml
+++ b/Cronet/tests/common/AndroidManifest.xml
@@ -18,6 +18,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.android.net.http.tests.coverage">
+
<!-- NetHttpCoverageTests combines CtsNetHttpTestCases and NetHttpTests targets,
so permissions and others are declared in their respective manifests -->
<application tools:replace="android:label"
diff --git a/Cronet/tests/common/AndroidTest.xml b/Cronet/tests/common/AndroidTest.xml
index ca298dd..2ac418f 100644
--- a/Cronet/tests/common/AndroidTest.xml
+++ b/Cronet/tests/common/AndroidTest.xml
@@ -20,8 +20,11 @@
</target_preparer>
<option name="test-tag" value="NetHttpCoverageTests" />
<!-- Tethering/Connectivity is a SDK 30+ module -->
+ <!-- TODO Switch back to Sdk30 when b/270049141 is fixed -->
<object type="module_controller"
- class="com.android.tradefed.testtype.suite.module.Sdk30ModuleController" />
+ class="com.android.tradefed.testtype.suite.module.Sdk31ModuleController" />
+ <option name="config-descriptor:metadata" key="mainline-param"
+ value="CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex" />
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.net.http.tests.coverage" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
diff --git a/Cronet/tests/cts/Android.bp b/Cronet/tests/cts/Android.bp
index 945b220..d969b54 100644
--- a/Cronet/tests/cts/Android.bp
+++ b/Cronet/tests/cts/Android.bp
@@ -29,6 +29,10 @@
java_defaults {
name: "CronetTestJavaDefaultsEnabled",
enabled: true,
+ // TODO(danstahr): move to unconditional static_libs once the T branch is abandoned
+ static_libs: [
+ "truth",
+ ],
}
java_defaults {
@@ -43,7 +47,12 @@
android_library {
name: "CtsNetHttpTestsLib",
+ defaults: [
+ "cts_defaults",
+ "CronetTestJavaDefaults",
+ ],
sdk_version: "test_current",
+ min_sdk_version: "30",
srcs: [
"src/**/*.java",
"src/**/*.kt",
@@ -62,6 +71,7 @@
"framework-tethering",
"org.apache.http.legacy",
],
+ lint: { test: true }
}
android_test {
diff --git a/Cronet/tests/cts/src/android/net/http/cts/BidirectionalStreamTest.kt b/Cronet/tests/cts/src/android/net/http/cts/BidirectionalStreamTest.kt
new file mode 100644
index 0000000..bead1f8
--- /dev/null
+++ b/Cronet/tests/cts/src/android/net/http/cts/BidirectionalStreamTest.kt
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2023 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 android.net.http.cts
+
+import android.content.Context
+import android.net.http.BidirectionalStream
+import android.net.http.HttpEngine
+import android.net.http.cts.util.TestBidirectionalStreamCallback
+import android.net.http.cts.util.TestBidirectionalStreamCallback.ResponseStep
+import android.net.http.cts.util.assumeOKStatusCode
+import android.net.http.cts.util.skipIfNoInternetConnection
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import kotlin.test.Test
+import kotlin.test.assertEquals
+import org.hamcrest.MatcherAssert
+import org.hamcrest.Matchers
+import org.junit.After
+import org.junit.Before
+import org.junit.runner.RunWith
+
+private const val URL = "https://source.android.com"
+
+/**
+ * This tests uses a non-hermetic server. Instead of asserting, assume the next callback. This way,
+ * if the request were to fail, the test would just be skipped instead of failing.
+ */
+@RunWith(AndroidJUnit4::class)
+class BidirectionalStreamTest {
+ private val context: Context = ApplicationProvider.getApplicationContext()
+ private val callback = TestBidirectionalStreamCallback()
+ private val httpEngine = HttpEngine.Builder(context).build()
+ private var stream: BidirectionalStream? = null
+
+ @Before
+ fun setUp() {
+ skipIfNoInternetConnection(context)
+ }
+
+ @After
+ @Throws(Exception::class)
+ fun tearDown() {
+ // cancel active requests to enable engine shutdown.
+ stream?.let {
+ it.cancel()
+ callback.blockForDone()
+ }
+ httpEngine.shutdown()
+ }
+
+ private fun createBidirectionalStreamBuilder(url: String): BidirectionalStream.Builder {
+ return httpEngine.newBidirectionalStreamBuilder(url, callback.executor, callback)
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testBidirectionalStream_GetStream_CompletesSuccessfully() {
+ stream = createBidirectionalStreamBuilder(URL).setHttpMethod("GET").build()
+ stream!!.start()
+ callback.assumeCallback(ResponseStep.ON_SUCCEEDED)
+ val info = callback.mResponseInfo
+ assumeOKStatusCode(info)
+ MatcherAssert.assertThat(
+ "Received byte count must be > 0", info.receivedByteCount, Matchers.greaterThan(0L))
+ assertEquals("h2", info.negotiatedProtocol)
+ }
+}
diff --git a/Cronet/tests/cts/src/android/net/http/cts/HttpEngineTest.java b/Cronet/tests/cts/src/android/net/http/cts/HttpEngineTest.java
index 45d27bf..34baedf 100644
--- a/Cronet/tests/cts/src/android/net/http/cts/HttpEngineTest.java
+++ b/Cronet/tests/cts/src/android/net/http/cts/HttpEngineTest.java
@@ -23,6 +23,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import android.content.Context;
@@ -49,12 +50,13 @@
private TestUrlRequestCallback mCallback;
private UrlRequest mRequest;
private HttpEngine mEngine;
+ private Context mContext;
@Before
public void setUp() throws Exception {
- Context context = ApplicationProvider.getApplicationContext();
- skipIfNoInternetConnection(context);
- mEngineBuilder = new HttpEngine.Builder(context);
+ mContext = ApplicationProvider.getApplicationContext();
+ skipIfNoInternetConnection(mContext);
+ mEngineBuilder = new HttpEngine.Builder(mContext);
mCallback = new TestUrlRequestCallback();
}
@@ -77,7 +79,7 @@
public void testHttpEngine_Default() throws Exception {
mEngine = mEngineBuilder.build();
UrlRequest.Builder builder =
- mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor());
+ mEngine.newUrlRequestBuilder(URL, mCallback.getExecutor(), mCallback);
mRequest = builder.build();
mRequest.start();
@@ -90,10 +92,42 @@
}
@Test
+ public void testHttpEngine_EnableHttpCache() {
+ // We need a server which sets cache-control != no-cache.
+ String url = "https://www.example.com";
+ mEngine =
+ mEngineBuilder
+ .setStoragePath(mContext.getApplicationInfo().dataDir)
+ .setEnableHttpCache(HttpEngine.Builder.HTTP_CACHE_DISK,
+ /* maxSize */ 100 * 1024)
+ .build();
+
+ UrlRequest.Builder builder =
+ mEngine.newUrlRequestBuilder(url, mCallback, mCallback.getExecutor());
+ mRequest = builder.build();
+ mRequest.start();
+ // This tests uses a non-hermetic server. Instead of asserting, assume the next callback.
+ // This way, if the request were to fail, the test would just be skipped instead of failing.
+ mCallback.assumeCallback(ResponseStep.ON_SUCCEEDED);
+ UrlResponseInfo info = mCallback.mResponseInfo;
+ assumeOKStatusCode(info);
+ assertFalse(info.wasCached());
+
+ mCallback = new TestUrlRequestCallback();
+ builder = mEngine.newUrlRequestBuilder(url, mCallback, mCallback.getExecutor());
+ mRequest = builder.build();
+ mRequest.start();
+ mCallback.assumeCallback(ResponseStep.ON_SUCCEEDED);
+ info = mCallback.mResponseInfo;
+ assertOKStatusCode(info);
+ assertTrue(info.wasCached());
+ }
+
+ @Test
public void testHttpEngine_DisableHttp2() throws Exception {
mEngine = mEngineBuilder.setEnableHttp2(false).build();
UrlRequest.Builder builder =
- mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor());
+ mEngine.newUrlRequestBuilder(URL, mCallback.getExecutor(), mCallback);
mRequest = builder.build();
mRequest.start();
@@ -106,6 +140,36 @@
}
@Test
+ public void testHttpEngine_EnablePublicKeyPinningBypassForLocalTrustAnchors() {
+ // For known hosts, requests should succeed whether we're bypassing the local trust anchor
+ // or not.
+ mEngine = mEngineBuilder.setEnablePublicKeyPinningBypassForLocalTrustAnchors(false).build();
+ UrlRequest.Builder builder =
+ mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor());
+ mRequest = builder.build();
+ mRequest.start();
+ mCallback.expectCallback(ResponseStep.ON_SUCCEEDED);
+
+ mEngine.shutdown();
+ mEngine = mEngineBuilder.setEnablePublicKeyPinningBypassForLocalTrustAnchors(true).build();
+ mCallback = new TestUrlRequestCallback();
+ builder = mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor());
+ mRequest = builder.build();
+ mRequest.start();
+ mCallback.expectCallback(ResponseStep.ON_SUCCEEDED);
+
+ // TODO(b/270918920): We should also test with a certificate not present in the device's
+ // trusted store.
+ // This requires either:
+ // * Mocking the underlying CertificateVerifier.
+ // * Or, having the server return a root certificate not present in the device's trusted
+ // store.
+ // The former doesn't make sense for a CTS test as it would depend on the underlying
+ // implementation. The latter is something we should support once we write a proper test
+ // server.
+ }
+
+ @Test
public void testHttpEngine_EnableQuic() throws Exception {
mEngine = mEngineBuilder.setEnableQuic(true).addQuicHint(HOST, 443, 443).build();
// The hint doesn't guarantee that QUIC will win the race, just that it will race TCP.
@@ -114,7 +178,7 @@
for (int i = 0; i < 5; i++) {
mCallback = new TestUrlRequestCallback();
UrlRequest.Builder builder =
- mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor());
+ mEngine.newUrlRequestBuilder(URL, mCallback.getExecutor(), mCallback);
mRequest = builder.build();
mRequest.start();
diff --git a/Cronet/tests/cts/src/android/net/http/cts/QuicOptionsTest.kt b/Cronet/tests/cts/src/android/net/http/cts/QuicOptionsTest.kt
new file mode 100644
index 0000000..1888962
--- /dev/null
+++ b/Cronet/tests/cts/src/android/net/http/cts/QuicOptionsTest.kt
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2023 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 android.net.http.cts
+
+import android.net.http.QuicOptions
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class QuicOptionsTest {
+ @Test
+ fun testQuicOptions_defaultValues() {
+ val quicOptions = QuicOptions.Builder().build()
+ assertThat(quicOptions.quicHostAllowlist).isEmpty()
+ assertThat(quicOptions.handshakeUserAgent).isNull()
+ // TODO(danstahr): idleConnectionTimeout getter should be public
+ // assertThat(quicOptions.idleConnectionTimeout).isNull()
+ assertThat(quicOptions.inMemoryServerConfigsCacheSize).isNull()
+ }
+
+ @Test
+ fun testQuicOptions_quicHostAllowlist_returnsAddedValues() {
+ val quicOptions = QuicOptions.Builder()
+ .addAllowedQuicHost("foo")
+ .addAllowedQuicHost("bar")
+ .addAllowedQuicHost("foo")
+ .addAllowedQuicHost("baz")
+ .build()
+ assertThat(quicOptions.quicHostAllowlist)
+ .containsExactly("foo", "bar", "baz")
+ .inOrder()
+ }
+
+ // TODO(danstahr): idleConnectionTimeout getter should be public
+ /*
+ @Test
+ fun testQuicOptions_idleConnectionTimeout_returnsSetValue() {
+ val timeout = Duration.ofMinutes(10)
+ val quicOptions = QuicOptions.Builder()
+ .setIdleConnectionTimeout(timeout)
+ .build()
+ assertThat(quicOptions.idleConnectionTimeout)
+ .isEqualTo(timeout)
+ }
+ */
+
+ @Test
+ fun testQuicOptions_inMemoryServerConfigsCacheSize_returnsSetValue() {
+ val quicOptions = QuicOptions.Builder()
+ .setInMemoryServerConfigsCacheSize(42)
+ .build()
+ assertThat(quicOptions.inMemoryServerConfigsCacheSize)
+ .isEqualTo(42)
+ }
+}
diff --git a/Cronet/tests/cts/src/android/net/http/cts/UrlRequestTest.java b/Cronet/tests/cts/src/android/net/http/cts/UrlRequestTest.java
index 2bec9e6..735bdc6 100644
--- a/Cronet/tests/cts/src/android/net/http/cts/UrlRequestTest.java
+++ b/Cronet/tests/cts/src/android/net/http/cts/UrlRequestTest.java
@@ -70,7 +70,7 @@
}
private UrlRequest.Builder createUrlRequestBuilder(String url) {
- return mHttpEngine.newUrlRequestBuilder(url, mCallback, mCallback.getExecutor());
+ return mHttpEngine.newUrlRequestBuilder(url, mCallback.getExecutor(), mCallback);
}
@Test
@@ -113,8 +113,9 @@
String testData = "test";
UrlRequest.Builder builder = createUrlRequestBuilder(mTestServer.getEchoBodyUrl());
- TestUploadDataProvider dataProvider = new TestUploadDataProvider(
- TestUploadDataProvider.SuccessCallbackMode.SYNC, mCallback.getExecutor());
+ TestUploadDataProvider dataProvider =
+ new TestUploadDataProvider(
+ TestUploadDataProvider.SuccessCallbackMode.SYNC, mCallback.getExecutor());
dataProvider.addRead(testData.getBytes());
builder.setUploadDataProvider(dataProvider, mCallback.getExecutor());
builder.addHeader("Content-Type", "text/html");
diff --git a/Cronet/tests/cts/src/android/net/http/cts/util/TestBidirectionalStreamCallback.java b/Cronet/tests/cts/src/android/net/http/cts/util/TestBidirectionalStreamCallback.java
new file mode 100644
index 0000000..e82b24d
--- /dev/null
+++ b/Cronet/tests/cts/src/android/net/http/cts/util/TestBidirectionalStreamCallback.java
@@ -0,0 +1,484 @@
+/*
+ * Copyright (C) 2023 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 android.net.http.cts.util;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeThat;
+import static org.junit.Assume.assumeTrue;
+
+import android.net.http.BidirectionalStream;
+import android.net.http.HttpException;
+import android.net.http.UrlResponseInfo;
+import android.os.ConditionVariable;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+
+/**
+ * Callback that tracks information from different callbacks and has a method to block thread until
+ * the stream completes on another thread. Allows to cancel, block stream or throw an exception from
+ * an arbitrary step.
+ */
+public class TestBidirectionalStreamCallback extends BidirectionalStream.Callback {
+ private static final int TIMEOUT_MS = 12_000;
+ public UrlResponseInfo mResponseInfo;
+ public HttpException mError;
+
+ public ResponseStep mResponseStep = ResponseStep.NOTHING;
+
+ public boolean mOnErrorCalled;
+ public boolean mOnCanceledCalled;
+
+ public int mHttpResponseDataLength;
+ public String mResponseAsString = "";
+
+ public UrlResponseInfo.HeaderBlock mTrailers;
+
+ private static final int READ_BUFFER_SIZE = 32 * 1024;
+
+ // When false, the consumer is responsible for all calls into the stream
+ // that advance it.
+ private boolean mAutoAdvance = true;
+
+ // Conditionally fail on certain steps.
+ private FailureType mFailureType = FailureType.NONE;
+ private ResponseStep mFailureStep = ResponseStep.NOTHING;
+
+ // Signals when the stream is done either successfully or not.
+ private final ConditionVariable mDone = new ConditionVariable();
+
+ // Signaled on each step when mAutoAdvance is false.
+ private final ConditionVariable mReadStepBlock = new ConditionVariable();
+ private final ConditionVariable mWriteStepBlock = new ConditionVariable();
+
+ // Executor Service for Cronet callbacks.
+ private final ExecutorService mExecutorService =
+ Executors.newSingleThreadExecutor(new ExecutorThreadFactory());
+ private Thread mExecutorThread;
+
+ // position() of ByteBuffer prior to read() call.
+ private int mBufferPositionBeforeRead;
+
+ // Data to write.
+ private final ArrayList<WriteBuffer> mWriteBuffers = new ArrayList<WriteBuffer>();
+
+ // Buffers that we yet to receive the corresponding onWriteCompleted callback.
+ private final ArrayList<WriteBuffer> mWriteBuffersToBeAcked = new ArrayList<WriteBuffer>();
+
+ // Whether to use a direct executor.
+ private final boolean mUseDirectExecutor;
+ private final DirectExecutor mDirectExecutor;
+
+ private class ExecutorThreadFactory implements ThreadFactory {
+ @Override
+ public Thread newThread(Runnable r) {
+ mExecutorThread = new Thread(r);
+ return mExecutorThread;
+ }
+ }
+
+ private static class WriteBuffer {
+ final ByteBuffer mBuffer;
+ final boolean mFlush;
+
+ WriteBuffer(ByteBuffer buffer, boolean flush) {
+ mBuffer = buffer;
+ mFlush = flush;
+ }
+ }
+
+ private static class DirectExecutor implements Executor {
+ @Override
+ public void execute(Runnable task) {
+ task.run();
+ }
+ }
+
+ public enum ResponseStep {
+ NOTHING,
+ ON_STREAM_READY,
+ ON_RESPONSE_STARTED,
+ ON_READ_COMPLETED,
+ ON_WRITE_COMPLETED,
+ ON_TRAILERS,
+ ON_CANCELED,
+ ON_FAILED,
+ ON_SUCCEEDED,
+ }
+
+ public enum FailureType {
+ NONE,
+ CANCEL_SYNC,
+ CANCEL_ASYNC,
+ // Same as above, but continues to advance the stream after posting
+ // the cancellation task.
+ CANCEL_ASYNC_WITHOUT_PAUSE,
+ THROW_SYNC
+ }
+
+ private boolean isTerminalCallback(ResponseStep step) {
+ switch (step) {
+ case ON_SUCCEEDED:
+ case ON_CANCELED:
+ case ON_FAILED:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ public TestBidirectionalStreamCallback() {
+ mUseDirectExecutor = false;
+ mDirectExecutor = null;
+ }
+
+ public TestBidirectionalStreamCallback(boolean useDirectExecutor) {
+ mUseDirectExecutor = useDirectExecutor;
+ mDirectExecutor = new DirectExecutor();
+ }
+
+ public void setAutoAdvance(boolean autoAdvance) {
+ mAutoAdvance = autoAdvance;
+ }
+
+ public void setFailure(FailureType failureType, ResponseStep failureStep) {
+ mFailureStep = failureStep;
+ mFailureType = failureType;
+ }
+
+ public boolean blockForDone() {
+ return mDone.block(TIMEOUT_MS);
+ }
+
+ /**
+ * Waits for a terminal callback to complete execution before failing if the callback is not the
+ * expected one
+ *
+ * @param expectedStep the expected callback step
+ */
+ public void expectCallback(ResponseStep expectedStep) {
+ if (isTerminalCallback(expectedStep)) {
+ assertTrue(String.format(
+ "Request timed out. Expected %s callback. Current callback is %s",
+ expectedStep, mResponseStep),
+ blockForDone());
+ }
+ assertSame(expectedStep, mResponseStep);
+ }
+
+ /**
+ * Waits for a terminal callback to complete execution before skipping the test if the callback
+ * is not the expected one
+ *
+ * @param expectedStep the expected callback step
+ */
+ public void assumeCallback(ResponseStep expectedStep) {
+ if (isTerminalCallback(expectedStep)) {
+ assumeTrue(
+ String.format(
+ "Request timed out. Expected %s callback. Current callback is %s",
+ expectedStep, mResponseStep),
+ blockForDone());
+ }
+ assumeThat(expectedStep, equalTo(mResponseStep));
+ }
+
+ public void waitForNextReadStep() {
+ mReadStepBlock.block();
+ mReadStepBlock.close();
+ }
+
+ public void waitForNextWriteStep() {
+ mWriteStepBlock.block();
+ mWriteStepBlock.close();
+ }
+
+ public Executor getExecutor() {
+ if (mUseDirectExecutor) {
+ return mDirectExecutor;
+ }
+ return mExecutorService;
+ }
+
+ public void shutdownExecutor() {
+ if (mUseDirectExecutor) {
+ throw new UnsupportedOperationException("DirectExecutor doesn't support shutdown");
+ }
+ mExecutorService.shutdown();
+ }
+
+ public void addWriteData(byte[] data) {
+ addWriteData(data, true);
+ }
+
+ public void addWriteData(byte[] data, boolean flush) {
+ ByteBuffer writeBuffer = ByteBuffer.allocateDirect(data.length);
+ writeBuffer.put(data);
+ writeBuffer.flip();
+ mWriteBuffers.add(new WriteBuffer(writeBuffer, flush));
+ mWriteBuffersToBeAcked.add(new WriteBuffer(writeBuffer, flush));
+ }
+
+ @Override
+ public void onStreamReady(BidirectionalStream stream) {
+ checkOnValidThread();
+ assertFalse(stream.isDone());
+ assertEquals(ResponseStep.NOTHING, mResponseStep);
+ assertNull(mError);
+ mResponseStep = ResponseStep.ON_STREAM_READY;
+ if (maybeThrowCancelOrPause(stream, mWriteStepBlock)) {
+ return;
+ }
+ startNextWrite(stream);
+ }
+
+ @Override
+ public void onResponseHeadersReceived(BidirectionalStream stream, UrlResponseInfo info) {
+ checkOnValidThread();
+ assertFalse(stream.isDone());
+ assertTrue(
+ mResponseStep == ResponseStep.NOTHING
+ || mResponseStep == ResponseStep.ON_STREAM_READY
+ || mResponseStep == ResponseStep.ON_WRITE_COMPLETED);
+ assertNull(mError);
+
+ mResponseStep = ResponseStep.ON_RESPONSE_STARTED;
+ mResponseInfo = info;
+ if (maybeThrowCancelOrPause(stream, mReadStepBlock)) {
+ return;
+ }
+ startNextRead(stream);
+ }
+
+ @Override
+ public void onReadCompleted(
+ BidirectionalStream stream,
+ UrlResponseInfo info,
+ ByteBuffer byteBuffer,
+ boolean endOfStream) {
+ checkOnValidThread();
+ assertFalse(stream.isDone());
+ assertTrue(
+ mResponseStep == ResponseStep.ON_RESPONSE_STARTED
+ || mResponseStep == ResponseStep.ON_READ_COMPLETED
+ || mResponseStep == ResponseStep.ON_WRITE_COMPLETED
+ || mResponseStep == ResponseStep.ON_TRAILERS);
+ assertNull(mError);
+
+ mResponseStep = ResponseStep.ON_READ_COMPLETED;
+ mResponseInfo = info;
+
+ final int bytesRead = byteBuffer.position() - mBufferPositionBeforeRead;
+ mHttpResponseDataLength += bytesRead;
+ final byte[] lastDataReceivedAsBytes = new byte[bytesRead];
+ // Rewind byteBuffer.position() to pre-read() position.
+ byteBuffer.position(mBufferPositionBeforeRead);
+ // This restores byteBuffer.position() to its value on entrance to
+ // this function.
+ byteBuffer.get(lastDataReceivedAsBytes);
+
+ mResponseAsString += new String(lastDataReceivedAsBytes);
+
+ if (maybeThrowCancelOrPause(stream, mReadStepBlock)) {
+ return;
+ }
+ // Do not read if EOF has been reached.
+ if (!endOfStream) {
+ startNextRead(stream);
+ }
+ }
+
+ @Override
+ public void onWriteCompleted(
+ BidirectionalStream stream,
+ UrlResponseInfo info,
+ ByteBuffer buffer,
+ boolean endOfStream) {
+ checkOnValidThread();
+ assertFalse(stream.isDone());
+ assertNull(mError);
+ mResponseStep = ResponseStep.ON_WRITE_COMPLETED;
+ mResponseInfo = info;
+ if (!mWriteBuffersToBeAcked.isEmpty()) {
+ assertEquals(buffer, mWriteBuffersToBeAcked.get(0).mBuffer);
+ mWriteBuffersToBeAcked.remove(0);
+ }
+ if (maybeThrowCancelOrPause(stream, mWriteStepBlock)) {
+ return;
+ }
+ startNextWrite(stream);
+ }
+
+ @Override
+ public void onResponseTrailersReceived(
+ BidirectionalStream stream,
+ UrlResponseInfo info,
+ UrlResponseInfo.HeaderBlock trailers) {
+ checkOnValidThread();
+ assertFalse(stream.isDone());
+ assertNull(mError);
+ mResponseStep = ResponseStep.ON_TRAILERS;
+ mResponseInfo = info;
+ mTrailers = trailers;
+ if (maybeThrowCancelOrPause(stream, mReadStepBlock)) {
+ return;
+ }
+ }
+
+ @Override
+ public void onSucceeded(BidirectionalStream stream, UrlResponseInfo info) {
+ checkOnValidThread();
+ assertTrue(stream.isDone());
+ assertTrue(
+ mResponseStep == ResponseStep.ON_RESPONSE_STARTED
+ || mResponseStep == ResponseStep.ON_READ_COMPLETED
+ || mResponseStep == ResponseStep.ON_WRITE_COMPLETED
+ || mResponseStep == ResponseStep.ON_TRAILERS);
+ assertFalse(mOnErrorCalled);
+ assertFalse(mOnCanceledCalled);
+ assertNull(mError);
+ assertEquals(0, mWriteBuffers.size());
+ assertEquals(0, mWriteBuffersToBeAcked.size());
+
+ mResponseStep = ResponseStep.ON_SUCCEEDED;
+ mResponseInfo = info;
+ openDone();
+ maybeThrowCancelOrPause(stream, mReadStepBlock);
+ }
+
+ @Override
+ public void onFailed(BidirectionalStream stream, UrlResponseInfo info, HttpException error) {
+ checkOnValidThread();
+ assertTrue(stream.isDone());
+ // Shouldn't happen after success.
+ assertTrue(mResponseStep != ResponseStep.ON_SUCCEEDED);
+ // Should happen at most once for a single stream.
+ assertFalse(mOnErrorCalled);
+ assertFalse(mOnCanceledCalled);
+ assertNull(mError);
+ mResponseStep = ResponseStep.ON_FAILED;
+ mResponseInfo = info;
+
+ mOnErrorCalled = true;
+ mError = error;
+ openDone();
+ maybeThrowCancelOrPause(stream, mReadStepBlock);
+ }
+
+ @Override
+ public void onCanceled(BidirectionalStream stream, UrlResponseInfo info) {
+ checkOnValidThread();
+ assertTrue(stream.isDone());
+ // Should happen at most once for a single stream.
+ assertFalse(mOnCanceledCalled);
+ assertFalse(mOnErrorCalled);
+ assertNull(mError);
+ mResponseStep = ResponseStep.ON_CANCELED;
+ mResponseInfo = info;
+
+ mOnCanceledCalled = true;
+ openDone();
+ maybeThrowCancelOrPause(stream, mReadStepBlock);
+ }
+
+ public void startNextRead(BidirectionalStream stream) {
+ startNextRead(stream, ByteBuffer.allocateDirect(READ_BUFFER_SIZE));
+ }
+
+ public void startNextRead(BidirectionalStream stream, ByteBuffer buffer) {
+ mBufferPositionBeforeRead = buffer.position();
+ stream.read(buffer);
+ }
+
+ public void startNextWrite(BidirectionalStream stream) {
+ if (!mWriteBuffers.isEmpty()) {
+ Iterator<WriteBuffer> iterator = mWriteBuffers.iterator();
+ while (iterator.hasNext()) {
+ WriteBuffer b = iterator.next();
+ stream.write(b.mBuffer, !iterator.hasNext());
+ iterator.remove();
+ if (b.mFlush) {
+ stream.flush();
+ break;
+ }
+ }
+ }
+ }
+
+ public boolean isDone() {
+ // It's not mentioned by the Android docs, but block(0) seems to block
+ // indefinitely, so have to block for one millisecond to get state
+ // without blocking.
+ return mDone.block(1);
+ }
+
+ /** Returns the number of pending Writes. */
+ public int numPendingWrites() {
+ return mWriteBuffers.size();
+ }
+
+ protected void openDone() {
+ mDone.open();
+ }
+
+ /** Returns {@code false} if the callback should continue to advance the stream. */
+ private boolean maybeThrowCancelOrPause(
+ final BidirectionalStream stream, ConditionVariable stepBlock) {
+ if (mResponseStep != mFailureStep || mFailureType == FailureType.NONE) {
+ if (!mAutoAdvance) {
+ stepBlock.open();
+ return true;
+ }
+ return false;
+ }
+
+ if (mFailureType == FailureType.THROW_SYNC) {
+ throw new IllegalStateException("Callback Exception.");
+ }
+ Runnable task =
+ new Runnable() {
+ @Override
+ public void run() {
+ stream.cancel();
+ }
+ };
+ if (mFailureType == FailureType.CANCEL_ASYNC
+ || mFailureType == FailureType.CANCEL_ASYNC_WITHOUT_PAUSE) {
+ getExecutor().execute(task);
+ } else {
+ task.run();
+ }
+ return mFailureType != FailureType.CANCEL_ASYNC_WITHOUT_PAUSE;
+ }
+
+ /** Checks whether callback methods are invoked on the correct thread. */
+ private void checkOnValidThread() {
+ if (!mUseDirectExecutor) {
+ assertEquals(mExecutorThread, Thread.currentThread());
+ }
+ }
+}
diff --git a/Cronet/tests/cts/src/android/net/http/cts/util/TestStatusListener.kt b/Cronet/tests/cts/src/android/net/http/cts/util/TestStatusListener.kt
index e526c7d..3a4486f 100644
--- a/Cronet/tests/cts/src/android/net/http/cts/util/TestStatusListener.kt
+++ b/Cronet/tests/cts/src/android/net/http/cts/util/TestStatusListener.kt
@@ -24,7 +24,7 @@
private const val TIMEOUT_MS = 12000L
/** Test status listener for requests */
-class TestStatusListener : StatusListener() {
+class TestStatusListener : StatusListener {
private val statusFuture = CompletableFuture<Int>()
override fun onStatus(status: Int) {
diff --git a/Cronet/tests/mts/Android.bp b/Cronet/tests/mts/Android.bp
index 1cabd63..03d163c 100644
--- a/Cronet/tests/mts/Android.bp
+++ b/Cronet/tests/mts/Android.bp
@@ -20,6 +20,8 @@
android_library {
name: "NetHttpTestsLibPreJarJar",
srcs: [":cronet_aml_javatests_sources"],
+ sdk_version: "test_current",
+ min_sdk_version: "30",
static_libs: [
"androidx.test.ext.junit",
"androidx.test.rules",
@@ -28,7 +30,8 @@
libs: [
"android.test.base",
"framework-tethering-pre-jarjar",
- ]
+ ],
+ lint: { test: true }
}
android_test {
diff --git a/Cronet/tests/mts/AndroidTest.xml b/Cronet/tests/mts/AndroidTest.xml
index 8cb549e..0d780a1 100644
--- a/Cronet/tests/mts/AndroidTest.xml
+++ b/Cronet/tests/mts/AndroidTest.xml
@@ -16,8 +16,9 @@
-->
<configuration description="Runs NetHttp Mainline Tests.">
<!-- Only run tests if the device under test is SDK version 30 or above. -->
+ <!-- TODO Switch back to Sdk30 when b/270049141 is fixed -->
<object type="module_controller"
- class="com.android.tradefed.testtype.suite.module.Sdk30ModuleController" />
+ class="com.android.tradefed.testtype.suite.module.Sdk31ModuleController" />
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="test-file-name" value="NetHttpTests.apk" />
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 4d3ecdf..70c5f85 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -213,6 +213,9 @@
},
{
"name": "libnetworkstats_test[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]"
+ },
+ {
+ "name": "NetHttpCoverageTests[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]"
}
],
"mainline-postsubmit": [
diff --git a/Tethering/common/TetheringLib/cronet_enabled/api/current.txt b/Tethering/common/TetheringLib/cronet_enabled/api/current.txt
index 777138d..e954074 100644
--- a/Tethering/common/TetheringLib/cronet_enabled/api/current.txt
+++ b/Tethering/common/TetheringLib/cronet_enabled/api/current.txt
@@ -49,7 +49,7 @@
method @Nullable public Boolean getEnablePathDegradationMigration();
}
- public static class ConnectionMigrationOptions.Builder {
+ public static final class ConnectionMigrationOptions.Builder {
ctor public ConnectionMigrationOptions.Builder();
method public android.net.http.ConnectionMigrationOptions build();
method public android.net.http.ConnectionMigrationOptions.Builder setAllowNonDefaultNetworkUsage(boolean);
@@ -95,10 +95,11 @@
public abstract class HttpEngine {
method public void bindToNetwork(@Nullable android.net.Network);
- method public abstract java.net.URLStreamHandlerFactory createURLStreamHandlerFactory();
+ method public abstract java.net.URLStreamHandlerFactory createUrlStreamHandlerFactory();
method public static String getVersionString();
- method public abstract android.net.http.BidirectionalStream.Builder newBidirectionalStreamBuilder(String, android.net.http.BidirectionalStream.Callback, java.util.concurrent.Executor);
- method public abstract android.net.http.UrlRequest.Builder newUrlRequestBuilder(String, android.net.http.UrlRequest.Callback, java.util.concurrent.Executor);
+ method public abstract android.net.http.BidirectionalStream.Builder newBidirectionalStreamBuilder(String, java.util.concurrent.Executor, android.net.http.BidirectionalStream.Callback);
+ method public abstract android.net.http.UrlRequest.Builder newUrlRequestBuilder(String, java.util.concurrent.Executor, android.net.http.UrlRequest.Callback);
+ method public android.net.http.UrlRequest.Builder newUrlRequestBuilder(String, android.net.http.UrlRequest.Callback, java.util.concurrent.Executor);
method public abstract java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException;
method public abstract void shutdown();
}
@@ -126,7 +127,7 @@
}
public class HttpException extends java.io.IOException {
- ctor public HttpException(String, Throwable);
+ ctor public HttpException(@Nullable String, @Nullable Throwable);
}
public final class InlineExecutionProhibitedException extends java.util.concurrent.RejectedExecutionException {
@@ -134,7 +135,7 @@
}
public abstract class NetworkException extends android.net.http.HttpException {
- ctor public NetworkException(String, Throwable);
+ ctor public NetworkException(@Nullable String, @Nullable Throwable);
method public abstract int getErrorCode();
method public abstract boolean isImmediatelyRetryable();
field public static final int ERROR_ADDRESS_UNREACHABLE = 9; // 0x9
@@ -151,60 +152,60 @@
}
public abstract class QuicException extends android.net.http.NetworkException {
- ctor protected QuicException(String, Throwable);
+ ctor protected QuicException(@Nullable String, @Nullable Throwable);
}
public class QuicOptions {
method @Nullable public String getHandshakeUserAgent();
method @Nullable public Integer getInMemoryServerConfigsCacheSize();
- method public java.util.Set<java.lang.String> getQuicHostAllowlist();
+ method @NonNull public java.util.Set<java.lang.String> getQuicHostAllowlist();
}
- public static class QuicOptions.Builder {
+ public static final class QuicOptions.Builder {
ctor public QuicOptions.Builder();
- method public android.net.http.QuicOptions.Builder addAllowedQuicHost(String);
- method public android.net.http.QuicOptions build();
- method public android.net.http.QuicOptions.Builder setHandshakeUserAgent(String);
+ method @NonNull public android.net.http.QuicOptions.Builder addAllowedQuicHost(@NonNull String);
+ method @NonNull public android.net.http.QuicOptions build();
+ method @NonNull public android.net.http.QuicOptions.Builder setHandshakeUserAgent(@NonNull String);
method public android.net.http.QuicOptions.Builder setIdleConnectionTimeout(java.time.Duration);
- method public android.net.http.QuicOptions.Builder setInMemoryServerConfigsCacheSize(int);
+ method @NonNull public android.net.http.QuicOptions.Builder setInMemoryServerConfigsCacheSize(int);
}
public abstract class UploadDataProvider implements java.io.Closeable {
ctor public UploadDataProvider();
method public void close() throws java.io.IOException;
method public abstract long getLength() throws java.io.IOException;
- method public abstract void read(android.net.http.UploadDataSink, java.nio.ByteBuffer) throws java.io.IOException;
- method public abstract void rewind(android.net.http.UploadDataSink) throws java.io.IOException;
+ method public abstract void read(@NonNull android.net.http.UploadDataSink, @NonNull java.nio.ByteBuffer) throws java.io.IOException;
+ method public abstract void rewind(@NonNull android.net.http.UploadDataSink) throws java.io.IOException;
}
public abstract class UploadDataSink {
ctor public UploadDataSink();
- method public abstract void onReadError(Exception);
+ method public abstract void onReadError(@NonNull Exception);
method public abstract void onReadSucceeded(boolean);
- method public abstract void onRewindError(Exception);
+ method public abstract void onRewindError(@NonNull Exception);
method public abstract void onRewindSucceeded();
}
public abstract class UrlRequest {
method public abstract void cancel();
method public abstract void followRedirect();
- method public abstract void getStatus(android.net.http.UrlRequest.StatusListener);
+ method public abstract void getStatus(@NonNull android.net.http.UrlRequest.StatusListener);
method public abstract boolean isDone();
- method public abstract void read(java.nio.ByteBuffer);
+ method public abstract void read(@NonNull java.nio.ByteBuffer);
method public abstract void start();
}
public abstract static class UrlRequest.Builder {
- method public abstract android.net.http.UrlRequest.Builder addHeader(String, String);
- method public abstract android.net.http.UrlRequest.Builder allowDirectExecutor();
- method public abstract android.net.http.UrlRequest.Builder bindToNetwork(@Nullable android.net.Network);
- method public abstract android.net.http.UrlRequest build();
- method public abstract android.net.http.UrlRequest.Builder disableCache();
- method public abstract android.net.http.UrlRequest.Builder setHttpMethod(String);
- method public abstract android.net.http.UrlRequest.Builder setPriority(int);
+ method @NonNull public abstract android.net.http.UrlRequest.Builder addHeader(@NonNull String, @NonNull String);
+ method @NonNull public abstract android.net.http.UrlRequest.Builder bindToNetwork(@Nullable android.net.Network);
+ method @NonNull public abstract android.net.http.UrlRequest build();
+ method @NonNull public abstract android.net.http.UrlRequest.Builder setAllowDirectExecutor(boolean);
+ method @NonNull public abstract android.net.http.UrlRequest.Builder setDisableCache(boolean);
+ method @NonNull public abstract android.net.http.UrlRequest.Builder setHttpMethod(@NonNull String);
+ method @NonNull public abstract android.net.http.UrlRequest.Builder setPriority(int);
method public abstract android.net.http.UrlRequest.Builder setTrafficStatsTag(int);
method public abstract android.net.http.UrlRequest.Builder setTrafficStatsUid(int);
- method public abstract android.net.http.UrlRequest.Builder setUploadDataProvider(android.net.http.UploadDataProvider, java.util.concurrent.Executor);
+ method @NonNull public abstract android.net.http.UrlRequest.Builder setUploadDataProvider(@NonNull android.net.http.UploadDataProvider, @NonNull java.util.concurrent.Executor);
field public static final int REQUEST_PRIORITY_HIGHEST = 4; // 0x4
field public static final int REQUEST_PRIORITY_IDLE = 0; // 0x0
field public static final int REQUEST_PRIORITY_LOW = 2; // 0x2
@@ -214,12 +215,12 @@
public abstract static class UrlRequest.Callback {
ctor public UrlRequest.Callback();
- method public void onCanceled(android.net.http.UrlRequest, android.net.http.UrlResponseInfo);
- method public abstract void onFailed(android.net.http.UrlRequest, android.net.http.UrlResponseInfo, android.net.http.HttpException);
- method public abstract void onReadCompleted(android.net.http.UrlRequest, android.net.http.UrlResponseInfo, java.nio.ByteBuffer) throws java.lang.Exception;
- method public abstract void onRedirectReceived(android.net.http.UrlRequest, android.net.http.UrlResponseInfo, String) throws java.lang.Exception;
- method public abstract void onResponseStarted(android.net.http.UrlRequest, android.net.http.UrlResponseInfo) throws java.lang.Exception;
- method public abstract void onSucceeded(android.net.http.UrlRequest, android.net.http.UrlResponseInfo);
+ method public void onCanceled(@NonNull android.net.http.UrlRequest, @Nullable android.net.http.UrlResponseInfo);
+ method public abstract void onFailed(@NonNull android.net.http.UrlRequest, @Nullable android.net.http.UrlResponseInfo, @NonNull android.net.http.HttpException);
+ method public abstract void onReadCompleted(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo, @NonNull java.nio.ByteBuffer) throws java.lang.Exception;
+ method public abstract void onRedirectReceived(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo, @NonNull String) throws java.lang.Exception;
+ method public abstract void onResponseStarted(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo) throws java.lang.Exception;
+ method public abstract void onSucceeded(@NonNull android.net.http.UrlRequest, @NonNull android.net.http.UrlResponseInfo);
}
public static class UrlRequest.Status {
@@ -241,21 +242,19 @@
field public static final int WAITING_FOR_STALLED_SOCKET_POOL = 1; // 0x1
}
- public abstract static class UrlRequest.StatusListener {
- ctor public UrlRequest.StatusListener();
- method public abstract void onStatus(int);
+ public static interface UrlRequest.StatusListener {
+ method public void onStatus(int);
}
public abstract class UrlResponseInfo {
ctor public UrlResponseInfo();
- method public abstract android.net.http.UrlResponseInfo.HeaderBlock getHeaders();
+ method @NonNull public abstract android.net.http.UrlResponseInfo.HeaderBlock getHeaders();
method public abstract int getHttpStatusCode();
- method public abstract String getHttpStatusText();
- method public abstract String getNegotiatedProtocol();
- method public abstract String getProxyServer();
+ method @NonNull public abstract String getHttpStatusText();
+ method @NonNull public abstract String getNegotiatedProtocol();
method public abstract long getReceivedByteCount();
- method public abstract String getUrl();
- method public abstract java.util.List<java.lang.String> getUrlChain();
+ method @NonNull public abstract String getUrl();
+ method @NonNull public abstract java.util.List<java.lang.String> getUrlChain();
method public abstract boolean wasCached();
}
diff --git a/Tethering/tests/mts/AndroidManifest.xml b/Tethering/tests/mts/AndroidManifest.xml
index 6d2abca..42f2da9 100644
--- a/Tethering/tests/mts/AndroidManifest.xml
+++ b/Tethering/tests/mts/AndroidManifest.xml
@@ -27,8 +27,6 @@
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="android.tethering.mts"
android:label="MTS tests of android.tethering">
- <meta-data android:name="listener"
- android:value="com.android.cts.runner.CtsTestRunListener" />
</instrumentation>
</manifest>
diff --git a/bpf_progs/netd.c b/bpf_progs/netd.c
index 84da79d..e068d8a 100644
--- a/bpf_progs/netd.c
+++ b/bpf_progs/netd.c
@@ -350,10 +350,10 @@
static __always_inline inline int bpf_owner_match(struct __sk_buff* skb, uint32_t uid,
bool egress, const unsigned kver) {
- if (skip_owner_match(skb, kver)) return PASS;
-
if (is_system_uid(uid)) return PASS;
+ if (skip_owner_match(skb, kver)) return PASS;
+
BpfConfig enabledRules = getConfig(UID_RULES_CONFIGURATION_KEY);
UidOwnerValue* uidEntry = bpf_uid_owner_map_lookup_elem(&uid);
@@ -415,11 +415,6 @@
}
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.
- return match;
- }
// Workaround for secureVPN with VpnIsolation enabled, refer to b/159994981 for details.
// Keep TAG_SYSTEM_DNS in sync with DnsResolver/include/netd_resolv/resolv.h
@@ -432,6 +427,9 @@
if (match == DROP_UNLESS_DNS) match = DROP;
}
+ // If an outbound packet is going to be dropped, we do not count that traffic.
+ if (egress && (match == DROP)) return DROP;
+
StatsKey key = {.uid = uid, .tag = tag, .counterSet = 0, .ifaceIndex = skb->ifindex};
uint8_t* counterSet = bpf_uid_counterset_map_lookup_elem(&uid);
diff --git a/framework-t/src/android/net/NetworkStatsAccess.java b/framework-t/src/android/net/NetworkStatsAccess.java
index b64fbdb..0585756 100644
--- a/framework-t/src/android/net/NetworkStatsAccess.java
+++ b/framework-t/src/android/net/NetworkStatsAccess.java
@@ -111,17 +111,18 @@
final DevicePolicyManager mDpm = context.getSystemService(DevicePolicyManager.class);
final TelephonyManager tm = (TelephonyManager)
context.getSystemService(Context.TELEPHONY_SERVICE);
- boolean hasCarrierPrivileges;
- final long token = Binder.clearCallingIdentity();
+ final boolean hasCarrierPrivileges;
+ final boolean isDeviceOwner;
+ long token = Binder.clearCallingIdentity();
try {
hasCarrierPrivileges = tm != null
&& tm.checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
== TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
+ isDeviceOwner = mDpm != null && mDpm.isDeviceOwnerApp(callingPackage);
} finally {
Binder.restoreCallingIdentity(token);
}
- final boolean isDeviceOwner = mDpm != null && mDpm.isDeviceOwnerApp(callingPackage);
final int appId = UserHandle.getAppId(callingUid);
final boolean isNetworkStack = context.checkPermission(
@@ -135,15 +136,20 @@
return NetworkStatsAccess.Level.DEVICE;
}
- boolean hasAppOpsPermission = hasAppOpsPermission(context, callingUid, callingPackage);
+ final boolean hasAppOpsPermission =
+ hasAppOpsPermission(context, callingUid, callingPackage);
if (hasAppOpsPermission || context.checkCallingOrSelfPermission(
READ_NETWORK_USAGE_HISTORY) == PackageManager.PERMISSION_GRANTED) {
return NetworkStatsAccess.Level.DEVICESUMMARY;
}
- //TODO(b/169395065) Figure out if this flow makes sense in Device Owner mode.
- boolean isProfileOwner = mDpm != null && (mDpm.isProfileOwnerApp(callingPackage)
- || mDpm.isDeviceOwnerApp(callingPackage));
+ final boolean isProfileOwner;
+ token = Binder.clearCallingIdentity();
+ try {
+ isProfileOwner = mDpm != null && mDpm.isProfileOwnerApp(callingPackage);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
if (isProfileOwner) {
// Apps with the AppOps permission, profile owners, and apps with the privileged
// permission can access data usage for all apps in this user/profile.
diff --git a/framework-t/src/android/net/NetworkTemplate.java b/framework-t/src/android/net/NetworkTemplate.java
index 4a1632b..55fcc4a 100644
--- a/framework-t/src/android/net/NetworkTemplate.java
+++ b/framework-t/src/android/net/NetworkTemplate.java
@@ -51,6 +51,7 @@
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.modules.utils.build.SdkLevel;
import com.android.net.module.util.CollectionUtils;
import com.android.net.module.util.NetworkIdentityUtils;
@@ -246,6 +247,38 @@
return new NetworkTemplate.Builder(MATCH_ETHERNET).build();
}
+ /**
+ * Template to combine all {@link ConnectivityManager#TYPE_BLUETOOTH} style
+ * networks together.
+ *
+ * @hide
+ */
+ // TODO(b/270089918): Remove this method. This can only be done after there are no more callers,
+ // including in OEM code which can access this by linking against the framework.
+ public static NetworkTemplate buildTemplateBluetooth() {
+ if (SdkLevel.isAtLeastU()) {
+ throw new UnsupportedOperationException(
+ "buildTemplateBluetooth is not supported on Android U devices or above");
+ }
+ return new NetworkTemplate.Builder(MATCH_BLUETOOTH).build();
+ }
+
+ /**
+ * Template to combine all {@link ConnectivityManager#TYPE_PROXY} style
+ * networks together.
+ *
+ * @hide
+ */
+ // TODO(b/270089918): Remove this method. This can only be done after there are no more callers,
+ // including in OEM code which can access this by linking against the framework.
+ public static NetworkTemplate buildTemplateProxy() {
+ if (SdkLevel.isAtLeastU()) {
+ throw new UnsupportedOperationException(
+ "buildTemplateProxy is not supported on Android U devices or above");
+ }
+ return new NetworkTemplate(MATCH_PROXY, null, null);
+ }
+
private final int mMatchRule;
/**
@@ -316,6 +349,10 @@
if (matchRule == 6 || matchRule == 7) {
Log.e(TAG, "Use MATCH_MOBILE with empty subscriberIds or MATCH_WIFI with empty "
+ "wifiNetworkKeys instead of template with matchRule=" + matchRule);
+ if (SdkLevel.isAtLeastU()) {
+ throw new UnsupportedOperationException(
+ "Wildcard templates are not supported on Android U devices or above");
+ }
}
}
@@ -337,6 +374,43 @@
}
/** @hide */
+ // TODO(b/270089918): Remove this method after no callers.
+ 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(getBackwardsCompatibleMatchRule(matchRule), matchSubscriberIds,
+ wifiNetworkKey != null ? new String[] { wifiNetworkKey } : new String[0],
+ getMeterednessForBackwardsCompatibility(matchRule),
+ ROAMING_ALL, DEFAULT_NETWORK_ALL, NETWORK_TYPE_ALL,
+ OEM_MANAGED_ALL);
+ if (SdkLevel.isAtLeastU()) {
+ throw new UnsupportedOperationException(
+ "This constructor is not supported on Android U devices or above");
+ }
+ }
+
+ /** @hide */
+ // TODO(b/269974916): Remove this method after Android U is released.
+ // This is only used by CTS of Android T.
+ public NetworkTemplate(int matchRule, String subscriberId, String[] matchSubscriberIds,
+ String[] matchWifiNetworkKeys, int metered, int roaming,
+ int defaultNetwork, int ratType, int oemManaged, int subscriberIdMatchRule) {
+ // subscriberId and subscriberIdMatchRule aren't used since they are replaced by
+ // matchSubscriberIds, which could be null to indicate the intention of matching any
+ // subscriberIds.
+ this(getBackwardsCompatibleMatchRule(matchRule),
+ matchSubscriberIds == null ? new String[]{} : matchSubscriberIds,
+ matchWifiNetworkKeys, metered, roaming, defaultNetwork, ratType, oemManaged);
+ if (SdkLevel.isAtLeastU()) {
+ throw new UnsupportedOperationException(
+ "This constructor is not supported on Android U devices or above");
+ }
+ }
+
+ /** @hide */
public NetworkTemplate(int matchRule, String[] matchSubscriberIds,
String[] matchWifiNetworkKeys, int metered, int roaming, int defaultNetwork,
int ratType, int oemManaged) {
@@ -436,9 +510,14 @@
return false;
}
- // TODO(b/270089918): Remove this method after no callers.
+ // TODO(b/270089918): Remove this method. This can only be done after there are no more callers,
+ // including in OEM code which can access this by linking against the framework.
/** @hide */
public boolean isMatchRuleMobile() {
+ if (SdkLevel.isAtLeastU()) {
+ throw new UnsupportedOperationException(
+ "isMatchRuleMobile is not supported on Android U devices or above");
+ }
switch (mMatchRule) {
case MATCH_MOBILE:
// Old MATCH_MOBILE_WILDCARD
diff --git a/framework/src/android/net/ConnectivityManager.java b/framework/src/android/net/ConnectivityManager.java
index 7cef58b..381a18a 100644
--- a/framework/src/android/net/ConnectivityManager.java
+++ b/framework/src/android/net/ConnectivityManager.java
@@ -2521,7 +2521,7 @@
@RequiresPermission(android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD)
public @NonNull SocketKeepalive createSocketKeepalive(@NonNull Network network,
@NonNull Socket socket,
- @NonNull Executor executor,
+ @NonNull @CallbackExecutor Executor executor,
@NonNull Callback callback) {
ParcelFileDescriptor dup;
try {
@@ -5494,9 +5494,9 @@
* @return {@code uid} if the connection is found and the app has permission to observe it
* (e.g., if it is associated with the calling VPN app's VpnService tunnel) or {@link
* android.os.Process#INVALID_UID} if the connection is not found.
- * @throws {@link SecurityException} if the caller is not the active VpnService for the current
+ * @throws SecurityException if the caller is not the active VpnService for the current
* user.
- * @throws {@link IllegalArgumentException} if an unsupported protocol is requested.
+ * @throws IllegalArgumentException if an unsupported protocol is requested.
*/
public int getConnectionOwnerUid(
int protocol, @NonNull InetSocketAddress local, @NonNull InetSocketAddress remote) {
diff --git a/framework/src/android/net/NetworkCapabilities.java b/framework/src/android/net/NetworkCapabilities.java
index 427eac1..324f565 100644
--- a/framework/src/android/net/NetworkCapabilities.java
+++ b/framework/src/android/net/NetworkCapabilities.java
@@ -53,18 +53,70 @@
import java.util.StringJoiner;
/**
- * Representation of the capabilities of an active network. Instances are
- * typically obtained through
- * {@link NetworkCallback#onCapabilitiesChanged(Network, NetworkCapabilities)}
- * or {@link ConnectivityManager#getNetworkCapabilities(Network)}.
- * <p>
- * This replaces the old {@link ConnectivityManager#TYPE_MOBILE} method of
- * network selection. Rather than indicate a need for Wi-Fi because an
- * application needs high bandwidth and risk obsolescence when a new, fast
- * network appears (like LTE), the application should specify it needs high
- * bandwidth. Similarly if an application needs an unmetered network for a bulk
- * transfer it can specify that rather than assuming all cellular based
- * connections are metered and all Wi-Fi based connections are not.
+ * Representation of the capabilities of an active network.
+ *
+ * <p>@see <a href="https://developer.android.com/training/basics/network-ops/reading-network-state>
+ * this general guide</a> on how to use NetworkCapabilities and related classes.
+ *
+ * <p>NetworkCapabilities represent what a network can do and what its
+ * characteristics are like. The principal attribute of NetworkCapabilities
+ * is in the capabilities bits, which are checked with
+ * {@link #hasCapability(int)}. See the list of capabilities and each
+ * capability for a description of what it means.
+ *
+ * <p>Some prime examples include {@code NET_CAPABILITY_MMS}, which means that the
+ * network is capable of sending MMS. A network without this capability
+ * is not capable of sending MMS.
+ * <p>The {@code NET_CAPABILITY_INTERNET} capability means that the network is
+ * configured to reach the general Internet. It may or may not actually
+ * provide connectivity ; the {@code NET_CAPABILITY_VALIDATED} bit indicates that
+ * the system found actual connectivity to the general Internet the last
+ * time it checked. Apps interested in actual connectivity should usually
+ * look at both these capabilities.
+ * <p>The {@code NET_CAPABILITY_NOT_METERED} capability is set for networks that
+ * do not bill the user for consumption of bytes. Applications are
+ * encouraged to consult this to determine appropriate usage, and to
+ * limit usage of metered network where possible, including deferring
+ * big downloads until such a time that an unmetered network is connected.
+ * Also see {@link android.app.job.JobScheduler} to help with scheduling such
+ * downloads, in particular
+ * {@link android.app.job.JobInfo.Builder#setRequiredNetwork(NetworkRequest)}.
+ * <p>NetworkCapabilities contain a number of other capabilities that
+ * represent what modern networks can and can't do. Look up the individual
+ * capabilities in this class to learn about each of them.
+ *
+ * <p>NetworkCapabilities typically represent attributes that can apply to
+ * any network. The attributes that apply only to specific transports like
+ * cellular or Wi-Fi can be found in the specifier (for requestable attributes)
+ * or in the transport info (for non-requestable ones). See
+ * {@link #getNetworkSpecifier} and {@link #getTransportInfo}. An app would
+ * downcast these to the specific class for the transport they need if they
+ * are interested in transport-specific attributes. Also see
+ * {@link android.net.wifi.WifiNetworkSpecifier} or
+ * {@link android.net.wifi.WifiInfo} for some examples of each of these.
+ *
+ * <p>NetworkCapabilities also contains other attributes like the estimated
+ * upstream and downstream bandwidth and the specific transport of that
+ * network (e.g. {@link #TRANSPORT_CELLULAR}). Generally, apps should normally
+ * have little reason to check for the type of transport ; for example, to
+ * query whether a network costs money to the user, do not look at the
+ * transport, but instead look at the absence or presence of
+ * {@link #NET_CAPABILITY_NOT_METERED} which will correctly account for
+ * metered Wi-Fis and free of charge cell connections.
+ *
+ * <p>The system communicates with apps about connected networks and uses
+ * NetworkCapabilities to express these capabilities about these networks.
+ * Apps should register callbacks with the {@link ConnectivityManager#requestNetwork}
+ * or {@link ConnectivityManager#registerNetworkCallback} family of methods
+ * to learn about the capabilities of a network on a continuous basis
+ * and be able to react to changes to capabilities. For quick debugging Android also
+ * provides {@link ConnectivityManager#getNetworkCapabilities(Network)},
+ * but the dynamic nature of networking makes this ill-suited to production
+ * code since capabilities obtained in this way can go stale immediately.
+ *
+ * <p>Also see {@link NetworkRequest} which uses the same capabilities
+ * together with {@link ConnectivityManager#requestNetwork} for how to
+ * request the system brings up the kind of network your application needs.
*/
public final class NetworkCapabilities implements Parcelable {
private static final String TAG = "NetworkCapabilities";
@@ -622,11 +674,19 @@
/**
* Indicates that this network should be able to prioritize latency for the internet.
+ *
+ * Starting with {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, requesting this capability with
+ * {@link ConnectivityManager#requestNetwork} requires declaration in the self-certified
+ * network capabilities. See {@link NetworkRequest} for the self-certification documentation.
*/
public static final int NET_CAPABILITY_PRIORITIZE_LATENCY = 34;
/**
* Indicates that this network should be able to prioritize bandwidth for the internet.
+ *
+ * Starting with {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, requesting this capability with
+ * {@link ConnectivityManager#requestNetwork} requires declaration in the self-certified
+ * network capabilities. See {@link NetworkRequest} for the self-certification documentation.
*/
public static final int NET_CAPABILITY_PRIORITIZE_BANDWIDTH = 35;
diff --git a/framework/src/android/net/NetworkRequest.java b/framework/src/android/net/NetworkRequest.java
index b7a6076..6c351d0 100644
--- a/framework/src/android/net/NetworkRequest.java
+++ b/framework/src/android/net/NetworkRequest.java
@@ -54,9 +54,92 @@
import java.util.Set;
/**
- * Defines a request for a network, made through {@link NetworkRequest.Builder} and used
- * to request a network via {@link ConnectivityManager#requestNetwork} or listen for changes
- * via {@link ConnectivityManager#registerNetworkCallback}.
+ * An object describing a network that the application is interested in.
+ *
+ * <p>@see <a href="https://developer.android.com/training/basics/network-ops/reading-network-state>
+ * this general guide</a> on how to use NetworkCapabilities and related classes.
+ *
+ * NetworkRequest defines a request for a network, made through
+ * {@link NetworkRequest.Builder} and used to request a network via
+ * {@link ConnectivityManager#requestNetwork} or to listen for changes
+ * via the {@link ConnectivityManager#registerNetworkCallback} family of
+ * functions.
+ *
+ * <p>{@link ConnectivityManager#requestNetwork} will try to find a connected
+ * network matching the NetworkRequest, and return it if there is one.
+ * As long as the request is outstanding, the system will try to find the best
+ * possible network that matches the request. The request will keep up the
+ * currently best connected network, and if a better one is found (e.g. cheaper
+ * or faster) the system will bring up that better network to better serve the
+ * request. A request filed with {@link ConnectivityManager#requestNetwork} will
+ * only match one network at a time (the one the system thinks is best), even if
+ * other networks can match the request that are being kept up by other requests.
+ *
+ * For example, an application needing a network with
+ * {@link NetworkCapabilities#NET_CAPABILITY_INTERNET} should use
+ * {@link ConnectivityManager#requestNetwork} to request the system keeps one up.
+ * A general cellular network can satisfy this request, but if the system finds
+ * a free Wi-Fi network which is expected to be faster, it will try and connect
+ * to that Wi-Fi network and switch the request over to it once it is connected.
+ * The cell network may stay connected if there are outstanding requests (from
+ * the same app or from other apps on the system) that match the cell network
+ * but not the Wi-Fi network, such as a request with {@link NetworkCapabilities#NET_CAPABILITY_MMS}.
+ *
+ * When a network is no longer needed to serve any request, the system can
+ * tear it down at any time and usually does so immediately, so make sure to
+ * keep up requests for the networks your app needs.
+ *
+ * <p>By contrast, requests filed with {@link ConnectivityManager#registerNetworkCallback}
+ * will receive callbacks for all matching networks, and will not cause the system to
+ * keep up the networks they match. Use this to listen to networks that the device is
+ * connected to, but that you don't want the system to keep up for your use case.
+ *
+ * <p>Applications build a NetworkRequest and pass it to one of the
+ * {@link ConnectivityManager} methods above together with a
+ * {@link ConnectivityManager.NetworkCallback} object. The callback
+ * will then start receiving method calls about networks that match
+ * the request.
+ *
+ * <p>Networks are brought up and/or matched according to the capabilities
+ * set in the builder. For example, a request with
+ * {@link NetworkCapabilities#NET_CAPABILITY_MMS} lets the system match
+ * and/or bring up a network that is capable to send MMS. A request with
+ * {@link NetworkCapabilities#NET_CAPABILITY_NOT_METERED} matches a network
+ * that doesn't charge the user for usage. See
+ * {@link NetworkCapabilities} for a list of capabilities and their
+ * description.
+ *
+ * <p>While all capabilities can be matched with the
+ * {@link ConnectivityManager#registerNetworkCallback} family of methods,
+ * not all capabilities can be used to request that the system brings
+ * up a network with {@link ConnectivityManager#requestNetwork}. For example,
+ * an application cannot use {@link ConnectivityManager#requestNetwork} to
+ * ask the system to bring up a network with
+ * {@link NetworkCapabilities#NET_CAPABILITY_CAPTIVE_PORTAL}, because the
+ * system won't know if a network has a captive portal before it connects
+ * to that network. Similarly, some capabilities may require a specific
+ * permission or privilege to be requested.
+ *
+ * Look up the specific capability and the {@link ConnectivityManager#requestNetwork}
+ * method for limitations applicable to each capability.
+ *
+ * <p>Also, starting with {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, some capabilities
+ * require the application to self-certify by explicitly adding the
+ * {@link android.content.pm.PackageManager#PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES}
+ * property in the AndroidManifest.xml, which points to an XML resource file. In the
+ * XML resource file, the application declares what kind of network capabilities the application
+ * wants to have.
+ *
+ * Here is an example self-certification XML resource file :
+ * <pre>
+ * {@code
+ * <network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ * <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+ * <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_BANDWIDTH"/>
+ * </network-capabilities-declaration>
+ * }
+ * </pre>
+ * Look up the specific capability to learn whether its usage requires this self-certification.
*/
public class NetworkRequest implements Parcelable {
/**
diff --git a/framework/src/android/net/connectivity/ConnectivityCompatChanges.java b/framework/src/android/net/connectivity/ConnectivityCompatChanges.java
index a166675..2cfda9e 100644
--- a/framework/src/android/net/connectivity/ConnectivityCompatChanges.java
+++ b/framework/src/android/net/connectivity/ConnectivityCompatChanges.java
@@ -62,6 +62,17 @@
// This was a platform change ID with value 191844585L before T
public static final long RUN_NATIVE_NSD_ONLY_IF_LEGACY_APPS_T_AND_LATER = 235355681L;
+ /**
+ * The self certified capabilities check should be enabled after android 13.
+ *
+ * <p> See {@link android.net.NetworkCapabilities} for more details.
+ *
+ * @hide
+ */
+ @ChangeId
+ @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.TIRAMISU)
+ public static final long ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION = 266524688;
+
private ConnectivityCompatChanges() {
}
}
diff --git a/nearby/halfsheet/res/values-ky/strings.xml b/nearby/halfsheet/res/values-ky/strings.xml
index 812e0e8..b0dfe20 100644
--- a/nearby/halfsheet/res/values-ky/strings.xml
+++ b/nearby/halfsheet/res/values-ky/strings.xml
@@ -25,5 +25,5 @@
<string name="paring_action_save" msgid="6259357442067880136">"Сактоо"</string>
<string name="paring_action_connect" msgid="4801102939608129181">"Туташуу"</string>
<string name="paring_action_launch" msgid="8940808384126591230">"Жөндөө"</string>
- <string name="paring_action_settings" msgid="424875657242864302">"Жөндөөлөр"</string>
+ <string name="paring_action_settings" msgid="424875657242864302">"Параметрлер"</string>
</resources>
diff --git a/netd/BpfHandler.cpp b/netd/BpfHandler.cpp
index 7950ff7..2b773c9 100644
--- a/netd/BpfHandler.cpp
+++ b/netd/BpfHandler.cpp
@@ -93,7 +93,7 @@
// cgroup if the program is pinned properly.
// TODO: delete the if statement once all devices should support cgroup
// socket filter (ie. the minimum kernel version required is 4.14).
- if (!access(CGROUP_SOCKET_PROG_PATH, F_OK)) {
+ if (bpf::isAtLeastKernelVersion(4, 14, 0)) {
RETURN_IF_NOT_OK(
attachProgramToCgroup(CGROUP_SOCKET_PROG_PATH, cg_fd, BPF_CGROUP_INET_SOCK_CREATE));
}
diff --git a/service-t/native/libs/libnetworkstats/NetworkTraceHandler.cpp b/service-t/native/libs/libnetworkstats/NetworkTraceHandler.cpp
index aeadb4a..be4ffe3 100644
--- a/service-t/native/libs/libnetworkstats/NetworkTraceHandler.cpp
+++ b/service-t/native/libs/libnetworkstats/NetworkTraceHandler.cpp
@@ -55,13 +55,12 @@
NetworkTraceHandler::RegisterDataSource();
}
-NetworkTraceHandler::NetworkTraceHandler()
- : NetworkTraceHandler([this](const PacketTrace& pkt) {
- NetworkTraceHandler::Trace(
- [this, pkt](NetworkTraceHandler::TraceContext ctx) {
- Fill(pkt, *ctx.NewTracePacket());
- });
- }) {}
+// static
+NetworkTracePoller NetworkTraceHandler::sPoller([](const PacketTrace& pkt) {
+ NetworkTraceHandler::Trace([pkt](NetworkTraceHandler::TraceContext ctx) {
+ NetworkTraceHandler::Fill(pkt, *ctx.NewTracePacket());
+ });
+});
void NetworkTraceHandler::OnSetup(const SetupArgs& args) {
const std::string& raw = args.config->network_packet_trace_config_raw();
@@ -75,21 +74,27 @@
}
void NetworkTraceHandler::OnStart(const StartArgs&) {
- if (!Start()) return;
- mTaskRunner = perfetto::Platform::GetDefaultPlatform()->CreateTaskRunner({});
- Loop();
+ mStarted = sPoller.Start(mPollMs);
}
void NetworkTraceHandler::OnStop(const StopArgs&) {
- Stop();
- mTaskRunner.reset();
+ if (mStarted) sPoller.Stop();
+ mStarted = false;
}
-void NetworkTraceHandler::Loop() {
- mTaskRunner->PostDelayedTask([this]() { Loop(); }, mPollMs);
- ConsumeAll();
+void NetworkTracePoller::SchedulePolling() {
+ // Schedules another run of ourselves to recursively poll periodically.
+ mTaskRunner->PostDelayedTask(
+ [this]() {
+ mMutex.lock();
+ SchedulePolling();
+ ConsumeAllLocked();
+ mMutex.unlock();
+ },
+ mPollMs);
}
+// static class method
void NetworkTraceHandler::Fill(const PacketTrace& src, TracePacket& dst) {
dst.set_timestamp(src.timestampNs);
auto* event = dst.set_network_packet();
@@ -113,9 +118,23 @@
}
}
-bool NetworkTraceHandler::Start() {
+bool NetworkTracePoller::Start(uint32_t pollMs) {
ALOGD("Starting datasource");
+ std::scoped_lock<std::mutex> lock(mMutex);
+ if (mSessionCount > 0) {
+ if (mPollMs != pollMs) {
+ // Nothing technical prevents mPollMs from changing, it's just unclear
+ // what the right behavior is. Taking the min of active values could poll
+ // too frequently giving some sessions too much data. Taking the max could
+ // be too infrequent. For now, do nothing.
+ ALOGI("poll_ms can't be changed while running, ignoring poll_ms=%d",
+ pollMs);
+ }
+ mSessionCount++;
+ return true;
+ }
+
auto status = mConfigurationMap.init(PACKET_TRACE_ENABLED_MAP_PATH);
if (!status.ok()) {
ALOGW("Failed to bind config map: %s", status.error().message().c_str());
@@ -136,24 +155,41 @@
return false;
}
+ // Start a task runner to run ConsumeAll every mPollMs milliseconds.
+ mTaskRunner = perfetto::Platform::GetDefaultPlatform()->CreateTaskRunner({});
+ mPollMs = pollMs;
+ SchedulePolling();
+
+ mSessionCount++;
return true;
}
-bool NetworkTraceHandler::Stop() {
+bool NetworkTracePoller::Stop() {
ALOGD("Stopping datasource");
+ std::scoped_lock<std::mutex> lock(mMutex);
+ if (mSessionCount == 0) return false; // This should never happen
+
+ // If this isn't the last session, don't clean up yet.
+ if (--mSessionCount > 0) return true;
+
auto res = mConfigurationMap.writeValue(0, false, BPF_ANY);
if (!res.ok()) {
ALOGW("Failed to disable tracing: %s", res.error().message().c_str());
- return false;
}
+ mTaskRunner.reset();
mRingBuffer.reset();
- return true;
+ return res.ok();
}
-bool NetworkTraceHandler::ConsumeAll() {
+bool NetworkTracePoller::ConsumeAll() {
+ std::scoped_lock<std::mutex> lock(mMutex);
+ return ConsumeAllLocked();
+}
+
+bool NetworkTracePoller::ConsumeAllLocked() {
if (mRingBuffer == nullptr) {
ALOGW("Tracing is not active");
return false;
diff --git a/service-t/native/libs/libnetworkstats/NetworkTraceHandlerTest.cpp b/service-t/native/libs/libnetworkstats/NetworkTraceHandlerTest.cpp
index 560194f..543be21 100644
--- a/service-t/native/libs/libnetworkstats/NetworkTraceHandlerTest.cpp
+++ b/service-t/native/libs/libnetworkstats/NetworkTraceHandlerTest.cpp
@@ -39,6 +39,9 @@
namespace android {
namespace bpf {
+// Use uint32 max to cause the handler to never Loop. Instead, the tests will
+// manually drive things by calling ConsumeAll explicitly.
+constexpr uint32_t kNeverPoll = std::numeric_limits<uint32_t>::max();
__be16 bindAndListen(int s) {
sockaddr_in sin = {.sin_family = AF_INET};
@@ -83,7 +86,7 @@
}
};
-class NetworkTraceHandlerTest : public testing::Test {
+class NetworkTracePollerTest : public testing::Test {
protected:
void SetUp() {
if (access(PACKET_TRACE_RINGBUF_PATH, R_OK)) {
@@ -95,31 +98,49 @@
}
};
-TEST_F(NetworkTraceHandlerTest, PollWhileInactive) {
- NetworkTraceHandler handler([&](const PacketTrace& pkt) {});
+TEST_F(NetworkTracePollerTest, PollWhileInactive) {
+ NetworkTracePoller handler([&](const PacketTrace& pkt) {});
// One succeed after start and before stop.
EXPECT_FALSE(handler.ConsumeAll());
- ASSERT_TRUE(handler.Start());
+ ASSERT_TRUE(handler.Start(kNeverPoll));
EXPECT_TRUE(handler.ConsumeAll());
ASSERT_TRUE(handler.Stop());
EXPECT_FALSE(handler.ConsumeAll());
}
-TEST_F(NetworkTraceHandlerTest, TraceTcpSession) {
+TEST_F(NetworkTracePollerTest, ConcurrentSessions) {
+ // Simulate two concurrent sessions (two starts followed by two stops). Check
+ // that tracing is stopped only after both sessions finish.
+ NetworkTracePoller handler([&](const PacketTrace& pkt) {});
+
+ ASSERT_TRUE(handler.Start(kNeverPoll));
+ EXPECT_TRUE(handler.ConsumeAll());
+
+ ASSERT_TRUE(handler.Start(kNeverPoll));
+ EXPECT_TRUE(handler.ConsumeAll());
+
+ ASSERT_TRUE(handler.Stop());
+ EXPECT_TRUE(handler.ConsumeAll());
+
+ ASSERT_TRUE(handler.Stop());
+ EXPECT_FALSE(handler.ConsumeAll());
+}
+
+TEST_F(NetworkTracePollerTest, TraceTcpSession) {
__be16 server_port = 0;
std::vector<PacketTrace> packets;
// Record all packets with the bound address and current uid. This callback is
// involked only within ConsumeAll, at which point the port should have
// already been filled in and all packets have been processed.
- NetworkTraceHandler handler([&](const PacketTrace& pkt) {
+ NetworkTracePoller handler([&](const PacketTrace& pkt) {
if (pkt.sport != server_port && pkt.dport != server_port) return;
if (pkt.uid != getuid()) return;
packets.push_back(pkt);
});
- ASSERT_TRUE(handler.Start());
+ ASSERT_TRUE(handler.Start(kNeverPoll));
const uint32_t kClientTag = 2468;
const uint32_t kServerTag = 1357;
diff --git a/service-t/native/libs/libnetworkstats/include/netdbpf/NetworkTraceHandler.h b/service-t/native/libs/libnetworkstats/include/netdbpf/NetworkTraceHandler.h
index c257aa0..3f244b3 100644
--- a/service-t/native/libs/libnetworkstats/include/netdbpf/NetworkTraceHandler.h
+++ b/service-t/native/libs/libnetworkstats/include/netdbpf/NetworkTraceHandler.h
@@ -22,6 +22,7 @@
#include <string>
#include <unordered_map>
+#include "android-base/thread_annotations.h"
#include "bpf/BpfMap.h"
#include "bpf/BpfRingbuf.h"
@@ -31,6 +32,56 @@
namespace android {
namespace bpf {
+// NetworkTracePoller is responsible for interactions with the BPF ring buffer
+// including polling. This class is an internal helper for NetworkTraceHandler,
+// it is not meant to be used elsewhere.
+class NetworkTracePoller {
+ public:
+ // Testonly: initialize with a callback capable of intercepting data.
+ NetworkTracePoller(std::function<void(const PacketTrace&)> callback)
+ : mCallback(std::move(callback)) {}
+
+ // Starts tracing with the given poll interval.
+ bool Start(uint32_t pollMs) EXCLUDES(mMutex);
+
+ // Stops tracing and release any held state.
+ bool Stop() EXCLUDES(mMutex);
+
+ // Consumes all available events from the ringbuffer.
+ bool ConsumeAll() EXCLUDES(mMutex);
+
+ private:
+ void SchedulePolling() REQUIRES(mMutex);
+ bool ConsumeAllLocked() REQUIRES(mMutex);
+
+ std::mutex mMutex;
+
+ // Records the number of successfully started active sessions so that only the
+ // first active session attempts setup and only the last cleans up. Note that
+ // the session count will remain zero if Start fails. It is expected that Stop
+ // will not be called for any trace session where Start fails.
+ int mSessionCount GUARDED_BY(mMutex);
+
+ // How often to poll the ring buffer, defined by the trace config.
+ uint32_t mPollMs GUARDED_BY(mMutex);
+
+ // The function to process PacketTrace, typically a Perfetto sink.
+ std::function<void(const PacketTrace&)> mCallback GUARDED_BY(mMutex);
+
+ // The BPF ring buffer handle.
+ std::unique_ptr<BpfRingbuf<PacketTrace>> mRingBuffer GUARDED_BY(mMutex);
+
+ // The packet tracing config map (really a 1-element array).
+ BpfMap<uint32_t, bool> mConfigurationMap GUARDED_BY(mMutex);
+
+ // This must be the last member, causing it to be the first deleted. If it is
+ // not, members required for callbacks can be deleted before it's stopped.
+ std::unique_ptr<perfetto::base::TaskRunner> mTaskRunner GUARDED_BY(mMutex);
+};
+
+// NetworkTraceHandler implements the android.network_packets data source. This
+// class is registered with Perfetto and is instantiated when tracing starts and
+// destroyed when tracing ends. There is one instance per trace session.
class NetworkTraceHandler : public perfetto::DataSource<NetworkTraceHandler> {
public:
// Registers this DataSource.
@@ -39,45 +90,19 @@
// Connects to the system Perfetto daemon and registers the trace handler.
static void InitPerfettoTracing();
- // Initialize with the default Perfetto callback.
- NetworkTraceHandler();
-
- // Testonly: initialize with a callback capable of intercepting data.
- NetworkTraceHandler(std::function<void(const PacketTrace&)> callback)
- : mCallback(std::move(callback)) {}
-
- // Testonly: standalone functions without perfetto dependency.
- bool Start();
- bool Stop();
- bool ConsumeAll();
-
// perfetto::DataSource overrides:
- void OnSetup(const SetupArgs&) override;
+ void OnSetup(const SetupArgs& args) override;
void OnStart(const StartArgs&) override;
void OnStop(const StopArgs&) override;
- // Convert a PacketTrace into a Perfetto trace packet.
- void Fill(const PacketTrace& src,
- ::perfetto::protos::pbzero::TracePacket& dst);
-
private:
- void Loop();
+ // Convert a PacketTrace into a Perfetto trace packet.
+ static void Fill(const PacketTrace& src,
+ ::perfetto::protos::pbzero::TracePacket& dst);
- // How often to poll the ring buffer, defined by the trace config.
+ static NetworkTracePoller sPoller;
uint32_t mPollMs;
-
- // The function to process PacketTrace, typically a Perfetto sink.
- std::function<void(const PacketTrace&)> mCallback;
-
- // The BPF ring buffer handle.
- std::unique_ptr<BpfRingbuf<PacketTrace>> mRingBuffer;
-
- // The packet tracing config map (really a 1-element array).
- BpfMap<uint32_t, bool> mConfigurationMap;
-
- // This must be the last member, causing it to be the first deleted. If it is
- // not, members required for callbacks can be deleted before it's stopped.
- std::unique_ptr<perfetto::base::TaskRunner> mTaskRunner;
+ bool mStarted;
};
} // namespace bpf
diff --git a/service-t/src/com/android/server/NsdService.java b/service-t/src/com/android/server/NsdService.java
index 4ad39e1..619b64d 100644
--- a/service-t/src/com/android/server/NsdService.java
+++ b/service-t/src/com/android/server/NsdService.java
@@ -20,6 +20,7 @@
import static android.net.nsd.NsdManager.MDNS_DISCOVERY_MANAGER_EVENT;
import static android.net.nsd.NsdManager.MDNS_SERVICE_EVENT;
import static android.provider.DeviceConfig.NAMESPACE_CONNECTIVITY;
+import static android.provider.DeviceConfig.NAMESPACE_TETHERING;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -79,6 +80,7 @@
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -110,6 +112,34 @@
*/
private static final String MDNS_ADVERTISER_VERSION = "mdns_advertiser_version";
+ /**
+ * Comma-separated list of type:flag mappings indicating the flags to use to allowlist
+ * discovery/advertising using MdnsDiscoveryManager / MdnsAdvertiser for a given type.
+ *
+ * For example _mytype._tcp.local and _othertype._tcp.local would be configured with:
+ * _mytype._tcp:mytype,_othertype._tcp.local:othertype
+ *
+ * In which case the flags:
+ * "mdns_discovery_manager_allowlist_mytype_version",
+ * "mdns_advertiser_allowlist_mytype_version",
+ * "mdns_discovery_manager_allowlist_othertype_version",
+ * "mdns_advertiser_allowlist_othertype_version"
+ * would be used to toggle MdnsDiscoveryManager / MdnsAdvertiser for each type. The flags will
+ * be read with
+ * {@link DeviceConfigUtils#isFeatureEnabled(Context, String, String, String, boolean)}.
+ *
+ * @see #MDNS_DISCOVERY_MANAGER_ALLOWLIST_FLAG_PREFIX
+ * @see #MDNS_ADVERTISER_ALLOWLIST_FLAG_PREFIX
+ * @see #MDNS_ALLOWLIST_FLAG_SUFFIX
+ */
+ private static final String MDNS_TYPE_ALLOWLIST_FLAGS = "mdns_type_allowlist_flags";
+
+ private static final String MDNS_DISCOVERY_MANAGER_ALLOWLIST_FLAG_PREFIX =
+ "mdns_discovery_manager_allowlist_";
+ private static final String MDNS_ADVERTISER_ALLOWLIST_FLAG_PREFIX =
+ "mdns_advertiser_allowlist_";
+ private static final String MDNS_ALLOWLIST_FLAG_SUFFIX = "_version";
+
public static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
private static final long CLEANUP_DELAY_MS = 10000;
private static final int IFACE_IDX_ANY = 0;
@@ -317,7 +347,7 @@
if (!mIsMonitoringSocketsStarted) return;
if (isAnyRequestActive()) return;
- mMdnsSocketProvider.stopMonitoringSockets();
+ mMdnsSocketProvider.requestStopWhenInactive();
mIsMonitoringSocketsStarted = false;
}
@@ -496,31 +526,6 @@
clientInfo.mClientIdForServiceUpdates = 0;
}
- /**
- * Check the given service type is valid and construct it to a service type
- * which can use for discovery / resolution service.
- *
- * <p> The valid service type should be 2 labels, or 3 labels if the query is for a
- * subtype (see RFC6763 7.1). Each label is up to 63 characters and must start with an
- * underscore; they are alphanumerical characters or dashes or underscore, except the
- * last one that is just alphanumerical. The last label must be _tcp or _udp.
- *
- * @param serviceType the request service type for discovery / resolution service
- * @return constructed service type or null if the given service type is invalid.
- */
- @Nullable
- private String constructServiceType(String serviceType) {
- if (TextUtils.isEmpty(serviceType)) return null;
-
- final Pattern serviceTypePattern = Pattern.compile(
- "^(_[a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]\\.)?"
- + "(_[a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]\\._(?:tcp|udp))$");
- final Matcher matcher = serviceTypePattern.matcher(serviceType);
- if (!matcher.matches()) return null;
- return matcher.group(1) == null
- ? serviceType
- : matcher.group(1) + "_sub." + matcher.group(2);
- }
/**
* Truncate a service name to up to 63 UTF-8 bytes.
@@ -545,6 +550,12 @@
return new String(out.array(), 0, out.position(), utf8);
}
+ private void stopDiscoveryManagerRequest(ClientRequest request, int clientId, int id,
+ ClientInfo clientInfo) {
+ clientInfo.unregisterMdnsListenerFromRequest(request);
+ removeRequestMap(clientId, id, clientInfo);
+ }
+
@Override
public boolean processMessage(Message msg) {
final ClientInfo clientInfo;
@@ -572,8 +583,9 @@
final NsdServiceInfo info = args.serviceInfo;
id = getUniqueId();
- if (mDeps.isMdnsDiscoveryManagerEnabled(mContext)) {
- final String serviceType = constructServiceType(info.getServiceType());
+ final String serviceType = constructServiceType(info.getServiceType());
+ if (mDeps.isMdnsDiscoveryManagerEnabled(mContext)
+ || useDiscoveryManagerForType(serviceType)) {
if (serviceType == null) {
clientInfo.onDiscoverServicesFailed(clientId,
NsdManager.FAILURE_INTERNAL_ERROR);
@@ -631,11 +643,7 @@
// point, so this needs to check the type of the original request to
// unregister instead of looking at the flag value.
if (request instanceof DiscoveryManagerRequest) {
- final MdnsListener listener =
- ((DiscoveryManagerRequest) request).mListener;
- mMdnsDiscoveryManager.unregisterListener(
- listener.getListenedServiceType(), listener);
- removeRequestMap(clientId, id, clientInfo);
+ stopDiscoveryManagerRequest(request, clientId, id, clientInfo);
clientInfo.onStopDiscoverySucceeded(clientId);
} else {
removeRequestMap(clientId, id, clientInfo);
@@ -667,10 +675,11 @@
}
id = getUniqueId();
- if (mDeps.isMdnsAdvertiserEnabled(mContext)) {
- final NsdServiceInfo serviceInfo = args.serviceInfo;
- final String serviceType = serviceInfo.getServiceType();
- final String registerServiceType = constructServiceType(serviceType);
+ final NsdServiceInfo serviceInfo = args.serviceInfo;
+ final String serviceType = serviceInfo.getServiceType();
+ final String registerServiceType = constructServiceType(serviceType);
+ if (mDeps.isMdnsAdvertiserEnabled(mContext)
+ || useAdvertiserForType(registerServiceType)) {
if (registerServiceType == null) {
Log.e(TAG, "Invalid service type: " + serviceType);
clientInfo.onRegisterServiceFailed(clientId,
@@ -686,7 +695,7 @@
storeAdvertiserRequestMap(clientId, id, clientInfo);
} else {
maybeStartDaemon();
- if (registerService(id, args.serviceInfo)) {
+ if (registerService(id, serviceInfo)) {
if (DBG) Log.d(TAG, "Register " + clientId + " " + id);
storeLegacyRequestMap(clientId, id, clientInfo, msg.what);
// Return success after mDns reports success
@@ -748,8 +757,9 @@
final NsdServiceInfo info = args.serviceInfo;
id = getUniqueId();
- if (mDeps.isMdnsDiscoveryManagerEnabled(mContext)) {
- final String serviceType = constructServiceType(info.getServiceType());
+ final String serviceType = constructServiceType(info.getServiceType());
+ if (mDeps.isMdnsDiscoveryManagerEnabled(mContext)
+ || useDiscoveryManagerForType(serviceType)) {
if (serviceType == null) {
clientInfo.onResolveServiceFailed(clientId,
NsdManager.FAILURE_INTERNAL_ERROR);
@@ -763,6 +773,7 @@
final MdnsSearchOptions options = MdnsSearchOptions.newBuilder()
.setNetwork(info.getNetwork())
.setIsPassiveMode(true)
+ .setResolveInstanceName(info.getServiceName())
.build();
mMdnsDiscoveryManager.registerListener(
resolveServiceType, listener, options);
@@ -775,7 +786,7 @@
}
maybeStartDaemon();
- if (resolveService(id, args.serviceInfo)) {
+ if (resolveService(id, info)) {
clientInfo.mResolvedService = new NsdServiceInfo();
storeLegacyRequestMap(clientId, id, clientInfo, msg.what);
} else {
@@ -803,15 +814,22 @@
break;
}
id = request.mGlobalId;
- removeRequestMap(clientId, id, clientInfo);
- if (stopResolveService(id)) {
+ // Note isMdnsDiscoveryManagerEnabled may have changed to false at this
+ // point, so this needs to check the type of the original request to
+ // unregister instead of looking at the flag value.
+ if (request instanceof DiscoveryManagerRequest) {
+ stopDiscoveryManagerRequest(request, clientId, id, clientInfo);
clientInfo.onStopResolutionSucceeded(clientId);
} else {
- clientInfo.onStopResolutionFailed(
- clientId, NsdManager.FAILURE_OPERATION_NOT_RUNNING);
+ removeRequestMap(clientId, id, clientInfo);
+ if (stopResolveService(id)) {
+ clientInfo.onStopResolutionSucceeded(clientId);
+ } else {
+ clientInfo.onStopResolutionFailed(
+ clientId, NsdManager.FAILURE_OPERATION_NOT_RUNNING);
+ }
+ clientInfo.mResolvedService = null;
}
- clientInfo.mResolvedService = null;
- // TODO: Implement the stop resolution with MdnsDiscoveryManager.
break;
}
case NsdManager.REGISTER_SERVICE_CALLBACK:
@@ -1144,17 +1162,27 @@
Log.e(TAG, "Invalid attribute", e);
}
}
- try {
- if (serviceInfo.getIpv4Address() != null) {
- info.setHost(InetAddresses.parseNumericAddress(
- serviceInfo.getIpv4Address()));
- } else {
- info.setHost(InetAddresses.parseNumericAddress(
- serviceInfo.getIpv6Address()));
+ final List<InetAddress> addresses = new ArrayList<>();
+ for (String ipv4Address : serviceInfo.getIpv4Addresses()) {
+ try {
+ addresses.add(InetAddresses.parseNumericAddress(ipv4Address));
+ } catch (IllegalArgumentException e) {
+ Log.wtf(TAG, "Invalid ipv4 address", e);
}
+ }
+ for (String ipv6Address : serviceInfo.getIpv6Addresses()) {
+ try {
+ addresses.add(InetAddresses.parseNumericAddress(ipv6Address));
+ } catch (IllegalArgumentException e) {
+ Log.wtf(TAG, "Invalid ipv6 address", e);
+ }
+ }
+
+ if (addresses.size() != 0) {
+ info.setHostAddresses(addresses);
clientInfo.onResolveServiceSucceeded(clientId, info);
- } catch (IllegalArgumentException e) {
- Log.wtf(TAG, "Invalid address in RESOLVE_SERVICE_SUCCEEDED", e);
+ } else {
+ // No address. Notify resolution failure.
clientInfo.onResolveServiceFailed(
clientId, NsdManager.FAILURE_INTERNAL_ERROR);
}
@@ -1164,10 +1192,7 @@
Log.wtf(TAG, "non-DiscoveryManager request in DiscoveryManager event");
break;
}
- final MdnsListener listener = ((DiscoveryManagerRequest) request).mListener;
- mMdnsDiscoveryManager.unregisterListener(
- listener.getListenedServiceType(), listener);
- removeRequestMap(clientId, transactionId, clientInfo);
+ stopDiscoveryManagerRequest(request, clientId, transactionId, clientInfo);
break;
}
default:
@@ -1227,6 +1252,34 @@
return sb.toString();
}
+ /**
+ * Check the given service type is valid and construct it to a service type
+ * which can use for discovery / resolution service.
+ *
+ * <p> The valid service type should be 2 labels, or 3 labels if the query is for a
+ * subtype (see RFC6763 7.1). Each label is up to 63 characters and must start with an
+ * underscore; they are alphanumerical characters or dashes or underscore, except the
+ * last one that is just alphanumerical. The last label must be _tcp or _udp.
+ *
+ * @param serviceType the request service type for discovery / resolution service
+ * @return constructed service type or null if the given service type is invalid.
+ */
+ @Nullable
+ public static String constructServiceType(String serviceType) {
+ if (TextUtils.isEmpty(serviceType)) return null;
+
+ final Pattern serviceTypePattern = Pattern.compile(
+ "^(_[a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]\\.)?"
+ + "(_[a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]\\._(?:tcp|udp))"
+ // Drop '.' at the end of service type that is compatible with old backend.
+ + "\\.?$");
+ final Matcher matcher = serviceTypePattern.matcher(serviceType);
+ if (!matcher.matches()) return null;
+ return matcher.group(1) == null
+ ? matcher.group(2)
+ : matcher.group(1) + "_sub." + matcher.group(2);
+ }
+
@VisibleForTesting
NsdService(Context ctx, Handler handler, long cleanupDelayMs) {
this(ctx, handler, cleanupDelayMs, new Dependencies());
@@ -1280,6 +1333,24 @@
}
/**
+ * Get the type allowlist flag value.
+ * @see #MDNS_TYPE_ALLOWLIST_FLAGS
+ */
+ @Nullable
+ public String getTypeAllowlistFlags() {
+ return DeviceConfigUtils.getDeviceConfigProperty(NAMESPACE_TETHERING,
+ MDNS_TYPE_ALLOWLIST_FLAGS, null);
+ }
+
+ /**
+ * @see DeviceConfigUtils#isFeatureEnabled(Context, String, String, String, boolean)
+ */
+ public boolean isFeatureEnabled(Context context, String feature) {
+ return DeviceConfigUtils.isFeatureEnabled(context, NAMESPACE_TETHERING,
+ feature, DeviceConfigUtils.TETHERING_MODULE_NAME, false /* defaultEnabled */);
+ }
+
+ /**
* @see MdnsDiscoveryManager
*/
public MdnsDiscoveryManager makeMdnsDiscoveryManager(
@@ -1304,6 +1375,41 @@
}
}
+ /**
+ * Return whether a type is allowlisted to use the Java backend.
+ * @param type The service type
+ * @param flagPrefix One of {@link #MDNS_ADVERTISER_ALLOWLIST_FLAG_PREFIX} or
+ * {@link #MDNS_DISCOVERY_MANAGER_ALLOWLIST_FLAG_PREFIX}.
+ */
+ private boolean isTypeAllowlistedForJavaBackend(@Nullable String type,
+ @NonNull String flagPrefix) {
+ if (type == null) return false;
+ final String typesConfig = mDeps.getTypeAllowlistFlags();
+ if (TextUtils.isEmpty(typesConfig)) return false;
+
+ final String mappingPrefix = type + ":";
+ String mappedFlag = null;
+ for (String mapping : TextUtils.split(typesConfig, ",")) {
+ if (mapping.startsWith(mappingPrefix)) {
+ mappedFlag = mapping.substring(mappingPrefix.length());
+ break;
+ }
+ }
+
+ if (mappedFlag == null) return false;
+
+ return mDeps.isFeatureEnabled(mContext,
+ flagPrefix + mappedFlag + MDNS_ALLOWLIST_FLAG_SUFFIX);
+ }
+
+ private boolean useDiscoveryManagerForType(@Nullable String type) {
+ return isTypeAllowlistedForJavaBackend(type, MDNS_DISCOVERY_MANAGER_ALLOWLIST_FLAG_PREFIX);
+ }
+
+ private boolean useAdvertiserForType(@Nullable String type) {
+ return isTypeAllowlistedForJavaBackend(type, MDNS_ADVERTISER_ALLOWLIST_FLAG_PREFIX);
+ }
+
public static NsdService create(Context context) {
HandlerThread thread = new HandlerThread(TAG);
thread.start();
@@ -1694,6 +1800,13 @@
mIsPreSClient = true;
}
+ private void unregisterMdnsListenerFromRequest(ClientRequest request) {
+ final MdnsListener listener =
+ ((DiscoveryManagerRequest) request).mListener;
+ mMdnsDiscoveryManager.unregisterListener(
+ listener.getListenedServiceType(), listener);
+ }
+
// Remove any pending requests from the global map when we get rid of a client,
// and send cancellations to the daemon.
private void expungeAllRequests() {
@@ -1709,10 +1822,7 @@
}
if (request instanceof DiscoveryManagerRequest) {
- final MdnsListener listener =
- ((DiscoveryManagerRequest) request).mListener;
- mMdnsDiscoveryManager.unregisterListener(
- listener.getListenedServiceType(), listener);
+ unregisterMdnsListenerFromRequest(request);
continue;
}
diff --git a/service-t/src/com/android/server/connectivity/mdns/EnqueueMdnsQueryCallable.java b/service-t/src/com/android/server/connectivity/mdns/EnqueueMdnsQueryCallable.java
index fdd1478..9a67007 100644
--- a/service-t/src/com/android/server/connectivity/mdns/EnqueueMdnsQueryCallable.java
+++ b/service-t/src/com/android/server/connectivity/mdns/EnqueueMdnsQueryCallable.java
@@ -60,13 +60,21 @@
}
}
+ @NonNull
private final WeakReference<MdnsSocketClientBase> weakRequestSender;
+ @NonNull
private final MdnsPacketWriter packetWriter;
+ @NonNull
private final String[] serviceTypeLabels;
+ @NonNull
private final List<String> subtypes;
private final boolean expectUnicastResponse;
private final int transactionId;
+ @Nullable
private final Network network;
+ private final boolean sendDiscoveryQueries;
+ @NonNull
+ private final List<MdnsResponse> servicesToResolve;
EnqueueMdnsQueryCallable(
@NonNull MdnsSocketClientBase requestSender,
@@ -75,7 +83,9 @@
@NonNull Collection<String> subtypes,
boolean expectUnicastResponse,
int transactionId,
- @Nullable Network network) {
+ @Nullable Network network,
+ boolean sendDiscoveryQueries,
+ @NonNull Collection<MdnsResponse> servicesToResolve) {
weakRequestSender = new WeakReference<>(requestSender);
this.packetWriter = packetWriter;
serviceTypeLabels = TextUtils.split(serviceType, "\\.");
@@ -83,6 +93,8 @@
this.expectUnicastResponse = expectUnicastResponse;
this.transactionId = transactionId;
this.network = network;
+ this.sendDiscoveryQueries = sendDiscoveryQueries;
+ this.servicesToResolve = new ArrayList<>(servicesToResolve);
}
// Incompatible return type for override of Callable#call().
@@ -96,9 +108,44 @@
return null;
}
- int numQuestions = 1;
- if (!subtypes.isEmpty()) {
- numQuestions += subtypes.size();
+ int numQuestions = 0;
+
+ if (sendDiscoveryQueries) {
+ numQuestions++; // Base service type
+ if (!subtypes.isEmpty()) {
+ numQuestions += subtypes.size();
+ }
+ }
+
+ // List of (name, type) to query
+ final ArrayList<Pair<String[], Integer>> missingKnownAnswerRecords = new ArrayList<>();
+ for (MdnsResponse response : servicesToResolve) {
+ // TODO: also send queries to renew record TTL (as per RFC6762 7.1 no need to query
+ // if remaining TTL is more than half the original one, so send the queries if half
+ // the TTL has passed).
+ if (response.isComplete()) continue;
+ final String[] serviceName = response.getServiceName();
+ if (serviceName == null) continue;
+ if (!response.hasTextRecord()) {
+ missingKnownAnswerRecords.add(new Pair<>(serviceName, MdnsRecord.TYPE_TXT));
+ }
+ if (!response.hasServiceRecord()) {
+ missingKnownAnswerRecords.add(new Pair<>(serviceName, MdnsRecord.TYPE_SRV));
+ // The hostname is not yet known, so queries for address records will be sent
+ // the next time the EnqueueMdnsQueryCallable is enqueued if the reply does not
+ // contain them. In practice, advertisers should include the address records
+ // when queried for SRV, although it's not a MUST requirement (RFC6763 12.2).
+ } else if (!response.hasInet4AddressRecord() && !response.hasInet6AddressRecord()) {
+ final String[] host = response.getServiceRecord().getServiceHost();
+ missingKnownAnswerRecords.add(new Pair<>(host, MdnsRecord.TYPE_A));
+ missingKnownAnswerRecords.add(new Pair<>(host, MdnsRecord.TYPE_AAAA));
+ }
+ }
+ numQuestions += missingKnownAnswerRecords.size();
+
+ if (numQuestions == 0) {
+ // No query to send
+ return null;
}
// Header.
@@ -109,28 +156,25 @@
packetWriter.writeUInt16(0); // number of authority entries
packetWriter.writeUInt16(0); // number of additional records
- // Question(s). There will be one question for each (fqdn+subtype, recordType)
- // combination,
- // as well as one for each (fqdn, recordType) combination.
-
- for (String subtype : subtypes) {
- String[] labels = new String[serviceTypeLabels.length + 2];
- labels[0] = MdnsConstants.SUBTYPE_PREFIX + subtype;
- labels[1] = MdnsConstants.SUBTYPE_LABEL;
- System.arraycopy(serviceTypeLabels, 0, labels, 2, serviceTypeLabels.length);
-
- packetWriter.writeLabels(labels);
- packetWriter.writeUInt16(MdnsRecord.TYPE_PTR);
- packetWriter.writeUInt16(
- MdnsConstants.QCLASS_INTERNET
- | (expectUnicastResponse ? MdnsConstants.QCLASS_UNICAST : 0));
+ // Question(s) for missing records on known answers
+ for (Pair<String[], Integer> question : missingKnownAnswerRecords) {
+ writeQuestion(question.first, question.second);
}
- packetWriter.writeLabels(serviceTypeLabels);
- packetWriter.writeUInt16(MdnsRecord.TYPE_PTR);
- packetWriter.writeUInt16(
- MdnsConstants.QCLASS_INTERNET
- | (expectUnicastResponse ? MdnsConstants.QCLASS_UNICAST : 0));
+ // Question(s) for discovering other services with the type. There will be one question
+ // for each (fqdn+subtype, recordType) combination, as well as one for each (fqdn,
+ // recordType) combination.
+ if (sendDiscoveryQueries) {
+ for (String subtype : subtypes) {
+ String[] labels = new String[serviceTypeLabels.length + 2];
+ labels[0] = MdnsConstants.SUBTYPE_PREFIX + subtype;
+ labels[1] = MdnsConstants.SUBTYPE_LABEL;
+ System.arraycopy(serviceTypeLabels, 0, labels, 2, serviceTypeLabels.length);
+
+ writeQuestion(labels, MdnsRecord.TYPE_PTR);
+ }
+ writeQuestion(serviceTypeLabels, MdnsRecord.TYPE_PTR);
+ }
if (requestSender instanceof MdnsMultinetworkSocketClient) {
sendPacketToIpv4AndIpv6(requestSender, MdnsConstants.MDNS_PORT, network);
@@ -159,6 +203,14 @@
}
}
+ private void writeQuestion(String[] labels, int type) throws IOException {
+ packetWriter.writeLabels(labels);
+ packetWriter.writeUInt16(type);
+ packetWriter.writeUInt16(
+ MdnsConstants.QCLASS_INTERNET
+ | (expectUnicastResponse ? MdnsConstants.QCLASS_UNICAST : 0));
+ }
+
private void sendPacketTo(MdnsSocketClientBase requestSender, InetSocketAddress address)
throws IOException {
DatagramPacket packet = packetWriter.getPacket(address);
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsAdvertiser.java b/service-t/src/com/android/server/connectivity/mdns/MdnsAdvertiser.java
index 977478a..ec3e997 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsAdvertiser.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsAdvertiser.java
@@ -31,6 +31,7 @@
import java.util.List;
import java.util.Map;
+import java.util.UUID;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
@@ -43,6 +44,9 @@
private static final String TAG = MdnsAdvertiser.class.getSimpleName();
static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
+ // Top-level domain for link-local queries, as per RFC6762 3.
+ private static final String LOCAL_TLD = "local";
+
private final Looper mLooper;
private final AdvertiserCallback mCb;
@@ -60,6 +64,8 @@
private final SparseArray<Registration> mRegistrations = new SparseArray<>();
private final Dependencies mDeps;
+ private String[] mDeviceHostName;
+
/**
* Dependencies for {@link MdnsAdvertiser}, useful for testing.
*/
@@ -71,11 +77,32 @@
public MdnsInterfaceAdvertiser makeAdvertiser(@NonNull MdnsInterfaceSocket socket,
@NonNull List<LinkAddress> initialAddresses,
@NonNull Looper looper, @NonNull byte[] packetCreationBuffer,
- @NonNull MdnsInterfaceAdvertiser.Callback cb) {
+ @NonNull MdnsInterfaceAdvertiser.Callback cb,
+ @NonNull String[] deviceHostName) {
// Note NetworkInterface is final and not mockable
final String logTag = socket.getInterface().getName();
return new MdnsInterfaceAdvertiser(logTag, socket, initialAddresses, looper,
- packetCreationBuffer, cb);
+ packetCreationBuffer, cb, deviceHostName);
+ }
+
+ /**
+ * Generates a unique hostname to be used by the device.
+ */
+ @NonNull
+ public String[] generateHostname() {
+ // Generate a very-probably-unique hostname. This allows minimizing possible conflicts
+ // to the point that probing for it is no longer necessary (as per RFC6762 8.1 last
+ // paragraph), and does not leak more information than what could already be obtained by
+ // looking at the mDNS packets source address.
+ // This differs from historical behavior that just used "Android.local" for many
+ // devices, creating a lot of conflicts.
+ // Having a different hostname per interface is an acceptable option as per RFC6762 14.
+ // This hostname will change every time the interface is reconnected, so this does not
+ // allow tracking the device.
+ // TODO: consider deriving a hostname from other sources, such as the IPv6 addresses
+ // (reusing the same privacy-protecting mechanics).
+ return new String[] {
+ "Android_" + UUID.randomUUID().toString().replace("-", ""), LOCAL_TLD };
}
}
@@ -260,7 +287,7 @@
MdnsInterfaceAdvertiser advertiser = mAllAdvertisers.get(socket);
if (advertiser == null) {
advertiser = mDeps.makeAdvertiser(socket, addresses, mLooper, mPacketCreationBuffer,
- mInterfaceAdvertiserCb);
+ mInterfaceAdvertiserCb, mDeviceHostName);
mAllAdvertisers.put(socket, advertiser);
advertiser.start();
}
@@ -389,6 +416,7 @@
mCb = cb;
mSocketProvider = socketProvider;
mDeps = deps;
+ mDeviceHostName = deps.generateHostname();
}
private void checkThread() {
@@ -453,6 +481,10 @@
advertiser.removeService(id);
}
mRegistrations.remove(id);
+ // Regenerates host name when registrations removed.
+ if (mRegistrations.size() == 0) {
+ mDeviceHostName = mDeps.generateHostname();
+ }
}
private static <K, V> boolean any(@NonNull ArrayMap<K, V> map,
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsDiscoveryManager.java b/service-t/src/com/android/server/connectivity/mdns/MdnsDiscoveryManager.java
index cc6b98b..67059e7 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsDiscoveryManager.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsDiscoveryManager.java
@@ -19,6 +19,7 @@
import android.Manifest.permission;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
+import android.net.Network;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
@@ -27,7 +28,6 @@
import com.android.server.connectivity.mdns.util.MdnsLogger;
import java.io.IOException;
-import java.util.Arrays;
import java.util.Map;
/**
@@ -119,22 +119,10 @@
}
@Override
- public synchronized void onResponseReceived(@NonNull MdnsResponse response) {
- String[] name =
- response.getPointerRecords().isEmpty()
- ? null
- : response.getPointerRecords().get(0).getName();
- if (name != null) {
- for (MdnsServiceTypeClient serviceTypeClient : serviceTypeClients.values()) {
- String[] serviceType = serviceTypeClient.getServiceTypeLabels();
- if ((Arrays.equals(name, serviceType)
- || ((name.length == (serviceType.length + 2))
- && name[1].equals(MdnsConstants.SUBTYPE_LABEL)
- && MdnsRecord.labelsAreSuffix(serviceType, name)))) {
- serviceTypeClient.processResponse(response);
- return;
- }
- }
+ public synchronized void onResponseReceived(@NonNull MdnsPacket packet,
+ int interfaceIndex, Network network) {
+ for (MdnsServiceTypeClient serviceTypeClient : serviceTypeClients.values()) {
+ serviceTypeClient.processResponse(packet, interfaceIndex, network);
}
}
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java b/service-t/src/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java
index c616e01..79cddce 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiser.java
@@ -141,8 +141,9 @@
public static class Dependencies {
/** @see MdnsRecordRepository */
@NonNull
- public MdnsRecordRepository makeRecordRepository(@NonNull Looper looper) {
- return new MdnsRecordRepository(looper);
+ public MdnsRecordRepository makeRecordRepository(@NonNull Looper looper,
+ @NonNull String[] deviceHostName) {
+ return new MdnsRecordRepository(looper, deviceHostName);
}
/** @see MdnsReplySender */
@@ -169,17 +170,18 @@
public MdnsInterfaceAdvertiser(@NonNull String logTag,
@NonNull MdnsInterfaceSocket socket, @NonNull List<LinkAddress> initialAddresses,
- @NonNull Looper looper, @NonNull byte[] packetCreationBuffer, @NonNull Callback cb) {
+ @NonNull Looper looper, @NonNull byte[] packetCreationBuffer, @NonNull Callback cb,
+ @NonNull String[] deviceHostName) {
this(logTag, socket, initialAddresses, looper, packetCreationBuffer, cb,
- new Dependencies());
+ new Dependencies(), deviceHostName);
}
public MdnsInterfaceAdvertiser(@NonNull String logTag,
@NonNull MdnsInterfaceSocket socket, @NonNull List<LinkAddress> initialAddresses,
@NonNull Looper looper, @NonNull byte[] packetCreationBuffer, @NonNull Callback cb,
- @NonNull Dependencies deps) {
+ @NonNull Dependencies deps, @NonNull String[] deviceHostName) {
mTag = MdnsInterfaceAdvertiser.class.getSimpleName() + "/" + logTag;
- mRecordRepository = deps.makeRecordRepository(looper);
+ mRecordRepository = deps.makeRecordRepository(looper, deviceHostName);
mRecordRepository.updateAddresses(initialAddresses);
mSocket = socket;
mCb = cb;
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClient.java b/service-t/src/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClient.java
index d959065..93972d9 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClient.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClient.java
@@ -33,7 +33,6 @@
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetSocketAddress;
-import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -48,7 +47,6 @@
@NonNull private final Handler mHandler;
@NonNull private final MdnsSocketProvider mSocketProvider;
- @NonNull private final MdnsResponseDecoder mResponseDecoder;
private final Map<MdnsServiceBrowserListener, InterfaceSocketCallback> mRequestedNetworks =
new ArrayMap<>();
@@ -62,8 +60,6 @@
@NonNull MdnsSocketProvider provider) {
mHandler = new Handler(looper);
mSocketProvider = provider;
- mResponseDecoder = new MdnsResponseDecoder(
- new MdnsResponseDecoder.Clock(), null /* serviceType */);
}
private class InterfaceSocketCallback implements MdnsSocketProvider.SocketCallback {
@@ -170,19 +166,21 @@
@NonNull Network network) {
int packetNumber = ++mReceivedPacketNumber;
- final List<MdnsResponse> responses = new ArrayList<>();
- final int errorCode = mResponseDecoder.decode(
- recvbuf, length, responses, interfaceIndex, network);
- if (errorCode == MdnsResponseDecoder.SUCCESS) {
- for (MdnsResponse response : responses) {
+ final MdnsPacket response;
+ try {
+ response = MdnsResponseDecoder.parseResponse(recvbuf, length);
+ } catch (MdnsPacket.ParseException e) {
+ if (e.code != MdnsResponseErrorCode.ERROR_NOT_RESPONSE_MESSAGE) {
+ Log.e(TAG, e.getMessage(), e);
if (mCallback != null) {
- mCallback.onResponseReceived(response);
+ mCallback.onFailedToParseMdnsResponse(packetNumber, e.code);
}
}
- } else if (errorCode != MdnsResponseErrorCode.ERROR_NOT_RESPONSE_MESSAGE) {
- if (mCallback != null) {
- mCallback.onFailedToParseMdnsResponse(packetNumber, errorCode);
- }
+ return;
+ }
+
+ if (mCallback != null) {
+ mCallback.onResponseReceived(response, interfaceIndex, network);
}
}
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsRecordRepository.java b/service-t/src/com/android/server/connectivity/mdns/MdnsRecordRepository.java
index e975ab4..1329172 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsRecordRepository.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsRecordRepository.java
@@ -47,7 +47,6 @@
import java.util.Random;
import java.util.Set;
import java.util.TreeMap;
-import java.util.UUID;
import java.util.concurrent.TimeUnit;
/**
@@ -90,15 +89,16 @@
@NonNull
private final Looper mLooper;
@NonNull
- private String[] mDeviceHostname;
+ private final String[] mDeviceHostname;
- public MdnsRecordRepository(@NonNull Looper looper) {
- this(looper, new Dependencies());
+ public MdnsRecordRepository(@NonNull Looper looper, @NonNull String[] deviceHostname) {
+ this(looper, new Dependencies(), deviceHostname);
}
@VisibleForTesting
- public MdnsRecordRepository(@NonNull Looper looper, @NonNull Dependencies deps) {
- mDeviceHostname = deps.getHostname();
+ public MdnsRecordRepository(@NonNull Looper looper, @NonNull Dependencies deps,
+ @NonNull String[] deviceHostname) {
+ mDeviceHostname = deviceHostname;
mLooper = looper;
}
@@ -107,25 +107,6 @@
*/
@VisibleForTesting
public static class Dependencies {
- /**
- * Get a unique hostname to be used by the device.
- */
- @NonNull
- public String[] getHostname() {
- // Generate a very-probably-unique hostname. This allows minimizing possible conflicts
- // to the point that probing for it is no longer necessary (as per RFC6762 8.1 last
- // paragraph), and does not leak more information than what could already be obtained by
- // looking at the mDNS packets source address.
- // This differs from historical behavior that just used "Android.local" for many
- // devices, creating a lot of conflicts.
- // Having a different hostname per interface is an acceptable option as per RFC6762 14.
- // This hostname will change every time the interface is reconnected, so this does not
- // allow tracking the device.
- // TODO: consider deriving a hostname from other sources, such as the IPv6 addresses
- // (reusing the same privacy-protecting mechanics).
- return new String[] {
- "Android_" + UUID.randomUUID().toString().replace("-", ""), LOCAL_TLD };
- }
/**
* @see NetworkInterface#getInetAddresses().
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsResponse.java b/service-t/src/com/android/server/connectivity/mdns/MdnsResponse.java
index 3a41978..be2555b 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsResponse.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsResponse.java
@@ -16,16 +16,20 @@
package com.android.server.connectivity.mdns;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.net.Network;
import com.android.internal.annotations.VisibleForTesting;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Objects;
/** An mDNS response. */
public class MdnsResponse {
@@ -33,42 +37,72 @@
private final List<MdnsPointerRecord> pointerRecords;
private MdnsServiceRecord serviceRecord;
private MdnsTextRecord textRecord;
- private MdnsInetAddressRecord inet4AddressRecord;
- private MdnsInetAddressRecord inet6AddressRecord;
+ @NonNull private List<MdnsInetAddressRecord> inet4AddressRecords;
+ @NonNull private List<MdnsInetAddressRecord> inet6AddressRecords;
private long lastUpdateTime;
private final int interfaceIndex;
@Nullable private final Network network;
+ @NonNull private final String[] serviceName;
/** Constructs a new, empty response. */
- public MdnsResponse(long now, int interfaceIndex, @Nullable Network network) {
+ public MdnsResponse(long now, @NonNull String[] serviceName, int interfaceIndex,
+ @Nullable Network network) {
lastUpdateTime = now;
records = new LinkedList<>();
pointerRecords = new LinkedList<>();
+ inet4AddressRecords = new ArrayList<>();
+ inet6AddressRecords = new ArrayList<>();
this.interfaceIndex = interfaceIndex;
this.network = network;
+ this.serviceName = serviceName;
}
- // This generic typed helper compares records for equality.
- // Returns True if records are the same.
- private <T> boolean recordsAreSame(T a, T b) {
- return ((a == null) && (b == null)) || ((a != null) && (b != null) && a.equals(b));
+ public MdnsResponse(@NonNull MdnsResponse base) {
+ records = new ArrayList<>(base.records);
+ pointerRecords = new ArrayList<>(base.pointerRecords);
+ serviceRecord = base.serviceRecord;
+ textRecord = base.textRecord;
+ inet4AddressRecords = new ArrayList<>(base.inet4AddressRecords);
+ inet6AddressRecords = new ArrayList<>(base.inet6AddressRecords);
+ lastUpdateTime = base.lastUpdateTime;
+ serviceName = base.serviceName;
+ interfaceIndex = base.interfaceIndex;
+ network = base.network;
+ }
+
+ /**
+ * Compare records for equality, including their TTL.
+ *
+ * MdnsRecord#equals ignores TTL and receiptTimeMillis, but methods in this class need to update
+ * records when the TTL changes (especially for goodbye announcements).
+ */
+ private boolean recordsAreSame(MdnsRecord a, MdnsRecord b) {
+ if (!Objects.equals(a, b)) return false;
+ return a == null || a.getTtl() == b.getTtl();
}
/**
* Adds a pointer record.
*
* @return <code>true</code> if the record was added, or <code>false</code> if a matching
- * pointer
- * record is already present in the response.
+ * pointer record is already present in the response with the same TTL.
*/
public synchronized boolean addPointerRecord(MdnsPointerRecord pointerRecord) {
- if (!pointerRecords.contains(pointerRecord)) {
- pointerRecords.add(pointerRecord);
- records.add(pointerRecord);
- return true;
+ if (!Arrays.equals(serviceName, pointerRecord.getPointer())) {
+ throw new IllegalArgumentException(
+ "Pointer records for different service names cannot be added");
}
-
- return false;
+ final int existing = pointerRecords.indexOf(pointerRecord);
+ if (existing >= 0) {
+ if (recordsAreSame(pointerRecord, pointerRecords.get(existing))) {
+ return false;
+ }
+ final MdnsRecord record = pointerRecords.remove(existing);
+ records.remove(record);
+ }
+ pointerRecords.add(pointerRecord);
+ records.add(pointerRecord);
+ return true;
}
/** Gets the pointer records. */
@@ -170,44 +204,60 @@
return textRecord != null;
}
- /** Sets the IPv4 address record. */
- public synchronized boolean setInet4AddressRecord(
- @Nullable MdnsInetAddressRecord newInet4AddressRecord) {
- if (recordsAreSame(this.inet4AddressRecord, newInet4AddressRecord)) {
- return false;
+ /** Add the IPv4 address record. */
+ public synchronized boolean addInet4AddressRecord(
+ @NonNull MdnsInetAddressRecord newInet4AddressRecord) {
+ final int existing = inet4AddressRecords.indexOf(newInet4AddressRecord);
+ if (existing >= 0) {
+ if (recordsAreSame(newInet4AddressRecord, inet4AddressRecords.get(existing))) {
+ return false;
+ }
+ final MdnsRecord record = inet4AddressRecords.remove(existing);
+ records.remove(record);
}
- if (this.inet4AddressRecord != null) {
- records.remove(this.inet4AddressRecord);
- }
- if (newInet4AddressRecord != null && newInet4AddressRecord.getInet4Address() != null) {
- this.inet4AddressRecord = newInet4AddressRecord;
- records.add(this.inet4AddressRecord);
- }
+ inet4AddressRecords.add(newInet4AddressRecord);
+ records.add(newInet4AddressRecord);
return true;
}
- /** Gets the IPv4 address record. */
+ /** Gets the IPv4 address records. */
+ @NonNull
+ public synchronized List<MdnsInetAddressRecord> getInet4AddressRecords() {
+ return Collections.unmodifiableList(inet4AddressRecords);
+ }
+
+ /** Return the first IPv4 address record or null if no record. */
+ @Nullable
public synchronized MdnsInetAddressRecord getInet4AddressRecord() {
- return inet4AddressRecord;
+ return inet4AddressRecords.isEmpty() ? null : inet4AddressRecords.get(0);
}
+ /** Check whether response has IPv4 address record */
public synchronized boolean hasInet4AddressRecord() {
- return inet4AddressRecord != null;
+ return !inet4AddressRecords.isEmpty();
}
- /** Sets the IPv6 address record. */
- public synchronized boolean setInet6AddressRecord(
- @Nullable MdnsInetAddressRecord newInet6AddressRecord) {
- if (recordsAreSame(this.inet6AddressRecord, newInet6AddressRecord)) {
- return false;
+ /** Clear all IPv4 address records */
+ synchronized void clearInet4AddressRecords() {
+ for (MdnsInetAddressRecord record : inet4AddressRecords) {
+ records.remove(record);
}
- if (this.inet6AddressRecord != null) {
- records.remove(this.inet6AddressRecord);
+ inet4AddressRecords.clear();
+ }
+
+ /** Sets the IPv6 address records. */
+ public synchronized boolean addInet6AddressRecord(
+ @NonNull MdnsInetAddressRecord newInet6AddressRecord) {
+ final int existing = inet6AddressRecords.indexOf(newInet6AddressRecord);
+ if (existing >= 0) {
+ if (recordsAreSame(newInet6AddressRecord, inet6AddressRecords.get(existing))) {
+ return false;
+ }
+ final MdnsRecord record = inet6AddressRecords.remove(existing);
+ records.remove(record);
}
- if (newInet6AddressRecord != null && newInet6AddressRecord.getInet6Address() != null) {
- this.inet6AddressRecord = newInet6AddressRecord;
- records.add(this.inet6AddressRecord);
- }
+ inet6AddressRecords.add(newInet6AddressRecord);
+ records.add(newInet6AddressRecord);
return true;
}
@@ -227,13 +277,28 @@
return network;
}
- /** Gets the IPv6 address record. */
- public synchronized MdnsInetAddressRecord getInet6AddressRecord() {
- return inet6AddressRecord;
+ /** Gets all IPv6 address records. */
+ public synchronized List<MdnsInetAddressRecord> getInet6AddressRecords() {
+ return Collections.unmodifiableList(inet6AddressRecords);
}
+ /** Return the first IPv6 address record or null if no record. */
+ @Nullable
+ public synchronized MdnsInetAddressRecord getInet6AddressRecord() {
+ return inet6AddressRecords.isEmpty() ? null : inet6AddressRecords.get(0);
+ }
+
+ /** Check whether response has IPv6 address record */
public synchronized boolean hasInet6AddressRecord() {
- return inet6AddressRecord != null;
+ return !inet6AddressRecords.isEmpty();
+ }
+
+ /** Clear all IPv6 address records */
+ synchronized void clearInet6AddressRecords() {
+ for (MdnsInetAddressRecord record : inet6AddressRecords) {
+ records.remove(record);
+ }
+ inet6AddressRecords.clear();
}
/** Gets all of the records. */
@@ -242,101 +307,58 @@
}
/**
- * Merges any records that are present in another response into this one.
+ * Drop address records if they are for a hostname that does not match the service record.
*
- * @return <code>true</code> if any records were added or updated.
+ * @return True if the records were dropped.
*/
- public synchronized boolean mergeRecordsFrom(MdnsResponse other) {
- lastUpdateTime = other.lastUpdateTime;
+ public synchronized boolean dropUnmatchedAddressRecords() {
+ if (this.serviceRecord == null) return false;
+ boolean dropAddressRecords = false;
- boolean updated = false;
-
- List<MdnsPointerRecord> pointerRecords = other.getPointerRecords();
- if (pointerRecords != null) {
- for (MdnsPointerRecord pointerRecord : pointerRecords) {
- if (addPointerRecord(pointerRecord)) {
- updated = true;
- }
+ for (MdnsInetAddressRecord inetAddressRecord : getInet4AddressRecords()) {
+ if (!Arrays.equals(
+ this.serviceRecord.getServiceHost(), inetAddressRecord.getName())) {
+ dropAddressRecords = true;
+ }
+ }
+ for (MdnsInetAddressRecord inetAddressRecord : getInet6AddressRecords()) {
+ if (!Arrays.equals(
+ this.serviceRecord.getServiceHost(), inetAddressRecord.getName())) {
+ dropAddressRecords = true;
}
}
- MdnsServiceRecord serviceRecord = other.getServiceRecord();
- if (serviceRecord != null) {
- if (setServiceRecord(serviceRecord)) {
- updated = true;
- }
+ if (dropAddressRecords) {
+ clearInet4AddressRecords();
+ clearInet6AddressRecords();
+ return true;
}
-
- MdnsTextRecord textRecord = other.getTextRecord();
- if (textRecord != null) {
- if (setTextRecord(textRecord)) {
- updated = true;
- }
- }
-
- MdnsInetAddressRecord otherInet4AddressRecord = other.getInet4AddressRecord();
- if (otherInet4AddressRecord != null && otherInet4AddressRecord.getInet4Address() != null) {
- if (setInet4AddressRecord(otherInet4AddressRecord)) {
- updated = true;
- }
- }
-
- MdnsInetAddressRecord otherInet6AddressRecord = other.getInet6AddressRecord();
- if (otherInet6AddressRecord != null && otherInet6AddressRecord.getInet6Address() != null) {
- if (setInet6AddressRecord(otherInet6AddressRecord)) {
- updated = true;
- }
- }
-
- // If the hostname in the service record no longer matches the hostname in either of the
- // address records, then drop the address records.
- if (this.serviceRecord != null) {
- boolean dropAddressRecords = false;
-
- if (this.inet4AddressRecord != null) {
- if (!Arrays.equals(
- this.serviceRecord.getServiceHost(), this.inet4AddressRecord.getName())) {
- dropAddressRecords = true;
- }
- }
- if (this.inet6AddressRecord != null) {
- if (!Arrays.equals(
- this.serviceRecord.getServiceHost(), this.inet6AddressRecord.getName())) {
- dropAddressRecords = true;
- }
- }
-
- if (dropAddressRecords) {
- setInet4AddressRecord(null);
- setInet6AddressRecord(null);
- updated = true;
- }
- }
-
- return updated;
+ return false;
}
/**
- * Tests if the response is complete. A response is considered complete if it contains PTR, SRV,
- * TXT, and A (for IPv4) or AAAA (for IPv6) records.
+ * Tests if the response is complete. A response is considered complete if it contains SRV,
+ * TXT, and A (for IPv4) or AAAA (for IPv6) records. The service type->name mapping is always
+ * known when constructing a MdnsResponse, so this may return true when there is no PTR record.
*/
public synchronized boolean isComplete() {
- return !pointerRecords.isEmpty()
- && (serviceRecord != null)
+ return (serviceRecord != null)
&& (textRecord != null)
- && (inet4AddressRecord != null || inet6AddressRecord != null);
+ && (!inet4AddressRecords.isEmpty() || !inet6AddressRecords.isEmpty());
}
/**
* Returns the key for this response. The key uniquely identifies the response by its service
* name.
*/
- public synchronized String getServiceInstanceName() {
- if (pointerRecords.isEmpty()) {
- return null;
- }
- String[] pointers = pointerRecords.get(0).getPointer();
- return ((pointers != null) && (pointers.length > 0)) ? pointers[0] : null;
+ @Nullable
+ public String getServiceInstanceName() {
+ return serviceName.length > 0 ? serviceName[0] : null;
+ }
+
+ @NonNull
+ public String[] getServiceName() {
+ return serviceName;
}
/**
@@ -388,13 +410,13 @@
++count;
}
- if (inet4AddressRecord != null) {
- inet4AddressRecord.write(writer, now);
+ for (MdnsInetAddressRecord inetAddressRecord : inet4AddressRecords) {
+ inetAddressRecord.write(writer, now);
++count;
}
- if (inet6AddressRecord != null) {
- inet6AddressRecord.write(writer, now);
+ for (MdnsInetAddressRecord inetAddressRecord : inet6AddressRecords) {
+ inetAddressRecord.write(writer, now);
++count;
}
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsResponseDecoder.java b/service-t/src/com/android/server/connectivity/mdns/MdnsResponseDecoder.java
index 82da2e4..0151202 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsResponseDecoder.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsResponseDecoder.java
@@ -20,18 +20,18 @@
import android.annotation.Nullable;
import android.net.Network;
import android.os.SystemClock;
+import android.util.ArraySet;
import com.android.server.connectivity.mdns.util.MdnsLogger;
import java.io.EOFException;
-import java.net.DatagramPacket;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
/** A class that decodes mDNS responses from UDP packets. */
public class MdnsResponseDecoder {
-
public static final int SUCCESS = 0;
private static final String TAG = "MdnsResponseDecoder";
private static final MdnsLogger LOGGER = new MdnsLogger(TAG);
@@ -50,14 +50,8 @@
List<MdnsResponse> responses, String[] pointer) {
if (responses != null) {
for (MdnsResponse response : responses) {
- List<MdnsPointerRecord> pointerRecords = response.getPointerRecords();
- if (pointerRecords == null) {
- continue;
- }
- for (MdnsPointerRecord pointerRecord : pointerRecords) {
- if (Arrays.equals(pointerRecord.getPointer(), pointer)) {
- return response;
- }
+ if (Arrays.equals(response.getServiceName(), pointer)) {
+ return response;
}
}
}
@@ -82,34 +76,16 @@
/**
* Decodes all mDNS responses for the desired service type from a packet. The class does not
- * check
- * the responses for completeness; the caller should do that.
- *
- * @param packet The packet to read from.
- * @param interfaceIndex the network interface index (or {@link
- * MdnsSocket#INTERFACE_INDEX_UNSPECIFIED} if not known) at which the packet was received
- * @param network the network at which the packet was received, or null if it is unknown.
- * @return A list of mDNS responses, or null if the packet contained no appropriate responses.
- */
- public int decode(@NonNull DatagramPacket packet, @NonNull List<MdnsResponse> responses,
- int interfaceIndex, @Nullable Network network) {
- return decode(packet.getData(), packet.getLength(), responses, interfaceIndex, network);
- }
-
- /**
- * Decodes all mDNS responses for the desired service type from a packet. The class does not
- * check
- * the responses for completeness; the caller should do that.
+ * check the responses for completeness; the caller should do that.
*
* @param recvbuf The received data buffer to read from.
* @param length The length of received data buffer.
- * @param interfaceIndex the network interface index (or {@link
- * MdnsSocket#INTERFACE_INDEX_UNSPECIFIED} if not known) at which the packet was received
- * @param network the network at which the packet was received, or null if it is unknown.
- * @return A list of mDNS responses, or null if the packet contained no appropriate responses.
+ * @return A decoded {@link MdnsPacket}.
+ * @throws MdnsPacket.ParseException if a response packet could not be parsed.
*/
- public int decode(@NonNull byte[] recvbuf, int length, @NonNull List<MdnsResponse> responses,
- int interfaceIndex, @Nullable Network network) {
+ @NonNull
+ public static MdnsPacket parseResponse(@NonNull byte[] recvbuf, int length)
+ throws MdnsPacket.ParseException {
MdnsPacketReader reader = new MdnsPacketReader(recvbuf, length);
final MdnsPacket mdnsPacket;
@@ -117,21 +93,37 @@
reader.readUInt16(); // transaction ID (not used)
int flags = reader.readUInt16();
if ((flags & MdnsConstants.FLAGS_RESPONSE_MASK) != MdnsConstants.FLAGS_RESPONSE) {
- return MdnsResponseErrorCode.ERROR_NOT_RESPONSE_MESSAGE;
+ throw new MdnsPacket.ParseException(
+ MdnsResponseErrorCode.ERROR_NOT_RESPONSE_MESSAGE, "Not a response", null);
}
mdnsPacket = MdnsPacket.parseRecordsSection(reader, flags);
if (mdnsPacket.answers.size() < 1) {
- return MdnsResponseErrorCode.ERROR_NO_ANSWERS;
+ throw new MdnsPacket.ParseException(
+ MdnsResponseErrorCode.ERROR_NO_ANSWERS, "Response has no answers",
+ null);
}
+ return mdnsPacket;
} catch (EOFException e) {
- LOGGER.e("Reached the end of the mDNS response unexpectedly.", e);
- return MdnsResponseErrorCode.ERROR_END_OF_FILE;
- } catch (MdnsPacket.ParseException e) {
- LOGGER.e(e.getMessage(), e);
- return e.code;
+ throw new MdnsPacket.ParseException(MdnsResponseErrorCode.ERROR_END_OF_FILE,
+ "Reached the end of the mDNS response unexpectedly.", e);
}
+ }
+ /**
+ * Augments a list of {@link MdnsResponse} with records from a packet. The class does not check
+ * the resulting responses for completeness; the caller should do that.
+ *
+ * @param mdnsPacket the response packet with the new records
+ * @param existingResponses list of existing responses. Will not be modified.
+ * @param interfaceIndex the network interface index (or
+ * {@link MdnsSocket#INTERFACE_INDEX_UNSPECIFIED} if not known) at which the packet was received
+ * @param network the network at which the packet was received, or null if it is unknown.
+ * @return The set of response instances that were modified or newly added.
+ */
+ public ArraySet<MdnsResponse> augmentResponses(@NonNull MdnsPacket mdnsPacket,
+ @NonNull Collection<MdnsResponse> existingResponses, int interfaceIndex,
+ @Nullable Network network) {
final ArrayList<MdnsRecord> records = new ArrayList<>(
mdnsPacket.questions.size() + mdnsPacket.answers.size()
+ mdnsPacket.authorityRecords.size() + mdnsPacket.additionalRecords.size());
@@ -139,6 +131,11 @@
records.addAll(mdnsPacket.authorityRecords);
records.addAll(mdnsPacket.additionalRecords);
+ final ArraySet<MdnsResponse> modified = new ArraySet<>();
+ final ArrayList<MdnsResponse> responses = new ArrayList<>(existingResponses.size());
+ for (MdnsResponse existing : existingResponses) {
+ responses.add(new MdnsResponse(existing));
+ }
// The response records are structured in a hierarchy, where some records reference
// others, as follows:
//
@@ -178,12 +175,14 @@
MdnsResponse response = findResponseWithPointer(responses,
pointerRecord.getPointer());
if (response == null) {
- response = new MdnsResponse(now, interfaceIndex, network);
+ response = new MdnsResponse(now, pointerRecord.getPointer(), interfaceIndex,
+ network);
responses.add(response);
}
- // Set interface index earlier because some responses have PTR record only.
- // Need to know every response is getting from which interface.
- response.addPointerRecord((MdnsPointerRecord) record);
+
+ if (response.addPointerRecord((MdnsPointerRecord) record)) {
+ modified.add(response);
+ }
}
}
}
@@ -193,47 +192,94 @@
if (record instanceof MdnsServiceRecord) {
MdnsServiceRecord serviceRecord = (MdnsServiceRecord) record;
MdnsResponse response = findResponseWithPointer(responses, serviceRecord.getName());
- if (response != null) {
- response.setServiceRecord(serviceRecord);
+ if (response != null && response.setServiceRecord(serviceRecord)) {
+ response.dropUnmatchedAddressRecords();
+ modified.add(response);
}
} else if (record instanceof MdnsTextRecord) {
MdnsTextRecord textRecord = (MdnsTextRecord) record;
MdnsResponse response = findResponseWithPointer(responses, textRecord.getName());
- if (response != null) {
- response.setTextRecord(textRecord);
+ if (response != null && response.setTextRecord(textRecord)) {
+ modified.add(response);
}
}
}
- // Loop 3: find A and AAAA records, which reference the host name in the SRV record.
+ // Loop 3-1: find A and AAAA records and clear addresses if the cache-flush bit set, which
+ // reference the host name in the SRV record.
+ final List<MdnsInetAddressRecord> inetRecords = new ArrayList<>();
for (MdnsRecord record : records) {
if (record instanceof MdnsInetAddressRecord) {
MdnsInetAddressRecord inetRecord = (MdnsInetAddressRecord) record;
+ inetRecords.add(inetRecord);
if (allowMultipleSrvRecordsPerHost) {
List<MdnsResponse> matchingResponses =
findResponsesWithHostName(responses, inetRecord.getName());
for (MdnsResponse response : matchingResponses) {
- assignInetRecord(response, inetRecord);
+ // Per RFC6762 10.2, clear all address records if the cache-flush bit set.
+ // This bit, the cache-flush bit, tells neighboring hosts
+ // that this is not a shared record type. Instead of merging this new
+ // record additively into the cache in addition to any previous records with
+ // the same name, rrtype, and rrclass, all old records with that name,
+ // rrtype, and rrclass that were received more than one second ago are
+ // declared invalid, and marked to expire from the cache in one second.
+ if (inetRecord.getCacheFlush()) {
+ response.clearInet4AddressRecords();
+ response.clearInet6AddressRecords();
+ }
}
} else {
MdnsResponse response =
findResponseWithHostName(responses, inetRecord.getName());
if (response != null) {
- assignInetRecord(response, inetRecord);
+ // Per RFC6762 10.2, clear all address records if the cache-flush bit set.
+ // This bit, the cache-flush bit, tells neighboring hosts
+ // that this is not a shared record type. Instead of merging this new
+ // record additively into the cache in addition to any previous records with
+ // the same name, rrtype, and rrclass, all old records with that name,
+ // rrtype, and rrclass that were received more than one second ago are
+ // declared invalid, and marked to expire from the cache in one second.
+ if (inetRecord.getCacheFlush()) {
+ response.clearInet4AddressRecords();
+ response.clearInet6AddressRecords();
+ }
}
}
}
}
- return SUCCESS;
+ // Loop 3-2: Assign addresses, which reference the host name in the SRV record.
+ for (MdnsInetAddressRecord inetRecord : inetRecords) {
+ if (allowMultipleSrvRecordsPerHost) {
+ List<MdnsResponse> matchingResponses =
+ findResponsesWithHostName(responses, inetRecord.getName());
+ for (MdnsResponse response : matchingResponses) {
+ if (assignInetRecord(response, inetRecord)) {
+ modified.add(response);
+ }
+ }
+ } else {
+ MdnsResponse response =
+ findResponseWithHostName(responses, inetRecord.getName());
+ if (response != null) {
+ if (assignInetRecord(response, inetRecord)) {
+ modified.add(response);
+ }
+ }
+ }
+ }
+
+ return modified;
}
- private static void assignInetRecord(MdnsResponse response, MdnsInetAddressRecord inetRecord) {
+ private static boolean assignInetRecord(
+ MdnsResponse response, MdnsInetAddressRecord inetRecord) {
if (inetRecord.getInet4Address() != null) {
- response.setInet4AddressRecord(inetRecord);
+ return response.addInet4AddressRecord(inetRecord);
} else if (inetRecord.getInet6Address() != null) {
- response.setInet6AddressRecord(inetRecord);
+ return response.addInet6AddressRecord(inetRecord);
}
+ return false;
}
private static List<MdnsResponse> findResponsesWithHostName(
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsSearchOptions.java b/service-t/src/com/android/server/connectivity/mdns/MdnsSearchOptions.java
index 583c4a9..3da6bd0 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsSearchOptions.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsSearchOptions.java
@@ -46,7 +46,8 @@
public MdnsSearchOptions createFromParcel(Parcel source) {
return new MdnsSearchOptions(source.createStringArrayList(),
source.readBoolean(), source.readBoolean(),
- source.readParcelable(null));
+ source.readParcelable(null),
+ source.readString());
}
@Override
@@ -56,6 +57,8 @@
};
private static MdnsSearchOptions defaultOptions;
private final List<String> subtypes;
+ @Nullable
+ private final String resolveInstanceName;
private final boolean isPassiveMode;
private final boolean removeExpiredService;
@@ -64,7 +67,7 @@
/** Parcelable constructs for a {@link MdnsSearchOptions}. */
MdnsSearchOptions(List<String> subtypes, boolean isPassiveMode, boolean removeExpiredService,
- @Nullable Network network) {
+ @Nullable Network network, @Nullable String resolveInstanceName) {
this.subtypes = new ArrayList<>();
if (subtypes != null) {
this.subtypes.addAll(subtypes);
@@ -72,6 +75,7 @@
this.isPassiveMode = isPassiveMode;
this.removeExpiredService = removeExpiredService;
mNetwork = network;
+ this.resolveInstanceName = resolveInstanceName;
}
/** Returns a {@link Builder} for {@link MdnsSearchOptions}. */
@@ -115,6 +119,15 @@
return mNetwork;
}
+ /**
+ * If non-null, queries should try to resolve all records of this specific service, rather than
+ * discovering all services.
+ */
+ @Nullable
+ public String getResolveInstanceName() {
+ return resolveInstanceName;
+ }
+
@Override
public int describeContents() {
return 0;
@@ -126,6 +139,7 @@
out.writeBoolean(isPassiveMode);
out.writeBoolean(removeExpiredService);
out.writeParcelable(mNetwork, 0);
+ out.writeString(resolveInstanceName);
}
/** A builder to create {@link MdnsSearchOptions}. */
@@ -134,6 +148,7 @@
private boolean isPassiveMode = true;
private boolean removeExpiredService;
private Network mNetwork;
+ private String resolveInstanceName;
private Builder() {
subtypes = new ArraySet<>();
@@ -194,10 +209,22 @@
return this;
}
+ /**
+ * Set the instance name to resolve.
+ *
+ * If non-null, queries should try to resolve all records of this specific service,
+ * rather than discovering all services.
+ * @param name The instance name.
+ */
+ public Builder setResolveInstanceName(String name) {
+ resolveInstanceName = name;
+ return this;
+ }
+
/** Builds a {@link MdnsSearchOptions} with the arguments supplied to this builder. */
public MdnsSearchOptions build() {
return new MdnsSearchOptions(new ArrayList<>(subtypes), isPassiveMode,
- removeExpiredService, mNetwork);
+ removeExpiredService, mNetwork, resolveInstanceName);
}
}
}
\ No newline at end of file
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsServiceInfo.java b/service-t/src/com/android/server/connectivity/mdns/MdnsServiceInfo.java
index 938fc3f..78df6df 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsServiceInfo.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsServiceInfo.java
@@ -31,10 +31,10 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.TreeMap;
/**
* A class representing a discovered mDNS service instance.
@@ -57,8 +57,8 @@
source.createStringArrayList(),
source.createStringArray(),
source.readInt(),
- source.readString(),
- source.readString(),
+ source.createStringArrayList(),
+ source.createStringArrayList(),
source.createStringArrayList(),
source.createTypedArrayList(TextEntry.CREATOR),
source.readInt(),
@@ -76,10 +76,10 @@
private final List<String> subtypes;
private final String[] hostName;
private final int port;
- @Nullable
- private final String ipv4Address;
- @Nullable
- private final String ipv6Address;
+ @NonNull
+ private final List<String> ipv4Addresses;
+ @NonNull
+ private final List<String> ipv6Addresses;
final List<String> textStrings;
@Nullable
final List<TextEntry> textEntries;
@@ -105,8 +105,8 @@
subtypes,
hostName,
port,
- ipv4Address,
- ipv6Address,
+ List.of(ipv4Address),
+ List.of(ipv6Address),
textStrings,
/* textEntries= */ null,
/* interfaceIndex= */ INTERFACE_INDEX_UNSPECIFIED,
@@ -130,8 +130,8 @@
subtypes,
hostName,
port,
- ipv4Address,
- ipv6Address,
+ List.of(ipv4Address),
+ List.of(ipv6Address),
textStrings,
textEntries,
/* interfaceIndex= */ INTERFACE_INDEX_UNSPECIFIED,
@@ -160,8 +160,8 @@
subtypes,
hostName,
port,
- ipv4Address,
- ipv6Address,
+ List.of(ipv4Address),
+ List.of(ipv6Address),
textStrings,
textEntries,
interfaceIndex,
@@ -179,8 +179,8 @@
@Nullable List<String> subtypes,
String[] hostName,
int port,
- @Nullable String ipv4Address,
- @Nullable String ipv6Address,
+ @NonNull List<String> ipv4Addresses,
+ @NonNull List<String> ipv6Addresses,
@Nullable List<String> textStrings,
@Nullable List<TextEntry> textEntries,
int interfaceIndex,
@@ -193,8 +193,8 @@
}
this.hostName = hostName;
this.port = port;
- this.ipv4Address = ipv4Address;
- this.ipv6Address = ipv6Address;
+ this.ipv4Addresses = new ArrayList<>(ipv4Addresses);
+ this.ipv6Addresses = new ArrayList<>(ipv6Addresses);
this.textStrings = new ArrayList<>();
if (textStrings != null) {
this.textStrings.addAll(textStrings);
@@ -205,17 +205,14 @@
// compatibility. We should prefer only {@code textEntries} if it's not null.
List<TextEntry> entries =
(this.textEntries != null) ? this.textEntries : parseTextStrings(this.textStrings);
- Map<String, byte[]> attributes = new HashMap<>(entries.size());
+ // The map of attributes is case-insensitive.
+ final Map<String, byte[]> attributes = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
for (TextEntry entry : entries) {
- String key = entry.getKey().toLowerCase(Locale.ENGLISH);
-
// Per https://datatracker.ietf.org/doc/html/rfc6763#section-6.4, only the first entry
// of the same key should be accepted:
// If a client receives a TXT record containing the same key more than once, then the
// client MUST silently ignore all but the first occurrence of that attribute.
- if (!attributes.containsKey(key)) {
- attributes.put(key, entry.getValue());
- }
+ attributes.putIfAbsent(entry.getKey(), entry.getValue());
}
this.attributes = Collections.unmodifiableMap(attributes);
this.interfaceIndex = interfaceIndex;
@@ -263,16 +260,41 @@
return port;
}
- /** Returns the IPV4 address of this service instance. */
+ /** Returns the IPV4 addresses of this service instance. */
+ @NonNull
+ public List<String> getIpv4Addresses() {
+ return Collections.unmodifiableList(ipv4Addresses);
+ }
+
+ /**
+ * Returns the first IPV4 address of this service instance.
+ *
+ * @deprecated Use {@link #getIpv4Addresses()} to get the entire list of IPV4
+ * addresses for
+ * the host.
+ */
@Nullable
+ @Deprecated
public String getIpv4Address() {
- return ipv4Address;
+ return ipv4Addresses.isEmpty() ? null : ipv4Addresses.get(0);
}
/** Returns the IPV6 address of this service instance. */
+ @NonNull
+ public List<String> getIpv6Addresses() {
+ return Collections.unmodifiableList(ipv6Addresses);
+ }
+
+ /**
+ * Returns the first IPV6 address of this service instance.
+ *
+ * @deprecated Use {@link #getIpv6Addresses()} to get the entire list of IPV6 addresses for
+ * the host.
+ */
@Nullable
+ @Deprecated
public String getIpv6Address() {
- return ipv6Address;
+ return ipv6Addresses.isEmpty() ? null : ipv6Addresses.get(0);
}
/**
@@ -311,12 +333,12 @@
*/
@Nullable
public byte[] getAttributeAsBytes(@NonNull String key) {
- return attributes.get(key.toLowerCase(Locale.ENGLISH));
+ return attributes.get(key);
}
/** Returns an immutable map of all attributes. */
public Map<String, String> getAttributes() {
- Map<String, String> map = new HashMap<>(attributes.size());
+ Map<String, String> map = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
for (Map.Entry<String, byte[]> kv : attributes.entrySet()) {
final byte[] value = kv.getValue();
map.put(kv.getKey(), value == null ? null : new String(value, UTF_8));
@@ -336,8 +358,8 @@
out.writeStringList(subtypes);
out.writeStringArray(hostName);
out.writeInt(port);
- out.writeString(ipv4Address);
- out.writeString(ipv6Address);
+ out.writeStringList(ipv4Addresses);
+ out.writeStringList(ipv6Addresses);
out.writeStringList(textStrings);
out.writeTypedList(textEntries);
out.writeInt(interfaceIndex);
@@ -346,13 +368,16 @@
@Override
public String toString() {
- return String.format(
- Locale.ROOT,
- "Name: %s, subtypes: %s, ip: %s, port: %d",
- serviceInstanceName,
- TextUtils.join(",", subtypes),
- ipv4Address,
- port);
+ return "Name: " + serviceInstanceName
+ + ", type: " + TextUtils.join(".", serviceType)
+ + ", subtypes: " + TextUtils.join(",", subtypes)
+ + ", ip: " + ipv4Addresses
+ + ", ipv6: " + ipv6Addresses
+ + ", port: " + port
+ + ", interfaceIndex: " + interfaceIndex
+ + ", network: " + network
+ + ", textStrings: " + textStrings
+ + ", textEntries: " + textEntries;
}
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsServiceTypeClient.java b/service-t/src/com/android/server/connectivity/mdns/MdnsServiceTypeClient.java
index d26fbdb..df270bb 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsServiceTypeClient.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsServiceTypeClient.java
@@ -21,8 +21,8 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.net.Network;
-import android.os.SystemClock;
import android.text.TextUtils;
+import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Pair;
@@ -33,12 +33,12 @@
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
@@ -51,18 +51,23 @@
private static final int DEFAULT_MTU = 1500;
private static final MdnsLogger LOGGER = new MdnsLogger("MdnsServiceTypeClient");
+
private final String serviceType;
private final String[] serviceTypeLabels;
private final MdnsSocketClientBase socketClient;
+ private final MdnsResponseDecoder responseDecoder;
private final ScheduledExecutorService executor;
private final Object lock = new Object();
- private final Set<MdnsServiceBrowserListener> listeners = new ArraySet<>();
+ private final ArrayMap<MdnsServiceBrowserListener, MdnsSearchOptions> listeners =
+ new ArrayMap<>();
private final Map<String, MdnsResponse> instanceNameToResponse = new HashMap<>();
private final boolean removeServiceAfterTtlExpires =
MdnsConfigs.removeServiceAfterTtlExpires();
private final boolean allowSearchOptionsToRemoveExpiredService =
MdnsConfigs.allowSearchOptionsToRemoveExpiredService();
+ private final MdnsResponseDecoder.Clock clock;
+
@Nullable private MdnsSearchOptions searchOptions;
// The session ID increases when startSendAndReceive() is called where we schedule a
@@ -84,10 +89,21 @@
@NonNull String serviceType,
@NonNull MdnsSocketClientBase socketClient,
@NonNull ScheduledExecutorService executor) {
+ this(serviceType, socketClient, executor, new MdnsResponseDecoder.Clock());
+ }
+
+ @VisibleForTesting
+ public MdnsServiceTypeClient(
+ @NonNull String serviceType,
+ @NonNull MdnsSocketClientBase socketClient,
+ @NonNull ScheduledExecutorService executor,
+ @NonNull MdnsResponseDecoder.Clock clock) {
this.serviceType = serviceType;
this.socketClient = socketClient;
this.executor = executor;
- serviceTypeLabels = TextUtils.split(serviceType, "\\.");
+ this.serviceTypeLabels = TextUtils.split(serviceType, "\\.");
+ this.responseDecoder = new MdnsResponseDecoder(clock, serviceTypeLabels);
+ this.clock = clock;
}
private static MdnsServiceInfo buildMdnsServiceInfoFromResponse(
@@ -99,15 +115,19 @@
port = response.getServiceRecord().getServicePort();
}
- String ipv4Address = null;
- String ipv6Address = null;
+ final List<String> ipv4Addresses = new ArrayList<>();
+ final List<String> ipv6Addresses = new ArrayList<>();
if (response.hasInet4AddressRecord()) {
- Inet4Address inet4Address = response.getInet4AddressRecord().getInet4Address();
- ipv4Address = (inet4Address == null) ? null : inet4Address.getHostAddress();
+ for (MdnsInetAddressRecord inetAddressRecord : response.getInet4AddressRecords()) {
+ final Inet4Address inet4Address = inetAddressRecord.getInet4Address();
+ ipv4Addresses.add((inet4Address == null) ? null : inet4Address.getHostAddress());
+ }
}
if (response.hasInet6AddressRecord()) {
- Inet6Address inet6Address = response.getInet6AddressRecord().getInet6Address();
- ipv6Address = (inet6Address == null) ? null : inet6Address.getHostAddress();
+ for (MdnsInetAddressRecord inetAddressRecord : response.getInet6AddressRecords()) {
+ final Inet6Address inet6Address = inetAddressRecord.getInet6Address();
+ ipv6Addresses.add((inet6Address == null) ? null : inet6Address.getHostAddress());
+ }
}
String serviceInstanceName = response.getServiceInstanceName();
if (serviceInstanceName == null) {
@@ -127,8 +147,8 @@
response.getSubtypes(),
hostName,
port,
- ipv4Address,
- ipv6Address,
+ ipv4Addresses,
+ ipv6Addresses,
textStrings,
textEntries,
response.getInterfaceIndex(),
@@ -148,7 +168,7 @@
@NonNull MdnsSearchOptions searchOptions) {
synchronized (lock) {
this.searchOptions = searchOptions;
- if (listeners.add(listener)) {
+ if (listeners.put(listener, searchOptions) == null) {
for (MdnsResponse existingResponse : instanceNameToResponse.values()) {
final MdnsServiceInfo info =
buildMdnsServiceInfoFromResponse(existingResponse, serviceTypeLabels);
@@ -197,65 +217,63 @@
return serviceTypeLabels;
}
- public synchronized void processResponse(@NonNull MdnsResponse response) {
- if (shouldRemoveServiceAfterTtlExpires()) {
- // Because {@link QueryTask} and {@link processResponse} are running in different
- // threads. We need to synchronize {@link lock} to protect
- // {@link instanceNameToResponse} won’t be modified at the same time.
- synchronized (lock) {
- if (response.isGoodbye()) {
- onGoodbyeReceived(response.getServiceInstanceName());
+ /**
+ * Process an incoming response packet.
+ */
+ public synchronized void processResponse(@NonNull MdnsPacket packet, int interfaceIndex,
+ Network network) {
+ synchronized (lock) {
+ // Augment the list of current known responses, and generated responses for resolve
+ // requests if there is no known response
+ final List<MdnsResponse> currentList = new ArrayList<>(instanceNameToResponse.values());
+ currentList.addAll(makeResponsesForResolveIfUnknown(interfaceIndex, network));
+ final ArraySet<MdnsResponse> modifiedResponses = responseDecoder.augmentResponses(
+ packet, currentList, interfaceIndex, network);
+
+ for (MdnsResponse modified : modifiedResponses) {
+ if (modified.isGoodbye()) {
+ onGoodbyeReceived(modified.getServiceInstanceName());
} else {
- onResponseReceived(response);
+ onResponseModified(modified);
}
}
- } else {
- if (response.isGoodbye()) {
- onGoodbyeReceived(response.getServiceInstanceName());
- } else {
- onResponseReceived(response);
- }
}
}
public synchronized void onFailedToParseMdnsResponse(int receivedPacketNumber, int errorCode) {
- for (MdnsServiceBrowserListener listener : listeners) {
- listener.onFailedToParseMdnsResponse(receivedPacketNumber, errorCode);
+ for (int i = 0; i < listeners.size(); i++) {
+ listeners.keyAt(i).onFailedToParseMdnsResponse(receivedPacketNumber, errorCode);
}
}
- private void onResponseReceived(@NonNull MdnsResponse response) {
- MdnsResponse currentResponse;
- currentResponse = instanceNameToResponse.get(response.getServiceInstanceName());
+ private void onResponseModified(@NonNull MdnsResponse response) {
+ final MdnsResponse currentResponse =
+ instanceNameToResponse.get(response.getServiceInstanceName());
boolean newServiceFound = false;
- boolean existingServiceChanged = false;
boolean serviceBecomesComplete = false;
if (currentResponse == null) {
newServiceFound = true;
- currentResponse = response;
String serviceInstanceName = response.getServiceInstanceName();
if (serviceInstanceName != null) {
- instanceNameToResponse.put(serviceInstanceName, currentResponse);
+ instanceNameToResponse.put(serviceInstanceName, response);
}
} else {
boolean before = currentResponse.isComplete();
- existingServiceChanged = currentResponse.mergeRecordsFrom(response);
- boolean after = currentResponse.isComplete();
+ instanceNameToResponse.put(response.getServiceInstanceName(), response);
+ boolean after = response.isComplete();
serviceBecomesComplete = !before && after;
}
- if (!newServiceFound && !existingServiceChanged) {
- return;
- }
MdnsServiceInfo serviceInfo =
- buildMdnsServiceInfoFromResponse(currentResponse, serviceTypeLabels);
+ buildMdnsServiceInfoFromResponse(response, serviceTypeLabels);
- for (MdnsServiceBrowserListener listener : listeners) {
+ for (int i = 0; i < listeners.size(); i++) {
+ final MdnsServiceBrowserListener listener = listeners.keyAt(i);
if (newServiceFound) {
listener.onServiceNameDiscovered(serviceInfo);
}
- if (currentResponse.isComplete()) {
+ if (response.isComplete()) {
if (newServiceFound || serviceBecomesComplete) {
listener.onServiceFound(serviceInfo);
} else {
@@ -270,7 +288,8 @@
if (response == null) {
return;
}
- for (MdnsServiceBrowserListener listener : listeners) {
+ for (int i = 0; i < listeners.size(); i++) {
+ final MdnsServiceBrowserListener listener = listeners.keyAt(i);
final MdnsServiceInfo serviceInfo =
buildMdnsServiceInfoFromResponse(response, serviceTypeLabels);
if (response.isComplete()) {
@@ -389,6 +408,29 @@
}
}
+ private List<MdnsResponse> makeResponsesForResolveIfUnknown(int interfaceIndex,
+ @NonNull Network network) {
+ final List<MdnsResponse> resolveResponses = new ArrayList<>();
+ for (int i = 0; i < listeners.size(); i++) {
+ final String resolveName = listeners.valueAt(i).getResolveInstanceName();
+ if (resolveName == null) {
+ continue;
+ }
+ MdnsResponse knownResponse = instanceNameToResponse.get(resolveName);
+ if (knownResponse == null) {
+ final ArrayList<String> instanceFullName = new ArrayList<>(
+ serviceTypeLabels.length + 1);
+ instanceFullName.add(resolveName);
+ instanceFullName.addAll(Arrays.asList(serviceTypeLabels));
+ knownResponse = new MdnsResponse(
+ 0L /* lastUpdateTime */, instanceFullName.toArray(new String[0]),
+ interfaceIndex, network);
+ }
+ resolveResponses.add(knownResponse);
+ }
+ return resolveResponses;
+ }
+
// A FutureTask that enqueues a single query, and schedule a new FutureTask for the next task.
private class QueryTask implements Runnable {
@@ -400,6 +442,18 @@
@Override
public void run() {
+ final List<MdnsResponse> servicesToResolve;
+ final boolean sendDiscoveryQueries;
+ synchronized (lock) {
+ // The listener is requesting to resolve a service that has no info in
+ // cache. Use the provided name to generate a minimal response, so other records are
+ // queried to complete it.
+ // Only the names are used to know which queries to send, other parameters like
+ // interfaceIndex do not matter.
+ servicesToResolve = makeResponsesForResolveIfUnknown(
+ 0 /* interfaceIndex */, config.network);
+ sendDiscoveryQueries = servicesToResolve.size() < listeners.size();
+ }
Pair<Integer, List<String>> result;
try {
result =
@@ -410,7 +464,9 @@
config.subtypes,
config.expectUnicastResponse,
config.transactionId,
- config.network)
+ config.network,
+ sendDiscoveryQueries,
+ servicesToResolve)
.call();
} catch (RuntimeException e) {
LOGGER.e(String.format("Failed to run EnqueueMdnsQueryCallable for subtype: %s",
@@ -435,8 +491,8 @@
}
}
if ((result != null)) {
- for (MdnsServiceBrowserListener listener : listeners) {
- listener.onDiscoveryQuerySent(result.second, result.first);
+ for (int i = 0; i < listeners.size(); i++) {
+ listeners.keyAt(i).onDiscoveryQuerySent(result.second, result.first);
}
}
if (shouldRemoveServiceAfterTtlExpires()) {
@@ -446,10 +502,11 @@
if (existingResponse.hasServiceRecord()
&& existingResponse
.getServiceRecord()
- .getRemainingTTL(SystemClock.elapsedRealtime())
+ .getRemainingTTL(clock.elapsedRealtime())
== 0) {
iter.remove();
- for (MdnsServiceBrowserListener listener : listeners) {
+ for (int i = 0; i < listeners.size(); i++) {
+ final MdnsServiceBrowserListener listener = listeners.keyAt(i);
String serviceInstanceName =
existingResponse.getServiceInstanceName();
if (serviceInstanceName != null) {
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClient.java b/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClient.java
index 907687e..c03e6aa 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClient.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClient.java
@@ -16,8 +16,6 @@
package com.android.server.connectivity.mdns;
-import static com.android.server.connectivity.mdns.MdnsSocketClientBase.Callback;
-
import android.Manifest.permission;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -35,7 +33,6 @@
import java.net.DatagramPacket;
import java.util.ArrayDeque;
import java.util.ArrayList;
-import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Timer;
@@ -73,7 +70,6 @@
private final Context context;
private final byte[] multicastReceiverBuffer = new byte[RECEIVER_BUFFER_SIZE];
@Nullable private final byte[] unicastReceiverBuffer;
- private final MdnsResponseDecoder responseDecoder;
private final MulticastLock multicastLock;
private final boolean useSeparateSocketForUnicast =
MdnsConfigs.useSeparateSocketToSendUnicastQuery();
@@ -110,7 +106,6 @@
public MdnsSocketClient(@NonNull Context context, @NonNull MulticastLock multicastLock) {
this.context = context;
this.multicastLock = multicastLock;
- responseDecoder = new MdnsResponseDecoder(new MdnsResponseDecoder.Clock(), null);
if (useSeparateSocketForUnicast) {
unicastReceiverBuffer = new byte[RECEIVER_BUFFER_SIZE];
} else {
@@ -421,37 +416,27 @@
int interfaceIndex, @Nullable Network network) {
int packetNumber = ++receivedPacketNumber;
- List<MdnsResponse> responses = new LinkedList<>();
- int errorCode = responseDecoder.decode(packet, responses, interfaceIndex, network);
- if (errorCode == MdnsResponseDecoder.SUCCESS) {
- if (responseType.equals(MULTICAST_TYPE)) {
- receivedMulticastResponse = true;
- if (cannotReceiveMulticastResponse.getAndSet(false)) {
- // If we are already in the bad state, receiving a multicast response means
- // we are recovered.
- LOGGER.e(
- "Recovered from the state where the phone can't receive any multicast"
- + " response");
- }
- } else {
- receivedUnicastResponse = true;
- }
- for (MdnsResponse response : responses) {
- String serviceInstanceName = response.getServiceInstanceName();
- LOGGER.log("mDNS %s response received: %s at ifIndex %d", responseType,
- serviceInstanceName, interfaceIndex);
- if (callback != null) {
- callback.onResponseReceived(response);
- }
- }
- } else if (errorCode != MdnsResponseErrorCode.ERROR_NOT_RESPONSE_MESSAGE) {
+ final MdnsPacket response;
+ try {
+ response = MdnsResponseDecoder.parseResponse(packet.getData(), packet.getLength());
+ } catch (MdnsPacket.ParseException e) {
LOGGER.w(String.format("Error while decoding %s packet (%d): %d",
- responseType, packetNumber, errorCode));
+ responseType, packetNumber, e.code));
if (callback != null) {
- callback.onFailedToParseMdnsResponse(packetNumber, errorCode);
+ callback.onFailedToParseMdnsResponse(packetNumber, e.code);
}
+ return e.code;
}
- return errorCode;
+
+ if (response == null) {
+ return MdnsResponseErrorCode.ERROR_NOT_RESPONSE_MESSAGE;
+ }
+
+ if (callback != null) {
+ callback.onResponseReceived(response, interfaceIndex, network);
+ }
+
+ return MdnsResponseErrorCode.SUCCESS;
}
@VisibleForTesting
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClientBase.java b/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClientBase.java
index 23504a0..796dc83 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClientBase.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsSocketClientBase.java
@@ -72,7 +72,8 @@
/*** Callback for mdns response */
interface Callback {
/*** Receive a mdns response */
- void onResponseReceived(@NonNull MdnsResponse response);
+ void onResponseReceived(@NonNull MdnsPacket packet, int interfaceIndex,
+ @Nullable Network network);
/*** Parse a mdns response failed */
void onFailedToParseMdnsResponse(int receivedPacketNumber, int errorCode);
diff --git a/service-t/src/com/android/server/connectivity/mdns/MdnsSocketProvider.java b/service-t/src/com/android/server/connectivity/mdns/MdnsSocketProvider.java
index 9298852..743f946 100644
--- a/service-t/src/com/android/server/connectivity/mdns/MdnsSocketProvider.java
+++ b/service-t/src/com/android/server/connectivity/mdns/MdnsSocketProvider.java
@@ -82,6 +82,7 @@
private final List<String> mTetheredInterfaces = new ArrayList<>();
private final byte[] mPacketReadBuffer = new byte[READ_BUFFER_SIZE];
private boolean mMonitoringSockets = false;
+ private boolean mRequestStop = false;
public MdnsSocketProvider(@NonNull Context context, @NonNull Looper looper) {
this(context, looper, new Dependencies());
@@ -179,6 +180,7 @@
/*** Start monitoring sockets by listening callbacks for sockets creation or removal */
public void startMonitoringSockets() {
ensureRunningOnHandlerThread(mHandler);
+ mRequestStop = false; // Reset stop request flag.
if (mMonitoringSockets) {
Log.d(TAG, "Already monitoring sockets.");
return;
@@ -195,22 +197,34 @@
mMonitoringSockets = true;
}
- /*** Stop monitoring sockets and unregister callbacks */
- public void stopMonitoringSockets() {
+ private void maybeStopMonitoringSockets() {
+ if (!mMonitoringSockets) return; // Already unregistered.
+ if (!mRequestStop) return; // No stop request.
+
+ // Only unregister the network callback if there is no socket request.
+ if (mCallbacksToRequestedNetworks.isEmpty()) {
+ mContext.getSystemService(ConnectivityManager.class)
+ .unregisterNetworkCallback(mNetworkCallback);
+
+ final TetheringManager tetheringManager = mContext.getSystemService(
+ TetheringManager.class);
+ tetheringManager.unregisterTetheringEventCallback(mTetheringEventCallback);
+
+ mHandler.post(mNetlinkMonitor::stop);
+ mMonitoringSockets = false;
+ }
+ }
+
+ /*** Request to stop monitoring sockets and unregister callbacks */
+ public void requestStopWhenInactive() {
ensureRunningOnHandlerThread(mHandler);
if (!mMonitoringSockets) {
Log.d(TAG, "Monitoring sockets hasn't been started.");
return;
}
- if (DBG) Log.d(TAG, "Stop monitoring sockets.");
- mContext.getSystemService(ConnectivityManager.class)
- .unregisterNetworkCallback(mNetworkCallback);
-
- final TetheringManager tetheringManager = mContext.getSystemService(TetheringManager.class);
- tetheringManager.unregisterTetheringEventCallback(mTetheringEventCallback);
-
- mHandler.post(mNetlinkMonitor::stop);
- mMonitoringSockets = false;
+ if (DBG) Log.d(TAG, "Try to stop monitoring sockets.");
+ mRequestStop = true;
+ maybeStopMonitoringSockets();
}
/*** Check whether the target network is matched current network */
@@ -450,6 +464,9 @@
cb.onInterfaceDestroyed(new Network(INetd.LOCAL_NET_ID), info.mSocket);
}
mTetherInterfaceSockets.clear();
+
+ // Try to unregister network callback.
+ maybeStopMonitoringSockets();
}
/*** Callbacks for listening socket changes */
diff --git a/service/ServiceConnectivityResources/res/values-eu/strings.xml b/service/ServiceConnectivityResources/res/values-eu/strings.xml
index 9b39fd3..13f9eb4 100644
--- a/service/ServiceConnectivityResources/res/values-eu/strings.xml
+++ b/service/ServiceConnectivityResources/res/values-eu/strings.xml
@@ -36,7 +36,7 @@
<item msgid="3004933964374161223">"datu-konexioa"</item>
<item msgid="5624324321165953608">"Wifia"</item>
<item msgid="5667906231066981731">"Bluetootha"</item>
- <item msgid="346574747471703768">"Ethernet-a"</item>
+ <item msgid="346574747471703768">"Etherneta"</item>
<item msgid="5734728378097476003">"VPNa"</item>
</string-array>
<string name="network_switch_type_name_unknown" msgid="5116448402191972082">"sare mota ezezaguna"</string>
diff --git a/service/src/com/android/metrics/stats.proto b/service/src/com/android/metrics/stats.proto
index 48b8316..8104632 100644
--- a/service/src/com/android/metrics/stats.proto
+++ b/service/src/com/android/metrics/stats.proto
@@ -284,3 +284,66 @@
// The latency of selection issued in milli-second
optional int32 selection_issued_latency_milli = 5;
}
+
+message NetworkSliceRequestCountSample {
+ // Bitfield representing the network's capability(e.g. NET_CAPABILITY_PRIORITIZE_LATENCY),
+ // defined in packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int64 slice_id = 1;
+
+ // Bitfield representing the network's enterprise capability identifier
+ // (e.g. NET_ENTERPRISE_ID_1), defined in
+ // packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int32 enterprise_id = 2;
+
+ // number of request for this slice
+ optional int32 request_count = 3;
+
+ // number of apps with outstanding request(s) for this slice
+ optional int32 distinct_app_count = 4;
+}
+
+message NetworkSliceSessionEnded {
+ // Bitfield representing the network's capability(e.g. NET_CAPABILITY_PRIORITIZE_LATENCY),
+ // defined in packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int64 slice_id = 1;
+
+ // Bitfield representing the network's enterprise capability identifier
+ // (e.g. NET_ENTERPRISE_ID_1), defined in
+ // packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int32 enterprise_id = 2;
+
+ // Number of bytes received at the device on this slice id
+ optional int64 rx_bytes = 3;
+
+ // Number of bytes transmitted by the device on this slice id
+ optional int64 tx_bytes = 4;
+
+ // Number of apps that have used this slice
+ optional int32 number_of_apps = 5;
+
+ // How long(in seconds) this slice has been connected
+ optional int32 slice_connection_duration_sec = 6;
+}
+
+message NetworkSliceDailyDataUsageReported {
+ // Bitfield representing the network's capability(e.g. NET_CAPABILITY_PRIORITIZE_LATENCY),
+ // defined in packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int64 slice_id = 1;
+
+ // Bitfield representing the network's enterprise capability identifier
+ // (e.g. NET_ENTERPRISE_ID_1), defined in
+ // packages/modules/Connectivity/framework/src/android/net/NetworkCapabilities.java
+ optional int32 enterprise_id = 2;
+
+ // Number of bytes received at the device on this slice id
+ optional int64 rx_bytes = 3;
+
+ // Number of bytes transmitted by the device on this slice id
+ optional int64 tx_bytes = 4;
+
+ // Number of apps that have used this slice
+ optional int32 number_of_apps = 5;
+
+ // How long(in seconds) this slice has been connected
+ optional int32 slice_connection_duration_sec = 6;
+}
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java
index e32ea8f..4c55afe 100755
--- a/service/src/com/android/server/ConnectivityService.java
+++ b/service/src/com/android/server/ConnectivityService.java
@@ -113,6 +113,7 @@
import android.app.BroadcastOptions;
import android.app.PendingIntent;
import android.app.admin.DevicePolicyManager;
+import android.app.compat.CompatChanges;
import android.app.usage.NetworkStatsManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -121,6 +122,7 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
+import android.content.res.XmlResourceParser;
import android.database.ContentObserver;
import android.net.CaptivePortal;
import android.net.CaptivePortalData;
@@ -195,6 +197,7 @@
import android.net.Uri;
import android.net.VpnManager;
import android.net.VpnTransportInfo;
+import android.net.connectivity.ConnectivityCompatChanges;
import android.net.metrics.IpConnectivityLog;
import android.net.metrics.NetworkEvent;
import android.net.netd.aidl.NativeUidRangeConfig;
@@ -269,6 +272,7 @@
import com.android.networkstack.apishim.ConstantsShim;
import com.android.networkstack.apishim.common.BroadcastOptionsShim;
import com.android.networkstack.apishim.common.UnsupportedApiLevelException;
+import com.android.server.connectivity.ApplicationSelfCertifiedNetworkCapabilities;
import com.android.server.connectivity.AutodestructReference;
import com.android.server.connectivity.AutomaticOnOffKeepaliveTracker;
import com.android.server.connectivity.AutomaticOnOffKeepaliveTracker.AutomaticOnOffKeepalive;
@@ -279,6 +283,7 @@
import com.android.server.connectivity.DnsManager.PrivateDnsValidationUpdate;
import com.android.server.connectivity.DscpPolicyTracker;
import com.android.server.connectivity.FullScore;
+import com.android.server.connectivity.InvalidTagException;
import com.android.server.connectivity.KeepaliveTracker;
import com.android.server.connectivity.LingerMonitor;
import com.android.server.connectivity.MockableSystemProperties;
@@ -300,6 +305,8 @@
import libcore.io.IoUtils;
+import org.xmlpull.v1.XmlPullParserException;
+
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.PrintWriter;
@@ -902,6 +909,13 @@
// Only the handler thread is allowed to access this field.
private long mIngressRateLimit = -1;
+ // This is the cache for the packageName -> ApplicationSelfCertifiedNetworkCapabilities. This
+ // value can be accessed from both handler thread and any random binder thread. Therefore,
+ // accessing this value requires holding a lock.
+ @GuardedBy("mSelfCertifiedCapabilityCache")
+ private final Map<String, ApplicationSelfCertifiedNetworkCapabilities>
+ mSelfCertifiedCapabilityCache = new HashMap<>();
+
/**
* Implements support for the legacy "one network per network type" model.
*
@@ -1452,6 +1466,20 @@
public BroadcastOptionsShim makeBroadcastOptionsShim(BroadcastOptions options) {
return BroadcastOptionsShimImpl.newInstance(options);
}
+
+ /**
+ * Wrapper method for
+ * {@link android.app.compat.CompatChanges#isChangeEnabled(long, String, UserHandle)}.
+ *
+ * @param changeId The ID of the compatibility change in question.
+ * @param packageName The package name of the app in question.
+ * @param user The user that the operation is done for.
+ * @return {@code true} if the change is enabled for the specified package.
+ */
+ public boolean isChangeEnabled(long changeId, @NonNull final String packageName,
+ @NonNull final UserHandle user) {
+ return CompatChanges.isChangeEnabled(changeId, packageName, user);
+ }
}
public ConnectivityService(Context context) {
@@ -4427,7 +4455,7 @@
mQosCallbackTracker.handleNetworkReleased(nai.network);
for (String iface : nai.linkProperties.getAllInterfaceNames()) {
// Disable wakeup packet monitoring for each interface.
- wakeupModifyInterface(iface, nai.networkCapabilities, false);
+ wakeupModifyInterface(iface, nai, false);
}
nai.networkMonitor().notifyNetworkDisconnected();
mNetworkAgentInfos.remove(nai);
@@ -5024,9 +5052,6 @@
@Override
public void setTestLowTcpPollingTimerForKeepalive(long timeMs) {
enforceSettingsPermission();
- if (!Build.isDebuggable()) {
- throw new IllegalStateException("Is not supported in non-debuggable build");
- }
if (timeMs > System.currentTimeMillis() + MAX_TEST_LOW_TCP_POLLING_UNTIL_MS) {
throw new IllegalArgumentException("Argument should not exceed "
@@ -6319,6 +6344,11 @@
if (isMappedInOemNetworkPreference(packageName)) {
handleSetOemNetworkPreference(mOemNetworkPreferences, null);
}
+
+ // Invalidates cache entry when the package is updated.
+ synchronized (mSelfCertifiedCapabilityCache) {
+ mSelfCertifiedCapabilityCache.remove(packageName);
+ }
}
private final BroadcastReceiver mUserIntentReceiver = new BroadcastReceiver() {
@@ -6655,8 +6685,6 @@
@Override
public void binderDied() {
- log("ConnectivityService NetworkRequestInfo binderDied(" +
- "uid/pid:" + mUid + "/" + mPid + ", " + mRequests + ", " + mBinder + ")");
// As an immutable collection, mRequests cannot change by the time the
// lambda is evaluated on the handler thread so calling .get() from a binder thread
// is acceptable. Use handleReleaseNetworkRequest and not directly
@@ -6947,8 +6975,69 @@
asUid, requests, nr, msgr, binder, callbackFlags, callingAttributionTag);
}
+ private boolean shouldCheckCapabilitiesDeclaration(
+ @NonNull final NetworkCapabilities networkCapabilities, final int callingUid,
+ @NonNull final String callingPackageName) {
+ final UserHandle user = UserHandle.getUserHandleForUid(callingUid);
+ // Only run the check if the change is enabled.
+ if (!mDeps.isChangeEnabled(
+ ConnectivityCompatChanges.ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION,
+ callingPackageName, user)) {
+ return false;
+ }
+
+ return networkCapabilities.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ || networkCapabilities.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY);
+ }
+
+ private void enforceRequestCapabilitiesDeclaration(@NonNull final String callerPackageName,
+ @NonNull final NetworkCapabilities networkCapabilities) {
+ // This check is added to fix the linter error for "current min is 30", which is not going
+ // to happen because Connectivity service always run in S+.
+ if (!SdkLevel.isAtLeastS()) {
+ Log.wtf(TAG, "Connectivity service should always run in at least SDK S");
+ return;
+ }
+ ApplicationSelfCertifiedNetworkCapabilities applicationNetworkCapabilities;
+ try {
+ synchronized (mSelfCertifiedCapabilityCache) {
+ applicationNetworkCapabilities = mSelfCertifiedCapabilityCache.get(
+ callerPackageName);
+ if (applicationNetworkCapabilities == null) {
+ final PackageManager packageManager = mContext.getPackageManager();
+ final PackageManager.Property networkSliceProperty = packageManager.getProperty(
+ ConstantsShim.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES,
+ callerPackageName
+ );
+ final XmlResourceParser parser = packageManager
+ .getResourcesForApplication(callerPackageName)
+ .getXml(networkSliceProperty.getResourceId());
+ applicationNetworkCapabilities =
+ ApplicationSelfCertifiedNetworkCapabilities.createFromXml(parser);
+ mSelfCertifiedCapabilityCache.put(callerPackageName,
+ applicationNetworkCapabilities);
+ }
+
+ }
+ } catch (PackageManager.NameNotFoundException ne) {
+ throw new SecurityException(
+ "Cannot find " + ConstantsShim.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES
+ + " property");
+ } catch (XmlPullParserException | IOException | InvalidTagException e) {
+ throw new SecurityException(e.getMessage());
+ }
+
+ applicationNetworkCapabilities.enforceSelfCertifiedNetworkCapabilitiesDeclared(
+ networkCapabilities);
+ }
private void enforceNetworkRequestPermissions(NetworkCapabilities networkCapabilities,
String callingPackageName, String callingAttributionTag, final int callingUid) {
+ if (shouldCheckCapabilitiesDeclaration(networkCapabilities, callingUid,
+ callingPackageName)) {
+ enforceRequestCapabilitiesDeclaration(callingPackageName, networkCapabilities);
+ }
if (networkCapabilities.hasCapability(NET_CAPABILITY_NOT_RESTRICTED) == false) {
// For T+ devices, callers with carrier privilege could request with CBS capabilities.
if (networkCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_CBS)
@@ -7706,7 +7795,7 @@
// the LinkProperties for the network are accurate.
networkAgent.clatd.fixupLinkProperties(oldLp, newLp);
- updateInterfaces(newLp, oldLp, netId, networkAgent.networkCapabilities);
+ updateInterfaces(newLp, oldLp, netId, networkAgent);
// update filtering rules, need to happen after the interface update so netd knows about the
// new interface (the interface name -> index map becomes initialized)
@@ -7814,10 +7903,16 @@
return captivePortalBuilder.build();
}
- private void wakeupModifyInterface(String iface, NetworkCapabilities caps, boolean add) {
+ private String makeNflogPrefix(String iface, long networkHandle) {
+ // This needs to be kept in sync and backwards compatible with the decoding logic in
+ // NetdEventListenerService, which is non-mainline code.
+ return SdkLevel.isAtLeastU() ? (networkHandle + ":" + iface) : ("iface:" + iface);
+ }
+
+ private void wakeupModifyInterface(String iface, NetworkAgentInfo nai, boolean add) {
// Marks are only available on WiFi interfaces. Checking for
// marks on unsupported interfaces is harmless.
- if (!caps.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
+ if (!nai.networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
return;
}
@@ -7830,7 +7925,7 @@
return;
}
- final String prefix = "iface:" + iface;
+ final String prefix = makeNflogPrefix(iface, nai.network.getNetworkHandle());
try {
if (add) {
mNetd.wakeupAddInterface(iface, prefix, mark, mask);
@@ -7840,12 +7935,11 @@
} catch (Exception e) {
loge("Exception modifying wakeup packet monitoring: " + e);
}
-
}
private void updateInterfaces(final @NonNull LinkProperties newLp,
final @Nullable LinkProperties oldLp, final int netId,
- final @NonNull NetworkCapabilities caps) {
+ final @NonNull NetworkAgentInfo nai) {
final CompareResult<String> interfaceDiff = new CompareResult<>(
oldLp != null ? oldLp.getAllInterfaceNames() : null, newLp.getAllInterfaceNames());
if (!interfaceDiff.added.isEmpty()) {
@@ -7853,9 +7947,9 @@
try {
if (DBG) log("Adding iface " + iface + " to network " + netId);
mNetd.networkAddInterface(netId, iface);
- wakeupModifyInterface(iface, caps, true);
+ wakeupModifyInterface(iface, nai, true);
mDeps.reportNetworkInterfaceForTransports(mContext, iface,
- caps.getTransportTypes());
+ nai.networkCapabilities.getTransportTypes());
} catch (Exception e) {
logw("Exception adding interface: " + e);
}
@@ -7864,7 +7958,7 @@
for (final String iface : interfaceDiff.removed) {
try {
if (DBG) log("Removing iface " + iface + " from network " + netId);
- wakeupModifyInterface(iface, caps, false);
+ wakeupModifyInterface(iface, nai, false);
mNetd.networkRemoveInterface(netId, iface);
} catch (Exception e) {
loge("Exception removing interface: " + e);
diff --git a/service/src/com/android/server/connectivity/ApplicationSelfCertifiedNetworkCapabilities.java b/service/src/com/android/server/connectivity/ApplicationSelfCertifiedNetworkCapabilities.java
new file mode 100644
index 0000000..76e966f
--- /dev/null
+++ b/service/src/com/android/server/connectivity/ApplicationSelfCertifiedNetworkCapabilities.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2023 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;
+
+
+import android.annotation.NonNull;
+import android.net.NetworkCapabilities;
+import android.util.Log;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.util.ArrayDeque;
+
+
+/**
+ * The class for parsing and checking the self-declared application network capabilities.
+ *
+ * ApplicationSelfCertifiedNetworkCapabilities is an immutable class that
+ * can parse the self-declared application network capabilities in the application resources. The
+ * class also provides a helper method to check whether the requested network capabilities
+ * already self-declared.
+ */
+public final class ApplicationSelfCertifiedNetworkCapabilities {
+
+ public static final String PRIORITIZE_LATENCY = "NET_CAPABILITY_PRIORITIZE_LATENCY";
+ public static final String PRIORITIZE_BANDWIDTH = "NET_CAPABILITY_PRIORITIZE_BANDWIDTH";
+
+ private static final String TAG =
+ ApplicationSelfCertifiedNetworkCapabilities.class.getSimpleName();
+ private static final String NETWORK_CAPABILITIES_DECLARATION_TAG =
+ "network-capabilities-declaration";
+ private static final String USES_NETWORK_CAPABILITY_TAG = "uses-network-capability";
+ private static final String NAME_TAG = "name";
+
+ private long mRequestedNetworkCapabilities = 0;
+
+ /**
+ * Creates {@link ApplicationSelfCertifiedNetworkCapabilities} from a xml parser.
+ *
+ * <p> Here is an example of the xml syntax:
+ *
+ * <pre>
+ * {@code
+ * <network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ * <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+ * <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_BANDWIDTH"/>
+ * </network-capabilities-declaration>
+ * }
+ * </pre>
+ * <p>
+ *
+ * @param xmlParser The underlying {@link XmlPullParser} that will read the xml.
+ * @return An ApplicationSelfCertifiedNetworkCapabilities object.
+ * @throws InvalidTagException if the capabilities in xml config contains invalid tag.
+ * @throws XmlPullParserException if xml parsing failed.
+ * @throws IOException if unable to read the xml file properly.
+ */
+ @NonNull
+ public static ApplicationSelfCertifiedNetworkCapabilities createFromXml(
+ @NonNull final XmlPullParser xmlParser)
+ throws InvalidTagException, XmlPullParserException, IOException {
+ return new ApplicationSelfCertifiedNetworkCapabilities(parseXml(xmlParser));
+ }
+
+ private static long parseXml(@NonNull final XmlPullParser xmlParser)
+ throws InvalidTagException, XmlPullParserException, IOException {
+ long requestedNetworkCapabilities = 0;
+ final ArrayDeque<String> openTags = new ArrayDeque<>();
+
+ while (checkedNextTag(xmlParser, openTags) != XmlPullParser.START_TAG) {
+ continue;
+ }
+
+ // Validates the tag is "network-capabilities-declaration"
+ if (!xmlParser.getName().equals(NETWORK_CAPABILITIES_DECLARATION_TAG)) {
+ throw new InvalidTagException("Invalid tag: " + xmlParser.getName());
+ }
+
+ checkedNextTag(xmlParser, openTags);
+ int eventType = xmlParser.getEventType();
+ while (eventType != XmlPullParser.END_DOCUMENT) {
+ switch (eventType) {
+ case XmlPullParser.START_TAG:
+ // USES_NETWORK_CAPABILITY_TAG should directly be declared under
+ // NETWORK_CAPABILITIES_DECLARATION_TAG.
+ if (xmlParser.getName().equals(USES_NETWORK_CAPABILITY_TAG)
+ && openTags.size() == 1) {
+ int capability = parseDeclarationTag(xmlParser);
+ if (capability >= 0) {
+ requestedNetworkCapabilities |= 1L << capability;
+ }
+ } else {
+ Log.w(TAG, "Unknown tag: " + xmlParser.getName() + " ,tags stack size: "
+ + openTags.size());
+ }
+ break;
+ default:
+ break;
+ }
+ eventType = checkedNextTag(xmlParser, openTags);
+ }
+ // Checks all the tags are parsed.
+ if (!openTags.isEmpty()) {
+ throw new InvalidTagException("Unbalanced tag: " + openTags.peek());
+ }
+ return requestedNetworkCapabilities;
+ }
+
+ private static int parseDeclarationTag(@NonNull final XmlPullParser xmlParser) {
+ String name = null;
+ for (int i = 0; i < xmlParser.getAttributeCount(); i++) {
+ final String attrName = xmlParser.getAttributeName(i);
+ if (attrName.equals(NAME_TAG)) {
+ name = xmlParser.getAttributeValue(i);
+ } else {
+ Log.w(TAG, "Unknown attribute name: " + attrName);
+ }
+ }
+ if (name != null) {
+ switch (name) {
+ case PRIORITIZE_BANDWIDTH:
+ return NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH;
+ case PRIORITIZE_LATENCY:
+ return NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY;
+ default:
+ Log.w(TAG, "Unknown capability declaration name: " + name);
+ }
+ } else {
+ Log.w(TAG, "uses-network-capability name must be specified");
+ }
+ // Invalid capability
+ return -1;
+ }
+
+ private static int checkedNextTag(@NonNull final XmlPullParser xmlParser,
+ @NonNull final ArrayDeque<String> openTags)
+ throws XmlPullParserException, IOException, InvalidTagException {
+ if (xmlParser.getEventType() == XmlPullParser.START_TAG) {
+ openTags.addFirst(xmlParser.getName());
+ } else if (xmlParser.getEventType() == XmlPullParser.END_TAG) {
+ if (!openTags.isEmpty() && openTags.peekFirst().equals(xmlParser.getName())) {
+ openTags.removeFirst();
+ } else {
+ throw new InvalidTagException("Unbalanced tag: " + xmlParser.getName());
+ }
+ }
+ return xmlParser.next();
+ }
+
+ private ApplicationSelfCertifiedNetworkCapabilities(long requestedNetworkCapabilities) {
+ mRequestedNetworkCapabilities = requestedNetworkCapabilities;
+ }
+
+ /**
+ * Enforces self-certified capabilities are declared.
+ *
+ * @param networkCapabilities the input NetworkCapabilities to check against.
+ * @throws SecurityException if the capabilities are not properly self-declared.
+ */
+ public void enforceSelfCertifiedNetworkCapabilitiesDeclared(
+ @NonNull final NetworkCapabilities networkCapabilities) {
+ if (networkCapabilities.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ && !hasPrioritizeBandwidth()) {
+ throw new SecurityException(
+ "Missing " + ApplicationSelfCertifiedNetworkCapabilities.PRIORITIZE_BANDWIDTH
+ + " declaration");
+ }
+ if (networkCapabilities.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ && !hasPrioritizeLatency()) {
+ throw new SecurityException(
+ "Missing " + ApplicationSelfCertifiedNetworkCapabilities.PRIORITIZE_LATENCY
+ + " declaration");
+ }
+ }
+
+ /**
+ * Checks if NET_CAPABILITY_PRIORITIZE_LATENCY is declared.
+ */
+ private boolean hasPrioritizeLatency() {
+ return (mRequestedNetworkCapabilities & (1L
+ << NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)) != 0;
+ }
+
+ /**
+ * Checks if NET_CAPABILITY_PRIORITIZE_BANDWIDTH is declared.
+ */
+ private boolean hasPrioritizeBandwidth() {
+ return (mRequestedNetworkCapabilities & (1L
+ << NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)) != 0;
+ }
+}
diff --git a/service/src/com/android/server/connectivity/InvalidTagException.java b/service/src/com/android/server/connectivity/InvalidTagException.java
new file mode 100644
index 0000000..b924d27
--- /dev/null
+++ b/service/src/com/android/server/connectivity/InvalidTagException.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2023 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;
+
+
+/**
+ * An exception thrown when a Tag is not valid in self_certified_network_capabilities.xml.
+ */
+public class InvalidTagException extends Exception {
+
+ public InvalidTagException(String message) {
+ super(message);
+ }
+}
diff --git a/tests/common/java/android/net/netstats/NetworkTemplateTest.kt b/tests/common/java/android/net/netstats/NetworkTemplateTest.kt
index c2eacbc..fb6759e 100644
--- a/tests/common/java/android/net/netstats/NetworkTemplateTest.kt
+++ b/tests/common/java/android/net/netstats/NetworkTemplateTest.kt
@@ -165,23 +165,6 @@
}
@Test
- fun testUnsupportedAppUsageConstructor() {
- val templateMobile = NetworkTemplate(MATCH_MOBILE, null /* subscriberId */,
- null /* wifiNetworkKey */)
- val templateMobileWildcard = NetworkTemplate(6 /* MATCH_MOBILE_WILDCARD */,
- null /* subscriberId */, null /* wifiNetworkKey */)
- val templateWifiWildcard = NetworkTemplate(7 /* MATCH_WIFI_WILDCARD */,
- null /* subscriberId */,
- null /* wifiNetworkKey */)
-
- assertEquals(NetworkTemplate.Builder(MATCH_MOBILE).setMeteredness(METERED_YES).build(),
- templateMobile)
- assertEquals(NetworkTemplate.Builder(MATCH_MOBILE).setMeteredness(METERED_YES).build(),
- templateMobileWildcard)
- assertEquals(NetworkTemplate.Builder(MATCH_WIFI).build(), templateWifiWildcard)
- }
-
- @Test
fun testBuilderWifiNetworkKeys() {
// Verify template builder which generates same template with the given different
// sequence keys.
diff --git a/tests/cts/hostside/Android.bp b/tests/cts/hostside/Android.bp
index ff9bd31..891c2dd 100644
--- a/tests/cts/hostside/Android.bp
+++ b/tests/cts/hostside/Android.bp
@@ -47,6 +47,9 @@
data: [
":CtsHostsideNetworkTestsApp",
":CtsHostsideNetworkTestsApp2",
+ ":CtsHostsideNetworkCapTestsAppWithoutProperty",
+ ":CtsHostsideNetworkCapTestsAppWithProperty",
+ ":CtsHostsideNetworkCapTestsAppSdk33",
] + next_app_data,
per_testcase_directory: true,
}
diff --git a/tests/cts/hostside/networkslicingtestapp/Android.bp b/tests/cts/hostside/networkslicingtestapp/Android.bp
new file mode 100644
index 0000000..2aa3f69
--- /dev/null
+++ b/tests/cts/hostside/networkslicingtestapp/Android.bp
@@ -0,0 +1,65 @@
+//
+// Copyright (C) 2023 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 {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+java_defaults {
+ name: "CtsHostsideNetworkCapTestsAppDefaults",
+ platform_apis: true,
+ static_libs: [
+ "androidx.test.ext.junit",
+ "androidx.test.rules",
+ "modules-utils-build",
+ "cts-net-utils",
+ ],
+ srcs: ["src/**/*.java"],
+ // Tag this module as a cts test artifact
+ test_suites: [
+ "cts",
+ "general-tests",
+ "sts",
+ ],
+}
+
+android_test_helper_app {
+ name: "CtsHostsideNetworkCapTestsAppWithoutProperty",
+ defaults: [
+ "cts_support_defaults",
+ "CtsHostsideNetworkCapTestsAppDefaults"
+ ],
+ manifest: "AndroidManifestWithoutProperty.xml",
+}
+
+android_test_helper_app {
+ name: "CtsHostsideNetworkCapTestsAppWithProperty",
+ defaults: [
+ "cts_support_defaults",
+ "CtsHostsideNetworkCapTestsAppDefaults"
+ ],
+ manifest: "AndroidManifestWithProperty.xml",
+}
+
+android_test_helper_app {
+ name: "CtsHostsideNetworkCapTestsAppSdk33",
+ defaults: [
+ "cts_support_defaults",
+ "CtsHostsideNetworkCapTestsAppDefaults"
+ ],
+ target_sdk_version: "33",
+ manifest: "AndroidManifestWithoutProperty.xml",
+}
diff --git a/tests/cts/hostside/networkslicingtestapp/AndroidManifestWithProperty.xml b/tests/cts/hostside/networkslicingtestapp/AndroidManifestWithProperty.xml
new file mode 100644
index 0000000..3ef0376
--- /dev/null
+++ b/tests/cts/hostside/networkslicingtestapp/AndroidManifestWithProperty.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2023 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.cts.net.hostside.networkslicingtestapp">
+
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
+
+ <application>
+ <uses-library android:name="android.test.runner"/>
+ <property android:name="android.net.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES"
+ android:resource="@xml/self_certified_network_capabilities_both" />
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.cts.net.hostside.networkslicingtestapp"/>
+
+</manifest>
diff --git a/tests/cts/hostside/networkslicingtestapp/AndroidManifestWithoutProperty.xml b/tests/cts/hostside/networkslicingtestapp/AndroidManifestWithoutProperty.xml
new file mode 100644
index 0000000..fe66684
--- /dev/null
+++ b/tests/cts/hostside/networkslicingtestapp/AndroidManifestWithoutProperty.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2023 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.cts.net.hostside.networkslicingtestapp">
+
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
+
+ <application>
+ <uses-library android:name="android.test.runner"/>
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.cts.net.hostside.networkslicingtestapp"/>
+
+</manifest>
diff --git a/tests/cts/hostside/networkslicingtestapp/res/xml/self_certified_network_capabilities_both.xml b/tests/cts/hostside/networkslicingtestapp/res/xml/self_certified_network_capabilities_both.xml
new file mode 100644
index 0000000..4066be2
--- /dev/null
+++ b/tests/cts/hostside/networkslicingtestapp/res/xml/self_certified_network_capabilities_both.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+
+<network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_BANDWIDTH"/>
+</network-capabilities-declaration>
diff --git a/tests/cts/hostside/networkslicingtestapp/src/com.android.cts.net.hostside.networkslicingtestapp/NetworkSelfDeclaredCapabilitiesTest.java b/tests/cts/hostside/networkslicingtestapp/src/com.android.cts.net.hostside.networkslicingtestapp/NetworkSelfDeclaredCapabilitiesTest.java
new file mode 100644
index 0000000..39792fc
--- /dev/null
+++ b/tests/cts/hostside/networkslicingtestapp/src/com.android.cts.net.hostside.networkslicingtestapp/NetworkSelfDeclaredCapabilitiesTest.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2023 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.cts.net.hostside.networkslicingtestapp;
+
+import static org.junit.Assert.assertThrows;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkCapabilities;
+import android.net.NetworkRequest;
+import android.os.Build;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.testutils.DevSdkIgnoreRule;
+import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class NetworkSelfDeclaredCapabilitiesTest {
+
+ @Rule
+ public final DevSdkIgnoreRule mDevSdkIgnoreRule = new DevSdkIgnoreRule();
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ public void requestNetwork_withoutRequestCapabilities() {
+ final ConnectivityManager cm =
+ (ConnectivityManager)
+ InstrumentationRegistry.getInstrumentation()
+ .getContext()
+ .getSystemService(Context.CONNECTIVITY_SERVICE);
+ final NetworkRequest request =
+ new NetworkRequest.Builder().build();
+ final ConnectivityManager.NetworkCallback callback =
+ new ConnectivityManager.NetworkCallback();
+ cm.requestNetwork(request, callback);
+ cm.unregisterNetworkCallback(callback);
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ public void requestNetwork_withSelfDeclaredCapabilities() {
+ final ConnectivityManager cm =
+ (ConnectivityManager)
+ InstrumentationRegistry.getInstrumentation()
+ .getContext()
+ .getSystemService(Context.CONNECTIVITY_SERVICE);
+ final NetworkRequest request =
+ new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ .build();
+ final ConnectivityManager.NetworkCallback callback =
+ new ConnectivityManager.NetworkCallback();
+ cm.requestNetwork(request, callback);
+ cm.unregisterNetworkCallback(callback);
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ public void requestNetwork_lackingRequiredSelfDeclaredCapabilities() {
+ final ConnectivityManager cm =
+ (ConnectivityManager)
+ InstrumentationRegistry.getInstrumentation()
+ .getContext()
+ .getSystemService(Context.CONNECTIVITY_SERVICE);
+ final NetworkRequest request =
+ new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ .build();
+ final ConnectivityManager.NetworkCallback callback =
+ new ConnectivityManager.NetworkCallback();
+ assertThrows(
+ SecurityException.class,
+ () -> cm.requestNetwork(request, callback));
+ }
+
+}
diff --git a/tests/cts/hostside/src/com/android/cts/net/HostsideSelfDeclaredNetworkCapabilitiesCheckTest.java b/tests/cts/hostside/src/com/android/cts/net/HostsideSelfDeclaredNetworkCapabilitiesCheckTest.java
new file mode 100644
index 0000000..4c2985d
--- /dev/null
+++ b/tests/cts/hostside/src/com/android/cts/net/HostsideSelfDeclaredNetworkCapabilitiesCheckTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2023 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.cts.net;
+
+public class HostsideSelfDeclaredNetworkCapabilitiesCheckTest extends HostsideNetworkTestCase {
+
+ private static final String TEST_WITH_PROPERTY_IN_CURRENT_SDK_APK =
+ "CtsHostsideNetworkCapTestsAppWithProperty.apk";
+ private static final String TEST_WITHOUT_PROPERTY_IN_CURRENT_SDK_APK =
+ "CtsHostsideNetworkCapTestsAppWithoutProperty.apk";
+ private static final String TEST_IN_SDK_33_APK =
+ "CtsHostsideNetworkCapTestsAppSdk33.apk";
+ private static final String TEST_APP_PKG =
+ "com.android.cts.net.hostside.networkslicingtestapp";
+ private static final String TEST_CLASS_NAME = ".NetworkSelfDeclaredCapabilitiesTest";
+ private static final String WITH_SELF_DECLARED_CAPABILITIES_METHOD =
+ "requestNetwork_withSelfDeclaredCapabilities";
+ private static final String LACKING_SELF_DECLARED_CAPABILITIES_METHOD =
+ "requestNetwork_lackingRequiredSelfDeclaredCapabilities";
+ private static final String WITHOUT_REQUEST_CAPABILITIES_METHOD =
+ "requestNetwork_withoutRequestCapabilities";
+
+
+ public void testRequestNetworkInCurrentSdkWithProperty() throws Exception {
+ uninstallPackage(TEST_APP_PKG, false);
+ installPackage(TEST_WITH_PROPERTY_IN_CURRENT_SDK_APK);
+ // If the self-declared capabilities are defined,
+ // the ConnectivityManager.requestNetwork() call should always pass.
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ WITH_SELF_DECLARED_CAPABILITIES_METHOD);
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ WITHOUT_REQUEST_CAPABILITIES_METHOD);
+ uninstallPackage(TEST_APP_PKG, true);
+ }
+
+ public void testRequestNetworkInCurrentSdkWithoutProperty() throws Exception {
+ uninstallPackage(TEST_APP_PKG, false);
+ installPackage(TEST_WITHOUT_PROPERTY_IN_CURRENT_SDK_APK);
+ // If the self-declared capabilities are not defined,
+ // the ConnectivityManager.requestNetwork() call will fail if the properly is not declared.
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ LACKING_SELF_DECLARED_CAPABILITIES_METHOD);
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ WITHOUT_REQUEST_CAPABILITIES_METHOD);
+ uninstallPackage(TEST_APP_PKG, true);
+ }
+
+ public void testRequestNetworkInSdk33() throws Exception {
+ uninstallPackage(TEST_APP_PKG, false);
+ installPackage(TEST_IN_SDK_33_APK);
+ // In Sdk33, the ConnectivityManager.requestNetwork() call should always pass.
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ WITH_SELF_DECLARED_CAPABILITIES_METHOD);
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ WITHOUT_REQUEST_CAPABILITIES_METHOD);
+ uninstallPackage(TEST_APP_PKG, true);
+ }
+
+ public void testReinstallPackageWillUpdateProperty() throws Exception {
+ uninstallPackage(TEST_APP_PKG, false);
+ installPackage(TEST_WITHOUT_PROPERTY_IN_CURRENT_SDK_APK);
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ LACKING_SELF_DECLARED_CAPABILITIES_METHOD);
+ uninstallPackage(TEST_APP_PKG, true);
+
+
+ // Updates package.
+ installPackage(TEST_WITH_PROPERTY_IN_CURRENT_SDK_APK);
+ runDeviceTests(TEST_APP_PKG,
+ TEST_APP_PKG + TEST_CLASS_NAME,
+ WITH_SELF_DECLARED_CAPABILITIES_METHOD);
+ uninstallPackage(TEST_APP_PKG, true);
+
+ }
+}
+
diff --git a/tests/cts/net/src/android/net/cts/IpSecManagerTest.java b/tests/cts/net/src/android/net/cts/IpSecManagerTest.java
index 4fa0080..9c30811 100644
--- a/tests/cts/net/src/android/net/cts/IpSecManagerTest.java
+++ b/tests/cts/net/src/android/net/cts/IpSecManagerTest.java
@@ -395,7 +395,7 @@
private static class StatsChecker {
private static final double ERROR_MARGIN_BYTES = 1.05;
private static final double ERROR_MARGIN_PKTS = 1.05;
- private static final int MAX_WAIT_TIME_MILLIS = 1000;
+ private static final int MAX_WAIT_TIME_MILLIS = 3000;
private static long uidTxBytes;
private static long uidRxBytes;
diff --git a/tests/unit/java/com/android/server/ConnectivityServiceTest.java b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
index 5b98237..1a358b2 100755
--- a/tests/unit/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/unit/java/com/android/server/ConnectivityServiceTest.java
@@ -183,6 +183,8 @@
import static com.android.testutils.RecorderCallback.CallbackEntry.UNAVAILABLE;
import static com.android.testutils.TestPermissionUtil.runAsShell;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
@@ -228,6 +230,7 @@
import android.app.PendingIntent;
import android.app.admin.DevicePolicyManager;
import android.app.usage.NetworkStatsManager;
+import android.compat.testing.PlatformCompatChangeRule;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentProvider;
@@ -312,6 +315,7 @@
import android.net.Uri;
import android.net.VpnManager;
import android.net.VpnTransportInfo;
+import android.net.connectivity.ConnectivityCompatChanges;
import android.net.metrics.IpConnectivityLog;
import android.net.netd.aidl.NativeUidRangeConfig;
import android.net.networkstack.NetworkStackClientBase;
@@ -379,6 +383,7 @@
import com.android.server.ConnectivityService.ConnectivityDiagnosticsCallbackInfo;
import com.android.server.ConnectivityService.NetworkRequestInfo;
import com.android.server.ConnectivityServiceTest.ConnectivityServiceDependencies.ReportedInterfaces;
+import com.android.server.connectivity.ApplicationSelfCertifiedNetworkCapabilities;
import com.android.server.connectivity.AutomaticOnOffKeepaliveTracker;
import com.android.server.connectivity.CarrierPrivilegeAuthenticator;
import com.android.server.connectivity.ClatCoordinator;
@@ -406,6 +411,9 @@
import com.android.testutils.TestableNetworkCallback;
import com.android.testutils.TestableNetworkOfferCallback;
+import libcore.junit.util.compat.CoreCompatChangeRule.DisableCompatChanges;
+import libcore.junit.util.compat.CoreCompatChangeRule.EnableCompatChanges;
+
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -475,6 +483,9 @@
@Rule
public final DevSdkIgnoreRule ignoreRule = new DevSdkIgnoreRule();
+ @Rule
+ public final PlatformCompatChangeRule compatChangeRule = new PlatformCompatChangeRule();
+
private static final int TIMEOUT_MS = 2_000;
// Broadcasts can take a long time to be delivered. The test will not wait for that long unless
// there is a failure, so use a long timeout.
@@ -2105,6 +2116,37 @@
reset(mBroadcastOptionsShim);
return mBroadcastOptionsShim;
}
+
+ @GuardedBy("this")
+ private boolean mForceDisableCompatChangeCheck = true;
+
+ /**
+ * By default, the {@link #isChangeEnabled(long, String, UserHandle)} will always return
+ * true as the mForceDisableCompatChangeCheck is true and compat change check logic is
+ * never executed. The compat change check logic can be turned on by calling this method.
+ * If this method is called, the
+ * {@link libcore.junit.util.compat.CoreCompatChangeRule.EnableCompatChanges} or
+ * {@link libcore.junit.util.compat.CoreCompatChangeRule.DisableCompatChanges} must be
+ * used to turn on/off the compat change flag.
+ */
+ private void enableCompatChangeCheck() {
+ synchronized (this) {
+ mForceDisableCompatChangeCheck = false;
+ }
+ }
+
+ @Override
+ public boolean isChangeEnabled(long changeId,
+ @NonNull final String packageName,
+ @NonNull final UserHandle user) {
+ synchronized (this) {
+ if (mForceDisableCompatChangeCheck) {
+ return false;
+ } else {
+ return super.isChangeEnabled(changeId, packageName, user);
+ }
+ }
+ }
}
private class AutomaticOnOffKeepaliveTrackerDependencies
@@ -6310,6 +6352,142 @@
}
}
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ @DisableCompatChanges(ConnectivityCompatChanges.ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION)
+ public void testSelfCertifiedCapabilitiesDisabled()
+ throws Exception {
+ mDeps.enableCompatChangeCheck();
+ final NetworkRequest networkRequest = new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ .build();
+ final TestNetworkCallback cb = new TestNetworkCallback();
+ mCm.requestNetwork(networkRequest, cb);
+ mCm.unregisterNetworkCallback(cb);
+ }
+
+ /** Set the networkSliceResourceId to 0 will result in NameNotFoundException be thrown. */
+ private void setupMockForNetworkCapabilitiesResources(int networkSliceResourceId)
+ throws PackageManager.NameNotFoundException {
+ if (networkSliceResourceId == 0) {
+ doThrow(new PackageManager.NameNotFoundException()).when(mPackageManager).getProperty(
+ ConstantsShim.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES,
+ mContext.getPackageName());
+ } else {
+ final PackageManager.Property property = new PackageManager.Property(
+ ConstantsShim.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES,
+ networkSliceResourceId,
+ true /* isResource */,
+ mContext.getPackageName(),
+ "dummyClass"
+ );
+ doReturn(property).when(mPackageManager).getProperty(
+ ConstantsShim.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES,
+ mContext.getPackageName());
+ doReturn(mContext.getResources()).when(mPackageManager).getResourcesForApplication(
+ mContext.getPackageName());
+ }
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ @EnableCompatChanges(ConnectivityCompatChanges.ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION)
+ public void requestNetwork_withoutPrioritizeBandwidthDeclaration_shouldThrowException()
+ throws Exception {
+ mDeps.enableCompatChangeCheck();
+ setupMockForNetworkCapabilitiesResources(
+ com.android.frameworks.tests.net.R.xml.self_certified_capabilities_latency);
+ final NetworkRequest networkRequest = new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ .build();
+ final TestNetworkCallback cb = new TestNetworkCallback();
+ final Exception e = assertThrows(SecurityException.class,
+ () -> mCm.requestNetwork(networkRequest, cb));
+ assertThat(e.getMessage(),
+ containsString(ApplicationSelfCertifiedNetworkCapabilities.PRIORITIZE_BANDWIDTH));
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ @EnableCompatChanges(ConnectivityCompatChanges.ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION)
+ public void requestNetwork_withoutPrioritizeLatencyDeclaration_shouldThrowException()
+ throws Exception {
+ mDeps.enableCompatChangeCheck();
+ setupMockForNetworkCapabilitiesResources(
+ com.android.frameworks.tests.net.R.xml.self_certified_capabilities_bandwidth);
+ final NetworkRequest networkRequest = new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ .build();
+ final TestNetworkCallback cb = new TestNetworkCallback();
+ final Exception e = assertThrows(SecurityException.class,
+ () -> mCm.requestNetwork(networkRequest, cb));
+ assertThat(e.getMessage(),
+ containsString(ApplicationSelfCertifiedNetworkCapabilities.PRIORITIZE_LATENCY));
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ @EnableCompatChanges(ConnectivityCompatChanges.ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION)
+ public void requestNetwork_withoutNetworkSliceProperty_shouldThrowException() throws Exception {
+ mDeps.enableCompatChangeCheck();
+ setupMockForNetworkCapabilitiesResources(0 /* networkSliceResourceId */);
+ final NetworkRequest networkRequest = new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ .build();
+ final TestNetworkCallback cb = new TestNetworkCallback();
+ final Exception e = assertThrows(SecurityException.class,
+ () -> mCm.requestNetwork(networkRequest, cb));
+ assertThat(e.getMessage(),
+ containsString(ConstantsShim.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES));
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ @EnableCompatChanges(ConnectivityCompatChanges.ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION)
+ public void requestNetwork_withNetworkSliceDeclaration_shouldSucceed() throws Exception {
+ mDeps.enableCompatChangeCheck();
+ setupMockForNetworkCapabilitiesResources(
+ com.android.frameworks.tests.net.R.xml.self_certified_capabilities_both);
+
+ final NetworkRequest networkRequest = new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ .build();
+ final TestNetworkCallback cb = new TestNetworkCallback();
+ mCm.requestNetwork(networkRequest, cb);
+ mCm.unregisterNetworkCallback(cb);
+ }
+
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
+ @EnableCompatChanges(ConnectivityCompatChanges.ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION)
+ public void requestNetwork_withNetworkSliceDeclaration_shouldUseCache() throws Exception {
+ mDeps.enableCompatChangeCheck();
+ setupMockForNetworkCapabilitiesResources(
+ com.android.frameworks.tests.net.R.xml.self_certified_capabilities_both);
+
+ final NetworkRequest networkRequest = new NetworkRequest.Builder()
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ .addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ .build();
+ final TestNetworkCallback cb = new TestNetworkCallback();
+ mCm.requestNetwork(networkRequest, cb);
+ mCm.unregisterNetworkCallback(cb);
+
+ // Second call should use caches
+ mCm.requestNetwork(networkRequest, cb);
+ mCm.unregisterNetworkCallback(cb);
+
+ // PackageManager's API only called once because the second call is using cache.
+ verify(mPackageManager, times(1)).getProperty(
+ ConstantsShim.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES,
+ mContext.getPackageName());
+ verify(mPackageManager, times(1)).getResourcesForApplication(
+ mContext.getPackageName());
+ }
+
/**
* Validate the service throws if request with CBS but without carrier privilege.
*/
diff --git a/tests/unit/java/com/android/server/NsdServiceTest.java b/tests/unit/java/com/android/server/NsdServiceTest.java
index 0680772..3dc5647 100644
--- a/tests/unit/java/com/android/server/NsdServiceTest.java
+++ b/tests/unit/java/com/android/server/NsdServiceTest.java
@@ -21,6 +21,7 @@
import static android.net.nsd.NsdManager.FAILURE_INTERNAL_ERROR;
import static android.net.nsd.NsdManager.FAILURE_OPERATION_NOT_RUNNING;
+import static com.android.server.NsdService.constructServiceType;
import static com.android.testutils.ContextUtils.mockService;
import static libcore.junit.util.compat.CoreCompatChangeRule.DisableCompatChanges;
@@ -895,8 +896,8 @@
List.of(), /* subtypes */
new String[] {"android", "local"}, /* hostName */
12345, /* port */
- IPV4_ADDRESS,
- IPV6_ADDRESS,
+ List.of(IPV4_ADDRESS),
+ List.of(IPV6_ADDRESS),
List.of(), /* textStrings */
List.of(), /* textEntries */
1234, /* interfaceIndex */
@@ -915,8 +916,8 @@
null, /* subtypes */
null, /* hostName */
0, /* port */
- null, /* ipv4Address */
- null, /* ipv6Address */
+ List.of(), /* ipv4Address */
+ List.of(), /* ipv6Address */
null, /* textStrings */
null, /* textEntries */
1234, /* interfaceIndex */
@@ -932,7 +933,7 @@
waitForIdle();
verify(mDiscoveryManager).unregisterListener(eq(serviceTypeWithLocalDomain), any());
verify(discListener, timeout(TIMEOUT_MS)).onDiscoveryStopped(SERVICE_TYPE);
- verify(mSocketProvider, timeout(CLEANUP_DELAY_MS + TIMEOUT_MS)).stopMonitoringSockets();
+ verify(mSocketProvider, timeout(CLEANUP_DELAY_MS + TIMEOUT_MS)).requestStopWhenInactive();
}
@Test
@@ -981,7 +982,9 @@
waitForIdle();
verify(mSocketProvider).startMonitoringSockets();
verify(mDiscoveryManager).registerListener(eq(constructedServiceType),
- listenerCaptor.capture(), argThat(options -> network.equals(options.getNetwork())));
+ listenerCaptor.capture(), argThat(options ->
+ network.equals(options.getNetwork())
+ && SERVICE_NAME.equals(options.getResolveInstanceName())));
final MdnsServiceBrowserListener listener = listenerCaptor.getValue();
final MdnsServiceInfo mdnsServiceInfo = new MdnsServiceInfo(
@@ -990,8 +993,8 @@
List.of(), /* subtypes */
new String[]{"android", "local"}, /* hostName */
PORT,
- IPV4_ADDRESS,
- IPV6_ADDRESS,
+ List.of(IPV4_ADDRESS),
+ List.of("2001:db8::1", "2001:db8::2"),
List.of() /* textStrings */,
List.of(MdnsServiceInfo.TextEntry.fromBytes(new byte[]{
'k', 'e', 'y', '=', (byte) 0xFF, (byte) 0xFE})) /* textEntries */,
@@ -1011,12 +1014,17 @@
assertEquals(1, info.getAttributes().size());
assertArrayEquals(new byte[]{(byte) 0xFF, (byte) 0xFE}, info.getAttributes().get("key"));
assertEquals(parseNumericAddress(IPV4_ADDRESS), info.getHost());
+ assertEquals(3, info.getHostAddresses().size());
+ assertTrue(info.getHostAddresses().stream().anyMatch(
+ address -> address.equals(parseNumericAddress("2001:db8::1"))));
+ assertTrue(info.getHostAddresses().stream().anyMatch(
+ address -> address.equals(parseNumericAddress("2001:db8::2"))));
assertEquals(network, info.getNetwork());
// Verify the listener has been unregistered.
verify(mDiscoveryManager, timeout(TIMEOUT_MS))
.unregisterListener(eq(constructedServiceType), any());
- verify(mSocketProvider, timeout(CLEANUP_DELAY_MS + TIMEOUT_MS)).stopMonitoringSockets();
+ verify(mSocketProvider, timeout(CLEANUP_DELAY_MS + TIMEOUT_MS)).requestStopWhenInactive();
}
@Test
@@ -1055,6 +1063,54 @@
}
@Test
+ public void testTypeSpecificFeatureFlagging() {
+ doReturn("_type1._tcp:flag1,_type2._tcp:flag2").when(mDeps).getTypeAllowlistFlags();
+ doReturn(true).when(mDeps).isFeatureEnabled(any(),
+ eq("mdns_discovery_manager_allowlist_flag1_version"));
+ doReturn(true).when(mDeps).isFeatureEnabled(any(),
+ eq("mdns_advertiser_allowlist_flag2_version"));
+
+ final NsdManager client = connectClient(mService);
+ final NsdServiceInfo service1 = new NsdServiceInfo(SERVICE_NAME, "_type1._tcp");
+ service1.setHostAddresses(List.of(parseNumericAddress("2001:db8::123")));
+ service1.setPort(1234);
+ final NsdServiceInfo service2 = new NsdServiceInfo(SERVICE_NAME, "_type2._tcp");
+ service2.setHostAddresses(List.of(parseNumericAddress("2001:db8::123")));
+ service2.setPort(1234);
+
+ client.discoverServices(service1.getServiceType(),
+ NsdManager.PROTOCOL_DNS_SD, mock(DiscoveryListener.class));
+ client.discoverServices(service2.getServiceType(),
+ NsdManager.PROTOCOL_DNS_SD, mock(DiscoveryListener.class));
+ waitForIdle();
+
+ // The DiscoveryManager is enabled for _type1 but not _type2
+ verify(mDiscoveryManager).registerListener(eq("_type1._tcp.local"), any(), any());
+ verify(mDiscoveryManager, never()).registerListener(
+ eq("_type2._tcp.local"), any(), any());
+
+ client.resolveService(service1, mock(ResolveListener.class));
+ client.resolveService(service2, mock(ResolveListener.class));
+ waitForIdle();
+
+ // Same behavior for resolve
+ verify(mDiscoveryManager, times(2)).registerListener(
+ eq("_type1._tcp.local"), any(), any());
+ verify(mDiscoveryManager, never()).registerListener(
+ eq("_type2._tcp.local"), any(), any());
+
+ client.registerService(service1, NsdManager.PROTOCOL_DNS_SD,
+ mock(RegistrationListener.class));
+ client.registerService(service2, NsdManager.PROTOCOL_DNS_SD,
+ mock(RegistrationListener.class));
+ waitForIdle();
+
+ // The advertiser is enabled for _type2 but not _type1
+ verify(mAdvertiser, never()).addService(anyInt(), argThat(info -> matches(info, service1)));
+ verify(mAdvertiser).addService(anyInt(), argThat(info -> matches(info, service2)));
+ }
+
+ @Test
public void testAdvertiseWithMdnsAdvertiser() {
setMdnsAdvertiserEnabled();
@@ -1090,7 +1146,7 @@
verify(mAdvertiser).removeService(idCaptor.getValue());
verify(regListener, timeout(TIMEOUT_MS)).onServiceUnregistered(
argThat(info -> matches(info, regInfo)));
- verify(mSocketProvider, timeout(TIMEOUT_MS)).stopMonitoringSockets();
+ verify(mSocketProvider, timeout(TIMEOUT_MS)).requestStopWhenInactive();
}
@Test
@@ -1150,6 +1206,50 @@
argThat(info -> matches(info, new NsdServiceInfo(regInfo.getServiceName(), null))));
}
+ @Test
+ public void testStopServiceResolutionWithMdnsDiscoveryManager() {
+ setMdnsDiscoveryManagerEnabled();
+
+ final NsdManager client = connectClient(mService);
+ final ResolveListener resolveListener = mock(ResolveListener.class);
+ final Network network = new Network(999);
+ final String serviceType = "_nsd._service._tcp";
+ final String constructedServiceType = "_nsd._sub._service._tcp.local";
+ final ArgumentCaptor<MdnsServiceBrowserListener> listenerCaptor =
+ ArgumentCaptor.forClass(MdnsServiceBrowserListener.class);
+ final NsdServiceInfo request = new NsdServiceInfo(SERVICE_NAME, serviceType);
+ request.setNetwork(network);
+ client.resolveService(request, resolveListener);
+ waitForIdle();
+ verify(mSocketProvider).startMonitoringSockets();
+ verify(mDiscoveryManager).registerListener(eq(constructedServiceType),
+ listenerCaptor.capture(), argThat(options -> network.equals(options.getNetwork())));
+
+ client.stopServiceResolution(resolveListener);
+ waitForIdle();
+
+ // Verify the listener has been unregistered.
+ verify(mDiscoveryManager, timeout(TIMEOUT_MS))
+ .unregisterListener(eq(constructedServiceType), eq(listenerCaptor.getValue()));
+ verify(resolveListener, timeout(TIMEOUT_MS)).onResolutionStopped(argThat(ns ->
+ request.getServiceName().equals(ns.getServiceName())
+ && request.getServiceType().equals(ns.getServiceType())));
+ verify(mSocketProvider, timeout(CLEANUP_DELAY_MS + TIMEOUT_MS)).requestStopWhenInactive();
+ }
+
+ @Test
+ public void testConstructServiceType() {
+ final String serviceType1 = "test._tcp";
+ final String serviceType2 = "_test._quic";
+ final String serviceType3 = "_123._udp.";
+ final String serviceType4 = "_TEST._999._tcp.";
+
+ assertEquals(null, constructServiceType(serviceType1));
+ assertEquals(null, constructServiceType(serviceType2));
+ assertEquals("_123._udp", constructServiceType(serviceType3));
+ assertEquals("_TEST._sub._999._tcp", constructServiceType(serviceType4));
+ }
+
private void waitForIdle() {
HandlerUtils.waitForIdle(mHandler, TIMEOUT_MS);
}
diff --git a/tests/unit/java/com/android/server/connectivity/ApplicationSelfCertifiedNetworkCapabilitiesTest.kt b/tests/unit/java/com/android/server/connectivity/ApplicationSelfCertifiedNetworkCapabilitiesTest.kt
new file mode 100644
index 0000000..f2d7aaa
--- /dev/null
+++ b/tests/unit/java/com/android/server/connectivity/ApplicationSelfCertifiedNetworkCapabilitiesTest.kt
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2023 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
+
+import android.net.NetworkCapabilities
+import android.os.Build
+import androidx.test.InstrumentationRegistry
+import androidx.test.filters.SmallTest
+import com.android.frameworks.tests.net.R
+import com.android.testutils.DevSdkIgnoreRule
+import com.android.testutils.DevSdkIgnoreRunner
+import com.google.common.truth.Truth.assertThat
+import kotlin.test.assertFailsWith
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(DevSdkIgnoreRunner::class)
+@SmallTest
+@DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.R)
+class ApplicationSelfCertifiedNetworkCapabilitiesTest {
+ private val mResource = InstrumentationRegistry.getContext().getResources()
+ private val bandwidthCapability = NetworkCapabilities.Builder().apply {
+ addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ }.build()
+ private val latencyCapability = NetworkCapabilities.Builder().apply {
+ addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ }.build()
+ private val emptyCapability = NetworkCapabilities.Builder().build()
+ private val bothCapabilities = NetworkCapabilities.Builder().apply {
+ addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH)
+ addCapability(NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY)
+ }.build()
+
+ @Test
+ fun parseXmlWithWrongTag_shouldIgnoreWrongTag() {
+ val parser = mResource.getXml(
+ R.xml.self_certified_capabilities_wrong_tag
+ )
+ val selfDeclaredCaps = ApplicationSelfCertifiedNetworkCapabilities.createFromXml(parser)
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(latencyCapability)
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(bandwidthCapability)
+ }
+
+ @Test
+ fun parseXmlWithWrongDeclaration_shouldThrowException() {
+ val parser = mResource.getXml(
+ R.xml.self_certified_capabilities_wrong_declaration
+ )
+ val exception = assertFailsWith<InvalidTagException> {
+ ApplicationSelfCertifiedNetworkCapabilities.createFromXml(parser)
+ }
+ assertThat(exception.message).contains("network-capabilities-declaration1")
+ }
+
+ @Test
+ fun checkIfSelfCertifiedNetworkCapabilitiesDeclared_shouldThrowExceptionWhenNoDeclaration() {
+ val parser = mResource.getXml(R.xml.self_certified_capabilities_other)
+ val selfDeclaredCaps = ApplicationSelfCertifiedNetworkCapabilities.createFromXml(parser)
+ val exception1 = assertFailsWith<SecurityException> {
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(latencyCapability)
+ }
+ assertThat(exception1.message).contains(
+ ApplicationSelfCertifiedNetworkCapabilities.PRIORITIZE_LATENCY
+ )
+ val exception2 = assertFailsWith<SecurityException> {
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(bandwidthCapability)
+ }
+ assertThat(exception2.message).contains(
+ ApplicationSelfCertifiedNetworkCapabilities.PRIORITIZE_BANDWIDTH
+ )
+ }
+
+ @Test
+ fun checkIfSelfCertifiedNetworkCapabilitiesDeclared_shouldPassIfDeclarationExist() {
+ val parser = mResource.getXml(R.xml.self_certified_capabilities_both)
+ val selfDeclaredCaps = ApplicationSelfCertifiedNetworkCapabilities.createFromXml(parser)
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(latencyCapability)
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(bandwidthCapability)
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(bothCapabilities)
+ selfDeclaredCaps.enforceSelfCertifiedNetworkCapabilitiesDeclared(emptyCapability)
+ }
+}
diff --git a/tests/unit/java/com/android/server/connectivity/IpConnectivityMetricsTest.java b/tests/unit/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
index 719314a..5881a8e 100644
--- a/tests/unit/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
+++ b/tests/unit/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
@@ -80,6 +80,7 @@
private static final byte[] MAC_ADDR =
{(byte)0x84, (byte)0xc9, (byte)0xb2, (byte)0x6a, (byte)0xed, (byte)0x4b};
+ private static final long NET_HANDLE = new Network(4291).getNetworkHandle();
@Mock Context mCtx;
@Mock IIpConnectivityMetrics mMockService;
@@ -607,7 +608,7 @@
void wakeupEvent(String iface, int uid, int ether, int ip, byte[] mac, String srcIp,
String dstIp, int sport, int dport, long now) throws Exception {
- String prefix = NetdEventListenerService.WAKEUP_EVENT_IFACE_PREFIX + iface;
+ String prefix = NET_HANDLE + ":" + iface;
mNetdListener.onWakeupEvent(prefix, uid, ether, ip, mac, srcIp, dstIp, sport, dport, now);
}
diff --git a/tests/unit/java/com/android/server/connectivity/NetdEventListenerServiceTest.java b/tests/unit/java/com/android/server/connectivity/NetdEventListenerServiceTest.java
index 7d6c3ae..f4b6464 100644
--- a/tests/unit/java/com/android/server/connectivity/NetdEventListenerServiceTest.java
+++ b/tests/unit/java/com/android/server/connectivity/NetdEventListenerServiceTest.java
@@ -60,6 +60,8 @@
private static final String EXAMPLE_IPV4 = "192.0.2.1";
private static final String EXAMPLE_IPV6 = "2001:db8:1200::2:1";
+ private static final long NET_HANDLE = new Network(5391).getNetworkHandle();
+
private static final byte[] MAC_ADDR =
{(byte)0x84, (byte)0xc9, (byte)0xb2, (byte)0x6a, (byte)0xed, (byte)0x4b};
@@ -498,7 +500,7 @@
void wakeupEvent(String iface, int uid, int ether, int ip, byte[] mac, String srcIp,
String dstIp, int sport, int dport, long now) throws Exception {
- String prefix = NetdEventListenerService.WAKEUP_EVENT_IFACE_PREFIX + iface;
+ String prefix = NET_HANDLE + ":" + iface;
mService.onWakeupEvent(prefix, uid, ether, ip, mac, srcIp, dstIp, sport, dport, now);
}
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsAdvertiserTest.kt b/tests/unit/java/com/android/server/connectivity/mdns/MdnsAdvertiserTest.kt
index 1febe6d..375c150 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsAdvertiserTest.kt
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsAdvertiserTest.kt
@@ -42,6 +42,7 @@
import org.mockito.Mockito.doReturn
import org.mockito.Mockito.mock
import org.mockito.Mockito.never
+import org.mockito.Mockito.times
import org.mockito.Mockito.verify
private const val SERVICE_ID_1 = 1
@@ -51,6 +52,7 @@
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 TEST_HOSTNAME = arrayOf("Android_test", "local")
private val SERVICE_1 = NsdServiceInfo("TestServiceName", "_advertisertest._tcp").apply {
port = 12345
@@ -81,10 +83,13 @@
@Before
fun setUp() {
thread.start()
+ doReturn(TEST_HOSTNAME).`when`(mockDeps).generateHostname()
doReturn(mockInterfaceAdvertiser1).`when`(mockDeps).makeAdvertiser(eq(mockSocket1),
- any(), any(), any(), any())
+ any(), any(), any(), any(), eq(TEST_HOSTNAME)
+ )
doReturn(mockInterfaceAdvertiser2).`when`(mockDeps).makeAdvertiser(eq(mockSocket2),
- any(), any(), any(), any())
+ any(), any(), any(), any(), eq(TEST_HOSTNAME)
+ )
doReturn(true).`when`(mockInterfaceAdvertiser1).isProbing(anyInt())
doReturn(true).`when`(mockInterfaceAdvertiser2).isProbing(anyInt())
}
@@ -106,8 +111,14 @@
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())
+ verify(mockDeps).makeAdvertiser(
+ eq(mockSocket1),
+ eq(listOf(TEST_LINKADDR)),
+ eq(thread.looper),
+ any(),
+ intAdvCbCaptor.capture(),
+ eq(TEST_HOSTNAME)
+ )
doReturn(false).`when`(mockInterfaceAdvertiser1).isProbing(SERVICE_ID_1)
postSync { intAdvCbCaptor.value.onRegisterServiceSucceeded(
@@ -134,9 +145,11 @@
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())
+ eq(thread.looper), any(), intAdvCbCaptor1.capture(), eq(TEST_HOSTNAME)
+ )
verify(mockDeps).makeAdvertiser(eq(mockSocket2), eq(listOf(TEST_LINKADDR)),
- eq(thread.looper), any(), intAdvCbCaptor2.capture())
+ eq(thread.looper), any(), intAdvCbCaptor2.capture(), eq(TEST_HOSTNAME)
+ )
doReturn(false).`when`(mockInterfaceAdvertiser1).isProbing(SERVICE_ID_1)
postSync { intAdvCbCaptor1.value.onRegisterServiceSucceeded(
@@ -192,7 +205,8 @@
val intAdvCbCaptor = ArgumentCaptor.forClass(MdnsInterfaceAdvertiser.Callback::class.java)
verify(mockDeps).makeAdvertiser(eq(mockSocket1), eq(listOf(TEST_LINKADDR)),
- eq(thread.looper), any(), intAdvCbCaptor.capture())
+ eq(thread.looper), any(), intAdvCbCaptor.capture(), eq(TEST_HOSTNAME)
+ )
verify(mockInterfaceAdvertiser1).addService(eq(SERVICE_ID_1),
argThat { it.matches(SERVICE_1) })
verify(mockInterfaceAdvertiser1).addService(eq(SERVICE_ID_2),
@@ -216,6 +230,15 @@
verify(mockInterfaceAdvertiser1, atLeastOnce()).destroyNow()
}
+ @Test
+ fun testRemoveService_whenAllServiceRemoved_thenUpdateHostName() {
+ val advertiser = MdnsAdvertiser(thread.looper, socketProvider, cb, mockDeps)
+ verify(mockDeps, times(1)).generateHostname()
+ postSync { advertiser.addService(SERVICE_ID_1, SERVICE_1) }
+ postSync { advertiser.removeService(SERVICE_ID_1) }
+ verify(mockDeps, times(2)).generateHostname()
+ }
+
private fun postSync(r: () -> Unit) {
handler.post(r)
handler.waitForIdle(TIMEOUT_MS)
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsDiscoveryManagerTests.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsDiscoveryManagerTests.java
index 83e7696..e6b8326 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsDiscoveryManagerTests.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsDiscoveryManagerTests.java
@@ -23,6 +23,7 @@
import static org.mockito.Mockito.when;
import android.annotation.NonNull;
+import android.net.Network;
import android.text.TextUtils;
import com.android.testutils.DevSdkIgnoreRule;
@@ -35,7 +36,10 @@
import org.mockito.MockitoAnnotations;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
+import java.util.List;
/** Tests for {@link MdnsDiscoveryManager}. */
@RunWith(DevSdkIgnoreRunner.class)
@@ -111,25 +115,38 @@
discoveryManager.registerListener(
SERVICE_TYPE_2, mockListenerTwo, MdnsSearchOptions.getDefaultOptions());
- MdnsResponse responseForServiceTypeOne = createMockResponse(SERVICE_TYPE_1);
- discoveryManager.onResponseReceived(responseForServiceTypeOne);
- verify(mockServiceTypeClientOne).processResponse(responseForServiceTypeOne);
+ MdnsPacket responseForServiceTypeOne = createMdnsPacket(SERVICE_TYPE_1);
+ final int ifIndex = 1;
+ final Network network = mock(Network.class);
+ discoveryManager.onResponseReceived(responseForServiceTypeOne, ifIndex, network);
+ verify(mockServiceTypeClientOne).processResponse(responseForServiceTypeOne, ifIndex,
+ network);
- MdnsResponse responseForServiceTypeTwo = createMockResponse(SERVICE_TYPE_2);
- discoveryManager.onResponseReceived(responseForServiceTypeTwo);
- verify(mockServiceTypeClientTwo).processResponse(responseForServiceTypeTwo);
+ MdnsPacket responseForServiceTypeTwo = createMdnsPacket(SERVICE_TYPE_2);
+ discoveryManager.onResponseReceived(responseForServiceTypeTwo, ifIndex, network);
+ verify(mockServiceTypeClientTwo).processResponse(responseForServiceTypeTwo, ifIndex,
+ network);
- MdnsResponse responseForSubtype = createMockResponse("subtype._sub._googlecast._tcp.local");
- discoveryManager.onResponseReceived(responseForSubtype);
- verify(mockServiceTypeClientOne).processResponse(responseForSubtype);
+ MdnsPacket responseForSubtype = createMdnsPacket("subtype._sub._googlecast._tcp.local");
+ discoveryManager.onResponseReceived(responseForSubtype, ifIndex, network);
+ verify(mockServiceTypeClientOne).processResponse(responseForSubtype, ifIndex, network);
}
- private MdnsResponse createMockResponse(String serviceType) {
- MdnsPointerRecord mockPointerRecord = mock(MdnsPointerRecord.class);
- MdnsResponse mockResponse = mock(MdnsResponse.class);
- when(mockResponse.getPointerRecords())
- .thenReturn(Collections.singletonList(mockPointerRecord));
- when(mockPointerRecord.getName()).thenReturn(TextUtils.split(serviceType, "\\."));
- return mockResponse;
+ private MdnsPacket createMdnsPacket(String serviceType) {
+ final String[] type = TextUtils.split(serviceType, "\\.");
+ final ArrayList<String> name = new ArrayList<>(type.length + 1);
+ name.add("TestName");
+ name.addAll(Arrays.asList(type));
+ return new MdnsPacket(0 /* flags */,
+ Collections.emptyList() /* questions */,
+ List.of(new MdnsPointerRecord(
+ type,
+ 0L /* receiptTimeMillis */,
+ false /* cacheFlush */,
+ 120000 /* ttlMillis */,
+ name.toArray(new String[0])
+ )) /* answers */,
+ Collections.emptyList() /* authorityRecords */,
+ Collections.emptyList() /* additionalRecords */);
}
}
\ No newline at end of file
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiserTest.kt b/tests/unit/java/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiserTest.kt
index 4a806b1..2d8d8f3 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiserTest.kt
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsInterfaceAdvertiserTest.kt
@@ -55,6 +55,7 @@
private val TEST_ADDRS = listOf(LinkAddress(parseNumericAddress("2001:db8::123"), 64))
private val TEST_BUFFER = ByteArray(1300)
+private val TEST_HOSTNAME = arrayOf("Android_test", "local")
private const val TEST_SERVICE_ID_1 = 42
private val TEST_SERVICE_1 = NsdServiceInfo().apply {
@@ -88,12 +89,23 @@
private val packetHandler get() = packetHandlerCaptor.value
private val advertiser by lazy {
- MdnsInterfaceAdvertiser(LOG_TAG, socket, TEST_ADDRS, thread.looper, TEST_BUFFER, cb, deps)
+ MdnsInterfaceAdvertiser(
+ LOG_TAG,
+ socket,
+ TEST_ADDRS,
+ thread.looper,
+ TEST_BUFFER,
+ cb,
+ deps,
+ TEST_HOSTNAME
+ )
}
@Before
fun setUp() {
- doReturn(repository).`when`(deps).makeRecordRepository(any())
+ doReturn(repository).`when`(deps).makeRecordRepository(any(),
+ eq(TEST_HOSTNAME)
+ )
doReturn(replySender).`when`(deps).makeReplySender(anyString(), any(), any(), any())
doReturn(announcer).`when`(deps).makeMdnsAnnouncer(anyString(), any(), any(), any())
doReturn(prober).`when`(deps).makeMdnsProber(anyString(), any(), any(), any())
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClientTest.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClientTest.java
index 9d42a65..1e322e4 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClientTest.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsMultinetworkSocketClientTest.java
@@ -19,9 +19,9 @@
import static com.android.server.connectivity.mdns.MdnsSocketProvider.SocketCallback;
import static com.android.server.connectivity.mdns.MulticastPacketReader.PacketHandler;
-import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.timeout;
@@ -146,16 +146,23 @@
// Send the data and verify the received records.
final PacketHandler handler = handlerCaptor.getValue();
handler.handlePacket(data, data.length, null /* src */);
- final ArgumentCaptor<MdnsResponse> responseCaptor =
- ArgumentCaptor.forClass(MdnsResponse.class);
- verify(mCallback).onResponseReceived(responseCaptor.capture());
- final MdnsResponse response = responseCaptor.getValue();
- assertTrue(response.hasPointerRecords());
- assertArrayEquals("_testtype._tcp.local".split("\\."),
- response.getPointerRecords().get(0).getName());
- assertTrue(response.hasServiceRecord());
- assertEquals("testservice", response.getServiceRecord().getServiceInstanceName());
- assertEquals("Android.local".split("\\."),
- response.getServiceRecord().getServiceHost());
+ final ArgumentCaptor<MdnsPacket> responseCaptor =
+ ArgumentCaptor.forClass(MdnsPacket.class);
+ verify(mCallback).onResponseReceived(responseCaptor.capture(), anyInt(), any());
+ final MdnsPacket response = responseCaptor.getValue();
+ assertEquals(0, response.questions.size());
+ assertEquals(0, response.additionalRecords.size());
+ assertEquals(0, response.authorityRecords.size());
+
+ final String[] serviceName = "testservice._testtype._tcp.local".split("\\.");
+ assertEquals(List.of(
+ new MdnsPointerRecord("_testtype._tcp.local".split("\\."),
+ 0L /* receiptTimeMillis */, false /* cacheFlush */, 4500000 /* ttlMillis */,
+ serviceName),
+ new MdnsServiceRecord(serviceName, 0L /* receiptTimeMillis */,
+ false /* cacheFlush */, 4500000 /* ttlMillis */, 0 /* servicePriority */,
+ 0 /* serviceWeight */, 31234 /* servicePort */,
+ new String[] { "Android", "local" } /* serviceHost */)
+ ), response.answers);
}
}
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsRecordRepositoryTest.kt b/tests/unit/java/com/android/server/connectivity/mdns/MdnsRecordRepositoryTest.kt
index ecc11ec..5665091 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsRecordRepositoryTest.kt
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsRecordRepositoryTest.kt
@@ -67,7 +67,6 @@
class MdnsRecordRepositoryTest {
private val thread = HandlerThread(MdnsRecordRepositoryTest::class.simpleName)
private val deps = object : Dependencies() {
- override fun getHostname() = TEST_HOSTNAME
override fun getInterfaceInetAddresses(iface: NetworkInterface) =
Collections.enumeration(TEST_ADDRESSES.map { it.address })
}
@@ -84,7 +83,7 @@
@Test
fun testAddServiceAndProbe() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
assertEquals(0, repository.servicesCount)
assertEquals(-1, repository.addService(TEST_SERVICE_ID_1, TEST_SERVICE_1))
assertEquals(1, repository.servicesCount)
@@ -117,7 +116,7 @@
@Test
fun testAddAndConflicts() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
repository.addService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
assertFailsWith(NameConflictException::class) {
repository.addService(TEST_SERVICE_ID_2, TEST_SERVICE_1)
@@ -126,7 +125,7 @@
@Test
fun testInvalidReuseOfServiceId() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
repository.addService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
assertFailsWith(IllegalArgumentException::class) {
repository.addService(TEST_SERVICE_ID_1, TEST_SERVICE_2)
@@ -135,7 +134,7 @@
@Test
fun testHasActiveService() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
assertFalse(repository.hasActiveService(TEST_SERVICE_ID_1))
repository.addService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
@@ -152,7 +151,7 @@
@Test
fun testExitAnnouncements() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
repository.initWithService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
repository.onAdvertisementSent(TEST_SERVICE_ID_1)
@@ -181,7 +180,7 @@
@Test
fun testExitingServiceReAdded() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
repository.initWithService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
repository.onAdvertisementSent(TEST_SERVICE_ID_1)
repository.exitService(TEST_SERVICE_ID_1)
@@ -195,7 +194,7 @@
@Test
fun testOnProbingSucceeded() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
val announcementInfo = repository.initWithService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
repository.onAdvertisementSent(TEST_SERVICE_ID_1)
val packet = announcementInfo.getPacket(0)
@@ -319,7 +318,7 @@
@Test
fun testGetReply() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
repository.initWithService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
val questions = listOf(MdnsPointerRecord(arrayOf("_testservice", "_tcp", "local"),
0L /* receiptTimeMillis */,
@@ -404,7 +403,7 @@
@Test
fun testGetConflictingServices() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
repository.addService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
repository.addService(TEST_SERVICE_ID_2, TEST_SERVICE_2)
@@ -432,7 +431,7 @@
@Test
fun testGetConflictingServices_IdenticalService() {
- val repository = MdnsRecordRepository(thread.looper, deps)
+ val repository = MdnsRecordRepository(thread.looper, deps, TEST_HOSTNAME)
repository.addService(TEST_SERVICE_ID_1, TEST_SERVICE_1)
repository.addService(TEST_SERVICE_ID_2, TEST_SERVICE_2)
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseDecoderTests.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseDecoderTests.java
index 4cae447..a80c078 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseDecoderTests.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseDecoderTests.java
@@ -16,20 +16,26 @@
package com.android.server.connectivity.mdns;
+import static android.net.InetAddresses.parseNumericAddress;
+
import static com.android.server.connectivity.mdns.MdnsResponseDecoder.Clock;
import static com.android.testutils.DevSdkIgnoreRuleKt.SC_V2;
+import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
-import android.net.InetAddresses;
import android.net.Network;
+import android.util.ArraySet;
import com.android.net.module.util.HexDump;
+import com.android.server.connectivity.mdns.MdnsResponseTests.MdnsInet4AddressRecord;
+import com.android.server.connectivity.mdns.MdnsResponseTests.MdnsInet6AddressRecord;
import com.android.testutils.DevSdkIgnoreRule;
import com.android.testutils.DevSdkIgnoreRunner;
@@ -43,8 +49,11 @@
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetSocketAddress;
-import java.util.LinkedList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
import java.util.List;
+import java.util.stream.Collectors;
@RunWith(DevSdkIgnoreRunner.class)
@DevSdkIgnoreRule.IgnoreUpTo(SC_V2)
@@ -147,6 +156,44 @@
+ "010001000000780004C0A8018A0000000000000000000000000000"
+ "000000");
+ // MDNS record for name "testhost1" with an IPv4 address of 10.1.2.3
+ private static final byte[] DATAIN_IPV4_1 = HexDump.hexStringToByteArray(
+ "0974657374686f73743100000180010000007800040a010203");
+ // MDNS record for name "testhost1" with an IPv4 address of 10.1.2.4
+ private static final byte[] DATAIN_IPV4_2 = HexDump.hexStringToByteArray(
+ "0974657374686f73743100000180010000007800040a010204");
+ // MDNS record w/name "testhost1" & IPv6 address of aabb:ccdd:1122:3344:a0b0:c0d0:1020:3040
+ private static final byte[] DATAIN_IPV6_1 = HexDump.hexStringToByteArray(
+ "0974657374686f73743100001c8001000000780010aabbccdd11223344a0b0c0d010203040");
+ // MDNS record w/name "testhost1" & IPv6 address of aabb:ccdd:1122:3344:a0b0:c0d0:1020:3030
+ private static final byte[] DATAIN_IPV6_2 = HexDump.hexStringToByteArray(
+ "0974657374686f73743100001c8001000000780010aabbccdd11223344a0b0c0d010203030");
+ // MDNS record w/name "test" & PTR to foo.bar.quxx
+ private static final byte[] DATAIN_PTR_1 = HexDump.hexStringToByteArray(
+ "047465737400000C000100001194000E03666F6F03626172047175787800");
+ // MDNS record w/name "test" & PTR to foo.bar.quxy
+ private static final byte[] DATAIN_PTR_2 = HexDump.hexStringToByteArray(
+ "047465737400000C000100001194000E03666F6F03626172047175787900");
+ // SRV record for: scapy.DNSRRSRV(rrname='foo.bar.quxx', ttl=120, port=1234, target='testhost1')
+ private static final byte[] DATAIN_SERVICE_1 = HexDump.hexStringToByteArray(
+ "03666f6f03626172047175787800002100010000007800110000000004d20974657374686f73743100");
+ // SRV record for: scapy.DNSRRSRV(rrname='foo.bar.quxx', ttl=120, port=1234, target='testhost2')
+ private static final byte[] DATAIN_SERVICE_2 = HexDump.hexStringToByteArray(
+ "03666f6f03626172047175787800002100010000007800110000000004d20974657374686f73743200");
+ // TXT record for: scapy.DNSRR(rrname='foo.bar.quxx', type='TXT', ttl=120,
+ // rdata=[b'a=hello there', b'b=1234567890', b'xyz=!$$$'])
+ private static final byte[] DATAIN_TEXT_1 = HexDump.hexStringToByteArray(
+ "03666f6f03626172047175787800001000010000007800240d613d68656c6c6f2074686572650c623d3132"
+ + "33343536373839300878797a3d21242424");
+
+ // TXT record for: scapy.DNSRR(rrname='foo.bar.quxx', type='TXT', ttl=120,
+ // rdata=[b'a=hello there', b'b=1234567890', b'xyz=!$$$'])
+ private static final byte[] DATAIN_TEXT_2 = HexDump.hexStringToByteArray(
+ "03666f6f03626172047175787800001000010000007800240d613d68656c6c6f2074686572650c623d3132"
+ + "33343536373839300878797a3d21402324");
+
+ private static final String[] DATAIN_SERVICE_NAME_1 = new String[] { "foo", "bar", "quxx" };
+
private static final String CAST_SERVICE_NAME = "_googlecast";
private static final String[] CAST_SERVICE_TYPE =
new String[] {CAST_SERVICE_NAME, "_tcp", "local"};
@@ -154,41 +201,28 @@
private static final String[] MATTER_SERVICE_TYPE =
new String[] {MATTER_SERVICE_NAME, "_tcp", "local"};
- private final List<MdnsResponse> responses = new LinkedList<>();
+ private ArraySet<MdnsResponse> responses;
private final Clock mClock = mock(Clock.class);
@Before
- public void setUp() {
+ public void setUp() throws Exception {
MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, CAST_SERVICE_TYPE);
assertNotNull(data);
- DatagramPacket packet = new DatagramPacket(data, data.length);
- packet.setSocketAddress(
- new InetSocketAddress(MdnsConstants.getMdnsIPv4Address(), MdnsConstants.MDNS_PORT));
- responses.clear();
- int errorCode = decoder.decode(
- packet, responses, MdnsSocket.INTERFACE_INDEX_UNSPECIFIED, mock(Network.class));
- assertEquals(MdnsResponseDecoder.SUCCESS, errorCode);
+ responses = decode(decoder, data);
assertEquals(1, responses.size());
}
@Test
- public void testDecodeWithNullServiceType() {
+ public void testDecodeWithNullServiceType() throws Exception {
MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, null);
- assertNotNull(data);
- DatagramPacket packet = new DatagramPacket(data, data.length);
- packet.setSocketAddress(
- new InetSocketAddress(MdnsConstants.getMdnsIPv4Address(), MdnsConstants.MDNS_PORT));
- responses.clear();
- int errorCode = decoder.decode(
- packet, responses, MdnsSocket.INTERFACE_INDEX_UNSPECIFIED, mock(Network.class));
- assertEquals(MdnsResponseDecoder.SUCCESS, errorCode);
+ responses = decode(decoder, data);
assertEquals(2, responses.size());
}
@Test
public void testDecodeMultipleAnswerPacket() throws IOException {
- MdnsResponse response = responses.get(0);
+ MdnsResponse response = responses.valueAt(0);
assertTrue(response.isComplete());
MdnsInetAddressRecord inet4AddressRecord = response.getInet4AddressRecord();
@@ -235,16 +269,10 @@
public void testDecodeIPv6AnswerPacket() throws IOException {
MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, CAST_SERVICE_TYPE);
assertNotNull(data6);
- DatagramPacket packet = new DatagramPacket(data6, data6.length);
- packet.setSocketAddress(
- new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT));
- responses.clear();
- int errorCode = decoder.decode(
- packet, responses, MdnsSocket.INTERFACE_INDEX_UNSPECIFIED, mock(Network.class));
- assertEquals(MdnsResponseDecoder.SUCCESS, errorCode);
-
- MdnsResponse response = responses.get(0);
+ responses = decode(decoder, data6);
+ assertEquals(1, responses.size());
+ MdnsResponse response = responses.valueAt(0);
assertTrue(response.isComplete());
MdnsInetAddressRecord inet6AddressRecord = response.getInet6AddressRecord();
@@ -259,104 +287,297 @@
@Test
public void testIsComplete() {
- MdnsResponse response = responses.get(0);
+ MdnsResponse response = new MdnsResponse(responses.valueAt(0));
assertTrue(response.isComplete());
response.clearPointerRecords();
+ // The service name is still known in MdnsResponse#getServiceName
+ assertTrue(response.isComplete());
+
+ response = new MdnsResponse(responses.valueAt(0));
+ response.clearInet4AddressRecords();
assertFalse(response.isComplete());
- response = responses.get(0);
- response.setInet4AddressRecord(null);
+ response.addInet6AddressRecord(new MdnsInetAddressRecord(new String[] { "testhostname" },
+ 0L /* receiptTimeMillis */, false /* cacheFlush */, 1234L /* ttlMillis */,
+ parseNumericAddress("2008:db1::123")));
+ assertTrue(response.isComplete());
+
+ response.clearInet6AddressRecords();
assertFalse(response.isComplete());
- response = responses.get(0);
- response.setInet6AddressRecord(null);
- assertFalse(response.isComplete());
-
- response = responses.get(0);
+ response = new MdnsResponse(responses.valueAt(0));
response.setServiceRecord(null);
assertFalse(response.isComplete());
- response = responses.get(0);
+ response = new MdnsResponse(responses.valueAt(0));
response.setTextRecord(null);
assertFalse(response.isComplete());
}
@Test
- public void decode_withInterfaceIndex_populatesInterfaceIndex() {
+ public void decode_withInterfaceIndex_populatesInterfaceIndex() throws Exception {
MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, CAST_SERVICE_TYPE);
assertNotNull(data6);
DatagramPacket packet = new DatagramPacket(data6, data6.length);
packet.setSocketAddress(
new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT));
- responses.clear();
+ final MdnsPacket parsedPacket = MdnsResponseDecoder.parseResponse(data6, data6.length);
+ assertNotNull(parsedPacket);
+
final Network network = mock(Network.class);
- int errorCode = decoder.decode(
- packet, responses, /* interfaceIndex= */ 10, network);
- assertEquals(errorCode, MdnsResponseDecoder.SUCCESS);
+ responses = decoder.augmentResponses(parsedPacket,
+ /* existingResponses= */ Collections.emptyList(),
+ /* interfaceIndex= */ 10, network /* expireOnExit= */);
+
assertEquals(responses.size(), 1);
- assertEquals(responses.get(0).getInterfaceIndex(), 10);
- assertEquals(network, responses.get(0).getNetwork());
+ assertEquals(responses.valueAt(0).getInterfaceIndex(), 10);
+ assertEquals(network, responses.valueAt(0).getNetwork());
}
@Test
- public void decode_singleHostname_multipleSrvRecords_flagEnabled_multipleCompleteResponses() {
+ public void decode_singleHostname_multipleSrvRecords_flagEnabled_multipleCompleteResponses()
+ throws Exception {
//MdnsScannerConfigsFlagsImpl.allowMultipleSrvRecordsPerHost.override(true);
MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, MATTER_SERVICE_TYPE);
assertNotNull(matterDuplicateHostname);
- DatagramPacket packet =
- new DatagramPacket(matterDuplicateHostname, matterDuplicateHostname.length);
-
- packet.setSocketAddress(
- new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT));
-
- responses.clear();
- int errorCode = decoder.decode(
- packet, responses, /* interfaceIndex= */ 0, mock(Network.class));
- assertEquals(MdnsResponseDecoder.SUCCESS, errorCode);
+ responses = decode(decoder, matterDuplicateHostname);
// This should emit two records:
assertEquals(2, responses.size());
- MdnsResponse response1 = responses.get(0);
- MdnsResponse response2 = responses.get(0);
+ MdnsResponse response1 = responses.valueAt(0);
+ MdnsResponse response2 = responses.valueAt(0);
// Both of which are complete:
assertTrue(response1.isComplete());
assertTrue(response2.isComplete());
// And should both have the same IPv6 address:
- assertEquals(InetAddresses.parseNumericAddress("2605:a601:a846:5700:3e61:5ff:fe0c:89f8"),
- response1.getInet6AddressRecord().getInet6Address());
- assertEquals(InetAddresses.parseNumericAddress("2605:a601:a846:5700:3e61:5ff:fe0c:89f8"),
- response2.getInet6AddressRecord().getInet6Address());
+ assertTrue(response1.getInet6AddressRecords().stream().anyMatch(
+ record -> record.getInet6Address().equals(
+ parseNumericAddress("2605:a601:a846:5700:3e61:5ff:fe0c:89f8"))));
+ assertTrue(response2.getInet6AddressRecords().stream().anyMatch(
+ record -> record.getInet6Address().equals(
+ parseNumericAddress("2605:a601:a846:5700:3e61:5ff:fe0c:89f8"))));
}
@Test
@Ignore("MdnsConfigs is not configurable currently.")
- public void decode_singleHostname_multipleSrvRecords_flagDisabled_singleCompleteResponse() {
+ public void decode_singleHostname_multipleSrvRecords_flagDisabled_singleCompleteResponse()
+ throws Exception {
//MdnsScannerConfigsFlagsImpl.allowMultipleSrvRecordsPerHost.override(false);
MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, MATTER_SERVICE_TYPE);
assertNotNull(matterDuplicateHostname);
- DatagramPacket packet =
- new DatagramPacket(matterDuplicateHostname, matterDuplicateHostname.length);
-
- packet.setSocketAddress(
- new InetSocketAddress(MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT));
-
- responses.clear();
- int errorCode = decoder.decode(
- packet, responses, /* interfaceIndex= */ 0, mock(Network.class));
- assertEquals(MdnsResponseDecoder.SUCCESS, errorCode);
+ responses = decode(decoder, matterDuplicateHostname);
// This should emit only two records:
assertEquals(2, responses.size());
// But only the first is complete:
- assertTrue(responses.get(0).isComplete());
- assertFalse(responses.get(1).isComplete());
+ assertTrue(responses.valueAt(0).isComplete());
+ assertFalse(responses.valueAt(1).isComplete());
+ }
+
+ @Test
+ public void testDecodeWithIpv4AddressChange() throws IOException {
+ MdnsResponse response = makeMdnsResponse(0, DATAIN_SERVICE_NAME_1, List.of(
+ new PacketAndRecordClass(DATAIN_PTR_1,
+ MdnsPointerRecord.class),
+ new PacketAndRecordClass(DATAIN_SERVICE_1,
+ MdnsServiceRecord.class),
+ new PacketAndRecordClass(DATAIN_IPV4_1,
+ MdnsInet4AddressRecord.class)));
+ // Now update the response with another address
+ final MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, null);
+ final ArraySet<MdnsResponse> updatedResponses = decode(
+ decoder, makeResponsePacket(DATAIN_IPV4_2), List.of(response));
+ assertEquals(1, updatedResponses.size());
+ assertEquals(parseNumericAddress("10.1.2.4"),
+ updatedResponses.valueAt(0).getInet4AddressRecord().getInet4Address());
+ assertEquals(parseNumericAddress("10.1.2.3"),
+ response.getInet4AddressRecord().getInet4Address());
+ }
+
+ @Test
+ public void testDecodeWithIpv6AddressChange() throws IOException {
+ MdnsResponse response = makeMdnsResponse(0, DATAIN_SERVICE_NAME_1, List.of(
+ new PacketAndRecordClass(DATAIN_PTR_1,
+ MdnsPointerRecord.class),
+ new PacketAndRecordClass(DATAIN_SERVICE_1,
+ MdnsServiceRecord.class),
+ new PacketAndRecordClass(DATAIN_IPV6_1,
+ MdnsInet6AddressRecord.class)));
+ // Now update the response with another address
+ final MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, null);
+ final ArraySet<MdnsResponse> updatedResponses = decode(
+ decoder, makeResponsePacket(DATAIN_IPV6_2), List.of(response));
+ assertEquals(1, updatedResponses.size());
+ assertEquals(parseNumericAddress("aabb:ccdd:1122:3344:a0b0:c0d0:1020:3030"),
+ updatedResponses.valueAt(0).getInet6AddressRecord().getInet6Address());
+ assertEquals(parseNumericAddress("aabb:ccdd:1122:3344:a0b0:c0d0:1020:3040"),
+ response.getInet6AddressRecord().getInet6Address());
+ }
+
+ @Test
+ public void testDecodeWithChangeOnText() throws IOException {
+ MdnsResponse response = makeMdnsResponse(0, DATAIN_SERVICE_NAME_1, List.of(
+ new PacketAndRecordClass(DATAIN_PTR_1,
+ MdnsPointerRecord.class),
+ new PacketAndRecordClass(DATAIN_SERVICE_1,
+ MdnsServiceRecord.class),
+ new PacketAndRecordClass(DATAIN_TEXT_1,
+ MdnsTextRecord.class)));
+ // Now update the response with another address
+ final MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, null);
+ final ArraySet<MdnsResponse> updatedResponses = decode(
+ decoder, makeResponsePacket(DATAIN_TEXT_2), List.of(response));
+ assertEquals(1, updatedResponses.size());
+ assertEquals(List.of(
+ new MdnsServiceInfo.TextEntry("a", "hello there"),
+ new MdnsServiceInfo.TextEntry("b", "1234567890"),
+ new MdnsServiceInfo.TextEntry("xyz", "!@#$")),
+ updatedResponses.valueAt(0).getTextRecord().getEntries());
+ }
+
+ @Test
+ public void testDecodeWithChangeOnService() throws IOException {
+ MdnsResponse response = makeMdnsResponse(0, DATAIN_SERVICE_NAME_1, List.of(
+ new PacketAndRecordClass(DATAIN_PTR_1,
+ MdnsPointerRecord.class),
+ new PacketAndRecordClass(DATAIN_SERVICE_1,
+ MdnsServiceRecord.class),
+ new PacketAndRecordClass(DATAIN_IPV4_1,
+ MdnsInet4AddressRecord.class)));
+ assertArrayEquals(new String[] { "testhost1" },
+ response.getServiceRecord().getServiceHost());
+ assertNotNull(response.getInet4AddressRecord());
+ // Now update the response with another hostname
+ final MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, null);
+ final ArraySet<MdnsResponse> updatedResponses = decode(
+ decoder, makeResponsePacket(DATAIN_SERVICE_2), List.of(response));
+ assertEquals(1, updatedResponses.size());
+ assertArrayEquals(new String[] { "testhost2" },
+ updatedResponses.valueAt(0).getServiceRecord().getServiceHost());
+ // Hostname changed, so address records are dropped
+ assertNull(updatedResponses.valueAt(0).getInet4AddressRecord());
+ }
+
+ @Test
+ public void testDecodeWithChangeOnPtr() throws IOException {
+ MdnsResponse response = makeMdnsResponse(0, DATAIN_SERVICE_NAME_1, List.of(
+ new PacketAndRecordClass(DATAIN_PTR_1,
+ MdnsPointerRecord.class),
+ new PacketAndRecordClass(DATAIN_SERVICE_1,
+ MdnsServiceRecord.class)));
+ // Now update the response with another address
+ final MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, null);
+ final ArraySet<MdnsResponse> updatedResponses = decode(
+ decoder, makeResponsePacket(DATAIN_PTR_2), List.of(response));
+ assertEquals(1, updatedResponses.size());
+ assertArrayEquals(new String[] { "foo", "bar", "quxy" },
+ updatedResponses.valueAt(0).getPointerRecords().get(0).getPointer());
+ }
+
+ @Test
+ public void testDecodeWithNoChange() throws IOException {
+ List<PacketAndRecordClass> recordList =
+ Arrays.asList(
+ new PacketAndRecordClass(DATAIN_IPV4_1, MdnsInet4AddressRecord.class),
+ new PacketAndRecordClass(DATAIN_IPV6_1, MdnsInet6AddressRecord.class),
+ new PacketAndRecordClass(DATAIN_PTR_1, MdnsPointerRecord.class),
+ new PacketAndRecordClass(DATAIN_SERVICE_2, MdnsServiceRecord.class),
+ new PacketAndRecordClass(DATAIN_TEXT_1, MdnsTextRecord.class));
+ // Create a two identical responses.
+ MdnsResponse response = makeMdnsResponse(0, DATAIN_SERVICE_NAME_1, recordList);
+
+ final MdnsResponseDecoder decoder = new MdnsResponseDecoder(mClock, null);
+ final byte[] identicalResponse = makeResponsePacket(
+ recordList.stream().map(p -> p.packetData).collect(Collectors.toList()));
+ final ArraySet<MdnsResponse> changes = decode(
+ decoder, identicalResponse, List.of(response));
+
+ // Decoding should not indicate any change.
+ assertEquals(0, changes.size());
+ }
+
+ private static MdnsResponse makeMdnsResponse(long time, String[] serviceName,
+ List<PacketAndRecordClass> responseList) throws IOException {
+ final MdnsResponse response = new MdnsResponse(
+ time, serviceName, 999 /* interfaceIndex */, mock(Network.class));
+ for (PacketAndRecordClass responseData : responseList) {
+ DatagramPacket packet =
+ new DatagramPacket(responseData.packetData, responseData.packetData.length);
+ MdnsPacketReader reader = new MdnsPacketReader(packet);
+ String[] name = reader.readLabels();
+ reader.skip(2); // skip record type indication.
+ // Apply the right kind of record to the response.
+ if (responseData.recordClass == MdnsInet4AddressRecord.class) {
+ response.addInet4AddressRecord(new MdnsInet4AddressRecord(name, reader));
+ } else if (responseData.recordClass == MdnsInet6AddressRecord.class) {
+ response.addInet6AddressRecord(new MdnsInet6AddressRecord(name, reader));
+ } else if (responseData.recordClass == MdnsPointerRecord.class) {
+ response.addPointerRecord(new MdnsPointerRecord(name, reader));
+ } else if (responseData.recordClass == MdnsServiceRecord.class) {
+ response.setServiceRecord(new MdnsServiceRecord(name, reader));
+ } else if (responseData.recordClass == MdnsTextRecord.class) {
+ response.setTextRecord(new MdnsTextRecord(name, reader));
+ } else {
+ fail("Unsupported/unexpected MdnsRecord subtype used in test - invalid test!");
+ }
+ }
+ return response;
+ }
+
+ private static byte[] makeResponsePacket(byte[] responseRecord) throws IOException {
+ return makeResponsePacket(List.of(responseRecord));
+ }
+
+ private static byte[] makeResponsePacket(List<byte[]> responseRecords) throws IOException {
+ final MdnsPacketWriter writer = new MdnsPacketWriter(1500);
+ writer.writeUInt16(0); // Transaction ID (advertisement: 0)
+ writer.writeUInt16(0x8400); // Flags: response, authoritative
+ writer.writeUInt16(0); // questions count
+ writer.writeUInt16(responseRecords.size()); // answers count
+ writer.writeUInt16(0); // authority entries count
+ writer.writeUInt16(0); // additional records count
+
+ for (byte[] record : responseRecords) {
+ writer.writeBytes(record);
+ }
+ final DatagramPacket packet = writer.getPacket(new InetSocketAddress(0 /* port */));
+ return Arrays.copyOf(packet.getData(), packet.getLength());
+ }
+
+
+ // This helper class just wraps the data bytes of a response packet with the contained record
+ // type.
+ // Its only purpose is to make the test code a bit more readable.
+ private static class PacketAndRecordClass {
+ public final byte[] packetData;
+ public final Class<?> recordClass;
+
+ PacketAndRecordClass(byte[] data, Class<?> c) {
+ packetData = data;
+ recordClass = c;
+ }
+ }
+
+ private ArraySet<MdnsResponse> decode(MdnsResponseDecoder decoder, byte[] data)
+ throws MdnsPacket.ParseException {
+ return decode(decoder, data, Collections.emptyList());
+ }
+
+ private ArraySet<MdnsResponse> decode(MdnsResponseDecoder decoder, byte[] data,
+ Collection<MdnsResponse> existingResponses) throws MdnsPacket.ParseException {
+ final MdnsPacket parsedPacket = MdnsResponseDecoder.parseResponse(data, data.length);
+ assertNotNull(parsedPacket);
+
+ return decoder.augmentResponses(parsedPacket,
+ existingResponses,
+ MdnsSocket.INTERFACE_INDEX_UNSPECIFIED, mock(Network.class));
}
}
\ No newline at end of file
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseTests.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseTests.java
index ec57dc8..3f5e7a1 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseTests.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsResponseTests.java
@@ -16,6 +16,8 @@
package com.android.server.connectivity.mdns;
+import static android.net.InetAddresses.parseNumericAddress;
+
import static com.android.testutils.DevSdkIgnoreRuleKt.SC_V2;
import static org.junit.Assert.assertEquals;
@@ -23,22 +25,21 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
+import static java.util.Collections.emptyList;
+
import android.net.Network;
import com.android.net.module.util.HexDump;
import com.android.testutils.DevSdkIgnoreRule;
import com.android.testutils.DevSdkIgnoreRunner;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.net.DatagramPacket;
-import java.util.Arrays;
import java.util.List;
// The record test data does not use compressed names (label pointers), since that would require
@@ -48,36 +49,24 @@
public class MdnsResponseTests {
private static final String TAG = "MdnsResponseTests";
// MDNS response packet for name "test" with an IPv4 address of 10.1.2.3
- private static final byte[] dataIn_ipv4_1 = HexDump.hexStringToByteArray(
+ private static final byte[] DATAIN_IPV4 = HexDump.hexStringToByteArray(
"0474657374000001" + "0001000011940004" + "0A010203");
- // MDNS response packet for name "tess" with an IPv4 address of 10.1.2.4
- private static final byte[] dataIn_ipv4_2 = HexDump.hexStringToByteArray(
- "0474657373000001" + "0001000011940004" + "0A010204");
// MDNS response w/name "test" & IPv6 address of aabb:ccdd:1122:3344:a0b0:c0d0:1020:3040
- private static final byte[] dataIn_ipv6_1 = HexDump.hexStringToByteArray(
+ private static final byte[] DATAIN_IPV6 = HexDump.hexStringToByteArray(
"047465737400001C" + "0001000011940010" + "AABBCCDD11223344" + "A0B0C0D010203040");
- // MDNS response w/name "test" & IPv6 address of aabb:ccdd:1122:3344:a0b0:c0d0:1020:3030
- private static final byte[] dataIn_ipv6_2 = HexDump.hexStringToByteArray(
- "047465737400001C" + "0001000011940010" + "AABBCCDD11223344" + "A0B0C0D010203030");
// MDNS response w/name "test" & PTR to foo.bar.quxx
- private static final byte[] dataIn_ptr_1 = HexDump.hexStringToByteArray(
+ private static final byte[] DATAIN_PTR = HexDump.hexStringToByteArray(
"047465737400000C" + "000100001194000E" + "03666F6F03626172" + "047175787800");
- // MDNS response w/name "test" & PTR to foo.bar.quxy
- private static final byte[] dataIn_ptr_2 = HexDump.hexStringToByteArray(
- "047465737400000C" + "000100001194000E" + "03666F6F03626172" + "047175787900");
// MDNS response w/name "test" & Service for host foo.bar.quxx
- private static final byte[] dataIn_service_1 = HexDump.hexStringToByteArray(
+ private static final byte[] DATAIN_SERVICE = HexDump.hexStringToByteArray(
"0474657374000021"
+ "0001000011940014"
+ "000100FF1F480366"
+ "6F6F036261720471"
+ "75787800");
- // MDNS response w/name "test" & Service for host test
- private static final byte[] dataIn_service_2 = HexDump.hexStringToByteArray(
- "0474657374000021" + "000100001194000B" + "000100FF1F480474" + "657374");
// MDNS response w/name "test" & the following text strings:
// "a=hello there", "b=1234567890", and "xyz=!$$$"
- private static final byte[] dataIn_text_1 = HexDump.hexStringToByteArray(
+ private static final byte[] DATAIN_TEXT = HexDump.hexStringToByteArray(
"0474657374000010"
+ "0001000011940024"
+ "0D613D68656C6C6F"
@@ -85,18 +74,11 @@
+ "3D31323334353637"
+ "3839300878797A3D"
+ "21242424");
- // MDNS response w/name "test" & the following text strings:
- // "a=hello there", "b=1234567890", and "xyz=!@#$"
- private static final byte[] dataIn_text_2 = HexDump.hexStringToByteArray(
- "0474657374000010"
- + "0001000011940024"
- + "0D613D68656C6C6F"
- + "2074686572650C62"
- + "3D31323334353637"
- + "3839300878797A3D"
- + "21402324");
+ private static final String[] TEST_SERVICE_NAME =
+ new String[] { "test", "_type", "_tcp", "local" };
private static final int INTERFACE_INDEX = 999;
+ private static final int TEST_TTL_MS = 120_000;
private final Network mNetwork = mock(Network.class);
// The following helper classes act as wrappers so that IPv4 and IPv6 address records can
@@ -113,87 +95,63 @@
}
}
- // This helper class just wraps the data bytes of a response packet with the contained record
- // type.
- // Its only purpose is to make the test code a bit more readable.
- static class PacketAndRecordClass {
- public final byte[] packetData;
- public final Class<?> recordClass;
-
- public PacketAndRecordClass() {
- packetData = null;
- recordClass = null;
- }
-
- public PacketAndRecordClass(byte[] data, Class<?> c) {
- packetData = data;
- recordClass = c;
- }
- }
-
- // Construct an MdnsResponse with the specified data packets applied.
- private MdnsResponse makeMdnsResponse(long time, List<PacketAndRecordClass> responseList)
- throws IOException {
- MdnsResponse response = new MdnsResponse(time, INTERFACE_INDEX, mNetwork);
- for (PacketAndRecordClass responseData : responseList) {
- DatagramPacket packet =
- new DatagramPacket(responseData.packetData, responseData.packetData.length);
- MdnsPacketReader reader = new MdnsPacketReader(packet);
- String[] name = reader.readLabels();
- reader.skip(2); // skip record type indication.
- // Apply the right kind of record to the response.
- if (responseData.recordClass == MdnsInet4AddressRecord.class) {
- response.setInet4AddressRecord(new MdnsInet4AddressRecord(name, reader));
- } else if (responseData.recordClass == MdnsInet6AddressRecord.class) {
- response.setInet6AddressRecord(new MdnsInet6AddressRecord(name, reader));
- } else if (responseData.recordClass == MdnsPointerRecord.class) {
- response.addPointerRecord(new MdnsPointerRecord(name, reader));
- } else if (responseData.recordClass == MdnsServiceRecord.class) {
- response.setServiceRecord(new MdnsServiceRecord(name, reader));
- } else if (responseData.recordClass == MdnsTextRecord.class) {
- response.setTextRecord(new MdnsTextRecord(name, reader));
- } else {
- fail("Unsupported/unexpected MdnsRecord subtype used in test - invalid test!");
- }
- }
+ private MdnsResponse makeCompleteResponse(int recordsTtlMillis) {
+ final String[] hostname = new String[] { "MyHostname" };
+ final String[] serviceName = new String[] { "MyService", "_type", "_tcp", "local" };
+ final String[] serviceType = new String[] { "_type", "_tcp", "local" };
+ final MdnsResponse response = new MdnsResponse(/* now= */ 0, serviceName, INTERFACE_INDEX,
+ mNetwork);
+ response.addPointerRecord(new MdnsPointerRecord(serviceType, 0L /* receiptTimeMillis */,
+ false /* cacheFlush */, recordsTtlMillis, serviceName));
+ response.setServiceRecord(new MdnsServiceRecord(serviceName, 0L /* receiptTimeMillis */,
+ true /* cacheFlush */, recordsTtlMillis, 0 /* servicePriority */,
+ 0 /* serviceWeight */, 0 /* servicePort */, hostname));
+ response.setTextRecord(new MdnsTextRecord(serviceName, 0L /* receiptTimeMillis */,
+ true /* cacheFlush */, recordsTtlMillis, emptyList() /* entries */));
+ response.addInet4AddressRecord(new MdnsInetAddressRecord(
+ hostname, 0L /* receiptTimeMillis */, true /* cacheFlush */,
+ recordsTtlMillis, parseNumericAddress("192.0.2.123")));
+ response.addInet6AddressRecord(new MdnsInetAddressRecord(
+ hostname, 0L /* receiptTimeMillis */, true /* cacheFlush */,
+ recordsTtlMillis, parseNumericAddress("2001:db8::123")));
return response;
}
@Test
public void getInet4AddressRecord_returnsAddedRecord() throws IOException {
- DatagramPacket packet = new DatagramPacket(dataIn_ipv4_1, dataIn_ipv4_1.length);
+ DatagramPacket packet = new DatagramPacket(DATAIN_IPV4, DATAIN_IPV4.length);
MdnsPacketReader reader = new MdnsPacketReader(packet);
String[] name = reader.readLabels();
reader.skip(2); // skip record type indication.
MdnsInetAddressRecord record = new MdnsInetAddressRecord(name, MdnsRecord.TYPE_A, reader);
- MdnsResponse response = new MdnsResponse(0, INTERFACE_INDEX, mNetwork);
+ MdnsResponse response = new MdnsResponse(0, TEST_SERVICE_NAME, INTERFACE_INDEX, mNetwork);
assertFalse(response.hasInet4AddressRecord());
- assertTrue(response.setInet4AddressRecord(record));
+ assertTrue(response.addInet4AddressRecord(record));
assertEquals(response.getInet4AddressRecord(), record);
}
@Test
public void getInet6AddressRecord_returnsAddedRecord() throws IOException {
- DatagramPacket packet = new DatagramPacket(dataIn_ipv6_1, dataIn_ipv6_1.length);
+ DatagramPacket packet = new DatagramPacket(DATAIN_IPV6, DATAIN_IPV6.length);
MdnsPacketReader reader = new MdnsPacketReader(packet);
String[] name = reader.readLabels();
reader.skip(2); // skip record type indication.
MdnsInetAddressRecord record =
new MdnsInetAddressRecord(name, MdnsRecord.TYPE_AAAA, reader);
- MdnsResponse response = new MdnsResponse(0, INTERFACE_INDEX, mNetwork);
+ MdnsResponse response = new MdnsResponse(0, TEST_SERVICE_NAME, INTERFACE_INDEX, mNetwork);
assertFalse(response.hasInet6AddressRecord());
- assertTrue(response.setInet6AddressRecord(record));
+ assertTrue(response.addInet6AddressRecord(record));
assertEquals(response.getInet6AddressRecord(), record);
}
@Test
public void getPointerRecords_returnsAddedRecord() throws IOException {
- DatagramPacket packet = new DatagramPacket(dataIn_ptr_1, dataIn_ptr_1.length);
+ DatagramPacket packet = new DatagramPacket(DATAIN_PTR, DATAIN_PTR.length);
MdnsPacketReader reader = new MdnsPacketReader(packet);
String[] name = reader.readLabels();
reader.skip(2); // skip record type indication.
MdnsPointerRecord record = new MdnsPointerRecord(name, reader);
- MdnsResponse response = new MdnsResponse(0, INTERFACE_INDEX, mNetwork);
+ MdnsResponse response = new MdnsResponse(0, record.getPointer(), INTERFACE_INDEX, mNetwork);
assertFalse(response.hasPointerRecords());
assertTrue(response.addPointerRecord(record));
List<MdnsPointerRecord> recordList = response.getPointerRecords();
@@ -204,12 +162,12 @@
@Test
public void getServiceRecord_returnsAddedRecord() throws IOException {
- DatagramPacket packet = new DatagramPacket(dataIn_service_1, dataIn_service_1.length);
+ DatagramPacket packet = new DatagramPacket(DATAIN_SERVICE, DATAIN_SERVICE.length);
MdnsPacketReader reader = new MdnsPacketReader(packet);
String[] name = reader.readLabels();
reader.skip(2); // skip record type indication.
MdnsServiceRecord record = new MdnsServiceRecord(name, reader);
- MdnsResponse response = new MdnsResponse(0, INTERFACE_INDEX, mNetwork);
+ MdnsResponse response = new MdnsResponse(0, name, INTERFACE_INDEX, mNetwork);
assertFalse(response.hasServiceRecord());
assertTrue(response.setServiceRecord(record));
assertEquals(response.getServiceRecord(), record);
@@ -217,12 +175,12 @@
@Test
public void getTextRecord_returnsAddedRecord() throws IOException {
- DatagramPacket packet = new DatagramPacket(dataIn_text_1, dataIn_text_1.length);
+ DatagramPacket packet = new DatagramPacket(DATAIN_TEXT, DATAIN_TEXT.length);
MdnsPacketReader reader = new MdnsPacketReader(packet);
String[] name = reader.readLabels();
reader.skip(2); // skip record type indication.
MdnsTextRecord record = new MdnsTextRecord(name, reader);
- MdnsResponse response = new MdnsResponse(0, INTERFACE_INDEX, mNetwork);
+ MdnsResponse response = new MdnsResponse(0, name, INTERFACE_INDEX, mNetwork);
assertFalse(response.hasTextRecord());
assertTrue(response.setTextRecord(record));
assertEquals(response.getTextRecord(), record);
@@ -230,104 +188,86 @@
@Test
public void getInterfaceIndex() {
- final MdnsResponse response1 = new MdnsResponse(/* now= */ 0, INTERFACE_INDEX, mNetwork);
+ final MdnsResponse response1 = new MdnsResponse(/* now= */ 0, TEST_SERVICE_NAME,
+ INTERFACE_INDEX, mNetwork);
assertEquals(INTERFACE_INDEX, response1.getInterfaceIndex());
- final MdnsResponse response2 =
- new MdnsResponse(/* now= */ 0, 1234 /* interfaceIndex */, mNetwork);
+ final MdnsResponse response2 = new MdnsResponse(/* now= */ 0, TEST_SERVICE_NAME,
+ 1234 /* interfaceIndex */, mNetwork);
assertEquals(1234, response2.getInterfaceIndex());
}
@Test
public void testGetNetwork() {
- final MdnsResponse response1 =
- new MdnsResponse(/* now= */ 0, INTERFACE_INDEX, null /* network */);
+ final MdnsResponse response1 = new MdnsResponse(/* now= */ 0, TEST_SERVICE_NAME,
+ INTERFACE_INDEX, null /* network */);
assertNull(response1.getNetwork());
- final MdnsResponse response2 =
- new MdnsResponse(/* now= */ 0, 1234 /* interfaceIndex */, mNetwork);
+ final MdnsResponse response2 = new MdnsResponse(/* now= */ 0, TEST_SERVICE_NAME,
+ 1234 /* interfaceIndex */, mNetwork);
assertEquals(mNetwork, response2.getNetwork());
}
@Test
- public void mergeRecordsFrom_indicates_change_on_ipv4_address() throws IOException {
- MdnsResponse response = makeMdnsResponse(
- 0,
- Arrays.asList(
- new PacketAndRecordClass(dataIn_ipv4_1, MdnsInet4AddressRecord.class)));
- // Now create a new response that updates the address.
- MdnsResponse response2 = makeMdnsResponse(
- 100,
- Arrays.asList(
- new PacketAndRecordClass(dataIn_ipv4_2, MdnsInet4AddressRecord.class)));
- assertTrue(response.mergeRecordsFrom(response2));
+ public void copyConstructor() {
+ final MdnsResponse response = makeCompleteResponse(TEST_TTL_MS);
+ final MdnsResponse copy = new MdnsResponse(response);
+
+ assertEquals(response.getInet6AddressRecord(), copy.getInet6AddressRecord());
+ assertEquals(response.getInet4AddressRecord(), copy.getInet4AddressRecord());
+ assertEquals(response.getPointerRecords(), copy.getPointerRecords());
+ assertEquals(response.getServiceRecord(), copy.getServiceRecord());
+ assertEquals(response.getTextRecord(), copy.getTextRecord());
+ assertEquals(response.getRecords(), copy.getRecords());
+ assertEquals(response.getNetwork(), copy.getNetwork());
+ assertEquals(response.getInterfaceIndex(), copy.getInterfaceIndex());
}
@Test
- public void mergeRecordsFrom_indicates_change_on_ipv6_address() throws IOException {
- MdnsResponse response = makeMdnsResponse(
- 0,
- Arrays.asList(
- new PacketAndRecordClass(dataIn_ipv6_1, MdnsInet6AddressRecord.class)));
- // Now create a new response that updates the address.
- MdnsResponse response2 = makeMdnsResponse(
- 100,
- Arrays.asList(
- new PacketAndRecordClass(dataIn_ipv6_2, MdnsInet6AddressRecord.class)));
- assertTrue(response.mergeRecordsFrom(response2));
+ public void addRecords_noChange() {
+ final MdnsResponse response = makeCompleteResponse(TEST_TTL_MS);
+
+ assertFalse(response.addPointerRecord(response.getPointerRecords().get(0)));
+ assertFalse(response.addInet6AddressRecord(response.getInet6AddressRecord()));
+ assertFalse(response.addInet4AddressRecord(response.getInet4AddressRecord()));
+ assertFalse(response.setServiceRecord(response.getServiceRecord()));
+ assertFalse(response.setTextRecord(response.getTextRecord()));
}
@Test
- public void mergeRecordsFrom_indicates_change_on_text() throws IOException {
- MdnsResponse response = makeMdnsResponse(
- 0,
- Arrays.asList(new PacketAndRecordClass(dataIn_text_1, MdnsTextRecord.class)));
- // Now create a new response that updates the address.
- MdnsResponse response2 = makeMdnsResponse(
- 100,
- Arrays.asList(new PacketAndRecordClass(dataIn_text_2, MdnsTextRecord.class)));
- assertTrue(response.mergeRecordsFrom(response2));
- }
+ public void addRecords_ttlChange() {
+ final MdnsResponse response = makeCompleteResponse(TEST_TTL_MS);
+ final MdnsResponse ttlZeroResponse = makeCompleteResponse(0);
- @Test
- public void mergeRecordsFrom_indicates_change_on_service() throws IOException {
- MdnsResponse response = makeMdnsResponse(
- 0,
- Arrays.asList(new PacketAndRecordClass(dataIn_service_1, MdnsServiceRecord.class)));
- // Now create a new response that updates the address.
- MdnsResponse response2 = makeMdnsResponse(
- 100,
- Arrays.asList(new PacketAndRecordClass(dataIn_service_2, MdnsServiceRecord.class)));
- assertTrue(response.mergeRecordsFrom(response2));
- }
+ assertTrue(response.addPointerRecord(ttlZeroResponse.getPointerRecords().get(0)));
+ assertEquals(1, response.getPointerRecords().size());
+ assertEquals(0, response.getPointerRecords().get(0).getTtl());
+ assertTrue(response.getRecords().stream().anyMatch(r ->
+ r == response.getPointerRecords().get(0)));
- @Test
- public void mergeRecordsFrom_indicates_change_on_pointer() throws IOException {
- MdnsResponse response = makeMdnsResponse(
- 0,
- Arrays.asList(new PacketAndRecordClass(dataIn_ptr_1, MdnsPointerRecord.class)));
- // Now create a new response that updates the address.
- MdnsResponse response2 = makeMdnsResponse(
- 100,
- Arrays.asList(new PacketAndRecordClass(dataIn_ptr_2, MdnsPointerRecord.class)));
- assertTrue(response.mergeRecordsFrom(response2));
- }
+ assertTrue(response.addInet6AddressRecord(ttlZeroResponse.getInet6AddressRecord()));
+ assertEquals(1, response.getInet6AddressRecords().size());
+ assertEquals(0, response.getInet6AddressRecord().getTtl());
+ assertTrue(response.getRecords().stream().anyMatch(r ->
+ r == response.getInet6AddressRecord()));
- @Test
- @Ignore("MdnsConfigs is not configurable currently.")
- public void mergeRecordsFrom_indicates_noChange() throws IOException {
- //MdnsConfigsFlagsImpl.useReducedMergeRecordUpdateEvents.override(true);
- List<PacketAndRecordClass> recordList =
- Arrays.asList(
- new PacketAndRecordClass(dataIn_ipv4_1, MdnsInet4AddressRecord.class),
- new PacketAndRecordClass(dataIn_ipv6_1, MdnsInet6AddressRecord.class),
- new PacketAndRecordClass(dataIn_ptr_1, MdnsPointerRecord.class),
- new PacketAndRecordClass(dataIn_service_2, MdnsServiceRecord.class),
- new PacketAndRecordClass(dataIn_text_1, MdnsTextRecord.class));
- // Create a two identical responses.
- MdnsResponse response = makeMdnsResponse(0, recordList);
- MdnsResponse response2 = makeMdnsResponse(100, recordList);
- // Merging should not indicate any change.
- assertFalse(response.mergeRecordsFrom(response2));
+ assertTrue(response.addInet4AddressRecord(ttlZeroResponse.getInet4AddressRecord()));
+ assertEquals(1, response.getInet4AddressRecords().size());
+ assertEquals(0, response.getInet4AddressRecord().getTtl());
+ assertTrue(response.getRecords().stream().anyMatch(r ->
+ r == response.getInet4AddressRecord()));
+
+ assertTrue(response.setServiceRecord(ttlZeroResponse.getServiceRecord()));
+ assertEquals(0, response.getServiceRecord().getTtl());
+ assertTrue(response.getRecords().stream().anyMatch(r ->
+ r == response.getServiceRecord()));
+
+ assertTrue(response.setTextRecord(ttlZeroResponse.getTextRecord()));
+ assertEquals(0, response.getTextRecord().getTtl());
+ assertTrue(response.getRecords().stream().anyMatch(r ->
+ r == response.getTextRecord()));
+
+ // All records were replaced, not added
+ assertEquals(ttlZeroResponse.getRecords().size(), response.getRecords().size());
}
}
\ No newline at end of file
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceInfoTest.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceInfoTest.java
index 76728cf..e7d7a98 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceInfoTest.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceInfoTest.java
@@ -119,6 +119,26 @@
}
@Test
+ public void constructor_createWithUppercaseKeys_correctAttributes() {
+ MdnsServiceInfo info =
+ new MdnsServiceInfo(
+ "my-mdns-service",
+ new String[] {"_testtype", "_tcp"},
+ List.of(),
+ new String[] {"my-host", "local"},
+ 12345,
+ "192.168.1.1",
+ "2001::1",
+ List.of("KEY=Value"),
+ /* textEntries= */ null);
+
+ assertEquals("Value", info.getAttributeByKey("key"));
+ assertEquals("Value", info.getAttributeByKey("KEY"));
+ assertEquals(1, info.getAttributes().size());
+ assertEquals("KEY", info.getAttributes().keySet().iterator().next());
+ }
+
+ @Test
public void getInterfaceIndex_constructorWithDefaultValues_returnsMinusOne() {
MdnsServiceInfo info =
new MdnsServiceInfo(
@@ -177,8 +197,8 @@
List.of(),
new String[] {"my-host", "local"},
12345,
- "192.168.1.1",
- "2001::1",
+ List.of("192.168.1.1"),
+ List.of("2001::1"),
List.of(),
/* textEntries= */ null,
/* interfaceIndex= */ 20,
@@ -197,8 +217,8 @@
List.of(),
new String[] {"my-host", "local"},
12345,
- "192.168.1.1",
- "2001::1",
+ List.of("192.168.1.1", "192.168.1.2"),
+ List.of("2001::1", "2001::2"),
List.of("vn=Alphabet Inc.", "mn=Google Nest Hub Max", "id=12345"),
List.of(
MdnsServiceInfo.TextEntry.fromString("vn=Google Inc."),
@@ -217,7 +237,9 @@
assertArrayEquals(beforeParcel.getHostName(), afterParcel.getHostName());
assertEquals(beforeParcel.getPort(), afterParcel.getPort());
assertEquals(beforeParcel.getIpv4Address(), afterParcel.getIpv4Address());
+ assertEquals(beforeParcel.getIpv4Addresses(), afterParcel.getIpv4Addresses());
assertEquals(beforeParcel.getIpv6Address(), afterParcel.getIpv6Address());
+ assertEquals(beforeParcel.getIpv6Addresses(), afterParcel.getIpv6Addresses());
assertEquals(beforeParcel.getAttributes(), afterParcel.getAttributes());
assertEquals(beforeParcel.getInterfaceIndex(), afterParcel.getInterfaceIndex());
assertEquals(beforeParcel.getNetwork(), afterParcel.getNetwork());
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceTypeClientTests.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceTypeClientTests.java
index a45ca68..d9fa10f 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceTypeClientTests.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsServiceTypeClientTests.java
@@ -24,13 +24,12 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -60,8 +59,7 @@
import java.io.IOException;
import java.net.DatagramPacket;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
+import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Arrays;
@@ -72,6 +70,7 @@
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import java.util.stream.Stream;
/** Tests for {@link MdnsServiceTypeClient}. */
@RunWith(DevSdkIgnoreRunner.class)
@@ -85,6 +84,9 @@
private static final InetSocketAddress IPV6_ADDRESS = new InetSocketAddress(
MdnsConstants.getMdnsIPv6Address(), MdnsConstants.MDNS_PORT);
+ private static final long TEST_TTL = 120000L;
+ private static final long TEST_ELAPSED_REALTIME = 123L;
+
@Mock
private MdnsServiceBrowserListener mockListenerOne;
@Mock
@@ -95,6 +97,8 @@
private MdnsMultinetworkSocketClient mockSocketClient;
@Mock
private Network mockNetwork;
+ @Mock
+ private MdnsResponseDecoder.Clock mockDecoderClock;
@Captor
private ArgumentCaptor<MdnsServiceInfo> serviceInfoCaptor;
@@ -111,6 +115,7 @@
@SuppressWarnings("DoNotMock")
public void setUp() throws IOException {
MockitoAnnotations.initMocks(this);
+ doReturn(TEST_ELAPSED_REALTIME).when(mockDecoderClock).elapsedRealtime();
expectedIPv4Packets = new DatagramPacket[16];
expectedIPv6Packets = new DatagramPacket[16];
@@ -160,7 +165,8 @@
.thenReturn(expectedIPv6Packets[15]);
client =
- new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor) {
+ new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor,
+ mockDecoderClock) {
@Override
MdnsPacketWriter createMdnsPacketWriter() {
return mockPacketWriter;
@@ -414,16 +420,17 @@
}
private static void verifyServiceInfo(MdnsServiceInfo serviceInfo, String serviceName,
- String[] serviceType, String ipv4Address, String ipv6Address, int port,
+ String[] serviceType, List<String> ipv4Addresses, List<String> ipv6Addresses, int port,
List<String> subTypes, Map<String, String> attributes, int interfaceIndex,
Network network) {
assertEquals(serviceName, serviceInfo.getServiceInstanceName());
assertArrayEquals(serviceType, serviceInfo.getServiceType());
- assertEquals(ipv4Address, serviceInfo.getIpv4Address());
- assertEquals(ipv6Address, serviceInfo.getIpv6Address());
+ assertEquals(ipv4Addresses, serviceInfo.getIpv4Addresses());
+ assertEquals(ipv6Addresses, serviceInfo.getIpv6Addresses());
assertEquals(port, serviceInfo.getPort());
assertEquals(subTypes, serviceInfo.getSubtypes());
for (String key : attributes.keySet()) {
+ assertTrue(attributes.containsKey(key));
assertEquals(attributes.get(key), serviceInfo.getAttributeByKey(key));
}
assertEquals(interfaceIndex, serviceInfo.getInterfaceIndex());
@@ -434,22 +441,19 @@
public void processResponse_incompleteResponse() {
client.startSendAndReceive(mockListenerOne, MdnsSearchOptions.getDefaultOptions());
- MdnsResponse response = mock(MdnsResponse.class);
- when(response.getServiceInstanceName()).thenReturn("service-instance-1");
- doReturn(INTERFACE_INDEX).when(response).getInterfaceIndex();
- doReturn(mockNetwork).when(response).getNetwork();
- when(response.isComplete()).thenReturn(false);
-
- client.processResponse(response);
+ client.processResponse(createResponse(
+ "service-instance-1", null /* host */, 0 /* port */,
+ SERVICE_TYPE_LABELS,
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
verify(mockListenerOne).onServiceNameDiscovered(serviceInfoCaptor.capture());
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(0),
"service-instance-1",
SERVICE_TYPE_LABELS,
- null /* ipv4Address */,
- null /* ipv6Address */,
- 0 /* port */,
- List.of() /* subTypes */,
- Collections.singletonMap("key", null) /* attributes */,
+ /* ipv4Address= */ List.of(),
+ /* ipv6Address= */ List.of(),
+ /* port= */ 0,
+ /* subTypes= */ List.of(),
+ Collections.emptyMap(),
INTERFACE_INDEX,
mockNetwork);
@@ -463,36 +467,25 @@
client.startSendAndReceive(mockListenerOne, MdnsSearchOptions.getDefaultOptions());
// Process the initial response.
- MdnsResponse initialResponse =
- createResponse(
- "service-instance-1",
- ipV4Address,
- 5353,
- /* subtype= */ "ABCDE",
- Collections.emptyMap(),
- /* interfaceIndex= */ 20,
- mockNetwork);
- client.processResponse(initialResponse);
+ client.processResponse(createResponse(
+ "service-instance-1", ipV4Address, 5353,
+ /* subtype= */ "ABCDE",
+ Collections.emptyMap(), TEST_TTL), /* interfaceIndex= */ 20, mockNetwork);
// Process a second response with a different port and updated text attributes.
- MdnsResponse secondResponse =
- createResponse(
- "service-instance-1",
- ipV4Address,
- 5354,
- /* subtype= */ "ABCDE",
- Collections.singletonMap("key", "value"),
- /* interfaceIndex= */ 20,
- mockNetwork);
- client.processResponse(secondResponse);
+ client.processResponse(createResponse(
+ "service-instance-1", ipV4Address, 5354,
+ /* subtype= */ "ABCDE",
+ Collections.singletonMap("key", "value"), TEST_TTL),
+ /* interfaceIndex= */ 20, mockNetwork);
// Verify onServiceNameDiscovered was called once for the initial response.
verify(mockListenerOne).onServiceNameDiscovered(serviceInfoCaptor.capture());
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(0),
"service-instance-1",
SERVICE_TYPE_LABELS,
- ipV4Address /* ipv4Address */,
- null /* ipv6Address */,
+ List.of(ipV4Address) /* ipv4Address */,
+ List.of() /* ipv6Address */,
5353 /* port */,
Collections.singletonList("ABCDE") /* subTypes */,
Collections.singletonMap("key", null) /* attributes */,
@@ -529,39 +522,25 @@
client.startSendAndReceive(mockListenerOne, MdnsSearchOptions.getDefaultOptions());
// Process the initial response.
- MdnsResponse initialResponse =
- createResponse(
- "service-instance-1",
- ipV6Address,
- 5353,
- /* subtype= */ "ABCDE",
- Collections.emptyMap(),
- /* interfaceIndex= */ 20,
- mockNetwork);
- client.processResponse(initialResponse);
+ client.processResponse(createResponse(
+ "service-instance-1", ipV6Address, 5353,
+ /* subtype= */ "ABCDE",
+ Collections.emptyMap(), TEST_TTL), /* interfaceIndex= */ 20, mockNetwork);
// Process a second response with a different port and updated text attributes.
- MdnsResponse secondResponse =
- createResponse(
- "service-instance-1",
- ipV6Address,
- 5354,
- /* subtype= */ "ABCDE",
- Collections.singletonMap("key", "value"),
- /* interfaceIndex= */ 20,
- mockNetwork);
- client.processResponse(secondResponse);
-
- System.out.println("secondResponses ip"
- + secondResponse.getInet6AddressRecord().getInet6Address().getHostAddress());
+ client.processResponse(createResponse(
+ "service-instance-1", ipV6Address, 5354,
+ /* subtype= */ "ABCDE",
+ Collections.singletonMap("key", "value"), TEST_TTL),
+ /* interfaceIndex= */ 20, mockNetwork);
// Verify onServiceNameDiscovered was called once for the initial response.
verify(mockListenerOne).onServiceNameDiscovered(serviceInfoCaptor.capture());
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(0),
"service-instance-1",
SERVICE_TYPE_LABELS,
- null /* ipv4Address */,
- ipV6Address /* ipv6Address */,
+ List.of() /* ipv4Address */,
+ List.of(ipV6Address) /* ipv6Address */,
5353 /* port */,
Collections.singletonList("ABCDE") /* subTypes */,
Collections.singletonMap("key", null) /* attributes */,
@@ -619,29 +598,25 @@
final String serviceName = "service-instance-1";
final String ipV6Address = "2000:3333::da6c:63ff:fe7c:7483";
// Process the initial response.
- final MdnsResponse initialResponse =
- createResponse(
- serviceName,
- ipV6Address,
- 5353 /* port */,
- /* subtype= */ "ABCDE",
- Collections.emptyMap(),
- INTERFACE_INDEX,
- mockNetwork);
- client.processResponse(initialResponse);
- MdnsResponse response = mock(MdnsResponse.class);
- doReturn("goodbye-service").when(response).getServiceInstanceName();
- doReturn(INTERFACE_INDEX).when(response).getInterfaceIndex();
- doReturn(mockNetwork).when(response).getNetwork();
- doReturn(true).when(response).isGoodbye();
- client.processResponse(response);
+ client.processResponse(createResponse(
+ serviceName, ipV6Address, 5353,
+ SERVICE_TYPE_LABELS,
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
+
+ client.processResponse(createResponse(
+ "goodbye-service", ipV6Address, 5353,
+ SERVICE_TYPE_LABELS,
+ Collections.emptyMap(), /* ptrTtlMillis= */ 0L), INTERFACE_INDEX, mockNetwork);
+
// Verify removed callback won't be called if the service is not existed.
verifyServiceRemovedNoCallback(mockListenerOne);
verifyServiceRemovedNoCallback(mockListenerTwo);
// Verify removed callback would be called.
- doReturn(serviceName).when(response).getServiceInstanceName();
- client.processResponse(response);
+ client.processResponse(createResponse(
+ serviceName, ipV6Address, 5353,
+ SERVICE_TYPE_LABELS,
+ Collections.emptyMap(), 0L), INTERFACE_INDEX, mockNetwork);
verifyServiceRemovedCallback(
mockListenerOne, serviceName, SERVICE_TYPE_LABELS, INTERFACE_INDEX, mockNetwork);
verifyServiceRemovedCallback(
@@ -651,16 +626,10 @@
@Test
public void reportExistingServiceToNewlyRegisteredListeners() throws Exception {
// Process the initial response.
- MdnsResponse initialResponse =
- createResponse(
- "service-instance-1",
- "192.168.1.1",
- 5353,
- /* subtype= */ "ABCDE",
- Collections.emptyMap(),
- INTERFACE_INDEX,
- mockNetwork);
- client.processResponse(initialResponse);
+ client.processResponse(createResponse(
+ "service-instance-1", "192.168.1.1", 5353,
+ /* subtype= */ "ABCDE",
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
client.startSendAndReceive(mockListenerOne, MdnsSearchOptions.getDefaultOptions());
@@ -669,8 +638,8 @@
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(0),
"service-instance-1",
SERVICE_TYPE_LABELS,
- "192.168.1.1" /* ipv4Address */,
- null /* ipv6Address */,
+ List.of("192.168.1.1") /* ipv4Address */,
+ List.of() /* ipv6Address */,
5353 /* port */,
Collections.singletonList("ABCDE") /* subTypes */,
Collections.singletonMap("key", null) /* attributes */,
@@ -687,10 +656,10 @@
assertNull(existingServiceInfo.getAttributeByKey("key"));
// Process a goodbye message for the existing response.
- MdnsResponse goodByeResponse = mock(MdnsResponse.class);
- when(goodByeResponse.getServiceInstanceName()).thenReturn("service-instance-1");
- when(goodByeResponse.isGoodbye()).thenReturn(true);
- client.processResponse(goodByeResponse);
+ client.processResponse(createResponse(
+ "service-instance-1", "192.168.1.1", 5353,
+ SERVICE_TYPE_LABELS,
+ Collections.emptyMap(), /* ptrTtlMillis= */ 0L), INTERFACE_INDEX, mockNetwork);
client.startSendAndReceive(mockListenerTwo, MdnsSearchOptions.getDefaultOptions());
@@ -709,17 +678,15 @@
Runnable firstMdnsTask = currentThreadExecutor.getAndClearSubmittedRunnable();
// Process the initial response.
- MdnsResponse initialResponse =
- createMockResponse(
- serviceInstanceName, "192.168.1.1", 5353, List.of("ABCDE"),
- Map.of(), INTERFACE_INDEX, mockNetwork);
- client.processResponse(initialResponse);
+ client.processResponse(createResponse(
+ serviceInstanceName, "192.168.1.1", 5353, /* subtype= */ "ABCDE",
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
// Clear the scheduled runnable.
currentThreadExecutor.getAndClearLastScheduledRunnable();
// Simulate the case where the response is after TTL.
- when(initialResponse.getServiceRecord().getRemainingTTL(anyLong())).thenReturn((long) 0);
+ doReturn(TEST_ELAPSED_REALTIME + TEST_TTL + 1L).when(mockDecoderClock).elapsedRealtime();
firstMdnsTask.run();
// Verify removed callback was not called.
@@ -733,7 +700,8 @@
//MdnsConfigsFlagsImpl.allowSearchOptionsToRemoveExpiredService.override(true);
final String serviceInstanceName = "service-instance-1";
client =
- new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor) {
+ new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor,
+ mockDecoderClock) {
@Override
MdnsPacketWriter createMdnsPacketWriter() {
return mockPacketWriter;
@@ -743,24 +711,22 @@
Runnable firstMdnsTask = currentThreadExecutor.getAndClearSubmittedRunnable();
// Process the initial response.
- MdnsResponse initialResponse =
- createMockResponse(
- serviceInstanceName, "192.168.1.1", 5353, List.of("ABCDE"),
- Map.of(), INTERFACE_INDEX, mockNetwork);
- client.processResponse(initialResponse);
+ client.processResponse(createResponse(
+ serviceInstanceName, "192.168.1.1", 5353, /* subtype= */ "ABCDE",
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
// Clear the scheduled runnable.
currentThreadExecutor.getAndClearLastScheduledRunnable();
// Simulate the case where the response is under TTL.
- when(initialResponse.getServiceRecord().getRemainingTTL(anyLong())).thenReturn((long) 1000);
+ doReturn(TEST_ELAPSED_REALTIME + TEST_TTL - 1L).when(mockDecoderClock).elapsedRealtime();
firstMdnsTask.run();
// Verify removed callback was not called.
verifyServiceRemovedNoCallback(mockListenerOne);
// Simulate the case where the response is after TTL.
- when(initialResponse.getServiceRecord().getRemainingTTL(anyLong())).thenReturn((long) 0);
+ doReturn(TEST_ELAPSED_REALTIME + TEST_TTL + 1L).when(mockDecoderClock).elapsedRealtime();
firstMdnsTask.run();
// Verify removed callback was called.
@@ -773,7 +739,8 @@
throws Exception {
final String serviceInstanceName = "service-instance-1";
client =
- new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor) {
+ new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor,
+ mockDecoderClock) {
@Override
MdnsPacketWriter createMdnsPacketWriter() {
return mockPacketWriter;
@@ -783,17 +750,15 @@
Runnable firstMdnsTask = currentThreadExecutor.getAndClearSubmittedRunnable();
// Process the initial response.
- MdnsResponse initialResponse =
- createMockResponse(
- serviceInstanceName, "192.168.1.1", 5353, List.of("ABCDE"),
- Map.of(), INTERFACE_INDEX, mockNetwork);
- client.processResponse(initialResponse);
+ client.processResponse(createResponse(
+ serviceInstanceName, "192.168.1.1", 5353, /* subtype= */ "ABCDE",
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
// Clear the scheduled runnable.
currentThreadExecutor.getAndClearLastScheduledRunnable();
// Simulate the case where the response is after TTL.
- when(initialResponse.getServiceRecord().getRemainingTTL(anyLong())).thenReturn((long) 0);
+ doReturn(TEST_ELAPSED_REALTIME + TEST_TTL + 1L).when(mockDecoderClock).elapsedRealtime();
firstMdnsTask.run();
// Verify removed callback was not called.
@@ -807,7 +772,8 @@
//MdnsConfigsFlagsImpl.removeServiceAfterTtlExpires.override(true);
final String serviceInstanceName = "service-instance-1";
client =
- new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor) {
+ new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor,
+ mockDecoderClock) {
@Override
MdnsPacketWriter createMdnsPacketWriter() {
return mockPacketWriter;
@@ -817,17 +783,15 @@
Runnable firstMdnsTask = currentThreadExecutor.getAndClearSubmittedRunnable();
// Process the initial response.
- MdnsResponse initialResponse =
- createMockResponse(
- serviceInstanceName, "192.168.1.1", 5353, List.of("ABCDE"),
- Map.of(), INTERFACE_INDEX, mockNetwork);
- client.processResponse(initialResponse);
+ client.processResponse(createResponse(
+ serviceInstanceName, "192.168.1.1", 5353, /* subtype= */ "ABCDE",
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
// Clear the scheduled runnable.
currentThreadExecutor.getAndClearLastScheduledRunnable();
// Simulate the case where the response is after TTL.
- when(initialResponse.getServiceRecord().getRemainingTTL(anyLong())).thenReturn((long) 0);
+ doReturn(TEST_ELAPSED_REALTIME + TEST_TTL + 1L).when(mockDecoderClock).elapsedRealtime();
firstMdnsTask.run();
// Verify removed callback was called.
@@ -844,56 +808,36 @@
InOrder inOrder = inOrder(mockListenerOne);
// Process the initial response which is incomplete.
- final MdnsResponse initialResponse =
- createResponse(
- serviceName,
- null,
- 5353,
- "ABCDE" /* subtype */,
- Collections.emptyMap(),
- INTERFACE_INDEX,
- mockNetwork);
- client.processResponse(initialResponse);
+ final String subtype = "ABCDE";
+ client.processResponse(createResponse(
+ serviceName, null, 5353, subtype,
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
// Process a second response which has ip address to make response become complete.
- final MdnsResponse secondResponse =
- createResponse(
- serviceName,
- ipV4Address,
- 5353,
- "ABCDE" /* subtype */,
- Collections.emptyMap(),
- INTERFACE_INDEX,
- mockNetwork);
- client.processResponse(secondResponse);
+ client.processResponse(createResponse(
+ serviceName, ipV4Address, 5353, subtype,
+ Collections.emptyMap(), TEST_TTL), INTERFACE_INDEX, mockNetwork);
// Process a third response with a different ip address, port and updated text attributes.
- final MdnsResponse thirdResponse =
- createResponse(
- serviceName,
- ipV6Address,
- 5354,
- "ABCDE" /* subtype */,
- Collections.singletonMap("key", "value"),
- INTERFACE_INDEX,
- mockNetwork);
- client.processResponse(thirdResponse);
+ client.processResponse(createResponse(
+ serviceName, ipV6Address, 5354, subtype,
+ Collections.singletonMap("key", "value"), TEST_TTL), INTERFACE_INDEX, mockNetwork);
- // Process the last response which is goodbye message.
- final MdnsResponse lastResponse = mock(MdnsResponse.class);
- doReturn(serviceName).when(lastResponse).getServiceInstanceName();
- doReturn(true).when(lastResponse).isGoodbye();
- client.processResponse(lastResponse);
+ // Process the last response which is goodbye message (with the main type, not subtype).
+ client.processResponse(createResponse(
+ serviceName, ipV6Address, 5354, SERVICE_TYPE_LABELS,
+ Collections.singletonMap("key", "value"), /* ptrTtlMillis= */ 0L),
+ INTERFACE_INDEX, mockNetwork);
// Verify onServiceNameDiscovered was first called for the initial response.
inOrder.verify(mockListenerOne).onServiceNameDiscovered(serviceInfoCaptor.capture());
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(0),
serviceName,
SERVICE_TYPE_LABELS,
- null /* ipv4Address */,
- null /* ipv6Address */,
+ List.of() /* ipv4Address */,
+ List.of() /* ipv6Address */,
5353 /* port */,
- Collections.singletonList("ABCDE") /* subTypes */,
+ Collections.singletonList(subtype) /* subTypes */,
Collections.singletonMap("key", null) /* attributes */,
INTERFACE_INDEX,
mockNetwork);
@@ -903,10 +847,10 @@
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(1),
serviceName,
SERVICE_TYPE_LABELS,
- ipV4Address /* ipv4Address */,
- null /* ipv6Address */,
+ List.of(ipV4Address) /* ipv4Address */,
+ List.of() /* ipv6Address */,
5353 /* port */,
- Collections.singletonList("ABCDE") /* subTypes */,
+ Collections.singletonList(subtype) /* subTypes */,
Collections.singletonMap("key", null) /* attributes */,
INTERFACE_INDEX,
mockNetwork);
@@ -916,10 +860,10 @@
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(2),
serviceName,
SERVICE_TYPE_LABELS,
- ipV4Address /* ipv4Address */,
- ipV6Address /* ipv6Address */,
+ List.of(ipV4Address) /* ipv4Address */,
+ List.of(ipV6Address) /* ipv6Address */,
5354 /* port */,
- Collections.singletonList("ABCDE") /* subTypes */,
+ Collections.singletonList(subtype) /* subTypes */,
Collections.singletonMap("key", "value") /* attributes */,
INTERFACE_INDEX,
mockNetwork);
@@ -929,8 +873,8 @@
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(3),
serviceName,
SERVICE_TYPE_LABELS,
- ipV4Address /* ipv4Address */,
- ipV6Address /* ipv6Address */,
+ List.of(ipV4Address) /* ipv4Address */,
+ List.of(ipV6Address) /* ipv6Address */,
5354 /* port */,
Collections.singletonList("ABCDE") /* subTypes */,
Collections.singletonMap("key", "value") /* attributes */,
@@ -942,8 +886,8 @@
verifyServiceInfo(serviceInfoCaptor.getAllValues().get(4),
serviceName,
SERVICE_TYPE_LABELS,
- ipV4Address /* ipv4Address */,
- ipV6Address /* ipv6Address */,
+ List.of(ipV4Address) /* ipv4Address */,
+ List.of(ipV6Address) /* ipv6Address */,
5354 /* port */,
Collections.singletonList("ABCDE") /* subTypes */,
Collections.singletonMap("key", "value") /* attributes */,
@@ -951,6 +895,102 @@
mockNetwork);
}
+ @Test
+ public void testProcessResponse_Resolve() throws Exception {
+ client = new MdnsServiceTypeClient(SERVICE_TYPE, mockSocketClient, currentThreadExecutor);
+
+ final String instanceName = "service-instance";
+ final String[] hostname = new String[] { "testhost "};
+ final String ipV4Address = "192.0.2.0";
+ final String ipV6Address = "2001:db8::";
+
+ final MdnsSearchOptions resolveOptions = MdnsSearchOptions.newBuilder()
+ .setResolveInstanceName(instanceName).build();
+
+ client.startSendAndReceive(mockListenerOne, resolveOptions);
+ InOrder inOrder = inOrder(mockListenerOne, mockSocketClient);
+
+ // Verify a query for SRV/TXT was sent, but no PTR query
+ final ArgumentCaptor<DatagramPacket> srvTxtQueryCaptor =
+ ArgumentCaptor.forClass(DatagramPacket.class);
+ currentThreadExecutor.getAndClearLastScheduledRunnable().run();
+ // Send twice for IPv4 and IPv6
+ inOrder.verify(mockSocketClient, times(2)).sendUnicastPacket(srvTxtQueryCaptor.capture(),
+ eq(null) /* network */);
+
+ final MdnsPacket srvTxtQueryPacket = MdnsPacket.parse(
+ new MdnsPacketReader(srvTxtQueryCaptor.getValue()));
+ final List<MdnsRecord> srvTxtQuestions = srvTxtQueryPacket.questions;
+
+ final String[] serviceName = Stream.concat(Stream.of(instanceName),
+ Arrays.stream(SERVICE_TYPE_LABELS)).toArray(String[]::new);
+ assertFalse(srvTxtQuestions.stream().anyMatch(q -> q.getType() == MdnsRecord.TYPE_PTR));
+ assertTrue(srvTxtQuestions.stream().anyMatch(q ->
+ q.getType() == MdnsRecord.TYPE_SRV && Arrays.equals(q.name, serviceName)));
+ assertTrue(srvTxtQuestions.stream().anyMatch(q ->
+ q.getType() == MdnsRecord.TYPE_TXT && Arrays.equals(q.name, serviceName)));
+
+ // Process a response with SRV+TXT
+ final MdnsPacket srvTxtResponse = new MdnsPacket(
+ 0 /* flags */,
+ Collections.emptyList() /* questions */,
+ List.of(
+ new MdnsServiceRecord(serviceName, 0L /* receiptTimeMillis */,
+ true /* cacheFlush */, TEST_TTL, 0 /* servicePriority */,
+ 0 /* serviceWeight */, 1234 /* servicePort */, hostname),
+ new MdnsTextRecord(serviceName, 0L /* receiptTimeMillis */,
+ true /* cacheFlush */, TEST_TTL,
+ Collections.emptyList() /* entries */)),
+ Collections.emptyList() /* authorityRecords */,
+ Collections.emptyList() /* additionalRecords */);
+
+ client.processResponse(srvTxtResponse, INTERFACE_INDEX, mockNetwork);
+
+ // Expect a query for A/AAAA
+ final ArgumentCaptor<DatagramPacket> addressQueryCaptor =
+ ArgumentCaptor.forClass(DatagramPacket.class);
+ currentThreadExecutor.getAndClearLastScheduledRunnable().run();
+ inOrder.verify(mockSocketClient, times(2)).sendMulticastPacket(addressQueryCaptor.capture(),
+ eq(null) /* network */);
+
+ final MdnsPacket addressQueryPacket = MdnsPacket.parse(
+ new MdnsPacketReader(addressQueryCaptor.getValue()));
+ final List<MdnsRecord> addressQueryQuestions = addressQueryPacket.questions;
+ assertTrue(addressQueryQuestions.stream().anyMatch(q ->
+ q.getType() == MdnsRecord.TYPE_A && Arrays.equals(q.name, hostname)));
+ assertTrue(addressQueryQuestions.stream().anyMatch(q ->
+ q.getType() == MdnsRecord.TYPE_AAAA && Arrays.equals(q.name, hostname)));
+
+ // Process a response with address records
+ final MdnsPacket addressResponse = new MdnsPacket(
+ 0 /* flags */,
+ Collections.emptyList() /* questions */,
+ List.of(
+ new MdnsInetAddressRecord(hostname, 0L /* receiptTimeMillis */,
+ true /* cacheFlush */, TEST_TTL,
+ InetAddresses.parseNumericAddress(ipV4Address)),
+ new MdnsInetAddressRecord(hostname, 0L /* receiptTimeMillis */,
+ true /* cacheFlush */, TEST_TTL,
+ InetAddresses.parseNumericAddress(ipV6Address))),
+ Collections.emptyList() /* authorityRecords */,
+ Collections.emptyList() /* additionalRecords */);
+
+ inOrder.verify(mockListenerOne, never()).onServiceNameDiscovered(any());
+ client.processResponse(addressResponse, INTERFACE_INDEX, mockNetwork);
+
+ inOrder.verify(mockListenerOne).onServiceFound(serviceInfoCaptor.capture());
+ verifyServiceInfo(serviceInfoCaptor.getValue(),
+ instanceName,
+ SERVICE_TYPE_LABELS,
+ List.of(ipV4Address),
+ List.of(ipV6Address),
+ 1234 /* port */,
+ Collections.emptyList() /* subTypes */,
+ Collections.emptyMap() /* attributes */,
+ INTERFACE_INDEX,
+ mockNetwork);
+ }
+
// verifies that the right query was enqueued with the right delay, and send query by executing
// the runnable.
private void verifyAndSendQuery(int index, long timeInMs, boolean expectsUnicastResponse) {
@@ -1029,106 +1069,68 @@
}
}
- // Creates a mock mDNS response.
- private MdnsResponse createMockResponse(
- @NonNull String serviceInstanceName,
- @NonNull String host,
- int port,
- @NonNull List<String> subtypes,
- @NonNull Map<String, String> textAttributes,
- int interfaceIndex,
- Network network)
- throws Exception {
- String[] hostName = new String[]{"hostname"};
- MdnsServiceRecord serviceRecord = mock(MdnsServiceRecord.class);
- when(serviceRecord.getServiceHost()).thenReturn(hostName);
- when(serviceRecord.getServicePort()).thenReturn(port);
-
- MdnsResponse response = spy(new MdnsResponse(0, interfaceIndex, network));
-
- MdnsInetAddressRecord inetAddressRecord = mock(MdnsInetAddressRecord.class);
- if (host.contains(":")) {
- when(inetAddressRecord.getInet6Address())
- .thenReturn((Inet6Address) Inet6Address.getByName(host));
- response.setInet6AddressRecord(inetAddressRecord);
- } else {
- when(inetAddressRecord.getInet4Address())
- .thenReturn((Inet4Address) Inet4Address.getByName(host));
- response.setInet4AddressRecord(inetAddressRecord);
- }
-
- MdnsTextRecord textRecord = mock(MdnsTextRecord.class);
- List<String> textStrings = new ArrayList<>();
- List<TextEntry> textEntries = new ArrayList<>();
- for (Map.Entry<String, String> kv : textAttributes.entrySet()) {
- textStrings.add(kv.getKey() + "=" + kv.getValue());
- textEntries.add(new TextEntry(kv.getKey(), kv.getValue().getBytes(UTF_8)));
- }
- when(textRecord.getStrings()).thenReturn(textStrings);
- when(textRecord.getEntries()).thenReturn(textEntries);
-
- response.setServiceRecord(serviceRecord);
- response.setTextRecord(textRecord);
-
- doReturn(false).when(response).isGoodbye();
- doReturn(true).when(response).isComplete();
- doReturn(serviceInstanceName).when(response).getServiceInstanceName();
- doReturn(new ArrayList<>(subtypes)).when(response).getSubtypes();
- return response;
- }
-
- // Creates a mDNS response.
- private MdnsResponse createResponse(
+ private MdnsPacket createResponse(
@NonNull String serviceInstanceName,
@Nullable String host,
int port,
@NonNull String subtype,
@NonNull Map<String, String> textAttributes,
- int interfaceIndex,
- Network network)
+ long ptrTtlMillis)
throws Exception {
- MdnsResponse response = new MdnsResponse(0, interfaceIndex, network);
+ final ArrayList<String> type = new ArrayList<>();
+ type.add(subtype);
+ type.add(MdnsConstants.SUBTYPE_LABEL);
+ type.addAll(Arrays.asList(SERVICE_TYPE_LABELS));
+ return createResponse(serviceInstanceName, host, port, type.toArray(new String[0]),
+ textAttributes, ptrTtlMillis);
+ }
+
+ // Creates a mDNS response.
+ private MdnsPacket createResponse(
+ @NonNull String serviceInstanceName,
+ @Nullable String host,
+ int port,
+ @NonNull String[] type,
+ @NonNull Map<String, String> textAttributes,
+ long ptrTtlMillis) {
+
+ final ArrayList<MdnsRecord> answerRecords = new ArrayList<>();
// Set PTR record
+ final ArrayList<String> serviceNameList = new ArrayList<>();
+ serviceNameList.add(serviceInstanceName);
+ serviceNameList.addAll(Arrays.asList(type));
+ final String[] serviceName = serviceNameList.toArray(new String[0]);
final MdnsPointerRecord pointerRecord = new MdnsPointerRecord(
- new String[]{subtype, MdnsConstants.SUBTYPE_LABEL, "test"} /* name */,
- 0L /* receiptTimeMillis */,
+ type,
+ TEST_ELAPSED_REALTIME /* receiptTimeMillis */,
false /* cacheFlush */,
- 120000L /* ttlMillis */,
- new String[]{serviceInstanceName});
- response.addPointerRecord(pointerRecord);
+ ptrTtlMillis,
+ serviceName);
+ answerRecords.add(pointerRecord);
// Set SRV record.
final MdnsServiceRecord serviceRecord = new MdnsServiceRecord(
- new String[] {"service"} /* name */,
- 0L /* receiptTimeMillis */,
+ serviceName,
+ TEST_ELAPSED_REALTIME /* receiptTimeMillis */,
false /* cacheFlush */,
- 120000L /* ttlMillis */,
+ TEST_TTL,
0 /* servicePriority */,
0 /* serviceWeight */,
port,
new String[]{"hostname"});
- response.setServiceRecord(serviceRecord);
+ answerRecords.add(serviceRecord);
// Set A/AAAA record.
if (host != null) {
- if (InetAddresses.parseNumericAddress(host) instanceof Inet6Address) {
- final MdnsInetAddressRecord inetAddressRecord = new MdnsInetAddressRecord(
- new String[] {"address"} /* name */,
- 0L /* receiptTimeMillis */,
- false /* cacheFlush */,
- 120000L /* ttlMillis */,
- Inet6Address.getByName(host));
- response.setInet6AddressRecord(inetAddressRecord);
- } else {
- final MdnsInetAddressRecord inetAddressRecord = new MdnsInetAddressRecord(
- new String[] {"address"} /* name */,
- 0L /* receiptTimeMillis */,
- false /* cacheFlush */,
- 120000L /* ttlMillis */,
- Inet4Address.getByName(host));
- response.setInet4AddressRecord(inetAddressRecord);
- }
+ final InetAddress addr = InetAddresses.parseNumericAddress(host);
+ final MdnsInetAddressRecord inetAddressRecord = new MdnsInetAddressRecord(
+ new String[] {"hostname"} /* name */,
+ TEST_ELAPSED_REALTIME /* receiptTimeMillis */,
+ false /* cacheFlush */,
+ TEST_TTL,
+ addr);
+ answerRecords.add(inetAddressRecord);
}
// Set TXT record.
@@ -1137,12 +1139,18 @@
textEntries.add(new TextEntry(kv.getKey(), kv.getValue().getBytes(UTF_8)));
}
final MdnsTextRecord textRecord = new MdnsTextRecord(
- new String[] {"text"} /* name */,
- 0L /* receiptTimeMillis */,
+ serviceName,
+ TEST_ELAPSED_REALTIME /* receiptTimeMillis */,
false /* cacheFlush */,
- 120000L /* ttlMillis */,
+ TEST_TTL,
textEntries);
- response.setTextRecord(textRecord);
- return response;
+ answerRecords.add(textRecord);
+ return new MdnsPacket(
+ 0 /* flags */,
+ Collections.emptyList() /* questions */,
+ answerRecords,
+ Collections.emptyList() /* authorityRecords */,
+ Collections.emptyList() /* additionalRecords */
+ );
}
}
\ No newline at end of file
diff --git a/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java b/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java
index 1d61cd3..9048686 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketClientTests.java
@@ -18,13 +18,11 @@
import static com.android.testutils.DevSdkIgnoreRuleKt.SC_V2;
-import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.never;
@@ -48,7 +46,6 @@
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
import org.mockito.ArgumentMatchers;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@@ -373,7 +370,7 @@
mdnsClient.startDiscovery();
verify(mockCallback, timeout(TIMEOUT).atLeast(1))
- .onResponseReceived(any(MdnsResponse.class));
+ .onResponseReceived(any(MdnsPacket.class), anyInt(), any());
}
@Test
@@ -382,7 +379,7 @@
mdnsClient.startDiscovery();
verify(mockCallback, timeout(TIMEOUT).atLeastOnce())
- .onResponseReceived(any(MdnsResponse.class));
+ .onResponseReceived(any(MdnsPacket.class), anyInt(), any());
mdnsClient.stopDiscovery();
}
@@ -514,7 +511,7 @@
mdnsClient.startDiscovery();
verify(mockCallback, timeout(TIMEOUT).atLeastOnce())
- .onResponseReceived(argThat(response -> response.getInterfaceIndex() == 21));
+ .onResponseReceived(any(), eq(21), any());
}
@Test
@@ -536,11 +533,7 @@
mdnsClient.setCallback(mockCallback);
mdnsClient.startDiscovery();
- ArgumentCaptor<MdnsResponse> mdnsResponseCaptor =
- ArgumentCaptor.forClass(MdnsResponse.class);
verify(mockMulticastSocket, never()).getInterfaceIndex();
- verify(mockCallback, timeout(TIMEOUT).atLeast(1))
- .onResponseReceived(mdnsResponseCaptor.capture());
- assertEquals(-1, mdnsResponseCaptor.getValue().getInterfaceIndex());
+ verify(mockCallback, timeout(TIMEOUT).atLeast(1)).onResponseReceived(any(), eq(-1), any());
}
}
\ No newline at end of file
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 635b296..b9cb255 100644
--- a/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketProviderTest.java
+++ b/tests/unit/java/com/android/server/connectivity/mdns/MdnsSocketProviderTest.java
@@ -27,6 +27,7 @@
import static org.mockito.Mockito.doCallRealMethod;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -109,12 +110,15 @@
final HandlerThread thread = new HandlerThread("MdnsSocketProviderTest");
thread.start();
mHandler = new Handler(thread.getLooper());
+ mSocketProvider = new MdnsSocketProvider(mContext, thread.getLooper(), mDeps);
+ }
+ private void startMonitoringSockets() {
final ArgumentCaptor<NetworkCallback> nwCallbackCaptor =
ArgumentCaptor.forClass(NetworkCallback.class);
final ArgumentCaptor<TetheringEventCallback> teCallbackCaptor =
ArgumentCaptor.forClass(TetheringEventCallback.class);
- mSocketProvider = new MdnsSocketProvider(mContext, thread.getLooper(), mDeps);
+
mHandler.post(mSocketProvider::startMonitoringSockets);
HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
verify(mCm).registerNetworkCallback(any(), nwCallbackCaptor.capture(), any());
@@ -205,6 +209,8 @@
@Test
public void testSocketRequestAndUnrequestSocket() {
+ startMonitoringSockets();
+
final TestSocketCallback testCallback1 = new TestSocketCallback();
mHandler.post(() -> mSocketProvider.requestSocket(TEST_NETWORK, testCallback1));
HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
@@ -275,6 +281,8 @@
@Test
public void testAddressesChanged() throws Exception {
+ startMonitoringSockets();
+
final TestSocketCallback testCallback = new TestSocketCallback();
mHandler.post(() -> mSocketProvider.requestSocket(TEST_NETWORK, testCallback));
HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
@@ -297,4 +305,53 @@
testCallback.expectedAddressesChangedForNetwork(
TEST_NETWORK, List.of(LINKADDRV4, LINKADDRV6));
}
+
+ @Test
+ public void testStartAndStopMonitoringSockets() {
+ // Stop monitoring sockets before start. Should not unregister any network callback.
+ mHandler.post(mSocketProvider::requestStopWhenInactive);
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ verify(mCm, never()).unregisterNetworkCallback(any(NetworkCallback.class));
+ verify(mTm, never()).unregisterTetheringEventCallback(any(TetheringEventCallback.class));
+
+ // Start sockets monitoring.
+ startMonitoringSockets();
+ // Request a socket then unrequest it. Expect no network callback unregistration.
+ final TestSocketCallback testCallback = new TestSocketCallback();
+ mHandler.post(() -> mSocketProvider.requestSocket(TEST_NETWORK, testCallback));
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ testCallback.expectedNoCallback();
+ mHandler.post(()-> mSocketProvider.unrequestSocket(testCallback));
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ verify(mCm, never()).unregisterNetworkCallback(any(NetworkCallback.class));
+ verify(mTm, never()).unregisterTetheringEventCallback(any(TetheringEventCallback.class));
+ // Request stop and it should unregister network callback immediately because there is no
+ // socket request.
+ mHandler.post(mSocketProvider::requestStopWhenInactive);
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ verify(mCm, times(1)).unregisterNetworkCallback(any(NetworkCallback.class));
+ verify(mTm, times(1)).unregisterTetheringEventCallback(any(TetheringEventCallback.class));
+
+ // Start sockets monitoring and request a socket again.
+ mHandler.post(mSocketProvider::startMonitoringSockets);
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ verify(mCm, times(2)).registerNetworkCallback(any(), any(NetworkCallback.class), any());
+ verify(mTm, times(2)).registerTetheringEventCallback(
+ any(), any(TetheringEventCallback.class));
+ final TestSocketCallback testCallback2 = new TestSocketCallback();
+ mHandler.post(() -> mSocketProvider.requestSocket(TEST_NETWORK, testCallback2));
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ testCallback2.expectedNoCallback();
+ // Try to stop monitoring sockets but should be ignored and wait until all socket are
+ // unrequested.
+ mHandler.post(mSocketProvider::requestStopWhenInactive);
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ verify(mCm, times(1)).unregisterNetworkCallback(any(NetworkCallback.class));
+ verify(mTm, times(1)).unregisterTetheringEventCallback(any());
+ // Unrequest the socket then network callbacks should be unregistered.
+ mHandler.post(()-> mSocketProvider.unrequestSocket(testCallback2));
+ HandlerUtils.waitForIdle(mHandler, DEFAULT_TIMEOUT);
+ verify(mCm, times(2)).unregisterNetworkCallback(any(NetworkCallback.class));
+ verify(mTm, times(2)).unregisterTetheringEventCallback(any(TetheringEventCallback.class));
+ }
}
diff --git a/tests/unit/res/xml/self_certified_capabilities_bandwidth.xml b/tests/unit/res/xml/self_certified_capabilities_bandwidth.xml
new file mode 100644
index 0000000..01fdca1
--- /dev/null
+++ b/tests/unit/res/xml/self_certified_capabilities_bandwidth.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+
+<network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_BANDWIDTH"/>
+</network-capabilities-declaration>
diff --git a/tests/unit/res/xml/self_certified_capabilities_both.xml b/tests/unit/res/xml/self_certified_capabilities_both.xml
new file mode 100644
index 0000000..4066be2
--- /dev/null
+++ b/tests/unit/res/xml/self_certified_capabilities_both.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+
+<network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_BANDWIDTH"/>
+</network-capabilities-declaration>
diff --git a/tests/unit/res/xml/self_certified_capabilities_latency.xml b/tests/unit/res/xml/self_certified_capabilities_latency.xml
new file mode 100644
index 0000000..1c4a0e0
--- /dev/null
+++ b/tests/unit/res/xml/self_certified_capabilities_latency.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+
+<network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+</network-capabilities-declaration>
diff --git a/tests/unit/res/xml/self_certified_capabilities_other.xml b/tests/unit/res/xml/self_certified_capabilities_other.xml
new file mode 100644
index 0000000..5b6649c
--- /dev/null
+++ b/tests/unit/res/xml/self_certified_capabilities_other.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+
+<network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-network-capability android:name="other"/>
+</network-capabilities-declaration>
diff --git a/tests/unit/res/xml/self_certified_capabilities_wrong_declaration.xml b/tests/unit/res/xml/self_certified_capabilities_wrong_declaration.xml
new file mode 100644
index 0000000..6082356
--- /dev/null
+++ b/tests/unit/res/xml/self_certified_capabilities_wrong_declaration.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+
+<network-capabilities-declaration1 xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+</network-capabilities-declaration1>
diff --git a/tests/unit/res/xml/self_certified_capabilities_wrong_tag.xml b/tests/unit/res/xml/self_certified_capabilities_wrong_tag.xml
new file mode 100644
index 0000000..c9ecc0b
--- /dev/null
+++ b/tests/unit/res/xml/self_certified_capabilities_wrong_tag.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+
+<network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-network-capability1 android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
+ <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_BANDWIDTH"/>
+</network-capabilities-declaration>
diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp
index 0ff8284..d22a576 100644
--- a/tools/gn2bp/Android.bp.swp
+++ b/tools/gn2bp/Android.bp.swp
@@ -292,7 +292,6 @@
cc_library_static {
name: "cronet_aml_base_allocator_partition_allocator_partition_alloc",
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features",
"base/allocator/partition_allocator/address_pool_manager.cc",
"base/allocator/partition_allocator/address_pool_manager_bitmap.cc",
"base/allocator/partition_allocator/address_space_randomization.cc",
@@ -346,6 +345,9 @@
"base/allocator/partition_allocator/tagging.cc",
"base/allocator/partition_allocator/thread_cache.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ ],
generated_headers: [
"cronet_aml_base_allocator_partition_allocator_chromecast_buildflags",
"cronet_aml_base_allocator_partition_allocator_chromeos_buildflags",
@@ -557,13 +559,15 @@
target: {
android_arm: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
"base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc",
"base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc",
"base/allocator/partition_allocator/starscan/stack/asm/arm/push_registers_asm.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -576,13 +580,15 @@
},
android_arm64: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
"base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc",
"base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc",
"base/allocator/partition_allocator/starscan/stack/asm/arm64/push_registers_asm.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -598,13 +604,15 @@
},
android_x86: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
"base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc",
"base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc",
"base/allocator/partition_allocator/starscan/stack/asm/x86/push_registers_asm.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -617,13 +625,15 @@
},
android_x86_64: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
"base/allocator/partition_allocator/partition_alloc_base/files/file_path.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library.cc",
"base/allocator/partition_allocator/partition_alloc_base/native_library_posix.cc",
"base/allocator/partition_allocator/partition_alloc_base/time/time_android.cc",
"base/allocator/partition_allocator/starscan/stack/asm/x64/push_registers_asm.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -933,56 +943,6 @@
cc_library_static {
name: "cronet_aml_base_base",
srcs: [
- ":cronet_aml_base_nodebug_assertion",
- ":cronet_aml_third_party_abseil_cpp_absl_base_base",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
- ":cronet_aml_third_party_android_ndk_cpu_features",
- ":cronet_aml_third_party_ashmem_ashmem",
"base/allocator/allocator_check.cc",
"base/allocator/allocator_extension.cc",
"base/allocator/dispatcher/dispatcher.cc",
@@ -1424,9 +1384,60 @@
static_libs: [
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -1605,54 +1616,6 @@
cc_library_static {
name: "cronet_aml_base_base__testing",
srcs: [
- ":cronet_aml_base_nodebug_assertion__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
"base/allocator/allocator_check.cc",
"base/allocator/allocator_extension.cc",
"base/allocator/dispatcher/dispatcher.cc",
@@ -2020,9 +1983,58 @@
static_libs: [
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -2134,8 +2146,6 @@
},
android_arm: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
- ":cronet_aml_third_party_ashmem_ashmem__testing",
"base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
"base/android/android_hardware_buffer_compat.cc",
"base/android/android_image_reader_compat.cc",
@@ -2212,6 +2222,10 @@
"base/time/time_android.cc",
"base/trace_event/cfi_backtrace_android.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -2228,13 +2242,6 @@
"cronet_aml_base_logging_buildflags__testing",
"cronet_aml_build_chromeos_buildflags__testing",
],
- export_generated_headers: [
- "cronet_aml_base_android_runtime_jni_headers__testing",
- "cronet_aml_base_base_jni_headers__testing",
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
ldflags: [
"-Wl,-wrap,asprintf",
"-Wl,-wrap,calloc",
@@ -2255,8 +2262,6 @@
},
android_arm64: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
- ":cronet_aml_third_party_ashmem_ashmem__testing",
"base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
"base/android/android_hardware_buffer_compat.cc",
"base/android/android_image_reader_compat.cc",
@@ -2329,6 +2334,10 @@
"base/threading/platform_thread_android.cc",
"base/time/time_android.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -2347,13 +2356,6 @@
"cronet_aml_base_logging_buildflags__testing",
"cronet_aml_build_chromeos_buildflags__testing",
],
- export_generated_headers: [
- "cronet_aml_base_android_runtime_jni_headers__testing",
- "cronet_aml_base_base_jni_headers__testing",
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
ldflags: [
"-Wl,-wrap,asprintf",
"-Wl,-wrap,calloc",
@@ -2374,8 +2376,6 @@
},
android_x86: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
- ":cronet_aml_third_party_ashmem_ashmem__testing",
"base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
"base/android/android_hardware_buffer_compat.cc",
"base/android/android_image_reader_compat.cc",
@@ -2448,6 +2448,10 @@
"base/threading/platform_thread_android.cc",
"base/time/time_android.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -2464,13 +2468,6 @@
"cronet_aml_base_logging_buildflags__testing",
"cronet_aml_build_chromeos_buildflags__testing",
],
- export_generated_headers: [
- "cronet_aml_base_android_runtime_jni_headers__testing",
- "cronet_aml_base_base_jni_headers__testing",
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
ldflags: [
"-Wl,-wrap,asprintf",
"-Wl,-wrap,calloc",
@@ -2491,8 +2488,6 @@
},
android_x86_64: {
srcs: [
- ":cronet_aml_third_party_android_ndk_cpu_features__testing",
- ":cronet_aml_third_party_ashmem_ashmem__testing",
"base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
"base/android/android_hardware_buffer_compat.cc",
"base/android/android_image_reader_compat.cc",
@@ -2565,6 +2560,10 @@
"base/threading/platform_thread_android.cc",
"base/time/time_android.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -2582,13 +2581,6 @@
"cronet_aml_base_logging_buildflags__testing",
"cronet_aml_build_chromeos_buildflags__testing",
],
- export_generated_headers: [
- "cronet_aml_base_android_runtime_jni_headers__testing",
- "cronet_aml_base_base_jni_headers__testing",
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
ldflags: [
"-Wl,-wrap,asprintf",
"-Wl,-wrap,calloc",
@@ -3743,9 +3735,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_ced_ced__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
@@ -4051,7 +4094,7 @@
}
// GN: //base:nodebug_assertion
-cc_object {
+cc_library_static {
name: "cronet_aml_base_nodebug_assertion",
srcs: [
"base/nodebug_assertion.cc",
@@ -4096,6 +4139,11 @@
"buildtools/third_party/libc++abi/trunk/include",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -4124,7 +4172,7 @@
}
// GN: //base:nodebug_assertion__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_base_nodebug_assertion__testing",
srcs: [
"base/nodebug_assertion.cc",
@@ -4165,6 +4213,11 @@
"buildtools/third_party/libc++/trunk/include",
"buildtools/third_party/libc++abi/trunk/include",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -4648,9 +4701,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -4754,55 +4858,6 @@
cc_library_static {
name: "cronet_aml_base_test_test_support__testing",
srcs: [
- ":cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
- ":cronet_aml_third_party_googletest_gmock__testing",
- ":cronet_aml_third_party_googletest_gtest__testing",
"base/task/sequence_manager/test/fake_task.cc",
"base/task/sequence_manager/test/mock_time_domain.cc",
"base/task/sequence_manager/test/mock_time_message_pump.cc",
@@ -4880,12 +4935,65 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -5823,7 +5931,7 @@
}
// GN: //buildtools/third_party/libc++:libc++
-cc_object {
+cc_library_static {
name: "cronet_aml_buildtools_third_party_libc___libc__",
srcs: [
"buildtools/third_party/libc++/trunk/src/algorithm.cpp",
@@ -5869,6 +5977,9 @@
"buildtools/third_party/libc++/trunk/src/vector.cpp",
"buildtools/third_party/libc++/trunk/src/verbose_abort.cpp",
],
+ static_libs: [
+ "cronet_aml_buildtools_third_party_libc__abi_libc__abi",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -5904,6 +6015,11 @@
"buildtools/third_party/libc++abi/trunk/include",
],
cpp_std: "c++20",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
cppflags: [
"-fexceptions",
],
@@ -5967,7 +6083,7 @@
}
// GN: //buildtools/third_party/libc++:libc++__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_buildtools_third_party_libc___libc____testing",
srcs: [
"buildtools/third_party/libc++/trunk/src/algorithm.cpp",
@@ -6013,6 +6129,9 @@
"buildtools/third_party/libc++/trunk/src/vector.cpp",
"buildtools/third_party/libc++/trunk/src/verbose_abort.cpp",
],
+ static_libs: [
+ "cronet_aml_buildtools_third_party_libc__abi_libc__abi__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -6048,6 +6167,11 @@
"buildtools/third_party/libc++abi/trunk/include",
],
cpp_std: "c++20",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
cppflags: [
"-fexceptions",
],
@@ -6111,7 +6235,7 @@
}
// GN: //buildtools/third_party/libc++abi:libc++abi
-cc_object {
+cc_library_static {
name: "cronet_aml_buildtools_third_party_libc__abi_libc__abi",
srcs: [
"buildtools/third_party/libc++abi/trunk/src/abort_message.cpp",
@@ -6165,6 +6289,11 @@
"buildtools/third_party/libc++abi/trunk/include",
],
cpp_std: "c++20",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
cppflags: [
"-fexceptions",
],
@@ -6243,7 +6372,7 @@
}
// GN: //buildtools/third_party/libc++abi:libc++abi__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_buildtools_third_party_libc__abi_libc__abi__testing",
srcs: [
"buildtools/third_party/libc++abi/trunk/src/abort_message.cpp",
@@ -6297,6 +6426,11 @@
"buildtools/third_party/libc++abi/trunk/include",
],
cpp_std: "c++20",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
cppflags: [
"-fexceptions",
],
@@ -6424,12 +6558,6 @@
cc_library_shared {
name: "cronet_aml_components_cronet_android_cronet",
srcs: [
- ":cronet_aml_buildtools_third_party_libc___libc__",
- ":cronet_aml_buildtools_third_party_libc__abi_libc__abi",
- ":cronet_aml_components_cronet_android_cronet_static",
- ":cronet_aml_components_cronet_cronet_common",
- ":cronet_aml_components_cronet_metrics_util",
- ":cronet_aml_components_metrics_library_support",
"components/cronet/android/cronet_jni.cc",
],
shared_libs: [
@@ -6441,15 +6569,79 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_buildtools_third_party_libc___libc__",
+ "cronet_aml_buildtools_third_party_libc__abi_libc__abi",
+ "cronet_aml_components_cronet_android_cronet_static",
+ "cronet_aml_components_cronet_cronet_common",
+ "cronet_aml_components_cronet_cronet_version_header",
+ "cronet_aml_components_cronet_metrics_util",
+ "cronet_aml_components_metrics_library_support",
"cronet_aml_components_prefs_prefs",
"cronet_aml_crypto_crypto",
+ "cronet_aml_net_dns_dns",
+ "cronet_aml_net_dns_public_public",
+ "cronet_aml_net_http_transport_security_state_generated_files",
"cronet_aml_net_net",
+ "cronet_aml_net_net_deps",
+ "cronet_aml_net_net_public_deps",
"cronet_aml_net_preload_decoder",
"cronet_aml_net_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -6459,30 +6651,6 @@
"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_components_cronet_android_buildflags",
- "cronet_aml_components_cronet_android_cronet_jni_headers",
- "cronet_aml_components_cronet_android_cronet_jni_registration",
- "cronet_aml_components_cronet_cronet_buildflags",
- "cronet_aml_components_cronet_cronet_version_header_action",
- "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
- "cronet_aml_url_buildflags",
- ],
- export_generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
- "cronet_aml_build_chromeos_buildflags",
- "cronet_aml_components_cronet_android_buildflags",
- "cronet_aml_components_cronet_android_cronet_jni_headers",
- "cronet_aml_components_cronet_android_cronet_jni_registration",
- "cronet_aml_components_cronet_cronet_buildflags",
- "cronet_aml_components_cronet_cronet_version_header_action",
- "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
- "cronet_aml_url_buildflags",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -7693,7 +7861,7 @@
}
// GN: //components/cronet/android:cronet_static
-cc_object {
+cc_library_static {
name: "cronet_aml_components_cronet_android_cronet_static",
srcs: [
"components/cronet/android/cronet_bidirectional_stream_adapter.cc",
@@ -7713,15 +7881,76 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_components_cronet_cronet_common",
+ "cronet_aml_components_cronet_cronet_version_header",
+ "cronet_aml_components_cronet_metrics_util",
+ "cronet_aml_components_metrics_library_support",
"cronet_aml_components_prefs_prefs",
"cronet_aml_crypto_crypto",
+ "cronet_aml_net_dns_dns",
+ "cronet_aml_net_dns_public_public",
+ "cronet_aml_net_http_transport_security_state_generated_files",
"cronet_aml_net_net",
+ "cronet_aml_net_net_deps",
+ "cronet_aml_net_net_public_deps",
"cronet_aml_net_preload_decoder",
"cronet_aml_net_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -7738,9 +7967,15 @@
"cronet_aml_components_cronet_android_buildflags",
"cronet_aml_components_cronet_android_cronet_jni_headers",
"cronet_aml_components_cronet_android_cronet_jni_registration",
- "cronet_aml_components_cronet_cronet_buildflags",
- "cronet_aml_components_cronet_cronet_version_header_action",
- "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
+ "cronet_aml_url_buildflags",
+ ],
+ export_generated_headers: [
+ "cronet_aml_base_debugging_buildflags",
+ "cronet_aml_base_logging_buildflags",
+ "cronet_aml_build_chromeos_buildflags",
+ "cronet_aml_components_cronet_android_buildflags",
+ "cronet_aml_components_cronet_android_cronet_jni_headers",
+ "cronet_aml_components_cronet_android_cronet_jni_registration",
"cronet_aml_url_buildflags",
],
defaults: [
@@ -7789,6 +8024,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -7817,7 +8073,7 @@
}
// GN: //components/cronet/android:cronet_static__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_components_cronet_android_cronet_static__testing",
srcs: [
"components/cronet/android/cronet_bidirectional_stream_adapter.cc",
@@ -7837,15 +8093,76 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_components_cronet_cronet_common__testing",
+ "cronet_aml_components_cronet_cronet_version_header__testing",
+ "cronet_aml_components_cronet_metrics_util__testing",
+ "cronet_aml_components_metrics_library_support__testing",
"cronet_aml_components_prefs_prefs__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -7862,9 +8179,15 @@
"cronet_aml_components_cronet_android_buildflags__testing",
"cronet_aml_components_cronet_android_cronet_jni_headers__testing",
"cronet_aml_components_cronet_android_cronet_jni_registration__testing",
- "cronet_aml_components_cronet_cronet_buildflags__testing",
- "cronet_aml_components_cronet_cronet_version_header_action__testing",
- "cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen_headers",
+ "cronet_aml_url_buildflags__testing",
+ ],
+ export_generated_headers: [
+ "cronet_aml_base_debugging_buildflags__testing",
+ "cronet_aml_base_logging_buildflags__testing",
+ "cronet_aml_build_chromeos_buildflags__testing",
+ "cronet_aml_components_cronet_android_buildflags__testing",
+ "cronet_aml_components_cronet_android_cronet_jni_headers__testing",
+ "cronet_aml_components_cronet_android_cronet_jni_registration__testing",
"cronet_aml_url_buildflags__testing",
],
defaults: [
@@ -7913,6 +8236,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -7944,15 +8288,6 @@
cc_library_shared {
name: "cronet_aml_components_cronet_android_cronet_unittests_android__library__testing",
srcs: [
- ":cronet_aml_buildtools_third_party_libc___libc____testing",
- ":cronet_aml_buildtools_third_party_libc__abi_libc__abi__testing",
- ":cronet_aml_components_cronet_android_cronet_static__testing",
- ":cronet_aml_components_cronet_cronet_common__testing",
- ":cronet_aml_components_cronet_cronet_common_unittests__testing",
- ":cronet_aml_components_cronet_metrics_util__testing",
- ":cronet_aml_components_metrics_library_support__testing",
- ":cronet_aml_testing_android_native_test_native_test_native_code__testing",
- ":cronet_aml_testing_android_native_test_native_test_support__testing",
"components/cronet/run_all_unittests.cc",
],
shared_libs: [
@@ -7965,25 +8300,98 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_test_test_support__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_buildtools_third_party_libc___libc____testing",
+ "cronet_aml_buildtools_third_party_libc__abi_libc__abi__testing",
+ "cronet_aml_components_cronet_android_cronet_static__testing",
+ "cronet_aml_components_cronet_cronet_common__testing",
+ "cronet_aml_components_cronet_cronet_common_unittests__testing",
+ "cronet_aml_components_cronet_cronet_version_header__testing",
+ "cronet_aml_components_cronet_metrics_util__testing",
+ "cronet_aml_components_metrics_library_support__testing",
"cronet_aml_components_prefs_prefs__testing",
"cronet_aml_components_prefs_test_support__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_dns_test_support__testing",
"cronet_aml_net_gtest_util__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
+ "cronet_aml_net_quic_test_flags_utils__testing",
+ "cronet_aml_net_simple_quic_tools__testing",
"cronet_aml_net_test_support__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
"cronet_aml_net_third_party_quiche_quiche_tool_support__testing",
+ "cronet_aml_net_tools_tld_cleanup_tld_cleanup__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_testing_android_native_test_native_test_native_code__testing",
+ "cronet_aml_testing_android_native_test_native_test_support__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -7994,32 +8402,6 @@
"cronet_aml_third_party_protobuf_protobuf_lite__testing",
"cronet_aml_url_url__testing",
],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_components_cronet_android_buildflags__testing",
- "cronet_aml_components_cronet_android_cronet_jni_headers__testing",
- "cronet_aml_components_cronet_android_cronet_jni_registration__testing",
- "cronet_aml_components_cronet_cronet_buildflags__testing",
- "cronet_aml_components_cronet_cronet_version_header_action__testing",
- "cronet_aml_testing_android_native_test_native_test_jni_headers__testing",
- "cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen_headers",
- "cronet_aml_url_buildflags__testing",
- ],
- export_generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_components_cronet_android_buildflags__testing",
- "cronet_aml_components_cronet_android_cronet_jni_headers__testing",
- "cronet_aml_components_cronet_android_cronet_jni_registration__testing",
- "cronet_aml_components_cronet_cronet_buildflags__testing",
- "cronet_aml_components_cronet_cronet_version_header_action__testing",
- "cronet_aml_testing_android_native_test_native_test_jni_headers__testing",
- "cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen_headers",
- "cronet_aml_url_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -8430,7 +8812,7 @@
}
// GN: //components/cronet:cronet_common
-cc_object {
+cc_library_static {
name: "cronet_aml_components_cronet_cronet_common",
srcs: [
"components/cronet/cronet_context.cc",
@@ -8450,15 +8832,74 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_components_cronet_cronet_version_header",
+ "cronet_aml_components_metrics_library_support",
"cronet_aml_components_prefs_prefs",
"cronet_aml_crypto_crypto",
+ "cronet_aml_net_dns_dns",
+ "cronet_aml_net_dns_public_public",
+ "cronet_aml_net_http_transport_security_state_generated_files",
"cronet_aml_net_net",
+ "cronet_aml_net_net_deps",
+ "cronet_aml_net_net_public_deps",
"cronet_aml_net_preload_decoder",
"cronet_aml_net_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -8470,8 +8911,9 @@
],
generated_headers: [
"cronet_aml_components_cronet_cronet_buildflags",
- "cronet_aml_components_cronet_cronet_version_header_action",
- "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
+ ],
+ export_generated_headers: [
+ "cronet_aml_components_cronet_cronet_buildflags",
],
defaults: [
"cronet_aml_defaults",
@@ -8519,6 +8961,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -8547,7 +9010,7 @@
}
// GN: //components/cronet:cronet_common__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_components_cronet_cronet_common__testing",
srcs: [
"components/cronet/cronet_context.cc",
@@ -8567,15 +9030,74 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_components_cronet_cronet_version_header__testing",
+ "cronet_aml_components_metrics_library_support__testing",
"cronet_aml_components_prefs_prefs__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -8587,8 +9109,9 @@
],
generated_headers: [
"cronet_aml_components_cronet_cronet_buildflags__testing",
- "cronet_aml_components_cronet_cronet_version_header_action__testing",
- "cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen_headers",
+ ],
+ export_generated_headers: [
+ "cronet_aml_components_cronet_cronet_buildflags__testing",
],
defaults: [
"cronet_aml_defaults",
@@ -8636,6 +9159,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -8664,7 +9208,7 @@
}
// GN: //components/cronet:cronet_common_unittests__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_components_cronet_cronet_common_unittests__testing",
srcs: [
"components/cronet/host_cache_persistence_manager_unittest.cc",
@@ -8682,25 +9226,91 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_test_test_support__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_components_cronet_cronet_common__testing",
+ "cronet_aml_components_cronet_cronet_version_header__testing",
+ "cronet_aml_components_metrics_library_support__testing",
"cronet_aml_components_prefs_prefs__testing",
"cronet_aml_components_prefs_test_support__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_dns_test_support__testing",
"cronet_aml_net_gtest_util__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
+ "cronet_aml_net_quic_test_flags_utils__testing",
+ "cronet_aml_net_simple_quic_tools__testing",
"cronet_aml_net_test_support__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
"cronet_aml_net_third_party_quiche_quiche_tool_support__testing",
+ "cronet_aml_net_tools_tld_cleanup_tld_cleanup__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -8711,11 +9321,6 @@
"cronet_aml_third_party_protobuf_protobuf_lite__testing",
"cronet_aml_url_url__testing",
],
- generated_headers: [
- "cronet_aml_components_cronet_cronet_buildflags__testing",
- "cronet_aml_components_cronet_cronet_version_header_action__testing",
- "cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen_headers",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -8782,6 +9387,181 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
+ target: {
+ android_arm: {
+ cflags: [
+ "-fstack-protector",
+ ],
+ },
+ android_arm64: {
+ cflags: [
+ "-fstack-protector",
+ "-mno-outline",
+ "-mno-outline-atomics",
+ ],
+ },
+ android_x86: {
+ cflags: [
+ "-msse3",
+ ],
+ },
+ android_x86_64: {
+ cflags: [
+ "-fstack-protector",
+ "-msse3",
+ ],
+ },
+ },
+}
+
+// GN: //components/cronet:cronet_version_header
+cc_library_static {
+ name: "cronet_aml_components_cronet_cronet_version_header",
+ generated_headers: [
+ "cronet_aml_components_cronet_cronet_version_header_action",
+ ],
+ export_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",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
+ "-DHAVE_SYS_UIO_H",
+ "-DNDEBUG",
+ "-DNO_UNWIND_TABLES",
+ "-DNVALGRIND",
+ "-DOFFICIAL_BUILD",
+ "-D_FORTIFY_SOURCE=2",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ "-Oz",
+ "-fdata-sections",
+ "-ffunction-sections",
+ "-fno-asynchronous-unwind-tables",
+ "-fno-unwind-tables",
+ "-fvisibility-inlines-hidden",
+ "-fvisibility=hidden",
+ "-g1",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ ],
+ cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
+ target: {
+ android_arm: {
+ cflags: [
+ "-fstack-protector",
+ ],
+ },
+ android_arm64: {
+ cflags: [
+ "-fstack-protector",
+ "-mno-outline",
+ "-mno-outline-atomics",
+ ],
+ },
+ android_x86: {
+ cflags: [
+ "-msse3",
+ ],
+ },
+ android_x86_64: {
+ cflags: [
+ "-fstack-protector",
+ "-msse3",
+ ],
+ },
+ },
+}
+
+// GN: //components/cronet:cronet_version_header__testing
+cc_library_static {
+ name: "cronet_aml_components_cronet_cronet_version_header__testing",
+ generated_headers: [
+ "cronet_aml_components_cronet_cronet_version_header_action__testing",
+ ],
+ export_generated_headers: [
+ "cronet_aml_components_cronet_cronet_version_header_action__testing",
+ ],
+ 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",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
+ "-DHAVE_SYS_UIO_H",
+ "-DNDEBUG",
+ "-DNO_UNWIND_TABLES",
+ "-DNVALGRIND",
+ "-DOFFICIAL_BUILD",
+ "-D_FORTIFY_SOURCE=2",
+ "-D_GNU_SOURCE",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ "-Oz",
+ "-fdata-sections",
+ "-ffunction-sections",
+ "-fno-asynchronous-unwind-tables",
+ "-fno-unwind-tables",
+ "-fvisibility-inlines-hidden",
+ "-fvisibility=hidden",
+ "-g1",
+ ],
+ local_include_dirs: [
+ "./",
+ "buildtools/third_party/libc++/",
+ "buildtools/third_party/libc++/trunk/include",
+ "buildtools/third_party/libc++abi/trunk/include",
+ ],
+ cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -8862,7 +9642,7 @@
}
// GN: //components/cronet:metrics_util
-cc_object {
+cc_library_static {
name: "cronet_aml_components_cronet_metrics_util",
srcs: [
"components/cronet/metrics_util.cc",
@@ -8875,9 +9655,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -8921,6 +9752,27 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -8949,7 +9801,7 @@
}
// GN: //components/cronet:metrics_util__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_components_cronet_metrics_util__testing",
srcs: [
"components/cronet/metrics_util.cc",
@@ -8962,9 +9814,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -9008,6 +9911,27 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -9036,7 +9960,7 @@
}
// GN: //components/metrics:library_support
-cc_object {
+cc_library_static {
name: "cronet_aml_components_metrics_library_support",
srcs: [
":cronet_aml_third_party_metrics_proto_metrics_proto_gen",
@@ -9052,9 +9976,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -9064,6 +10039,9 @@
generated_headers: [
"cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
],
+ export_generated_headers: [
+ "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -9107,6 +10085,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -9135,7 +10134,7 @@
}
// GN: //components/metrics:library_support__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_components_metrics_library_support__testing",
srcs: [
":cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen",
@@ -9151,9 +10150,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -9163,6 +10213,9 @@
generated_headers: [
"cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen_headers",
],
+ export_generated_headers: [
+ "cronet_aml_third_party_metrics_proto_metrics_proto__testing_gen_headers",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -9206,6 +10259,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -9333,9 +10407,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -9474,9 +10599,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -9585,55 +10761,6 @@
cc_library_static {
name: "cronet_aml_components_prefs_test_support__testing",
srcs: [
- ":cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
- ":cronet_aml_third_party_googletest_gmock__testing",
- ":cronet_aml_third_party_googletest_gtest__testing",
"components/prefs/mock_pref_change_callback.cc",
"components/prefs/pref_store_observer_mock.cc",
"components/prefs/pref_test_utils.cc",
@@ -9650,14 +10777,67 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_test_test_support__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_components_prefs_prefs__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -9666,12 +10846,6 @@
"cronet_aml_third_party_libxml_xml_reader__testing",
"cronet_aml_third_party_modp_b64_modp_b64__testing",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
- export_generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -9856,9 +11030,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -9985,9 +11210,58 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -10048,6 +11322,10 @@
],
},
android_arm: {
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -10074,6 +11352,10 @@
],
},
android_arm64: {
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -10102,6 +11384,10 @@
],
},
android_x86: {
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -10128,6 +11414,10 @@
],
},
android_x86_64: {
+ static_libs: [
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
+ ],
cflags: [
"-DANDROID",
"-DANDROID_NDK_VERSION_ROLL=r23_1",
@@ -11094,7 +12384,7 @@
}
// GN: //net/dns:dns
-cc_object {
+cc_library_static {
name: "cronet_aml_net_dns_dns",
srcs: [
"net/dns/address_info.cc",
@@ -11144,13 +12434,68 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"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_dns_public_public",
+ "cronet_aml_net_net_deps",
+ "cronet_aml_net_net_public_deps",
"cronet_aml_net_preload_decoder",
"cronet_aml_net_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -11160,18 +12505,6 @@
"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",
],
@@ -11221,6 +12554,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -11249,7 +12603,7 @@
}
// GN: //net/dns:dns__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_dns_dns__testing",
srcs: [
"net/dns/address_info.cc",
@@ -11299,13 +12653,68 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -11315,18 +12724,6 @@
"cronet_aml_third_party_protobuf_protobuf_lite__testing",
"cronet_aml_url_url__testing",
],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
- "cronet_aml_net_buildflags__testing",
- "cronet_aml_net_isolation_info_proto__testing_gen_headers",
- "cronet_aml_net_net_jni_headers__testing",
- "cronet_aml_net_net_nqe_proto__testing_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto__testing_gen_headers",
- "cronet_aml_url_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -11376,6 +12773,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -11404,7 +12822,7 @@
}
// GN: //net/dns/public:public
-cc_object {
+cc_library_static {
name: "cronet_aml_net_dns_public_public",
srcs: [
"net/dns/public/dns_config_overrides.cc",
@@ -11425,13 +12843,67 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"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_net_deps",
+ "cronet_aml_net_net_public_deps",
"cronet_aml_net_preload_decoder",
"cronet_aml_net_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -11441,18 +12913,6 @@
"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",
],
@@ -11502,6 +12962,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -11530,7 +13011,7 @@
}
// GN: //net/dns/public:public__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_dns_public_public__testing",
srcs: [
"net/dns/public/dns_config_overrides.cc",
@@ -11551,13 +13032,67 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -11567,18 +13102,6 @@
"cronet_aml_third_party_protobuf_protobuf_lite__testing",
"cronet_aml_url_url__testing",
],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
- "cronet_aml_net_buildflags__testing",
- "cronet_aml_net_isolation_info_proto__testing_gen_headers",
- "cronet_aml_net_net_jni_headers__testing",
- "cronet_aml_net_net_nqe_proto__testing_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto__testing_gen_headers",
- "cronet_aml_url_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -11628,6 +13151,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -11656,7 +13200,7 @@
}
// GN: //net/dns:test_support__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_dns_test_support__testing",
srcs: [
"net/dns/dns_test_util.cc",
@@ -11672,17 +13216,76 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -11690,9 +13293,6 @@
"cronet_aml_third_party_protobuf_protobuf_lite__testing",
"cronet_aml_url_url__testing",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -11748,6 +13348,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -11798,55 +13419,6 @@
cc_library_static {
name: "cronet_aml_net_gtest_util__testing",
srcs: [
- ":cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
- ":cronet_aml_third_party_googletest_gmock__testing",
- ":cronet_aml_third_party_googletest_gtest__testing",
"net/test/scoped_disable_exit_on_dfatal.cc",
],
shared_libs: [
@@ -11859,20 +13431,79 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_test_test_support__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -11883,12 +13514,6 @@
"cronet_aml_third_party_protobuf_protobuf_lite__testing",
"cronet_aml_url_url__testing",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
- export_generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -12003,7 +13628,7 @@
}
// GN: //net/http:transport_security_state_generated_files
-cc_object {
+cc_library_static {
name: "cronet_aml_net_http_transport_security_state_generated_files",
srcs: [
"net/http/transport_security_state.cc",
@@ -12017,13 +13642,69 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"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_dns_dns",
+ "cronet_aml_net_dns_public_public",
+ "cronet_aml_net_net_deps",
+ "cronet_aml_net_net_public_deps",
"cronet_aml_net_preload_decoder",
"cronet_aml_net_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -12034,17 +13715,10 @@
"cronet_aml_url_url",
],
generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
"cronet_aml_build_branding_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",
+ ],
+ export_generated_headers: [
+ "cronet_aml_build_branding_buildflags",
],
defaults: [
"cronet_aml_defaults",
@@ -12095,6 +13769,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -12123,7 +13818,7 @@
}
// GN: //net/http:transport_security_state_generated_files__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_http_transport_security_state_generated_files__testing",
srcs: [
"net/http/transport_security_state.cc",
@@ -12137,13 +13832,69 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -12154,17 +13905,10 @@
"cronet_aml_url_url__testing",
],
generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
"cronet_aml_build_branding_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
- "cronet_aml_net_buildflags__testing",
- "cronet_aml_net_isolation_info_proto__testing_gen_headers",
- "cronet_aml_net_net_jni_headers__testing",
- "cronet_aml_net_net_nqe_proto__testing_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto__testing_gen_headers",
- "cronet_aml_url_buildflags__testing",
+ ],
+ export_generated_headers: [
+ "cronet_aml_build_branding_buildflags__testing",
],
defaults: [
"cronet_aml_defaults",
@@ -12215,6 +13959,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -12399,12 +14164,6 @@
cc_library_static {
name: "cronet_aml_net_net",
srcs: [
- ":cronet_aml_net_dns_dns",
- ":cronet_aml_net_dns_public_public",
- ":cronet_aml_net_http_transport_security_state_generated_files",
- ":cronet_aml_net_net_deps",
- ":cronet_aml_net_net_public_deps",
- ":cronet_aml_net_traffic_annotation_traffic_annotation",
"net/android/android_http_util.cc",
"net/android/cert_verify_result_android.cc",
"net/android/gurl_utils.cc",
@@ -12897,13 +14656,70 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"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_dns_dns",
+ "cronet_aml_net_dns_public_public",
+ "cronet_aml_net_http_transport_security_state_generated_files",
+ "cronet_aml_net_net_deps",
+ "cronet_aml_net_net_public_deps",
"cronet_aml_net_preload_decoder",
"cronet_aml_net_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -12914,32 +14730,12 @@
"cronet_aml_url_url",
],
generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
- "cronet_aml_build_branding_buildflags",
"cronet_aml_build_chromeos_buildflags",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
- "cronet_aml_net_buildflags",
"cronet_aml_net_ios_cronet_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",
],
export_generated_headers: [
- "cronet_aml_base_debugging_buildflags",
- "cronet_aml_base_logging_buildflags",
- "cronet_aml_build_branding_buildflags",
"cronet_aml_build_chromeos_buildflags",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
- "cronet_aml_net_buildflags",
"cronet_aml_net_ios_cronet_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",
],
export_static_lib_headers: [
"cronet_aml_crypto_crypto",
@@ -13058,12 +14854,6 @@
cc_library_static {
name: "cronet_aml_net_net__testing",
srcs: [
- ":cronet_aml_net_dns_dns__testing",
- ":cronet_aml_net_dns_public_public__testing",
- ":cronet_aml_net_http_transport_security_state_generated_files__testing",
- ":cronet_aml_net_net_deps__testing",
- ":cronet_aml_net_net_public_deps__testing",
- ":cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"net/android/android_http_util.cc",
"net/android/cert_verify_result_android.cc",
"net/android/gurl_utils.cc",
@@ -13556,13 +15346,70 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -13573,32 +15420,12 @@
"cronet_aml_url_url__testing",
],
generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_branding_buildflags__testing",
"cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
- "cronet_aml_net_buildflags__testing",
"cronet_aml_net_ios_cronet_buildflags__testing",
- "cronet_aml_net_isolation_info_proto__testing_gen_headers",
- "cronet_aml_net_net_jni_headers__testing",
- "cronet_aml_net_net_nqe_proto__testing_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto__testing_gen_headers",
- "cronet_aml_url_buildflags__testing",
],
export_generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_branding_buildflags__testing",
"cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
- "cronet_aml_net_buildflags__testing",
"cronet_aml_net_ios_cronet_buildflags__testing",
- "cronet_aml_net_isolation_info_proto__testing_gen_headers",
- "cronet_aml_net_net_jni_headers__testing",
- "cronet_aml_net_net_nqe_proto__testing_gen_headers",
- "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto__testing_gen_headers",
- "cronet_aml_url_buildflags__testing",
],
defaults: [
"cronet_aml_defaults",
@@ -13710,7 +15537,7 @@
}
// GN: //net:net_deps
-cc_object {
+cc_library_static {
name: "cronet_aml_net_net_deps",
srcs: [
":cronet_aml_net_isolation_info_proto_gen",
@@ -13725,10 +15552,61 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
"cronet_aml_net_preload_decoder",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_brotli_common",
"cronet_aml_third_party_brotli_dec",
"cronet_aml_third_party_icu_icui18n",
@@ -13746,6 +15624,15 @@
"cronet_aml_net_net_jni_headers",
"cronet_aml_url_buildflags",
],
+ export_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_isolation_info_proto_gen_headers",
+ "cronet_aml_net_net_jni_headers",
+ "cronet_aml_url_buildflags",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -13792,6 +15679,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -13820,7 +15728,7 @@
}
// GN: //net:net_deps__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_net_deps__testing",
srcs: [
":cronet_aml_net_isolation_info_proto__testing_gen",
@@ -13835,10 +15743,61 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_net_preload_decoder__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -13856,6 +15815,15 @@
"cronet_aml_net_net_jni_headers__testing",
"cronet_aml_url_buildflags__testing",
],
+ export_generated_headers: [
+ "cronet_aml_base_debugging_buildflags__testing",
+ "cronet_aml_base_logging_buildflags__testing",
+ "cronet_aml_build_chromeos_buildflags__testing",
+ "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
+ "cronet_aml_net_isolation_info_proto__testing_gen_headers",
+ "cronet_aml_net_net_jni_headers__testing",
+ "cronet_aml_url_buildflags__testing",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -13902,6 +15870,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -14222,7 +16211,7 @@
}
// GN: //net:net_public_deps
-cc_object {
+cc_library_static {
name: "cronet_aml_net_net_public_deps",
srcs: [
":cronet_aml_net_net_nqe_proto_gen",
@@ -14238,12 +16227,64 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"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_third_party_quiche_quiche",
+ "cronet_aml_net_traffic_annotation_traffic_annotation",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -14252,7 +16293,11 @@
"cronet_aml_url_url",
],
generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
+ "cronet_aml_net_buildflags",
+ "cronet_aml_net_net_nqe_proto_gen_headers",
+ "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
+ ],
+ export_generated_headers: [
"cronet_aml_net_buildflags",
"cronet_aml_net_net_nqe_proto_gen_headers",
"cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
@@ -14303,6 +16348,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -14331,7 +16397,7 @@
}
// GN: //net:net_public_deps__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_net_public_deps__testing",
srcs: [
":cronet_aml_net_net_nqe_proto__testing_gen",
@@ -14347,12 +16413,64 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -14361,7 +16479,11 @@
"cronet_aml_url_url__testing",
],
generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
+ "cronet_aml_net_buildflags__testing",
+ "cronet_aml_net_net_nqe_proto__testing_gen_headers",
+ "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto__testing_gen_headers",
+ ],
+ export_generated_headers: [
"cronet_aml_net_buildflags__testing",
"cronet_aml_net_net_nqe_proto__testing_gen_headers",
"cronet_aml_net_third_party_quiche_net_quic_test_tools_proto__testing_gen_headers",
@@ -14412,6 +16534,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -14453,9 +16596,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -14561,9 +16755,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -14656,7 +16901,7 @@
}
// GN: //net:quic_test_flags_utils__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_quic_test_flags_utils__testing",
srcs: [
"net/quic/platform/impl/quic_test_flags_utils.cc",
@@ -14670,14 +16915,71 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -14733,6 +17035,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -14761,7 +17084,7 @@
}
// GN: //net:simple_quic_tools__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_simple_quic_tools__testing",
srcs: [
"net/tools/quic/quic_client_message_loop_network_helper.cc",
@@ -14781,15 +17104,72 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
"cronet_aml_net_third_party_quiche_quiche_tool_support__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -14845,6 +17225,27 @@
"third_party/protobuf/src/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -14876,60 +17277,6 @@
cc_library_static {
name: "cronet_aml_net_test_support__testing",
srcs: [
- ":cronet_aml_net_dns_test_support__testing",
- ":cronet_aml_net_quic_test_flags_utils__testing",
- ":cronet_aml_net_simple_quic_tools__testing",
- ":cronet_aml_net_tools_tld_cleanup_tld_cleanup__testing",
- ":cronet_aml_net_traffic_annotation_traffic_annotation__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
- ":cronet_aml_third_party_googletest_gmock__testing",
- ":cronet_aml_third_party_googletest_gtest__testing",
"net/base/connection_endpoint_metadata_test_util.cc",
"net/base/load_timing_info_test_util.cc",
"net/base/mock_file_stream.cc",
@@ -15016,22 +17363,85 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_test_test_support__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_dns_test_support__testing",
"cronet_aml_net_gtest_util__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
+ "cronet_aml_net_quic_test_flags_utils__testing",
+ "cronet_aml_net_simple_quic_tools__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
"cronet_aml_net_third_party_quiche_quiche_tool_support__testing",
+ "cronet_aml_net_tools_tld_cleanup_tld_cleanup__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -15043,11 +17453,9 @@
"cronet_aml_url_url__testing",
],
generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
"cronet_aml_net_http_transport_security_state_unittest_data_default__testing",
],
export_generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
"cronet_aml_net_http_transport_security_state_unittest_data_default__testing",
],
defaults: [
@@ -15349,53 +17757,6 @@
name: "cronet_aml_net_third_party_quiche_quiche",
srcs: [
":cronet_aml_net_third_party_quiche_net_quic_proto_gen",
- ":cronet_aml_third_party_abseil_cpp_absl_base_base",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
"net/third_party/quiche/overrides/quiche_platform_impl/quiche_mutex_impl.cc",
"net/third_party/quiche/overrides/quiche_platform_impl/quiche_time_utils_impl.cc",
"net/third_party/quiche/overrides/quiche_platform_impl/quiche_url_utils_impl.cc",
@@ -15687,10 +18048,61 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
"cronet_aml_net_uri_template",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -15699,11 +18111,9 @@
"cronet_aml_url_url",
],
generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
"cronet_aml_net_third_party_quiche_net_quic_proto_gen_headers",
],
export_generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
"cronet_aml_net_third_party_quiche_net_quic_proto_gen_headers",
],
defaults: [
@@ -15806,53 +18216,6 @@
name: "cronet_aml_net_third_party_quiche_quiche__testing",
srcs: [
":cronet_aml_net_third_party_quiche_net_quic_proto__testing_gen",
- ":cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
"net/third_party/quiche/overrides/quiche_platform_impl/quiche_mutex_impl.cc",
"net/third_party/quiche/overrides/quiche_platform_impl/quiche_time_utils_impl.cc",
"net/third_party/quiche/overrides/quiche_platform_impl/quiche_url_utils_impl.cc",
@@ -16144,10 +18507,61 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -16156,11 +18570,9 @@
"cronet_aml_url_url__testing",
],
generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
"cronet_aml_net_third_party_quiche_net_quic_proto__testing_gen_headers",
],
export_generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
"cronet_aml_net_third_party_quiche_net_quic_proto__testing_gen_headers",
],
defaults: [
@@ -16296,14 +18708,71 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_dns_dns__testing",
+ "cronet_aml_net_dns_public_public__testing",
+ "cronet_aml_net_http_transport_security_state_generated_files__testing",
"cronet_aml_net_net__testing",
+ "cronet_aml_net_net_deps__testing",
+ "cronet_aml_net_net_public_deps__testing",
"cronet_aml_net_preload_decoder__testing",
"cronet_aml_net_third_party_quiche_quiche__testing",
+ "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
"cronet_aml_net_uri_template__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_brotli_common__testing",
"cronet_aml_third_party_brotli_dec__testing",
"cronet_aml_third_party_icu_icui18n__testing",
@@ -16408,7 +18877,7 @@
}
// GN: //net/tools/huffman_trie:huffman_trie_generator_sources__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_tools_huffman_trie_huffman_trie_generator_sources__testing",
srcs: [
"net/tools/huffman_trie/bit_writer.cc",
@@ -16421,9 +18890,58 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -16475,10 +18993,15 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++20",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
}
// GN: //net/tools/tld_cleanup:tld_cleanup__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_tools_tld_cleanup_tld_cleanup__testing",
srcs: [
"net/tools/tld_cleanup/tld_cleanup_util.cc",
@@ -16491,9 +19014,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -16538,6 +19112,27 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -16569,20 +19164,69 @@
cc_binary {
name: "cronet_aml_net_tools_transport_security_state_generator_transport_security_state_generator__testing",
srcs: [
- ":cronet_aml_buildtools_third_party_libc___libc____testing",
- ":cronet_aml_buildtools_third_party_libc__abi_libc__abi__testing",
- ":cronet_aml_net_tools_huffman_trie_huffman_trie_generator_sources__testing",
- ":cronet_aml_net_tools_transport_security_state_generator_transport_security_state_generator_sources__testing",
"net/tools/transport_security_state_generator/transport_security_state_generator.cc",
],
static_libs: [
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_buildtools_third_party_libc___libc____testing",
+ "cronet_aml_buildtools_third_party_libc__abi_libc__abi__testing",
"cronet_aml_crypto_crypto__testing",
+ "cronet_aml_net_tools_huffman_trie_huffman_trie_generator_sources__testing",
+ "cronet_aml_net_tools_transport_security_state_generator_transport_security_state_generator_sources__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -16642,7 +19286,7 @@
}
// GN: //net/tools/transport_security_state_generator:transport_security_state_generator_sources__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_tools_transport_security_state_generator_transport_security_state_generator_sources__testing",
srcs: [
"net/tools/transport_security_state_generator/cert_util.cc",
@@ -16657,9 +19301,59 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_net_tools_huffman_trie_huffman_trie_generator_sources__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -16711,10 +19405,15 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++20",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
}
// GN: //net/traffic_annotation:traffic_annotation
-cc_object {
+cc_library_static {
name: "cronet_aml_net_traffic_annotation_traffic_annotation",
srcs: [
"net/traffic_annotation/network_traffic_annotation_android.cc",
@@ -16727,9 +19426,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -16738,6 +19488,9 @@
generated_headers: [
"cronet_aml_build_chromeos_buildflags",
],
+ export_generated_headers: [
+ "cronet_aml_build_chromeos_buildflags",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -16776,6 +19529,27 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -16804,7 +19578,7 @@
}
// GN: //net/traffic_annotation:traffic_annotation__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_net_traffic_annotation_traffic_annotation__testing",
srcs: [
"net/traffic_annotation/network_traffic_annotation_android.cc",
@@ -16817,9 +19591,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -16828,6 +19653,9 @@
generated_headers: [
"cronet_aml_build_chromeos_buildflags__testing",
],
+ export_generated_headers: [
+ "cronet_aml_build_chromeos_buildflags__testing",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -16866,6 +19694,27 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -16907,9 +19756,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -17016,9 +19916,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -17150,7 +20101,7 @@
}
// GN: //testing/android/native_test:native_test_native_code__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_testing_android_native_test_native_test_native_code__testing",
srcs: [
"testing/android/native_test/native_test_jni_onload.cc",
@@ -17165,13 +20116,67 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_test_test_support__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_testing_android_native_test_native_test_support__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -17180,12 +20185,6 @@
"cronet_aml_third_party_libxml_xml_reader__testing",
"cronet_aml_third_party_modp_b64_modp_b64__testing",
],
- generated_headers: [
- "cronet_aml_base_debugging_buildflags__testing",
- "cronet_aml_base_logging_buildflags__testing",
- "cronet_aml_build_chromeos_buildflags__testing",
- "cronet_aml_testing_android_native_test_native_test_jni_headers__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -17224,6 +20223,27 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -17252,7 +20272,7 @@
}
// GN: //testing/android/native_test:native_test_support__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_testing_android_native_test_native_test_support__testing",
srcs: [
"testing/android/native_test/main_runner.cc",
@@ -17269,13 +20289,66 @@
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
"cronet_aml_base_i18n__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_test_test_config__testing",
"cronet_aml_base_test_test_support__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
"cronet_aml_testing_gtest_gtest__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_ced_ced__testing",
+ "cronet_aml_third_party_googletest_gmock__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
@@ -17290,6 +20363,12 @@
"cronet_aml_build_chromeos_buildflags__testing",
"cronet_aml_testing_android_native_test_native_test_jni_headers__testing",
],
+ export_generated_headers: [
+ "cronet_aml_base_debugging_buildflags__testing",
+ "cronet_aml_base_logging_buildflags__testing",
+ "cronet_aml_build_chromeos_buildflags__testing",
+ "cronet_aml_testing_android_native_test_native_test_jni_headers__testing",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -17347,6 +20426,27 @@
"third_party/icu/source/i18n/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -17378,54 +20478,6 @@
cc_library_static {
name: "cronet_aml_testing_gtest_gtest__testing",
srcs: [
- ":cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
- ":cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
- ":cronet_aml_third_party_googletest_gtest__testing",
"testing/gtest/empty.cc",
"testing/multiprocess_func_list.cc",
],
@@ -17437,20 +20489,66 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
"cronet_aml_third_party_modp_b64_modp_b64__testing",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
- export_generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -17545,7 +20643,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:base
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_base",
srcs: [
"third_party/abseil-cpp/absl/base/internal/cycleclock.cc",
@@ -17554,6 +20652,11 @@
"third_party/abseil-cpp/absl/base/internal/thread_identity.cc",
"third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -17589,6 +20692,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -17617,7 +20725,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:base__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
srcs: [
"third_party/abseil-cpp/absl/base/internal/cycleclock.cc",
@@ -17626,6 +20734,11 @@
"third_party/abseil-cpp/absl/base/internal/thread_identity.cc",
"third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -17657,6 +20770,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -17716,7 +20834,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:log_severity
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
srcs: [
"third_party/abseil-cpp/absl/base/log_severity.cc",
@@ -17756,6 +20874,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -17784,7 +20907,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:log_severity__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
srcs: [
"third_party/abseil-cpp/absl/base/log_severity.cc",
@@ -17820,6 +20943,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -17879,11 +21007,17 @@
}
// GN: //third_party/abseil-cpp/absl/base:malloc_internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
srcs: [
"third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -17919,6 +21053,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -17947,11 +21086,17 @@
}
// GN: //third_party/abseil-cpp/absl/base:malloc_internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -17983,6 +21128,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18042,11 +21192,14 @@
}
// GN: //third_party/abseil-cpp/absl/base:raw_logging_internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
srcs: [
"third_party/abseil-cpp/absl/base/internal/raw_logging.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -18082,6 +21235,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18110,11 +21268,14 @@
}
// GN: //third_party/abseil-cpp/absl/base:raw_logging_internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/base/internal/raw_logging.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -18146,6 +21307,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18205,7 +21371,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:spinlock_wait
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
srcs: [
"third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc",
@@ -18245,6 +21411,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18273,7 +21444,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:spinlock_wait__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
srcs: [
"third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc",
@@ -18309,6 +21480,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18368,7 +21544,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:strerror
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
srcs: [
"third_party/abseil-cpp/absl/base/internal/strerror.cc",
@@ -18408,6 +21584,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18436,7 +21617,7 @@
}
// GN: //third_party/abseil-cpp/absl/base:strerror__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
srcs: [
"third_party/abseil-cpp/absl/base/internal/strerror.cc",
@@ -18472,6 +21653,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18531,11 +21717,15 @@
}
// GN: //third_party/abseil-cpp/absl/base:throw_delegate
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
srcs: [
"third_party/abseil-cpp/absl/base/internal/throw_delegate.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -18571,6 +21761,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18599,11 +21794,15 @@
}
// GN: //third_party/abseil-cpp/absl/base:throw_delegate__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
srcs: [
"third_party/abseil-cpp/absl/base/internal/throw_delegate.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -18635,6 +21834,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18694,12 +21898,33 @@
}
// GN: //third_party/abseil-cpp/absl/container:hashtablez_sampler
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
srcs: [
"third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc",
"third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -18735,6 +21960,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18763,12 +21993,33 @@
}
// GN: //third_party/abseil-cpp/absl/container:hashtablez_sampler__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
srcs: [
"third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc",
"third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -18800,6 +22051,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18859,11 +22115,34 @@
}
// GN: //third_party/abseil-cpp/absl/container:raw_hash_set
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
srcs: [
"third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -18899,6 +22178,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -18927,11 +22211,34 @@
}
// GN: //third_party/abseil-cpp/absl/container:raw_hash_set__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
srcs: [
"third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -18963,6 +22270,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19022,13 +22334,17 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:debugging_internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
srcs: [
"third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc",
"third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc",
"third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -19064,6 +22380,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19092,13 +22413,17 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:debugging_internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc",
"third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc",
"third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -19130,6 +22455,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19189,11 +22519,17 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:demangle_internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
srcs: [
"third_party/abseil-cpp/absl/debugging/internal/demangle.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -19229,6 +22565,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19257,11 +22598,17 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:demangle_internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/debugging/internal/demangle.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -19293,6 +22640,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19352,11 +22704,26 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:examine_stack
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
srcs: [
"third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -19392,6 +22759,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19420,11 +22792,26 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:examine_stack__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
srcs: [
"third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -19456,6 +22843,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19515,11 +22907,27 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:failure_signal_handler
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
srcs: [
"third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -19555,6 +22963,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19583,11 +22996,27 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:failure_signal_handler__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
srcs: [
"third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -19619,6 +23048,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19678,11 +23112,16 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:stacktrace
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
srcs: [
"third_party/abseil-cpp/absl/debugging/stacktrace.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -19718,6 +23157,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19746,11 +23190,16 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:stacktrace__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
srcs: [
"third_party/abseil-cpp/absl/debugging/stacktrace.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -19782,6 +23231,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19841,11 +23295,24 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:symbolize
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
srcs: [
"third_party/abseil-cpp/absl/debugging/symbolize.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -19881,6 +23348,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -19909,11 +23381,24 @@
}
// GN: //third_party/abseil-cpp/absl/debugging:symbolize__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
srcs: [
"third_party/abseil-cpp/absl/debugging/symbolize.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -19945,6 +23430,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20004,11 +23494,17 @@
}
// GN: //third_party/abseil-cpp/absl/hash:city
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_hash_city",
srcs: [
"third_party/abseil-cpp/absl/hash/internal/city.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -20044,6 +23540,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20072,11 +23573,17 @@
}
// GN: //third_party/abseil-cpp/absl/hash:city__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
srcs: [
"third_party/abseil-cpp/absl/hash/internal/city.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -20108,6 +23615,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20167,11 +23679,25 @@
}
// GN: //third_party/abseil-cpp/absl/hash:hash
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
srcs: [
"third_party/abseil-cpp/absl/hash/internal/hash.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -20207,6 +23733,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20235,11 +23766,25 @@
}
// GN: //third_party/abseil-cpp/absl/hash:hash__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
srcs: [
"third_party/abseil-cpp/absl/hash/internal/hash.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -20271,6 +23816,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20330,11 +23880,18 @@
}
// GN: //third_party/abseil-cpp/absl/hash:low_level_hash
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
srcs: [
"third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -20370,6 +23927,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20398,11 +23960,18 @@
}
// GN: //third_party/abseil-cpp/absl/hash:low_level_hash__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
srcs: [
"third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -20434,6 +24003,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20493,7 +24067,7 @@
}
// GN: //third_party/abseil-cpp/absl/numeric:int128
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
srcs: [
"third_party/abseil-cpp/absl/numeric/int128.cc",
@@ -20533,6 +24107,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20561,7 +24140,7 @@
}
// GN: //third_party/abseil-cpp/absl/numeric:int128__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
srcs: [
"third_party/abseil-cpp/absl/numeric/int128.cc",
@@ -20597,6 +24176,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20656,7 +24240,7 @@
}
// GN: //third_party/abseil-cpp/absl/profiling:exponential_biased
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
srcs: [
"third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc",
@@ -20696,6 +24280,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20724,7 +24313,7 @@
}
// GN: //third_party/abseil-cpp/absl/profiling:exponential_biased__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
srcs: [
"third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc",
@@ -20760,6 +24349,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20819,12 +24413,22 @@
}
// GN: //third_party/abseil-cpp/absl/random:distributions
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
srcs: [
"third_party/abseil-cpp/absl/random/discrete_distribution.cc",
"third_party/abseil-cpp/absl/random/gaussian_distribution.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -20860,6 +24464,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20888,12 +24497,22 @@
}
// GN: //third_party/abseil-cpp/absl/random:distributions__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
srcs: [
"third_party/abseil-cpp/absl/random/discrete_distribution.cc",
"third_party/abseil-cpp/absl/random/gaussian_distribution.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -20925,6 +24544,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -20984,7 +24608,7 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:platform
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_round_keys.cc",
@@ -20992,6 +24616,9 @@
generated_headers: [
"cronet_aml_build_chromeos_buildflags",
],
+ export_generated_headers: [
+ "cronet_aml_build_chromeos_buildflags",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -21027,6 +24654,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21055,7 +24687,7 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:platform__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_round_keys.cc",
@@ -21064,6 +24696,9 @@
generated_headers: [
"cronet_aml_build_chromeos_buildflags__testing",
],
+ export_generated_headers: [
+ "cronet_aml_build_chromeos_buildflags__testing",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -21094,6 +24729,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21153,13 +24793,28 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:pool_urbg
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
srcs: [
"third_party/abseil-cpp/absl/random/internal/pool_urbg.cc",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
],
defaults: [
"cronet_aml_defaults",
@@ -21196,6 +24851,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21224,15 +24884,30 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:pool_urbg__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
srcs: [
"third_party/abseil-cpp/absl/random/internal/pool_urbg.cc",
],
- host_supported: true,
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
],
+ host_supported: true,
defaults: [
"cronet_aml_defaults",
],
@@ -21263,6 +24938,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21322,13 +25002,21 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen.cc",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
],
defaults: [
"cronet_aml_defaults",
@@ -21365,6 +25053,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21393,15 +25086,23 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen.cc",
],
- host_supported: true,
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
],
+ host_supported: true,
defaults: [
"cronet_aml_defaults",
],
@@ -21432,6 +25133,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21491,13 +25197,15 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_detect.cc",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
],
defaults: [
"cronet_aml_defaults",
@@ -21534,6 +25242,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21562,15 +25275,17 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_detect.cc",
],
- host_supported: true,
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
],
+ host_supported: true,
defaults: [
"cronet_aml_defaults",
],
@@ -21601,6 +25316,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21660,13 +25380,14 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes_impl
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_hwaes.cc",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
],
defaults: [
"cronet_aml_defaults",
@@ -21703,6 +25424,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21731,15 +25457,16 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen_hwaes_impl__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_hwaes.cc",
],
- host_supported: true,
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
],
+ host_supported: true,
defaults: [
"cronet_aml_defaults",
],
@@ -21770,6 +25497,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21829,13 +25561,18 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen_slow
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_slow.cc",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
],
defaults: [
"cronet_aml_defaults",
@@ -21872,6 +25609,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21900,15 +25642,20 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:randen_slow__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
srcs: [
"third_party/abseil-cpp/absl/random/internal/randen_slow.cc",
],
- host_supported: true,
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
],
+ host_supported: true,
defaults: [
"cronet_aml_defaults",
],
@@ -21939,6 +25686,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -21998,11 +25750,22 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:seed_material
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
srcs: [
"third_party/abseil-cpp/absl/random/internal/seed_material.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -22038,6 +25801,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22066,11 +25834,22 @@
}
// GN: //third_party/abseil-cpp/absl/random/internal:seed_material__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
srcs: [
"third_party/abseil-cpp/absl/random/internal/seed_material.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -22102,6 +25881,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22161,7 +25945,7 @@
}
// GN: //third_party/abseil-cpp/absl/random:seed_gen_exception
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
srcs: [
"third_party/abseil-cpp/absl/random/seed_gen_exception.cc",
@@ -22201,6 +25985,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22229,7 +26018,7 @@
}
// GN: //third_party/abseil-cpp/absl/random:seed_gen_exception__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
srcs: [
"third_party/abseil-cpp/absl/random/seed_gen_exception.cc",
@@ -22265,6 +26054,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22324,13 +26118,29 @@
}
// GN: //third_party/abseil-cpp/absl/random:seed_sequences
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
srcs: [
"third_party/abseil-cpp/absl/random/seed_sequences.cc",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
],
defaults: [
"cronet_aml_defaults",
@@ -22367,6 +26177,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22395,15 +26210,31 @@
}
// GN: //third_party/abseil-cpp/absl/random:seed_sequences__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
srcs: [
"third_party/abseil-cpp/absl/random/seed_sequences.cc",
],
- host_supported: true,
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
],
+ host_supported: true,
defaults: [
"cronet_aml_defaults",
],
@@ -22434,6 +26265,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22493,12 +26329,41 @@
}
// GN: //third_party/abseil-cpp/absl/status:status
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_status_status",
srcs: [
"third_party/abseil-cpp/absl/status/status.cc",
"third_party/abseil-cpp/absl/status/status_payload_printer.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -22534,6 +26399,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22562,12 +26432,41 @@
}
// GN: //third_party/abseil-cpp/absl/status:status__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
srcs: [
"third_party/abseil-cpp/absl/status/status.cc",
"third_party/abseil-cpp/absl/status/status_payload_printer.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -22599,6 +26498,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22658,11 +26562,42 @@
}
// GN: //third_party/abseil-cpp/absl/status:statusor
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
srcs: [
"third_party/abseil-cpp/absl/status/statusor.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -22698,6 +26633,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22726,11 +26666,42 @@
}
// GN: //third_party/abseil-cpp/absl/status:statusor__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
srcs: [
"third_party/abseil-cpp/absl/status/statusor.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -22762,6 +26733,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22821,13 +26797,40 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cord
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
srcs: [
"third_party/abseil-cpp/absl/strings/cord.cc",
"third_party/abseil-cpp/absl/strings/cord_analysis.cc",
"third_party/abseil-cpp/absl/strings/cord_buffer.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -22863,6 +26866,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22891,13 +26899,40 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cord__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/cord.cc",
"third_party/abseil-cpp/absl/strings/cord_analysis.cc",
"third_party/abseil-cpp/absl/strings/cord_buffer.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -22929,6 +26964,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -22988,7 +27028,7 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cord_internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cord_internal.cc",
@@ -22999,6 +27039,16 @@
"third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc",
"third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -23034,6 +27084,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23062,7 +27117,7 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cord_internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cord_internal.cc",
@@ -23073,6 +27128,16 @@
"third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc",
"third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -23104,6 +27169,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23163,11 +27233,16 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cordz_functions
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -23203,6 +27278,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23231,11 +27311,16 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cordz_functions__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -23267,6 +27352,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23326,11 +27416,31 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cordz_handle
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -23366,6 +27476,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23394,11 +27509,31 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cordz_handle__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -23430,6 +27565,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23489,11 +27629,35 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cordz_info
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cordz_info.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -23529,6 +27693,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23557,11 +27726,35 @@
}
// GN: //third_party/abseil-cpp/absl/strings:cordz_info__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/cordz_info.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -23593,6 +27786,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23652,13 +27850,19 @@
}
// GN: //third_party/abseil-cpp/absl/strings:internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/escaping.cc",
"third_party/abseil-cpp/absl/strings/internal/ostringstream.cc",
"third_party/abseil-cpp/absl/strings/internal/utf8.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -23694,6 +27898,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23722,13 +27931,19 @@
}
// GN: //third_party/abseil-cpp/absl/strings:internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/escaping.cc",
"third_party/abseil-cpp/absl/strings/internal/ostringstream.cc",
"third_party/abseil-cpp/absl/strings/internal/utf8.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -23760,6 +27975,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23819,7 +28039,7 @@
}
// GN: //third_party/abseil-cpp/absl/strings:str_format_internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc",
@@ -23829,6 +28049,17 @@
"third_party/abseil-cpp/absl/strings/internal/str_format/output.cc",
"third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -23864,6 +28095,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23892,7 +28128,7 @@
}
// GN: //third_party/abseil-cpp/absl/strings:str_format_internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc",
@@ -23902,6 +28138,17 @@
"third_party/abseil-cpp/absl/strings/internal/str_format/output.cc",
"third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -23933,6 +28180,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -23992,7 +28244,7 @@
}
// GN: //third_party/abseil-cpp/absl/strings:strings
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
srcs: [
"third_party/abseil-cpp/absl/strings/ascii.cc",
@@ -24009,6 +28261,15 @@
"third_party/abseil-cpp/absl/strings/string_view.cc",
"third_party/abseil-cpp/absl/strings/substitute.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -24044,6 +28305,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24072,7 +28338,7 @@
}
// GN: //third_party/abseil-cpp/absl/strings:strings__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
srcs: [
"third_party/abseil-cpp/absl/strings/ascii.cc",
@@ -24089,6 +28355,15 @@
"third_party/abseil-cpp/absl/strings/string_view.cc",
"third_party/abseil-cpp/absl/strings/substitute.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -24120,6 +28395,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24179,11 +28459,18 @@
}
// GN: //third_party/abseil-cpp/absl/synchronization:graphcycles_internal
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
srcs: [
"third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -24219,6 +28506,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24247,11 +28539,18 @@
}
// GN: //third_party/abseil-cpp/absl/synchronization:graphcycles_internal__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
srcs: [
"third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -24283,6 +28582,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24342,7 +28646,7 @@
}
// GN: //third_party/abseil-cpp/absl/synchronization:synchronization
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
srcs: [
"third_party/abseil-cpp/absl/synchronization/barrier.cc",
@@ -24353,6 +28657,25 @@
"third_party/abseil-cpp/absl/synchronization/mutex.cc",
"third_party/abseil-cpp/absl/synchronization/notification.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -24388,6 +28711,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24416,7 +28744,7 @@
}
// GN: //third_party/abseil-cpp/absl/synchronization:synchronization__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
srcs: [
"third_party/abseil-cpp/absl/synchronization/barrier.cc",
@@ -24427,6 +28755,25 @@
"third_party/abseil-cpp/absl/synchronization/mutex.cc",
"third_party/abseil-cpp/absl/synchronization/notification.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -24458,6 +28805,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24517,7 +28869,7 @@
}
// GN: //third_party/abseil-cpp/absl/time/internal/cctz:civil_time
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
srcs: [
"third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc",
@@ -24557,6 +28909,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24585,7 +28942,7 @@
}
// GN: //third_party/abseil-cpp/absl/time/internal/cctz:civil_time__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
srcs: [
"third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc",
@@ -24621,6 +28978,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24680,7 +29042,7 @@
}
// GN: //third_party/abseil-cpp/absl/time/internal/cctz:time_zone
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
srcs: [
"third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc",
@@ -24693,6 +29055,9 @@
"third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc",
"third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -24728,6 +29093,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24756,7 +29126,7 @@
}
// GN: //third_party/abseil-cpp/absl/time/internal/cctz:time_zone__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
srcs: [
"third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc",
@@ -24769,6 +29139,9 @@
"third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc",
"third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -24800,6 +29173,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24859,7 +29237,7 @@
}
// GN: //third_party/abseil-cpp/absl/time:time
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_time_time",
srcs: [
"third_party/abseil-cpp/absl/time/civil_time.cc",
@@ -24868,6 +29246,18 @@
"third_party/abseil-cpp/absl/time/format.cc",
"third_party/abseil-cpp/absl/time/time.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -24903,6 +29293,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -24931,7 +29326,7 @@
}
// GN: //third_party/abseil-cpp/absl/time:time__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
srcs: [
"third_party/abseil-cpp/absl/time/civil_time.cc",
@@ -24940,6 +29335,18 @@
"third_party/abseil-cpp/absl/time/format.cc",
"third_party/abseil-cpp/absl/time/time.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -24971,6 +29378,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25030,11 +29442,15 @@
}
// GN: //third_party/abseil-cpp/absl/types:bad_optional_access
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
srcs: [
"third_party/abseil-cpp/absl/types/bad_optional_access.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -25070,6 +29486,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25098,11 +29519,15 @@
}
// GN: //third_party/abseil-cpp/absl/types:bad_optional_access__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
srcs: [
"third_party/abseil-cpp/absl/types/bad_optional_access.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -25134,6 +29559,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25193,11 +29623,15 @@
}
// GN: //third_party/abseil-cpp/absl/types:bad_variant_access
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
srcs: [
"third_party/abseil-cpp/absl/types/bad_variant_access.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -25233,6 +29667,11 @@
"third_party/abseil-cpp/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25261,11 +29700,15 @@
}
// GN: //third_party/abseil-cpp/absl/types:bad_variant_access__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
srcs: [
"third_party/abseil-cpp/absl/types/bad_variant_access.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -25297,6 +29740,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/abseil-cpp/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25356,7 +29804,7 @@
}
// GN: //third_party/android_ndk:cpu_features
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_android_ndk_cpu_features",
srcs: [
"third_party/android_ndk/sources/android/cpufeatures/cpu-features.c",
@@ -25395,6 +29843,11 @@
"third_party/android_ndk/sources/android/cpufeatures/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25423,7 +29876,7 @@
}
// GN: //third_party/android_ndk:cpu_features__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_android_ndk_cpu_features__testing",
srcs: [
"third_party/android_ndk/sources/android/cpufeatures/cpu-features.c",
@@ -25462,6 +29915,11 @@
"third_party/android_ndk/sources/android/cpufeatures/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25490,7 +29948,7 @@
}
// GN: //third_party/ashmem:ashmem
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_ashmem_ashmem",
srcs: [
"third_party/ashmem/ashmem-dev.c",
@@ -25531,6 +29989,11 @@
"buildtools/third_party/libc++abi/trunk/include",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25559,7 +30022,7 @@
}
// GN: //third_party/ashmem:ashmem__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_ashmem_ashmem__testing",
srcs: [
"third_party/ashmem/ashmem-dev.c",
@@ -25600,6 +30063,11 @@
"buildtools/third_party/libc++abi/trunk/include",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
cflags: [
@@ -25631,7 +30099,6 @@
cc_library_static {
name: "cronet_aml_third_party_boringssl_boringssl",
srcs: [
- ":cronet_aml_third_party_boringssl_boringssl_asm",
"third_party/boringssl/err_data.c",
"third_party/boringssl/src/crypto/asn1/a_bitstr.c",
"third_party/boringssl/src/crypto/asn1/a_bool.c",
@@ -25899,6 +30366,9 @@
"third_party/boringssl/src/ssl/tls_method.cc",
"third_party/boringssl/src/ssl/tls_record.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_boringssl_boringssl_asm",
+ ],
defaults: [
"cronet_aml_defaults",
],
@@ -25973,7 +30443,6 @@
cc_library_static {
name: "cronet_aml_third_party_boringssl_boringssl__testing",
srcs: [
- ":cronet_aml_third_party_boringssl_boringssl_asm__testing",
"third_party/boringssl/err_data.c",
"third_party/boringssl/src/crypto/asn1/a_bitstr.c",
"third_party/boringssl/src/crypto/asn1/a_bool.c",
@@ -26241,6 +30710,9 @@
"third_party/boringssl/src/ssl/tls_method.cc",
"third_party/boringssl/src/ssl/tls_record.cc",
],
+ static_libs: [
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
+ ],
host_supported: true,
defaults: [
"cronet_aml_defaults",
@@ -26339,7 +30811,7 @@
}
// GN: //third_party/boringssl:boringssl_asm
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_boringssl_boringssl_asm",
defaults: [
"cronet_aml_defaults",
@@ -26378,6 +30850,11 @@
"third_party/boringssl/src/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
srcs: [
@@ -26473,7 +30950,7 @@
}
// GN: //third_party/boringssl:boringssl_asm__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_boringssl_boringssl_asm__testing",
host_supported: true,
defaults: [
@@ -26508,6 +30985,11 @@
"buildtools/third_party/libc++abi/trunk/include",
"third_party/boringssl/src/include/",
],
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ ],
target: {
android_arm: {
srcs: [
@@ -27049,7 +31531,7 @@
}
// GN: //third_party/googletest:gmock__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_googletest_gmock__testing",
srcs: [
"third_party/googletest/src/googlemock/src/gmock-cardinalities.cc",
@@ -27066,17 +31548,66 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
+ "cronet_aml_third_party_googletest_gtest__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
"cronet_aml_third_party_modp_b64_modp_b64__testing",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -27122,6 +31653,27 @@
"third_party/googletest/src/googletest/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -27150,7 +31702,7 @@
}
// GN: //third_party/googletest:gtest__testing
-cc_object {
+cc_library_static {
name: "cronet_aml_third_party_googletest_gtest__testing",
srcs: [
"third_party/googletest/custom/gtest/internal/custom/chrome_custom_temp_dir.cc",
@@ -27173,17 +31725,65 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
"cronet_aml_third_party_modp_b64_modp_b64__testing",
],
- generated_headers: [
- "cronet_aml_build_chromeos_buildflags__testing",
- ],
defaults: [
"cronet_aml_defaults",
],
@@ -27227,6 +31827,27 @@
"third_party/googletest/src/googletest/include/",
],
cpp_std: "c++17",
+ ldflags: [
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ "-Wl,--icf=all",
+ "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
+ "-Wl,-wrap,asprintf",
+ "-Wl,-wrap,calloc",
+ "-Wl,-wrap,free",
+ "-Wl,-wrap,getcwd",
+ "-Wl,-wrap,malloc",
+ "-Wl,-wrap,malloc_usable_size",
+ "-Wl,-wrap,memalign",
+ "-Wl,-wrap,posix_memalign",
+ "-Wl,-wrap,pvalloc",
+ "-Wl,-wrap,realloc",
+ "-Wl,-wrap,realpath",
+ "-Wl,-wrap,strdup",
+ "-Wl,-wrap,strndup",
+ "-Wl,-wrap,valloc",
+ "-Wl,-wrap,vasprintf",
+ ],
target: {
android_arm: {
cflags: [
@@ -29879,14 +34500,14 @@
cc_binary {
name: "cronet_aml_third_party_protobuf_protoc",
srcs: [
- ":cronet_aml_buildtools_third_party_libc___libc__",
- ":cronet_aml_buildtools_third_party_libc__abi_libc__abi",
"third_party/protobuf/src/google/protobuf/compiler/main.cc",
],
shared_libs: [
"libz",
],
static_libs: [
+ "cronet_aml_buildtools_third_party_libc___libc__",
+ "cronet_aml_buildtools_third_party_libc__abi_libc__abi",
"cronet_aml_third_party_protobuf_protobuf_full",
"cronet_aml_third_party_protobuf_protoc_lib",
],
@@ -30173,9 +34794,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc",
"cronet_aml_base_base",
"cronet_aml_base_base_static",
+ "cronet_aml_base_nodebug_assertion",
"cronet_aml_base_third_party_double_conversion_double_conversion",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access",
+ "cronet_aml_third_party_android_ndk_cpu_features",
+ "cronet_aml_third_party_ashmem_ashmem",
"cronet_aml_third_party_boringssl_boringssl",
+ "cronet_aml_third_party_boringssl_boringssl_asm",
"cronet_aml_third_party_icu_icui18n",
"cronet_aml_third_party_icu_icuuc_private",
"cronet_aml_third_party_libevent_libevent",
@@ -30317,9 +34989,60 @@
"cronet_aml_base_allocator_partition_allocator_partition_alloc__testing",
"cronet_aml_base_base__testing",
"cronet_aml_base_base_static__testing",
+ "cronet_aml_base_nodebug_assertion__testing",
"cronet_aml_base_third_party_double_conversion_double_conversion__testing",
"cronet_aml_base_third_party_dynamic_annotations_dynamic_annotations__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_base__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_log_severity__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_malloc_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_raw_logging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_spinlock_wait__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_strerror__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_base_throw_delegate__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_hashtablez_sampler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_container_raw_hash_set__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_debugging_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_demangle_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_examine_stack__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_failure_signal_handler__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_stacktrace__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_debugging_symbolize__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_city__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_hash_low_level_hash__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_numeric_int128__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_profiling_exponential_biased__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_distributions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_platform__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_pool_urbg__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_hwaes_impl__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_randen_slow__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_internal_seed_material__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_gen_exception__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_random_seed_sequences__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_status__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_status_statusor__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cord_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_functions__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_handle__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_cordz_info__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_str_format_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_strings_strings__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_graphcycles_internal__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_synchronization_synchronization__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_civil_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_internal_cctz_time_zone__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_time_time__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_optional_access__testing",
+ "cronet_aml_third_party_abseil_cpp_absl_types_bad_variant_access__testing",
+ "cronet_aml_third_party_android_ndk_cpu_features__testing",
+ "cronet_aml_third_party_ashmem_ashmem__testing",
"cronet_aml_third_party_boringssl_boringssl__testing",
+ "cronet_aml_third_party_boringssl_boringssl_asm__testing",
"cronet_aml_third_party_icu_icui18n__testing",
"cronet_aml_third_party_icu_icuuc_private__testing",
"cronet_aml_third_party_libevent_libevent__testing",
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 2c970a5..d714a90 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -549,7 +549,13 @@
return self.type == "cc_genrule"
def has_input_files(self):
- return len(self.srcs) > 0 or any([len(target.srcs) > 0 for target in self.target.values()])
+ if len(self.srcs) > 0:
+ return True
+ if any([len(target.srcs) > 0 for target in self.target.values()]):
+ return True
+ # Allow cc_static_library with export_generated_headers as those are crucial for
+ # the depending modules
+ return len(self.export_generated_headers) > 0
def merge_attribute(self, key, source_module, allowed_archs, source_key = None):
"""
@@ -591,8 +597,8 @@
def to_string(self, output):
for m in sorted(self.modules.values(), key=lambda m: m.name):
- if m.type != "cc_object" or m.has_input_files():
- # Don't print cc_object with empty srcs. These attributes are already
+ if m.type != "cc_library_static" or m.has_input_files():
+ # Don't print cc_library_static 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.
@@ -1345,10 +1351,9 @@
def set_module_flags(module, module_type, cflags, defines, ldflags, libs):
module.cflags.update(_get_cflags(cflags, defines))
- if module_type != 'cc_object':
- module.ldflags.update({flag for flag in ldflags
- if flag in ldflag_allowlist or flag.startswith("-Wl,-wrap,")})
- _set_linker_script(module, libs)
+ module.ldflags.update({flag for flag in ldflags
+ if flag in ldflag_allowlist or flag.startswith("-Wl,-wrap,")})
+ _set_linker_script(module, libs)
# TODO: implement proper cflag parsing.
for flag in cflags:
if '-std=' in flag:
@@ -1397,12 +1402,10 @@
# Can be used for both host and device targets.
module_type = 'cc_binary'
module = Module(module_type, bp_module_name, gn_target_name)
- elif target.type == 'static_library':
+ elif target.type in ['static_library', 'source_set']:
module = Module('cc_library_static', bp_module_name, gn_target_name)
elif target.type == 'shared_library':
module = Module('cc_library_shared', bp_module_name, gn_target_name)
- elif target.type == 'source_set':
- module = Module('cc_object', bp_module_name, gn_target_name)
elif target.type == 'group':
# "group" targets are resolved recursively by gn_utils.get_target().
# There's nothing we need to do at this level for them.
@@ -1525,27 +1528,21 @@
if not module.is_compiled() or module.is_genrule():
continue
+ # Drop compiled modules that doesn't provide any benefit. This is mostly
+ # applicable to source_sets when converted to cc_static_library, sometimes
+ # the source set only has header files which are dropped so the module becomes empty.
+ if dep_module.is_compiled() and not dep_module.has_input_files():
+ continue
+
if dep_module.type == 'cc_library_shared':
module.shared_libs.add(dep_module.name)
elif dep_module.type == 'cc_library_static':
module.static_libs.add(dep_module.name)
- elif dep_module.type == 'cc_object':
- module.merge_attribute('generated_headers', dep_module, target.arch.keys())
- if module.type != 'cc_object':
- if dep_module.has_input_files():
- # Only add it as part of srcs if the dep_module has input files otherwise
- # this would throw an error.
- module.srcs.add(":" + dep_module.name)
- module.merge_attribute('export_generated_headers', dep_module,
- target.arch.keys(), 'generated_headers')
elif dep_module.type == 'cc_genrule':
module.merge_attribute('generated_headers', dep_module, [], 'genrule_headers')
module.merge_attribute('srcs', dep_module, [], 'genrule_srcs')
module.merge_attribute('shared_libs', dep_module, [], 'genrule_shared_libs')
module.merge_attribute('header_libs', dep_module, [], 'genrule_header_libs')
- if module.type not in ["cc_object"]:
- module.merge_attribute('export_generated_headers', dep_module, [],
- 'genrule_headers')
elif dep_module.type == 'cc_binary':
continue # Ignore executables deps (used by cmdline integration tests).
else:
@@ -1563,20 +1560,13 @@
# Arch-specific dependencies currently only include cc_library_static.
# Revisit this approach once we need to support more target types.
if dep_module.type == 'cc_library_static':
- module.target[arch_name].static_libs.add(dep_module.name)
+ if dep_module.has_input_files():
+ module.target[arch_name].static_libs.add(dep_module.name)
elif dep_module.type == 'cc_genrule':
module.target[arch_name].generated_headers.update(dep_module.genrule_headers)
module.target[arch_name].srcs.update(dep_module.genrule_srcs)
module.target[arch_name].shared_libs.update(dep_module.genrule_shared_libs)
module.target[arch_name].header_libs.update(dep_module.genrule_header_libs)
- if module.type not in ["cc_object"]:
- module.target[arch_name].export_generated_headers.update(
- dep_module.genrule_headers)
- elif dep_module.type == 'cc_object':
- if dep_module.has_input_files():
- # Only add it as part of srcs if the dep_module has input files otherwise
- # this would throw an error.
- module.target[arch_name].srcs.add(":" + dep_module.name)
else:
raise Error('Unsupported arch-specific dependency %s of target %s with type %s' %
(dep_module.name, target.name, dep_module.type))
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index 09a7b80..4066673 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -429,14 +429,6 @@
target.transitive_proto_deps.add(dep.name)
target.proto_paths.update(dep.proto_paths)
target.transitive_proto_deps.update(dep.transitive_proto_deps)
- elif dep.type == 'source_set':
- target.arch[arch].source_set_deps.add(dep.name)
- 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.
elif dep.type in ['action', 'action_foreach', 'copy']:
@@ -450,12 +442,11 @@
# java_library.
pass
- # Source set bubble up transitive source sets but can't be combined with this
- # if they are combined then source sets will bubble up static libraries
- # while we only want to have source sets bubble up only source sets.
- if dep.type == 'static_library':
- # Bubble up static_libs. Necessary, since soong does not propagate
+ if dep.type in ['static_library', 'source_set']:
+ # Bubble up static_libs and source_set. Necessary, since soong does not propagate
# static_libs up the build tree.
+ # Source sets are later translated to static_libraries, so it makes sense
+ # to reuse transitive_static_libs_deps.
target.arch[arch].transitive_static_libs_deps.add(dep.name)
if arch in dep.arch: