[automerger skipped] Merge Android 13 QPR2 am: 8432b44dc8 -s ours am: eb56c5c40d -s ours

am skip reason: Merged-In I2ffb9c251fa2eba33cf1de9ea537c1182927b167 with SHA-1 a1f4b82a9e is already in history

Original change: https://android-review.googlesource.com/c/device/google/gs101/+/2485272

Change-Id: I69d36caeebdf36435f7ed31d45d526d8b10c726f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/device.mk b/device.mk
index 016e5f9..af334e4 100644
--- a/device.mk
+++ b/device.mk
@@ -623,6 +623,7 @@
 	frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml\
 	frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml\
 	vendor/google/services/LyricCameraHAL/src/vendor.android.hardware.camera.preview-dis.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/vendor.android.hardware.camera.preview-dis.xml\
+	vendor/google/services/LyricCameraHAL/src/vendor.android.hardware.camera.stream-usecase.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/vendor.android.hardware.camera.stream-usecase.xml\
 
 #PRODUCT_COPY_FILES += \
 	frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index f391032..f8ee8e3 100644
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -945,15 +945,24 @@
 
 // Dump items related to display
 void DumpstateDevice::dumpDisplaySection(int fd) {
-    DumpFileToFd(fd, "CRTC-0 underrun count", "/sys/kernel/debug/dri/0/crtc-0/underrun_cnt");
-    DumpFileToFd(fd, "CRTC-0 crc count", "/sys/kernel/debug/dri/0/crtc-0/crc_cnt");
-    DumpFileToFd(fd, "CRTC-0 ecc count", "/sys/kernel/debug/dri/0/crtc-0/ecc_cnt");
-    DumpFileToFd(fd, "CRTC-0 idma err count", "/sys/kernel/debug/dri/0/crtc-0/idma_err_cnt");
+    // Dump counters for decon drivers
+    const std::string decon_device_sysfs_path("/sys/class/drm/card0/device/");
+    for(int i = 0; i <= 2; ++i){
+        const std::string decon_num_str = std::to_string(i);
+        const std::string decon_counter_path = decon_device_sysfs_path +
+                                              "decon" + decon_num_str +
+                                              "/counters";
+        if (access(decon_counter_path.c_str(), R_OK) == 0){
+            DumpFileToFd(fd, "DECON-" + decon_num_str + " counters",
+                         decon_counter_path);
+        }
+        else{
+            ::android::base::WriteStringToFd("No counters for DECON-" +
+                decon_num_str + " found at path (" + decon_counter_path + ")\n",
+                fd);
+        }
+    }
     DumpFileToFd(fd, "CRTC-0 event log", "/sys/kernel/debug/dri/0/crtc-0/event");
-    DumpFileToFd(fd, "CRTC-1 underrun count", "/sys/kernel/debug/dri/0/crtc-1/underrun_cnt");
-    DumpFileToFd(fd, "CRTC-1 crc count", "/sys/kernel/debug/dri/0/crtc-1/crc_cnt");
-    DumpFileToFd(fd, "CRTC-1 ecc count", "/sys/kernel/debug/dri/0/crtc-1/ecc_cnt");
-    DumpFileToFd(fd, "CRTC-1 idma err count", "/sys/kernel/debug/dri/0/crtc-1/idma_err_cnt");
     DumpFileToFd(fd, "CRTC-1 event log", "/sys/kernel/debug/dri/0/crtc-1/event");
     RunCommandToFd(fd, "libdisplaycolor", {"/vendor/bin/dumpsys", "displaycolor", "-v"},
                    CommandOptions::WithTimeout(2).Build());
diff --git a/gnss/47765/bin/android.hardware.gnss@2.1-impl-google.so b/gnss/47765/bin/android.hardware.gnss@2.1-impl-google.so
index e63acda..328b2dc 100755
--- a/gnss/47765/bin/android.hardware.gnss@2.1-impl-google.so
+++ b/gnss/47765/bin/android.hardware.gnss@2.1-impl-google.so
Binary files differ
diff --git a/gnss/47765/bin/android.hardware.gnss@2.1-service-brcm b/gnss/47765/bin/android.hardware.gnss@2.1-service-brcm
index 1ae69f1..8686067 100755
--- a/gnss/47765/bin/android.hardware.gnss@2.1-service-brcm
+++ b/gnss/47765/bin/android.hardware.gnss@2.1-service-brcm
Binary files differ
diff --git a/gnss/47765/bin/flp.default.so b/gnss/47765/bin/flp.default.so
index 728b67c..cf40a99 100755
--- a/gnss/47765/bin/flp.default.so
+++ b/gnss/47765/bin/flp.default.so
Binary files differ
diff --git a/gnss/47765/bin/gps.default.so b/gnss/47765/bin/gps.default.so
index 061ad5c..964d562 100755
--- a/gnss/47765/bin/gps.default.so
+++ b/gnss/47765/bin/gps.default.so
Binary files differ
diff --git a/gnss/47765/bin/gpsd b/gnss/47765/bin/gpsd
index 73a0c5e..143250c 100755
--- a/gnss/47765/bin/gpsd
+++ b/gnss/47765/bin/gpsd
Binary files differ
diff --git a/gnss/47765/bin/lhd b/gnss/47765/bin/lhd
index ed83fc7..d0adfc5 100755
--- a/gnss/47765/bin/lhd
+++ b/gnss/47765/bin/lhd
Binary files differ
diff --git a/gnss/47765/bin/scd b/gnss/47765/bin/scd
index f64cc25..43889d6 100755
--- a/gnss/47765/bin/scd
+++ b/gnss/47765/bin/scd
Binary files differ
diff --git a/gnss/47765/firmware/SensorHub.patch b/gnss/47765/firmware/SensorHub.patch
index cee5c46..5cf69c6 100644
--- a/gnss/47765/firmware/SensorHub.patch
+++ b/gnss/47765/firmware/SensorHub.patch
@@ -1,9 +1,9 @@
 <FormatVersion=0x00010003>
 
-<Crc=122>
+<Crc=211>
 <BlobLength=161839>
 <AsicVersion=0x004776A0>
-<ChangeList=557990>
+<ChangeList=562029>
 <PatchLevel=0>
 <PostPatchLevel=1>
 <CustomerVersion=None>
@@ -79,7 +79,7 @@
 009102A101F438F703B000BD4170700080BD8900708989
 00805D8A006905800025643A2564095374617274206368
 70704170705461736B0A00000000633A5C77735C626F64
-5F3437373631323239305F3535373939305C637573746F
+5F3437373631323732325F3536323032395C637573746F
 6D6572735C676F6F676C655C503231466C61677461696C
 6D63755C64656C69766572795C53656E736F724875625F
 5032315C7372635C6875625F636F6E74726F6C6C65722E
@@ -390,7 +390,7 @@
 F22046FEF700FF07E002464FF4D1630FF2F4518F2011F4
 5FF2FEF769FC04F5A6620A23C2E9000105F0F00006F00F
 0101433A462046BDE8F041FFF7BDBB0000633A5C77735C
-626F645F3437373631323239305F3535373939305C6375
+626F645F3437373631323732325F3536323032395C6375
 73746F6D6572735C676F6F676C655C503231466C616774
 61696C6D63755C64656C69766572795C53656E736F7248
 75625F5032315C7372635C636870705C7472616E73706F
@@ -526,7 +526,7 @@
 25210378204626F4F1F510B010BD000025643A25640948
 232568687520756E6B6E6F776E20726571756573742E20
 636D643D2523782C2049443D256868750A00633A5C7773
-5C626F645F3437373631323239305F3535373939305C63
+5C626F645F3437373631323732325F3536323032395C63
 7573746F6D6572735C676F6F676C655C503231466C6167
 7461696C6D63755C64656C69766572795C53656E736F72
 4875625F5032315C7372F19403502E8000635C63687070
@@ -585,7 +585,7 @@
 D803B000BDF07E8A000C53890028878A00113280009D32
 800025643A256409434850502042617564726174652069
 732073657420746F20256C640A0A00633A5C77735C626F
-645F3437373631323239305F3535373939305C63757374
+645F3437373631323732325F3536323032395C63757374
 6F6D6572735C676F6F676C655C503231466C6167746169
 6C6D63755C64656C69766572795C53656E736F72487562
 5F5032315C7372635C73656E736F725F6875622E630000
@@ -679,13 +679,13 @@
 B5C90382B0A0F5A86419D500F65C552846FDF7F6DD0600
 12D00020009069462846FDF712DE761E012804DB024600
 992046FEF79EF82846FDF76FDD002EECD173BD70470000
-633A5C77735C626F645F3437373631323239305F353537
-3939305C637573746F6D6572735C676F6F676C655C5032
+633A5C77735C626F645F3437373631323732325F353632
+3032395C637573746F6D6572735C676F6F676C655C5032
 31466C61677461696C6D63755C64656C69766572795C53
 656E736F724875625F5032315C7372635C636870705C69
 6E636C7564655C636870702F7472616E73706F72742E68
-00633A5C77735C626F645F3437373631323239305F3535
-373939305C637573746F6D6572735C676F6F676C655C50
+00633A5C77735C626F645F3437373631323732325F3536
+323032395C637573746F6D6572735C676F6F676C655C50
 3231466C61677461696C6D63755C64656C69766572795C
 53656E736F724875625F5032315C7372635C636870705C
 706C6174666F726D5C62636D5C42434D343737785C6C69
@@ -696,7 +696,7 @@
 D1D6E90223D0E918679F42E7D8E8D39642E4D2E5E7D0E9
 1823CDE900230FF27C010FF2100240F21E238F200FF4B1
 F403B0F0BD0000633A5C77735C626F645F343737363132
-3239305F3535373939305C637573746F6D6572735C676F
+3732325F3536323032395C637573746F6D6572735C676F
 6F676C655C503231466C61677461696C6D63755C64656C
 69766572795C53656E736F724875625F5032315C737263
 5C636870705C636C69656E74732E630000000025643A25
@@ -706,7 +706,7 @@
 21FEF75DF80AE03246294625F420F40120787032462068
 3946FEF718F8012003B0F0BD25643A2564094F4F4D2061
 742025733A25640A00633A5C77735C626F645F34373736
-31323239305F3535373939305C637573746F6D6572735C
+31323732325F3536323032395C637573746F6D6572735C
 676F6F676C655C503231466C61677461696C6D63755C64
 656C69766572795C53656E736F724875625F5032315C73
 72635C636870705C73657276696365735C6C6F6F706261
@@ -718,8 +718,8 @@
 0122460E2000908F200FF2B0010FF4C3F32868314604B0
 BDE870400E22FDF78CBF10B58B880124012B02D1FFF7BE
 FF00E00024204610BD25643A2564094F4F4D2061742025
-733A25640A00633A5C77735C626F645F34373736313232
-39305F3535373939305C637573746F6D6572735C676F6F
+733A25640A00633A5C77735C626F645F34373736313237
+32325F3536323032395C637573746F6D6572735C676F6F
 676C655C503231466C61677461696C6D63755C64656C69
 766572795C53656E736F724875625F5032315C7372635C
 636870705C73657276696365735C74696D6573796E632E
@@ -734,7 +734,7 @@
 314603B0BDE8F043FDF7E2BE10B58A880124012A02D1FF
 F7BAFF00E00024204610BD25643A2564094F4F4D206174
 2025733A25640A00633A5C77735C626F645F3437373631
-323239305F3535373939305C637573746F6D6572735C67
+323732325F3536323032395C637573746F6D6572735C67
 6F6F676C655C503231466C61677461696C6D63755C6465
 6C69766572795C53656E736F724875625F5032315C7372
 635C636870705C73657276696365735C646973636F7665
@@ -761,7 +761,7 @@
 05CDE90445AD230FF2AC118F200FF4D8F106B0BDE87083
 70B50446084615461E46FFF7BEFF3246294620680068BD
 E87040FDF797BD00000000633A5C77735C626F645F3437
-373631323239305F3535373939305C637573746F6D6572
+373631323732325F3536323032395C637573746F6D6572
 735C676F6F676C655C503231466C61677461696C6D6375
 5C64656C69766572795C53656E736F724875625F503231
 5C7372635C636870705C73657276696365732E63000000
@@ -788,8 +788,8 @@
 230FF240020FF22C018E2007E001A8009042230FF22C02
 0FF218018F200FF49DF00DF5027D10BC5DF80CFB0FF284
 014160704725643A25640950414C3A2025730A0000633A
-5C77735C626F645F3437373631323239305F3535373939
-305C637573746F6D6572735C676F6F676C655C50323146
+5C77735C626F645F3437373631323732325F3536323032
+395C637573746F6D6572735C676F6F676C655C50323146
 6C61677461696C6D63755C64656C69766572795C53656E
 736F724875625F5032315C7372635C636870705C706C61
 74666F726D5C70616C5F6170692E6300000000000001C9
@@ -848,7 +848,7 @@
 32BD13460A4601460248007810F469B000001453890055
 47800065478000687B890060D09100354780002B488000
 436870704C696E6B5461736B00000000633A5C77735C62
-6F645F3437373631323239305F3535373939305C637573
+6F645F3437373631323732325F3536323032395C637573
 746FF19403D04A80006D6572735C676F6F676C655C5032
 31466C61677461696C6D63755C64656C69766572795C53
 656E736F724875625F5032315C7372635C636870705C70
@@ -914,7 +914,7 @@
 0023002240F293210FF2380001B0BDE83040FBF732BB31
 BD0000D088890025643A256409474E5353207365727669
 636520616C7265616479206F70656E0A00000000633A5C
-77735C626F645F3437373631323239305F353537393930
+77735C626F645F3437373631323732325F353632303239
 5C637573746F6D6572735C676F6F676C655C503231466C
 61677461696C6D63755C64656C69766572795C53656E73
 6F724875625F5032315C7372635C636870705C73657276
@@ -965,7 +965,7 @@
 0023002295210FF23000FBF7EFF836B90023002296210F
 F22000FBF7E7F83620FEF78EF9286030B1811D2046FFF7
 99FF36203060012070BD633A5C77735C626F645F343737
-3631323239305F3535373939305C637573746F6D657273
+3631323732325F3536323032395C637573746F6D657273
 5C676F6F676C655C503231466C61677461696C6D63755C
 64656C69766572795C53656E736F724875625F5032315C
 7372635C636870705C636F6D6D6F6E5C676E73735F63F1
@@ -1020,7 +1020,7 @@
 0025643A2564095B25735D204D6561737572656D656E74
 2064617461206576656E74203A206D6561737572656D65
 6E745F636F756E74203D20282564290A000000633A5C77
-735C626F645F3437373631323239305F3535373939305C
+735C626F645F3437373631323732325F3536323032395C
 637573746F6D6572735C676F6F676C655C503231466C61
 677461696C6D63755C64656C69766572795C53656E736F
 724875625F5032315C7372635C636870705C706C617466
@@ -1229,7 +1229,7 @@
 8891FBF0F111FB00F008E0B08838B1A88070BD00291CBF
 F088002800D0A08070BD0B480170704700000948007870
 4700000848017070470000064800787047000001484161
-70470000787B8900A683080099CB91009ACB91002F2F64
+70470000787B89006D93080099CB91009ACB91002F2F64
 65706F742F636C69656E742F636F72652F72656C2F476F
 6F676C652F5032322F3535343830332F2E2E2E0000007E
 24247E5056542044756D70203A20474C4C207665722E20
diff --git a/rro_overlays/ConnectivityOverlay/res/values-mcc204-mnc04/config.xml b/rro_overlays/ConnectivityOverlay/res/values-mcc204-mnc04/config.xml
new file mode 100644
index 0000000..2a6d2e5
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values-mcc204-mnc04/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+    <!-- Whether the device should automatically switch away from Wi-Fi networks that lose
+         Internet access. Actual device behaviour is controlled by
+         Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
+    <integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
+
+    <!-- Whether the device should actively prefer bad wifi to good cell on Android 12/13
+         for configurations where config_avoidBadWifi=0. -->
+    <integer translatable="false" name="config_activelyPreferBadWifi">0</integer>
+</resources>
diff --git a/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc004/config.xml b/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc004/config.xml
new file mode 100644
index 0000000..3cc7253
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc004/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+    <!-- Whether the device should automatically switch away from Wi-Fi networks that lose
+         Internet access. Actual device behaviour is controlled by
+         Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
+    <integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
+</resources>
diff --git a/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc590/config.xml b/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc590/config.xml
new file mode 100644
index 0000000..3cc7253
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc590/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+    <!-- Whether the device should automatically switch away from Wi-Fi networks that lose
+         Internet access. Actual device behaviour is controlled by
+         Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
+    <integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
+</resources>
diff --git a/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc599/config.xml b/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc599/config.xml
new file mode 100644
index 0000000..3cc7253
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values-mcc310-mnc599/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+    <!-- Whether the device should automatically switch away from Wi-Fi networks that lose
+         Internet access. Actual device behaviour is controlled by
+         Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
+    <integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
+</resources>
diff --git a/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc270/config.xml b/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc270/config.xml
new file mode 100644
index 0000000..3cc7253
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc270/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+    <!-- Whether the device should automatically switch away from Wi-Fi networks that lose
+         Internet access. Actual device behaviour is controlled by
+         Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
+    <integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
+</resources>
diff --git a/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc280/config.xml b/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc280/config.xml
new file mode 100644
index 0000000..3cc7253
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc280/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+    <!-- Whether the device should automatically switch away from Wi-Fi networks that lose
+         Internet access. Actual device behaviour is controlled by
+         Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
+    <integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
+</resources>
diff --git a/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc480/config.xml b/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc480/config.xml
new file mode 100644
index 0000000..3cc7253
--- /dev/null
+++ b/rro_overlays/ConnectivityOverlay/res/values-mcc311-mnc480/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources>
+    <!-- Whether the device should automatically switch away from Wi-Fi networks that lose
+         Internet access. Actual device behaviour is controlled by
+         Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
+    <integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
+</resources>
diff --git a/rro_overlays/ConnectivityOverlay/res/values/config.xml b/rro_overlays/ConnectivityOverlay/res/values/config.xml
index d9a29b0..d9e9b58 100644
--- a/rro_overlays/ConnectivityOverlay/res/values/config.xml
+++ b/rro_overlays/ConnectivityOverlay/res/values/config.xml
@@ -23,4 +23,8 @@
 
     <!-- Mask to use when checking skb mark defined in config_networkWakeupPacketMark above. -->
     <integer translatable="false" name="config_networkWakeupPacketMask">0x80000000</integer>
+
+    <!-- Whether the device should actively prefer bad wifi to good cell on Android 12/13
+         for configurations where config_avoidBadWifi=0. -->
+    <integer translatable="false" name="config_activelyPreferBadWifi">1</integer>
 </resources>