diff --git a/Cronet/tests/cts/src/android/net/http/cts/ConnectionMigrationOptionsTest.kt b/Cronet/tests/cts/src/android/net/http/cts/ConnectionMigrationOptionsTest.kt
index 77cb30e..219db61 100644
--- a/Cronet/tests/cts/src/android/net/http/cts/ConnectionMigrationOptionsTest.kt
+++ b/Cronet/tests/cts/src/android/net/http/cts/ConnectionMigrationOptionsTest.kt
@@ -32,37 +32,37 @@
         val options =
                 ConnectionMigrationOptions.Builder().build()
 
-        assertEquals(MIGRATION_OPTION_UNSPECIFIED, options.allowNonDefaultNetworkUsageEnabled)
-        assertEquals(MIGRATION_OPTION_UNSPECIFIED, options.defaultNetworkMigrationEnabled)
-        assertEquals(MIGRATION_OPTION_UNSPECIFIED, options.pathDegradationMigrationEnabled)
+        assertEquals(MIGRATION_OPTION_UNSPECIFIED, options.allowNonDefaultNetworkUsage)
+        assertEquals(MIGRATION_OPTION_UNSPECIFIED, options.defaultNetworkMigration)
+        assertEquals(MIGRATION_OPTION_UNSPECIFIED, options.pathDegradationMigration)
     }
 
     @Test
     fun testConnectionMigrationOptions_enableDefaultNetworkMigration_returnSetValue() {
         val options =
             ConnectionMigrationOptions.Builder()
-                    .setDefaultNetworkMigrationEnabled(MIGRATION_OPTION_ENABLED)
+                    .setDefaultNetworkMigration(MIGRATION_OPTION_ENABLED)
                     .build()
 
-        assertEquals(MIGRATION_OPTION_ENABLED, options.defaultNetworkMigrationEnabled)
+        assertEquals(MIGRATION_OPTION_ENABLED, options.defaultNetworkMigration)
     }
 
     @Test
     fun testConnectionMigrationOptions_enablePathDegradationMigration_returnSetValue() {
         val options =
             ConnectionMigrationOptions.Builder()
-                    .setPathDegradationMigrationEnabled(MIGRATION_OPTION_ENABLED)
+                    .setPathDegradationMigration(MIGRATION_OPTION_ENABLED)
                     .build()
 
-        assertEquals(MIGRATION_OPTION_ENABLED, options.pathDegradationMigrationEnabled)
+        assertEquals(MIGRATION_OPTION_ENABLED, options.pathDegradationMigration)
     }
 
     @Test
     fun testConnectionMigrationOptions_allowNonDefaultNetworkUsage_returnSetValue() {
         val options =
                 ConnectionMigrationOptions.Builder()
-                        .setAllowNonDefaultNetworkUsageEnabled(MIGRATION_OPTION_ENABLED).build()
+                        .setAllowNonDefaultNetworkUsage(MIGRATION_OPTION_ENABLED).build()
 
-        assertEquals(MIGRATION_OPTION_ENABLED, options.allowNonDefaultNetworkUsageEnabled)
+        assertEquals(MIGRATION_OPTION_ENABLED, options.allowNonDefaultNetworkUsage)
     }
 }
diff --git a/Cronet/tests/cts/src/android/net/http/cts/DnsOptionsTest.kt b/Cronet/tests/cts/src/android/net/http/cts/DnsOptionsTest.kt
index 8af544e..6f4a979 100644
--- a/Cronet/tests/cts/src/android/net/http/cts/DnsOptionsTest.kt
+++ b/Cronet/tests/cts/src/android/net/http/cts/DnsOptionsTest.kt
@@ -34,22 +34,22 @@
     fun testDnsOptions_defaultValues() {
         val options = DnsOptions.Builder().build()
 
-        assertEquals(DNS_OPTION_UNSPECIFIED, options.persistHostCacheEnabled)
+        assertEquals(DNS_OPTION_UNSPECIFIED, options.persistHostCache)
         assertNull(options.persistHostCachePeriod)
-        assertEquals(DNS_OPTION_UNSPECIFIED, options.staleDnsEnabled)
+        assertEquals(DNS_OPTION_UNSPECIFIED, options.staleDns)
         assertNull(options.staleDnsOptions)
-        assertEquals(DNS_OPTION_UNSPECIFIED, options.useHttpStackDnsResolverEnabled)
+        assertEquals(DNS_OPTION_UNSPECIFIED, options.useHttpStackDnsResolver)
         assertEquals(DNS_OPTION_UNSPECIFIED,
-                options.preestablishConnectionsToStaleDnsResultsEnabled)
+                options.preestablishConnectionsToStaleDnsResults)
     }
 
     @Test
     fun testDnsOptions_persistHostCache_returnSetValue() {
         val options = DnsOptions.Builder()
-                .setPersistHostCacheEnabled(DNS_OPTION_ENABLED)
+                .setPersistHostCache(DNS_OPTION_ENABLED)
                 .build()
 
-        assertEquals(DNS_OPTION_ENABLED, options.persistHostCacheEnabled)
+        assertEquals(DNS_OPTION_ENABLED, options.persistHostCache)
     }
 
     @Test
@@ -63,43 +63,43 @@
     @Test
     fun testDnsOptions_enableStaleDns_returnSetValue() {
         val options = DnsOptions.Builder()
-                .setStaleDnsEnabled(DNS_OPTION_ENABLED)
+                .setStaleDns(DNS_OPTION_ENABLED)
                 .build()
 
-        assertEquals(DNS_OPTION_ENABLED, options.staleDnsEnabled)
+        assertEquals(DNS_OPTION_ENABLED, options.staleDns)
     }
 
     @Test
     fun testDnsOptions_useHttpStackDnsResolver_returnsSetValue() {
         val options = DnsOptions.Builder()
-                .setUseHttpStackDnsResolverEnabled(DNS_OPTION_ENABLED)
+                .setUseHttpStackDnsResolver(DNS_OPTION_ENABLED)
                 .build()
 
-        assertEquals(DNS_OPTION_ENABLED, options.useHttpStackDnsResolverEnabled)
+        assertEquals(DNS_OPTION_ENABLED, options.useHttpStackDnsResolver)
     }
 
     @Test
     fun testDnsOptions_preestablishConnectionsToStaleDnsResults_returnsSetValue() {
         val options = DnsOptions.Builder()
-                .setPreestablishConnectionsToStaleDnsResultsEnabled(DNS_OPTION_ENABLED)
+                .setPreestablishConnectionsToStaleDnsResults(DNS_OPTION_ENABLED)
                 .build()
 
         assertEquals(DNS_OPTION_ENABLED,
-                options.preestablishConnectionsToStaleDnsResultsEnabled)
+                options.preestablishConnectionsToStaleDnsResults)
     }
 
     @Test
     fun testDnsOptions_setStaleDnsOptions_returnsSetValues() {
         val staleOptions = DnsOptions.StaleDnsOptions.Builder()
-                .setAllowCrossNetworkUsageEnabled(DNS_OPTION_ENABLED)
+                .setAllowCrossNetworkUsage(DNS_OPTION_ENABLED)
                 .setFreshLookupTimeout(Duration.ofMillis(1234))
                 .build()
         val options = DnsOptions.Builder()
-                .setStaleDnsEnabled(DNS_OPTION_ENABLED)
+                .setStaleDns(DNS_OPTION_ENABLED)
                 .setStaleDnsOptions(staleOptions)
                 .build()
 
-        assertEquals(DNS_OPTION_ENABLED, options.staleDnsEnabled)
+        assertEquals(DNS_OPTION_ENABLED, options.staleDns)
         assertEquals(staleOptions, options.staleDnsOptions)
     }
 
@@ -107,18 +107,18 @@
     fun testStaleDnsOptions_defaultValues() {
         val options = DnsOptions.StaleDnsOptions.Builder().build()
 
-        assertEquals(DNS_OPTION_UNSPECIFIED, options.allowCrossNetworkUsageEnabled)
+        assertEquals(DNS_OPTION_UNSPECIFIED, options.allowCrossNetworkUsage)
         assertNull(options.freshLookupTimeout)
         assertNull(options.maxExpiredDelay)
-        assertEquals(DNS_OPTION_UNSPECIFIED, options.useStaleOnNameNotResolvedEnabled)
+        assertEquals(DNS_OPTION_UNSPECIFIED, options.useStaleOnNameNotResolved)
     }
 
     @Test
     fun testStaleDnsOptions_allowCrossNetworkUsage_returnsSetValue() {
         val options = DnsOptions.StaleDnsOptions.Builder()
-                .setAllowCrossNetworkUsageEnabled(DNS_OPTION_ENABLED).build()
+                .setAllowCrossNetworkUsage(DNS_OPTION_ENABLED).build()
 
-        assertEquals(DNS_OPTION_ENABLED, options.allowCrossNetworkUsageEnabled)
+        assertEquals(DNS_OPTION_ENABLED, options.allowCrossNetworkUsage)
     }
 
     @Test
@@ -133,10 +133,10 @@
     @Test
     fun testStaleDnsOptions_useStaleOnNameNotResolved_returnsSetValue() {
         val options = DnsOptions.StaleDnsOptions.Builder()
-                .setUseStaleOnNameNotResolvedEnabled(DNS_OPTION_ENABLED)
+                .setUseStaleOnNameNotResolved(DNS_OPTION_ENABLED)
                 .build()
 
-        assertEquals(DNS_OPTION_ENABLED, options.useStaleOnNameNotResolvedEnabled)
+        assertEquals(DNS_OPTION_ENABLED, options.useStaleOnNameNotResolved)
     }
 
     @Test
diff --git a/Tethering/common/TetheringLib/cronet_enabled/api/current.txt b/Tethering/common/TetheringLib/cronet_enabled/api/current.txt
index bc76b72..333ea1c 100644
--- a/Tethering/common/TetheringLib/cronet_enabled/api/current.txt
+++ b/Tethering/common/TetheringLib/cronet_enabled/api/current.txt
@@ -51,9 +51,9 @@
   }
 
   public class ConnectionMigrationOptions {
-    method public int getAllowNonDefaultNetworkUsageEnabled();
-    method public int getDefaultNetworkMigrationEnabled();
-    method public int getPathDegradationMigrationEnabled();
+    method public int getAllowNonDefaultNetworkUsage();
+    method public int getDefaultNetworkMigration();
+    method public int getPathDegradationMigration();
     field public static final int MIGRATION_OPTION_DISABLED = 2; // 0x2
     field public static final int MIGRATION_OPTION_ENABLED = 1; // 0x1
     field public static final int MIGRATION_OPTION_UNSPECIFIED = 0; // 0x0
@@ -62,18 +62,18 @@
   public static final class ConnectionMigrationOptions.Builder {
     ctor public ConnectionMigrationOptions.Builder();
     method @NonNull public android.net.http.ConnectionMigrationOptions build();
-    method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setAllowNonDefaultNetworkUsageEnabled(int);
-    method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setDefaultNetworkMigrationEnabled(int);
-    method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setPathDegradationMigrationEnabled(int);
+    method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setAllowNonDefaultNetworkUsage(int);
+    method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setDefaultNetworkMigration(int);
+    method @NonNull public android.net.http.ConnectionMigrationOptions.Builder setPathDegradationMigration(int);
   }
 
   public final class DnsOptions {
-    method public int getPersistHostCacheEnabled();
+    method public int getPersistHostCache();
     method @Nullable public java.time.Duration getPersistHostCachePeriod();
-    method public int getPreestablishConnectionsToStaleDnsResultsEnabled();
-    method public int getStaleDnsEnabled();
+    method public int getPreestablishConnectionsToStaleDnsResults();
+    method public int getStaleDns();
     method @Nullable public android.net.http.DnsOptions.StaleDnsOptions getStaleDnsOptions();
-    method public int getUseHttpStackDnsResolverEnabled();
+    method public int getUseHttpStackDnsResolver();
     field public static final int DNS_OPTION_DISABLED = 2; // 0x2
     field public static final int DNS_OPTION_ENABLED = 1; // 0x1
     field public static final int DNS_OPTION_UNSPECIFIED = 0; // 0x0
@@ -82,28 +82,28 @@
   public static final class DnsOptions.Builder {
     ctor public DnsOptions.Builder();
     method @NonNull public android.net.http.DnsOptions build();
-    method @NonNull public android.net.http.DnsOptions.Builder setPersistHostCacheEnabled(int);
+    method @NonNull public android.net.http.DnsOptions.Builder setPersistHostCache(int);
     method @NonNull public android.net.http.DnsOptions.Builder setPersistHostCachePeriod(@NonNull java.time.Duration);
-    method @NonNull public android.net.http.DnsOptions.Builder setPreestablishConnectionsToStaleDnsResultsEnabled(int);
-    method @NonNull public android.net.http.DnsOptions.Builder setStaleDnsEnabled(int);
+    method @NonNull public android.net.http.DnsOptions.Builder setPreestablishConnectionsToStaleDnsResults(int);
+    method @NonNull public android.net.http.DnsOptions.Builder setStaleDns(int);
     method @NonNull public android.net.http.DnsOptions.Builder setStaleDnsOptions(@NonNull android.net.http.DnsOptions.StaleDnsOptions);
-    method @NonNull public android.net.http.DnsOptions.Builder setUseHttpStackDnsResolverEnabled(int);
+    method @NonNull public android.net.http.DnsOptions.Builder setUseHttpStackDnsResolver(int);
   }
 
   public static class DnsOptions.StaleDnsOptions {
-    method public int getAllowCrossNetworkUsageEnabled();
+    method public int getAllowCrossNetworkUsage();
     method @Nullable public java.time.Duration getFreshLookupTimeout();
     method @Nullable public java.time.Duration getMaxExpiredDelay();
-    method public int getUseStaleOnNameNotResolvedEnabled();
+    method public int getUseStaleOnNameNotResolved();
   }
 
   public static final class DnsOptions.StaleDnsOptions.Builder {
     ctor public DnsOptions.StaleDnsOptions.Builder();
     method @NonNull public android.net.http.DnsOptions.StaleDnsOptions build();
-    method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setAllowCrossNetworkUsageEnabled(int);
+    method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setAllowCrossNetworkUsage(int);
     method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setFreshLookupTimeout(@NonNull java.time.Duration);
     method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setMaxExpiredDelay(@NonNull java.time.Duration);
-    method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setUseStaleOnNameNotResolvedEnabled(int);
+    method @NonNull public android.net.http.DnsOptions.StaleDnsOptions.Builder setUseStaleOnNameNotResolved(int);
   }
 
   public abstract class HeaderBlock {
