Merge "/charger->/system/bin/charger"
diff --git a/Android.bp b/Android.bp
index 960f9d5..ceabda2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,6 @@
 soong_namespace {
     imports: [
+        "hardware/google/pixel",
         "hardware/qcom/bootctrl",
     ],
 }
@@ -8,3 +9,4 @@
     "vibrator",
     "usb",
 ]
+
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 81bf9fd..b1deb4c 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -93,13 +93,13 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib/hw/*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib64/hw/*)
 
-# Remove Clearkey HAL 1.0
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.drm@1.0-service.clearkey.rc)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.drm@1.0-service.clearkey)
+# Remove Clearkey HAL 1.1
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.drm@1.1-service.clearkey.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.drm@1.1-service.clearkey)
 
-# Remove Widevine HAL 1.0
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.drm@1.0-service.widevine.rc)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.drm@1.0-service.widevine)
+# Remove Widevine HAL 1.1
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.drm@1.1-service.widevine.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.drm@1.1-service.widevine)
 
 # Health HAL 2.0
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.health@2.0-service)
@@ -114,10 +114,18 @@
 # Move libnfc-nci.conf to /vendor
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/libnfc-nci.conf)
 
+# Remove android.hardware.graphics.mapper@2.0-impl
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so)
+
 # Use android.hardware.cas@1.0-service-lazy for marlin_svelte build
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.cas@1.0-service)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.cas@1.0-service.rc)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.cas@1.0-service.xml)
 
+# Don't upgrade to Widevine HIDL 1.2 after all.  Stay with 1.1.
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.drm@1.2-service.widevine.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.drm@1.2-service.widevine)
+
 # Remove obsolete android.hardware.boot@1.0-impl-wrapper.recovery.so
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/system/lib64/hw/android.hardware.boot@1.0-impl-wrapper.recovery.so)
diff --git a/audio_platform_info_tasha_marlin.xml b/audio_platform_info_tasha_marlin.xml
index 086d5d8..4835143 100644
--- a/audio_platform_info_tasha_marlin.xml
+++ b/audio_platform_info_tasha_marlin.xml
@@ -91,18 +91,24 @@
        <usecase name="USECASE_AUDIO_PLAYBACK_MMAP" type="out" id="18" />
        <usecase name="USECASE_INCALL_MUSIC_UPLINK" type="out" id="32" />
     </pcm_ids>
+    <!-- Mandatory microphone characteristics include: device_id, type,     -->
+    <!-- address, location, group, index_in_the_group, directionality,      -->
+    <!-- num_frequency_responses, frequencies and responses.                -->
+    <!-- Optional microphone characteristics include: Sensitivity, max_spl, -->
+    <!-- min_spl, orientation and geometric_location. If missing they will  -->
+    <!-- be populated as unknown.                                           -->
     <microphone_characteristics>
-        <microphone valid_mask="31" device_id="builtin_mic_1" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+        <microphone device_id="builtin_mic_1" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
             group="0" index_in_the_group="0" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
             frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
             responses="-0.40 -0.40 -0.60 -0.70 -0.40 -0.40 -0.30 -0.30 -0.30 -0.30 -0.20 -0.60 -0.90 -0.90 -1.00 -0.70 -0.80 -0.70 -0.70 -0.90 -0.70 -0.20 0.60 1.40 1.70 0.80 -0.80 -2.10 -2.30 -1.70 -0.90 0.50 1.30 1.20 0.80 0.10 0.20 0.40 2.30 2.40 0.00 -0.40 -0.10 0.70 -0.40 1.00 0.50 1.40 2.40 2.00 2.50 2.70 1.70 1.40 1.70 -1.90 -3.60 1.70 2.30 0.00 0.80 -0.30 0.60 1.90 1.40 -1.90 0.30 1.70 -0.60 0.40 2.20 3.60 -4.20 2.50 3.60 8.10 -4.30 5.70 7.30 9.60 7.80 10.20 16.40 18.60 20.10 22.50 23.50 17.60 17.90 18.80 17.70 15.10 14.70"
             sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 -1.0 0.0" geometric_location="0.0513 0.0 0.0038" />
-        <microphone valid_mask="31" device_id="builtin_mic_2" type="AUDIO_DEVICE_IN_BACK_MIC" address="back" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+        <microphone device_id="builtin_mic_2" type="AUDIO_DEVICE_IN_BACK_MIC" address="back" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
             group="0" index_in_the_group="1" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
             frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
             responses="-1.20 -1.20 -1.40 -1.50 -1.10 -1.10 -1.10 -1.20 -1.20 -1.20 -1.10 -1.50 -1.60 -1.60 -1.60 -1.20 -1.20 -1.00 -0.70 -0.70 -0.50 -0.40 -0.40 -0.60 -1.30 -2.30 -2.10 -1.10 -0.30 -0.10 -0.10 -0.60 -1.00 -1.60 -1.60 -0.90 -1.00 -1.10 -1.80 -0.10 0.00 -0.20 -0.50 -0.50 -0.20 0.20 0.40 1.60 1.90 1.10 1.40 2.20 2.90 2.40 1.80 3.90 6.00 6.30 2.80 4.80 5.10 5.90 7.00 8.00 7.10 4.10 6.60 6.50 6.80 8.90 6.20 6.20 9.60 7.30 6.50 9.30 6.90 9.20 6.60 9.50 9.80 9.60 11.80 11.00 12.80 11.50 11.90 12.60 11.30 10.10 10.90 12.70 13.9"
             sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 -1.0" geometric_location="0.0347 0.1451 0.0" />
-        <microphone valid_mask="31" device_id="builtin_mic_3" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="top" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+        <microphone device_id="builtin_mic_3" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="top" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
             group="0" index_in_the_group="2" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
             frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
             responses="0.30 0.30 0.30 0.30 0.20 0.10 0.50 0.40 0.40 0.40 0.30 0.30 0.40 0.00 -0.20 -0.10 -0.20 0.10 0.10 0.30 0.60 0.70 1.00 1.10 1.30 1.40 1.10 -0.10 -1.20 -0.90 0.10 0.90 1.30 1.10 0.90 0.00 -1.10 -0.20 0.10 0.70 0.00 0.30 1.40 1.20 0.40 -0.30 1.10 0.70 2.40 2.20 3.10 2.60 1.80 3.60 4.80 2.90 3.20 4.90 7.20 6.70 5.40 4.80 6.50 7.00 8.40 9.20 8.20 4.80 7.40 7.80 7.00 10.10 6.70 6.70 10.10 7.90 6.50 9.10 6.30 8.50 5.50 8.80 8.70 8.40 10.70 9.40 11.10 10.30 11.30 12.80 12.40 11.70 14.30"
diff --git a/audio_platform_info_tasha_sailfish.xml b/audio_platform_info_tasha_sailfish.xml
index dba746e..bbd9c44 100644
--- a/audio_platform_info_tasha_sailfish.xml
+++ b/audio_platform_info_tasha_sailfish.xml
@@ -91,18 +91,24 @@
        <usecase name="USECASE_AUDIO_PLAYBACK_MMAP" type="out" id="18" />
        <usecase name="USECASE_INCALL_MUSIC_UPLINK" type="out" id="32" />
     </pcm_ids>
+    <!-- Mandatory microphone characteristics include: device_id, type,     -->
+    <!-- address, location, group, index_in_the_group, directionality,      -->
+    <!-- num_frequency_responses, frequencies and responses.                -->
+    <!-- Optional microphone characteristics include: Sensitivity, max_spl, -->
+    <!-- min_spl, orientation and geometric_location. If missing they will  -->
+    <!-- be populated as unknown.                                           -->
     <microphone_characteristics>
-        <microphone valid_mask="31" device_id="builtin_mic_1" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+        <microphone device_id="builtin_mic_1" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
             group="0" index_in_the_group="0" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
             frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
             responses="-0.80 -0.80 -1.00 -1.10 -0.80 -0.80 -0.70 -0.70 -0.70 -0.70 -0.60 -0.90 -1.10 -1.10 -1.20 -1.00 -1.30 -1.30 -1.40 -1.40 -1.20 -0.70 -0.10 0.80 1.20 0.50 -0.80 -2.00 -2.60 -2.70 -1.90 -0.40 0.70 0.60 0.20 -0.10 0.30 0.20 1.90 1.50 0.00 -0.60 -0.90 -0.10 -0.50 0.90 -0.20 1.00 1.30 1.30 2.90 1.90 1.40 3.10 1.10 -7.00 -0.20 1.00 2.10 -1.60 0.90 -1.70 1.40 0.80 -0.50 -0.40 0.50 1.20 0.40 -0.50 3.80 4.70 -2.20 -0.60 3.40 5.60 -2.50 3.30 6.30 8.80 6.30 11.20 15.20 16.80 19.40 22.30 24.30 18.00 18.00 18.60 17.30 15.20 15.70"
             sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 -1.0 0.0" geometric_location="0.0485 0.0 0.0038" />
-        <microphone valid_mask="31" device_id="builtin_mic_2" type="AUDIO_DEVICE_IN_BACK_MIC" address="back" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+        <microphone device_id="builtin_mic_2" type="AUDIO_DEVICE_IN_BACK_MIC" address="back" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
             group="0" index_in_the_group="1" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
             frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
             responses="-1.30 -1.30 -1.40 -1.50 -1.10 -1.10 -1.20 -1.30 -1.30 -1.30 -1.20 -1.50 -1.60 -1.40 -1.30 -0.90 -0.80 -0.60 -0.40 -0.40 -0.40 -0.60 -0.90 -1.50 -1.80 -1.80 -0.70 -0.20 -0.10 -0.60 -1.20 -1.40 -0.80 -0.90 -1.30 -1.30 -1.80 -1.30 -1.00 0.00 0.00 -0.30 -1.00 -0.60 0.10 0.10 1.10 2.20 1.90 0.80 2.20 2.60 3.00 2.50 1.70 5.40 5.60 6.40 5.00 3.50 6.00 6.40 7.70 8.50 7.60 4.30 7.10 7.10 7.00 9.60 6.60 6.40 10.00 8.10 6.90 9.30 6.80 9.30 6.40 9.70 9.90 9.70 12.00 10.90 13.10 12.60 13.20 13.50 12.00 9.90 11.70 13.90 15.90"
             sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 -1.0" geometric_location="0.0347 0.135 0.0" />
-        <microphone valid_mask="31" device_id="builtin_mic_3" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="top" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
+        <microphone device_id="builtin_mic_3" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="top" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
             group="0" index_in_the_group="2" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
             frequencies="97.16 102.92 109.02 115.48 122.32 129.57 137.25 145.38 153.99 163.12 172.78 183.02 193.87 205.35 217.52 230.41 244.06 258.52 273.84 290.07 307.26 325.46 344.75 365.17 386.81 409.73 434.01 459.73 486.97 515.82 546.39 578.76 613.06 649.38 687.86 728.62 771.79 817.52 865.96 917.28 971.63 1029.20 1090.18 1154.78 1223.21 1295.69 1372.46 1453.78 1539.93 1631.17 1727.83 1830.21 1938.65 2053.53 2175.20 2304.09 2440.62 2585.23 2738.42 2900.68 3072.56 3254.62 3447.47 3651.74 3868.12 4097.32 4340.10 4597.27 4869.68 5158.22 5463.87 5787.62 6130.56 6493.82 6878.60 7286.18 7717.92 8175.23 8659.64 9172.76 9716.28 10292.01 10901.84 11547.82 12232.07 12956.87 13724.61 14537.84 15399.27 16311.73 17278.26 18302.06 19386.53"
             responses="0.50 0.50 0.50 0.50 0.40 0.30 0.70 0.60 0.60 0.60 0.50 0.50 0.60 0.30 0.10 0.20 0.20 0.60 0.70 0.90 1.10 1.20 1.30 1.30 1.30 0.90 0.10 -0.80 -0.10 0.90 1.60 1.70 1.60 0.90 0.50 0.20 0.20 0.50 0.40 -0.20 0.00 1.70 1.70 1.40 0.70 0.40 1.60 0.80 2.40 3.20 2.90 1.80 3.00 2.90 4.50 3.90 2.20 6.00 7.80 6.70 5.40 5.00 6.90 7.00 7.70 9.50 8.30 5.10 7.40 7.40 7.40 9.50 6.60 6.60 10.30 7.90 6.70 9.70 6.90 8.80 6.50 9.40 9.10 9.00 10.70 9.60 11.00 9.90 11.30 13.60 13.20 12.40 15.40"
diff --git a/camera/QCamera2/Android.mk b/camera/QCamera2/Android.mk
index 368efff..395a11b 100644
--- a/camera/QCamera2/Android.mk
+++ b/camera/QCamera2/Android.mk
@@ -107,7 +107,7 @@
 LOCAL_SHARED_LIBRARIES += libqdMetaData libqservice libbinder
 LOCAL_SHARED_LIBRARIES += libcutils libdl
 LOCAL_HEADER_LIBRARIES := OmxCore_headers gralloc_headers media_plugin_headers
-LOCAL_SHARED_LIBRARIES += libhidlbase libhwbinder libutils android.hardware.power@1.1
+LOCAL_SHARED_LIBRARIES += libhidlbase libutils android.hardware.power@1.1
 ifeq ($(TARGET_TS_MAKEUP),true)
 LOCAL_SHARED_LIBRARIES += libts_face_beautify_hal libts_detected_face_hal
 endif
diff --git a/camera/QCamera2/HAL/test/qcamera_test.cpp b/camera/QCamera2/HAL/test/qcamera_test.cpp
index 832a384..eae0e7b 100644
--- a/camera/QCamera2/HAL/test/qcamera_test.cpp
+++ b/camera/QCamera2/HAL/test/qcamera_test.cpp
@@ -1509,8 +1509,7 @@
 {
     int ret = NO_ERROR;
     DisplayInfo dinfo;
-    sp<IBinder> display(SurfaceComposerClient::getBuiltInDisplay(
-                        ISurfaceComposer::eDisplayIdMain));
+    sp<IBinder> display = SurfaceComposerClient::getInternalDisplayToken();
     SurfaceComposerClient::getDisplayInfo(display, &dinfo);
     uint32_t previewWidth, previewHeight;
 
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 2f6fcf3..24a8728 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -43,6 +43,7 @@
 #include <time.h>
 #include <sync/sync.h>
 #include "gralloc_priv.h"
+#include <unordered_map>
 
 // Display dependencies
 #include "qdMetaData.h"
@@ -317,6 +318,27 @@
     .reserved                           = {0},
 };
 
+typedef std::tuple<int32_t, int32_t, int32_t, int32_t> config_entry;
+
+bool operator == (const config_entry & lhs, const config_entry & rhs) {
+    return (std::get<0> (lhs) == std::get<0> (rhs)) &&
+        (std::get<1> (lhs) == std::get<1> (rhs)) &&
+        (std::get<2> (lhs) == std::get<2> (rhs)) &&
+        (std::get<3> (lhs) == std::get<3> (rhs));
+}
+
+struct ConfigEntryHash {
+    std::size_t operator() (config_entry const& entry) const {
+        size_t result = 1;
+        size_t hashValue = 31;
+        result = hashValue*result + std::hash<int> {} (std::get<0>(entry));
+        result = hashValue*result + std::hash<int> {} (std::get<1>(entry));
+        result = hashValue*result + std::hash<int> {} (std::get<2>(entry));
+        result = hashValue*result + std::hash<int> {} (std::get<3>(entry));
+        return result;
+    }
+};
+
 // initialise to some default value
 uint32_t QCamera3HardwareInterface::sessionId[] = {0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF};
 
@@ -933,12 +955,13 @@
  * DESCRIPTION: Check if the configuration requested are those advertised
  *
  * PARAMETERS :
+ *   @cameraId : cameraId
  *   @stream_list : streams to be configured
  *
  * RETURN     :
  *
  *==========================================================================*/
-int QCamera3HardwareInterface::validateStreamDimensions(
+int QCamera3HardwareInterface::validateStreamDimensions(uint32_t cameraId,
         camera3_stream_configuration_t *streamList)
 {
     int rc = NO_ERROR;
@@ -981,23 +1004,23 @@
         case ANDROID_SCALER_AVAILABLE_FORMATS_RAW16:
         case ANDROID_SCALER_AVAILABLE_FORMATS_RAW_OPAQUE:
         case HAL_PIXEL_FORMAT_RAW10:
-            count = MIN(gCamCapability[mCameraId]->supported_raw_dim_cnt, MAX_SIZES_CNT);
+            count = MIN(gCamCapability[cameraId]->supported_raw_dim_cnt, MAX_SIZES_CNT);
             for (size_t i = 0; i < count; i++) {
-                if ((gCamCapability[mCameraId]->raw_dim[i].width == (int32_t)rotatedWidth) &&
-                        (gCamCapability[mCameraId]->raw_dim[i].height == (int32_t)rotatedHeight)) {
+                if ((gCamCapability[cameraId]->raw_dim[i].width == (int32_t)rotatedWidth) &&
+                        (gCamCapability[cameraId]->raw_dim[i].height == (int32_t)rotatedHeight)) {
                     sizeFound = true;
                     break;
                 }
             }
             break;
         case HAL_PIXEL_FORMAT_BLOB:
-            count = MIN(gCamCapability[mCameraId]->picture_sizes_tbl_cnt, MAX_SIZES_CNT);
+            count = MIN(gCamCapability[cameraId]->picture_sizes_tbl_cnt, MAX_SIZES_CNT);
             /* Verify set size against generated sizes table */
             for (size_t i = 0; i < count; i++) {
                 if (((int32_t)rotatedWidth ==
-                        gCamCapability[mCameraId]->picture_sizes_tbl[i].width) &&
+                        gCamCapability[cameraId]->picture_sizes_tbl[i].width) &&
                         ((int32_t)rotatedHeight ==
-                        gCamCapability[mCameraId]->picture_sizes_tbl[i].height)) {
+                        gCamCapability[cameraId]->picture_sizes_tbl[i].height)) {
                     sizeFound = true;
                     break;
                 }
@@ -1010,9 +1033,9 @@
                     || newStream->stream_type == CAMERA3_STREAM_INPUT
                     || IS_USAGE_ZSL(newStream->usage)) {
                 if (((int32_t)rotatedWidth ==
-                                gCamCapability[mCameraId]->active_array_size.width) &&
+                                gCamCapability[cameraId]->active_array_size.width) &&
                                 ((int32_t)rotatedHeight ==
-                                gCamCapability[mCameraId]->active_array_size.height)) {
+                                gCamCapability[cameraId]->active_array_size.height)) {
                     sizeFound = true;
                     break;
                 }
@@ -1023,13 +1046,13 @@
                  * size, so keeping the logic lenient at the moment
                  */
             }
-            count = MIN(gCamCapability[mCameraId]->picture_sizes_tbl_cnt,
+            count = MIN(gCamCapability[cameraId]->picture_sizes_tbl_cnt,
                     MAX_SIZES_CNT);
             for (size_t i = 0; i < count; i++) {
                 if (((int32_t)rotatedWidth ==
-                            gCamCapability[mCameraId]->picture_sizes_tbl[i].width) &&
+                            gCamCapability[cameraId]->picture_sizes_tbl[i].width) &&
                             ((int32_t)rotatedHeight ==
-                            gCamCapability[mCameraId]->picture_sizes_tbl[i].height)) {
+                            gCamCapability[cameraId]->picture_sizes_tbl[i].height)) {
                     sizeFound = true;
                     break;
                 }
@@ -1041,8 +1064,8 @@
         if (!sizeFound) {
             LOGE("Error: Unsupported size: %d x %d type: %d array size: %d x %d",
                     rotatedWidth, rotatedHeight, newStream->format,
-                    gCamCapability[mCameraId]->active_array_size.width,
-                    gCamCapability[mCameraId]->active_array_size.height);
+                    gCamCapability[cameraId]->active_array_size.width,
+                    gCamCapability[cameraId]->active_array_size.height);
             rc = -EINVAL;
             break;
         }
@@ -1111,6 +1134,9 @@
  * DESCRIPTION: Check if the configuration usage flags conflict with Eis
  *
  * PARAMETERS :
+ *   @bEisEnable : Flag indicated that EIS is enabled.
+ *   @bEisSupportedSize : Flag indicating that there is a preview/video stream
+ *                        within the EIS supported size.
  *   @stream_list : streams to be configured
  *
  * RETURN     :
@@ -1118,7 +1144,7 @@
  *   error code if usage flags are not supported
  *
  *==========================================================================*/
-int QCamera3HardwareInterface::validateUsageFlagsForEis(
+int QCamera3HardwareInterface::validateUsageFlagsForEis(bool bEisEnable, bool bEisSupportedSize,
         const camera3_stream_configuration_t* streamList)
 {
     for (size_t j = 0; j < streamList->num_streams; j++) {
@@ -1130,7 +1156,7 @@
         // Because EIS is "hard-coded" for certain use case, and current
         // implementation doesn't support shared preview and video on the same
         // stream, return failure if EIS is forced on.
-        if (isPreview && isVideo && m_bEisEnable && m_bEisSupportedSize) {
+        if (isPreview && isVideo && bEisEnable && bEisSupportedSize) {
             LOGE("Combined video and preview usage flag is not supported due to EIS");
             return -EINVAL;
         }
@@ -1430,22 +1456,40 @@
 }
 
 /*===========================================================================
- * FUNCTION   : configureStreamsPerfLocked
+ * FUNCTION   : validateStreamCombination
  *
- * DESCRIPTION: configureStreams while perfLock is held.
+ * DESCRIPTION: Validate a given stream combination.
  *
  * PARAMETERS :
- *   @stream_list : streams to be configured
+ *   @cameraId : camera Id.
+ *   @stream_list : stream combination to be validated.
+ *   @status : validation status.
  *
  * RETURN     : int32_t type of status
  *              NO_ERROR  -- success
  *              none-zero failure code
  *==========================================================================*/
-int QCamera3HardwareInterface::configureStreamsPerfLocked(
-        camera3_stream_configuration_t *streamList)
+int32_t QCamera3HardwareInterface::validateStreamCombination(uint32_t cameraId,
+        camera3_stream_configuration_t *streamList /*in*/, StreamValidateStatus *status /*out*/)
 {
-    ATRACE_CALL();
-    int rc = 0;
+    size_t rawStreamCnt = 0;
+    size_t stallStreamCnt = 0;
+    size_t processedStreamCnt = 0;
+    size_t numYuv888OnEncoder = 0;
+    bool bJpegExceeds4K = false;
+    bool bJpegOnEncoder = false;
+    uint32_t width_ratio;
+    uint32_t height_ratio;
+    bool isJpeg = false;
+    cam_dimension_t jpegSize = {0, 0};
+    camera3_stream_t *zslStream = nullptr;
+    uint32_t maxEisWidth = 0;
+    uint32_t maxEisHeight = 0;
+
+    if (status == nullptr) {
+        LOGE("NULL stream status");
+        return BAD_VALUE;
+    }
 
     // Sanity check stream_list
     if (streamList == NULL) {
@@ -1469,11 +1513,235 @@
         return BAD_VALUE;
     }
 
-    rc = validateUsageFlags(streamList);
+    auto rc = validateUsageFlags(streamList);
     if (rc != NO_ERROR) {
         return rc;
     }
 
+    rc = validateStreamDimensions(cameraId, streamList);
+    if (rc == NO_ERROR) {
+        rc = validateStreamRotations(streamList);
+    }
+    if (rc != NO_ERROR) {
+        LOGE("Invalid stream configuration requested!");
+        return rc;
+    }
+
+    size_t count = IS_TYPE_MAX;
+    count = MIN(gCamCapability[cameraId]->supported_is_types_cnt, count);
+    for (size_t i = 0; i < count; i++) {
+        if (gCamCapability[cameraId]->supported_is_types[i] == IS_TYPE_EIS_2_0) {
+            status->bEisSupported = true;
+            break;
+        }
+    }
+
+    if (status->bEisSupported) {
+        maxEisWidth = MAX_EIS_WIDTH;
+        maxEisHeight = MAX_EIS_HEIGHT;
+    }
+
+    status->maxViewfinderSize = gCamCapability[cameraId]->max_viewfinder_size;
+    status->largeYuv888Size = {0, 0};
+
+    /* stream configurations */
+    for (size_t i = 0; i < streamList->num_streams; i++) {
+        camera3_stream_t *newStream = streamList->streams[i];
+        LOGI("stream[%d] type = %d, format = %d, width = %d, "
+                "height = %d, rotation = %d, usage = 0x%x",
+                 i, newStream->stream_type, newStream->format,
+                newStream->width, newStream->height, newStream->rotation,
+                newStream->usage);
+        if (newStream->stream_type == CAMERA3_STREAM_INPUT){
+            status->isZsl = true;
+            status->inputStream = newStream;
+        }
+
+        if (IS_USAGE_ZSL(newStream->usage)) {
+            if (zslStream != nullptr) {
+                LOGE("Multiple input/reprocess streams requested!");
+                return BAD_VALUE;
+            }
+            zslStream = newStream;
+        }
+
+        if (newStream->format == HAL_PIXEL_FORMAT_BLOB) {
+            isJpeg = true;
+            jpegSize.width = newStream->width;
+            jpegSize.height = newStream->height;
+            if (newStream->width > VIDEO_4K_WIDTH ||
+                    newStream->height > VIDEO_4K_HEIGHT)
+                bJpegExceeds4K = true;
+        }
+
+        if ((HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED == newStream->format) &&
+                (IS_USAGE_PREVIEW(newStream->usage) || IS_USAGE_VIDEO(newStream->usage))) {
+            if (IS_USAGE_VIDEO(newStream->usage)) {
+                status->videoWidth = newStream->width;
+                status->videoHeight = newStream->height;
+                status->bIsVideo = true;
+                if ((VIDEO_4K_WIDTH <= newStream->width) &&
+                        (VIDEO_4K_HEIGHT <= newStream->height)) {
+                    status->bIs4KVideo = true;
+                }
+            }
+            status->bEisSupportedSize &= (newStream->width <= maxEisWidth) &&
+                                  (newStream->height <= maxEisHeight);
+        }
+        if (newStream->stream_type == CAMERA3_STREAM_OUTPUT) {
+            switch (newStream->format) {
+            case HAL_PIXEL_FORMAT_BLOB:
+                stallStreamCnt++;
+                if (isOnEncoder(status->maxViewfinderSize, newStream->width,
+                        newStream->height)) {
+                    status->numStreamsOnEncoder++;
+                    bJpegOnEncoder = true;
+                }
+                width_ratio = CEIL_DIVISION(gCamCapability[cameraId]->active_array_size.width,
+                        newStream->width);
+                height_ratio = CEIL_DIVISION(gCamCapability[cameraId]->active_array_size.height,
+                        newStream->height);;
+                FATAL_IF(gCamCapability[cameraId]->max_downscale_factor == 0,
+                        "FATAL: max_downscale_factor cannot be zero and so assert");
+                if ( (width_ratio > gCamCapability[cameraId]->max_downscale_factor) ||
+                    (height_ratio > gCamCapability[cameraId]->max_downscale_factor)) {
+                    LOGH("Setting small jpeg size flag to true");
+                    status->bSmallJpegSize = true;
+                }
+                break;
+            case HAL_PIXEL_FORMAT_RAW10:
+            case HAL_PIXEL_FORMAT_RAW_OPAQUE:
+            case HAL_PIXEL_FORMAT_RAW16:
+                rawStreamCnt++;
+                break;
+            case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
+                processedStreamCnt++;
+                if (isOnEncoder(status->maxViewfinderSize, newStream->width,
+                        newStream->height)) {
+                    if (newStream->stream_type != CAMERA3_STREAM_BIDIRECTIONAL &&
+                            !IS_USAGE_ZSL(newStream->usage)) {
+                        status->commonFeatureMask |= CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
+                    }
+                    status->numStreamsOnEncoder++;
+                }
+                break;
+            case HAL_PIXEL_FORMAT_YCbCr_420_888:
+                processedStreamCnt++;
+                if (isOnEncoder(status->maxViewfinderSize, newStream->width,
+                        newStream->height)) {
+                    // If Yuv888 size is not greater than 4K, set feature mask
+                    // to SUPERSET so that it support concurrent request on
+                    // YUV and JPEG.
+                    if (newStream->width <= VIDEO_4K_WIDTH &&
+                            newStream->height <= VIDEO_4K_HEIGHT) {
+                        status->commonFeatureMask |= CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
+                    }
+                    status->numStreamsOnEncoder++;
+                    numYuv888OnEncoder++;
+                    status->largeYuv888Size.width = newStream->width;
+                    status->largeYuv888Size.height = newStream->height;
+                }
+                break;
+            default:
+                LOGE("not a supported format 0x%x", newStream->format);
+                return BAD_VALUE;
+            }
+
+        }
+    }
+
+    if (validateUsageFlagsForEis(status->bEisSupported, status->bEisSupportedSize, streamList) !=
+            NO_ERROR) {
+        return BAD_VALUE;
+    }
+
+    /* Check if num_streams is sane */
+    if (stallStreamCnt > MAX_STALLING_STREAMS ||
+            rawStreamCnt > MAX_RAW_STREAMS ||
+            processedStreamCnt > MAX_PROCESSED_STREAMS) {
+        LOGE("Invalid stream configu: stall: %d, raw: %d, processed %d",
+                 stallStreamCnt, rawStreamCnt, processedStreamCnt);
+        return BAD_VALUE;
+    }
+    /* Check whether we have zsl stream or 4k video case */
+    if (status->isZsl && status->bIs4KVideo) {
+        LOGE("Currently invalid configuration ZSL&Video!");
+        return BAD_VALUE;
+    }
+    /* Check if stream sizes are sane */
+    if (status->numStreamsOnEncoder > 2) {
+        LOGE("Number of streams on ISP encoder path exceeds limits of 2");
+        return BAD_VALUE;
+    } else if (1 < status->numStreamsOnEncoder){
+        status->bUseCommonFeatureMask = true;
+        LOGH("Multiple streams above max viewfinder size, common mask needed");
+    }
+
+    /* Check if BLOB size is greater than 4k in 4k recording case */
+    if (status->bIs4KVideo && bJpegExceeds4K) {
+        LOGE("HAL doesn't support Blob size greater than 4k in 4k recording");
+        return BAD_VALUE;
+    }
+
+    // When JPEG and preview streams share VFE output, CPP will not apply CAC2
+    // on JPEG stream. So disable such configurations to ensure CAC2 is applied.
+    // Don't fail for reprocess configurations. Also don't fail if bJpegExceeds4K
+    // is not true. Otherwise testMandatoryOutputCombinations will fail with following
+    // configurations:
+    //    {[PRIV, PREVIEW] [PRIV, RECORD] [JPEG, RECORD]}
+    //    {[PRIV, PREVIEW] [YUV, RECORD] [JPEG, RECORD]}
+    //    (These two configurations will not have CAC2 enabled even in HQ modes.)
+    if (!status->isZsl && bJpegOnEncoder && bJpegExceeds4K && status->bUseCommonFeatureMask) {
+        ALOGE("%s: Blob size greater than 4k and multiple streams are on encoder output",
+                __func__);
+        return BAD_VALUE;
+    }
+
+    // If jpeg stream is available, and a YUV 888 stream is on Encoder path, and
+    // the YUV stream's size is greater or equal to the JPEG size, set common
+    // postprocess mask to NONE, so that we can take advantage of postproc bypass.
+    if (numYuv888OnEncoder && isOnEncoder(status->maxViewfinderSize,
+            jpegSize.width, jpegSize.height) &&
+            status->largeYuv888Size.width > jpegSize.width &&
+            status->largeYuv888Size.height > jpegSize.height) {
+        status->bYuv888OverrideJpeg = true;
+    } else if (!isJpeg && status->numStreamsOnEncoder > 1) {
+        status->commonFeatureMask = CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
+    }
+
+    LOGH("max viewfinder width %d height %d isZsl %d bUseCommonFeature %x commonFeatureMask %llx",
+            status->maxViewfinderSize.width, status->maxViewfinderSize.height, status->isZsl,
+            status->bUseCommonFeatureMask, status->commonFeatureMask);
+    LOGH("numStreamsOnEncoder %d, processedStreamCnt %d, stallcnt %d bSmallJpegSize %d",
+            status->numStreamsOnEncoder, processedStreamCnt, stallStreamCnt,
+            status->bSmallJpegSize);
+
+    return NO_ERROR;
+}
+
+/*===========================================================================
+ * FUNCTION   : configureStreamsPerfLocked
+ *
+ * DESCRIPTION: configureStreams while perfLock is held.
+ *
+ * PARAMETERS :
+ *   @stream_list : streams to be configured
+ *
+ * RETURN     : int32_t type of status
+ *              NO_ERROR  -- success
+ *              none-zero failure code
+ *==========================================================================*/
+int QCamera3HardwareInterface::configureStreamsPerfLocked(
+        camera3_stream_configuration_t *streamList)
+{
+    ATRACE_CALL();
+
+    StreamValidateStatus streamStatus;
+    auto rc = validateStreamCombination(mCameraId, streamList, &streamStatus);
+    if (NO_ERROR != rc) {
+        return rc;
+    }
+
     mOpMode = streamList->operation_mode;
     LOGD("mOpMode: %d", mOpMode);
 
@@ -1526,58 +1794,17 @@
     }
 
     /* Check whether we have video stream */
-    m_bIs4KVideo = false;
-    m_bIsVideo = false;
-    m_bEisSupportedSize = true;
+    m_bIs4KVideo = streamStatus.bIs4KVideo;
+    m_bIsVideo = streamStatus.bIsVideo;
+    m_bEisSupportedSize = streamStatus.bEisSupportedSize;
     m_bTnrEnabled = false;
-    bool isZsl = false;
-    bool isPreview = false;
-    uint32_t videoWidth = 0U;
-    uint32_t videoHeight = 0U;
-    size_t rawStreamCnt = 0;
-    size_t stallStreamCnt = 0;
-    size_t processedStreamCnt = 0;
-    // Number of streams on ISP encoder path
-    size_t numStreamsOnEncoder = 0;
-    size_t numYuv888OnEncoder = 0;
-    bool bYuv888OverrideJpeg = false;
-    cam_dimension_t largeYuv888Size = {0, 0};
-    cam_dimension_t maxViewfinderSize = {0, 0};
-    bool bJpegExceeds4K = false;
-    bool bJpegOnEncoder = false;
-    bool bUseCommonFeatureMask = false;
-    cam_feature_mask_t commonFeatureMask = 0;
-    bool bSmallJpegSize = false;
-    uint32_t width_ratio;
-    uint32_t height_ratio;
-    maxViewfinderSize = gCamCapability[mCameraId]->max_viewfinder_size;
-    camera3_stream_t *inputStream = NULL;
-    bool isJpeg = false;
-    cam_dimension_t jpegSize = {0, 0};
+    memset(&mInputStreamInfo, 0, sizeof(mInputStreamInfo));
 
     cam_padding_info_t padding_info = gCamCapability[mCameraId]->padding_info;
 
-    /*EIS configuration*/
-    bool eisSupported = false;
+    /*OIS configuration*/
     bool oisSupported = false;
-    int32_t margin_index = -1;
-    uint8_t eis_prop_set;
-    uint32_t maxEisWidth = 0;
-    uint32_t maxEisHeight = 0;
-
-    memset(&mInputStreamInfo, 0, sizeof(mInputStreamInfo));
-
-    size_t count = IS_TYPE_MAX;
-    count = MIN(gCamCapability[mCameraId]->supported_is_types_cnt, count);
-    for (size_t i = 0; i < count; i++) {
-        if (gCamCapability[mCameraId]->supported_is_types[i] == IS_TYPE_EIS_2_0) {
-            eisSupported = true;
-            margin_index = (int32_t)i;
-            break;
-        }
-    }
-
-    count = CAM_OPT_STAB_MAX;
+    size_t count = CAM_OPT_STAB_MAX;
     count = MIN(gCamCapability[mCameraId]->optical_stab_modes_count, count);
     for (size_t i = 0; i < count; i++) {
         if (gCamCapability[mCameraId]->optical_stab_modes[i] ==  CAM_OPT_STAB_ON) {
@@ -1586,219 +1813,24 @@
         }
     }
 
-    if (eisSupported) {
-        maxEisWidth = MAX_EIS_WIDTH;
-        maxEisHeight = MAX_EIS_HEIGHT;
-    }
-
     /* EIS setprop control */
     char eis_prop[PROPERTY_VALUE_MAX];
+    uint8_t eis_prop_set;
     memset(eis_prop, 0, sizeof(eis_prop));
     property_get("persist.camera.eis.enable", eis_prop, "0");
     eis_prop_set = (uint8_t)atoi(eis_prop);
 
-    m_bEisEnable = eis_prop_set && (!oisSupported && eisSupported) &&
+    m_bEisEnable = eis_prop_set && (!oisSupported && streamStatus.bEisSupported) &&
             (mOpMode != CAMERA3_STREAM_CONFIGURATION_CONSTRAINED_HIGH_SPEED_MODE) &&
             (gCamCapability[mCameraId]->position != CAM_POSITION_FRONT);
 
-    /* stream configurations */
-    for (size_t i = 0; i < streamList->num_streams; i++) {
-        camera3_stream_t *newStream = streamList->streams[i];
-        LOGI("stream[%d] type = %d, format = %d, width = %d, "
-                "height = %d, rotation = %d, usage = 0x%x",
-                 i, newStream->stream_type, newStream->format,
-                newStream->width, newStream->height, newStream->rotation,
-                newStream->usage);
-        if (newStream->stream_type == CAMERA3_STREAM_BIDIRECTIONAL ||
-                newStream->stream_type == CAMERA3_STREAM_INPUT){
-            isZsl = true;
-        }
-        if ((HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED == newStream->format) &&
-                IS_USAGE_PREVIEW(newStream->usage)) {
-            isPreview = true;
-        }
-
-        if (newStream->stream_type == CAMERA3_STREAM_INPUT){
-            inputStream = newStream;
-        }
-
-        if (newStream->format == HAL_PIXEL_FORMAT_BLOB) {
-            isJpeg = true;
-            jpegSize.width = newStream->width;
-            jpegSize.height = newStream->height;
-            if (newStream->width > VIDEO_4K_WIDTH ||
-                    newStream->height > VIDEO_4K_HEIGHT)
-                bJpegExceeds4K = true;
-        }
-
-        if ((HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED == newStream->format) &&
-                (IS_USAGE_PREVIEW(newStream->usage) || IS_USAGE_VIDEO(newStream->usage))) {
-            if (IS_USAGE_VIDEO(newStream->usage)) {
-                videoWidth = newStream->width;
-                videoHeight = newStream->height;
-                m_bIsVideo = true;
-                if ((VIDEO_4K_WIDTH <= newStream->width) &&
-                        (VIDEO_4K_HEIGHT <= newStream->height)) {
-                    m_bIs4KVideo = true;
-                }
-            }
-            m_bEisSupportedSize &= (newStream->width <= maxEisWidth) &&
-                                  (newStream->height <= maxEisHeight);
-        }
-        if (newStream->stream_type == CAMERA3_STREAM_BIDIRECTIONAL ||
-                newStream->stream_type == CAMERA3_STREAM_OUTPUT) {
-            switch (newStream->format) {
-            case HAL_PIXEL_FORMAT_BLOB:
-                stallStreamCnt++;
-                if (isOnEncoder(maxViewfinderSize, newStream->width,
-                        newStream->height)) {
-                    numStreamsOnEncoder++;
-                    bJpegOnEncoder = true;
-                }
-                width_ratio = CEIL_DIVISION(gCamCapability[mCameraId]->active_array_size.width,
-                        newStream->width);
-                height_ratio = CEIL_DIVISION(gCamCapability[mCameraId]->active_array_size.height,
-                        newStream->height);;
-                FATAL_IF(gCamCapability[mCameraId]->max_downscale_factor == 0,
-                        "FATAL: max_downscale_factor cannot be zero and so assert");
-                if ( (width_ratio > gCamCapability[mCameraId]->max_downscale_factor) ||
-                    (height_ratio > gCamCapability[mCameraId]->max_downscale_factor)) {
-                    LOGH("Setting small jpeg size flag to true");
-                    bSmallJpegSize = true;
-                }
-                break;
-            case HAL_PIXEL_FORMAT_RAW10:
-            case HAL_PIXEL_FORMAT_RAW_OPAQUE:
-            case HAL_PIXEL_FORMAT_RAW16:
-                rawStreamCnt++;
-                break;
-            case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
-                processedStreamCnt++;
-                if (isOnEncoder(maxViewfinderSize, newStream->width,
-                        newStream->height)) {
-                    if (newStream->stream_type != CAMERA3_STREAM_BIDIRECTIONAL &&
-                            !IS_USAGE_ZSL(newStream->usage)) {
-                        commonFeatureMask |= CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
-                    }
-                    numStreamsOnEncoder++;
-                }
-                break;
-            case HAL_PIXEL_FORMAT_YCbCr_420_888:
-                processedStreamCnt++;
-                if (isOnEncoder(maxViewfinderSize, newStream->width,
-                        newStream->height)) {
-                    // If Yuv888 size is not greater than 4K, set feature mask
-                    // to SUPERSET so that it support concurrent request on
-                    // YUV and JPEG.
-                    if (newStream->width <= VIDEO_4K_WIDTH &&
-                            newStream->height <= VIDEO_4K_HEIGHT) {
-                        commonFeatureMask |= CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
-                    }
-                    numStreamsOnEncoder++;
-                    numYuv888OnEncoder++;
-                    largeYuv888Size.width = newStream->width;
-                    largeYuv888Size.height = newStream->height;
-                }
-                break;
-            default:
-                processedStreamCnt++;
-                if (isOnEncoder(maxViewfinderSize, newStream->width,
-                        newStream->height)) {
-                    commonFeatureMask |= CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
-                    numStreamsOnEncoder++;
-                }
-                break;
-            }
-
-        }
-    }
-
-    if (validateUsageFlagsForEis(streamList) != NO_ERROR) {
-        pthread_mutex_unlock(&mMutex);
-        return -EINVAL;
-    }
     /* Logic to enable/disable TNR based on specific config size/etc.*/
     if ((m_bTnrPreview || m_bTnrVideo) && m_bIsVideo &&
-            ((videoWidth == 1920 && videoHeight == 1080) ||
-            (videoWidth == 1280 && videoHeight == 720)) &&
+            ((streamStatus.videoWidth == 1920 && streamStatus.videoHeight == 1080) ||
+            (streamStatus.videoWidth == 1280 && streamStatus.videoHeight == 720)) &&
             (mOpMode != CAMERA3_STREAM_CONFIGURATION_CONSTRAINED_HIGH_SPEED_MODE))
         m_bTnrEnabled = true;
 
-    /* Check if num_streams is sane */
-    if (stallStreamCnt > MAX_STALLING_STREAMS ||
-            rawStreamCnt > MAX_RAW_STREAMS ||
-            processedStreamCnt > MAX_PROCESSED_STREAMS) {
-        LOGE("Invalid stream configu: stall: %d, raw: %d, processed %d",
-                 stallStreamCnt, rawStreamCnt, processedStreamCnt);
-        pthread_mutex_unlock(&mMutex);
-        return -EINVAL;
-    }
-    /* Check whether we have zsl stream or 4k video case */
-    if (isZsl && m_bIsVideo) {
-        LOGE("Currently invalid configuration ZSL&Video!");
-        pthread_mutex_unlock(&mMutex);
-        return -EINVAL;
-    }
-    /* Check if stream sizes are sane */
-    if (numStreamsOnEncoder > 2) {
-        LOGE("Number of streams on ISP encoder path exceeds limits of 2");
-        pthread_mutex_unlock(&mMutex);
-        return -EINVAL;
-    } else if (1 < numStreamsOnEncoder){
-        bUseCommonFeatureMask = true;
-        LOGH("Multiple streams above max viewfinder size, common mask needed");
-    }
-
-    /* Check if BLOB size is greater than 4k in 4k recording case */
-    if (m_bIs4KVideo && bJpegExceeds4K) {
-        LOGE("HAL doesn't support Blob size greater than 4k in 4k recording");
-        pthread_mutex_unlock(&mMutex);
-        return -EINVAL;
-    }
-
-    // When JPEG and preview streams share VFE output, CPP will not apply CAC2
-    // on JPEG stream. So disable such configurations to ensure CAC2 is applied.
-    // Don't fail for reprocess configurations. Also don't fail if bJpegExceeds4K
-    // is not true. Otherwise testMandatoryOutputCombinations will fail with following
-    // configurations:
-    //    {[PRIV, PREVIEW] [PRIV, RECORD] [JPEG, RECORD]}
-    //    {[PRIV, PREVIEW] [YUV, RECORD] [JPEG, RECORD]}
-    //    (These two configurations will not have CAC2 enabled even in HQ modes.)
-    if (!isZsl && bJpegOnEncoder && bJpegExceeds4K && bUseCommonFeatureMask) {
-        ALOGE("%s: Blob size greater than 4k and multiple streams are on encoder output",
-                __func__);
-        pthread_mutex_unlock(&mMutex);
-        return -EINVAL;
-    }
-
-    // If jpeg stream is available, and a YUV 888 stream is on Encoder path, and
-    // the YUV stream's size is greater or equal to the JPEG size, set common
-    // postprocess mask to NONE, so that we can take advantage of postproc bypass.
-    if (numYuv888OnEncoder && isOnEncoder(maxViewfinderSize,
-            jpegSize.width, jpegSize.height) &&
-            largeYuv888Size.width > jpegSize.width &&
-            largeYuv888Size.height > jpegSize.height) {
-        bYuv888OverrideJpeg = true;
-    } else if (!isJpeg && numStreamsOnEncoder > 1) {
-        commonFeatureMask = CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
-    }
-
-    LOGH("max viewfinder width %d height %d isZsl %d bUseCommonFeature %x commonFeatureMask %llx",
-            maxViewfinderSize.width, maxViewfinderSize.height, isZsl, bUseCommonFeatureMask,
-            commonFeatureMask);
-    LOGH("numStreamsOnEncoder %d, processedStreamCnt %d, stallcnt %d bSmallJpegSize %d",
-            numStreamsOnEncoder, processedStreamCnt, stallStreamCnt, bSmallJpegSize);
-
-    rc = validateStreamDimensions(streamList);
-    if (rc == NO_ERROR) {
-        rc = validateStreamRotations(streamList);
-    }
-    if (rc != NO_ERROR) {
-        LOGE("Invalid stream configuration requested!");
-        pthread_mutex_unlock(&mMutex);
-        return rc;
-    }
-
     camera3_stream_t *zslStream = NULL; //Only use this for size and not actual handle!
     camera3_stream_t *jpegStream = NULL;
     for (size_t i = 0; i < streamList->num_streams; i++) {
@@ -1848,12 +1880,12 @@
             zslStream = newStream;
         }
         /* Covers YUV reprocess */
-        if (inputStream != NULL) {
+        if (streamStatus.inputStream != NULL) {
             if (newStream->stream_type == CAMERA3_STREAM_OUTPUT
                     && newStream->format == HAL_PIXEL_FORMAT_YCbCr_420_888
-                    && inputStream->format == HAL_PIXEL_FORMAT_YCbCr_420_888
-                    && inputStream->width == newStream->width
-                    && inputStream->height == newStream->height) {
+                    && streamStatus.inputStream->format == HAL_PIXEL_FORMAT_YCbCr_420_888
+                    && streamStatus.inputStream->width == newStream->width
+                    && streamStatus.inputStream->height == newStream->height) {
                 if (zslStream != NULL) {
                     /* This scenario indicates multiple YUV streams with same size
                      * as input stream have been requested, since zsl stream handle
@@ -1982,9 +2014,9 @@
                 || IS_USAGE_ZSL(newStream->usage)) &&
             newStream->format == HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED){
             mStreamConfigInfo.type[mStreamConfigInfo.num_streams] = CAM_STREAM_TYPE_SNAPSHOT;
-            if (bUseCommonFeatureMask) {
+            if (streamStatus.bUseCommonFeatureMask) {
                 mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] =
-                        commonFeatureMask;
+                        streamStatus.commonFeatureMask;
             } else {
                 mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] =
                         CAM_QCOM_FEATURE_NONE;
@@ -2037,10 +2069,11 @@
             break;
             case HAL_PIXEL_FORMAT_YCbCr_420_888:
                 mStreamConfigInfo.type[mStreamConfigInfo.num_streams] = CAM_STREAM_TYPE_CALLBACK;
-                if (isOnEncoder(maxViewfinderSize, newStream->width, newStream->height)) {
-                    if (bUseCommonFeatureMask)
+                if (isOnEncoder(streamStatus.maxViewfinderSize, newStream->width,
+                            newStream->height)) {
+                    if (streamStatus.bUseCommonFeatureMask)
                         mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] =
-                                commonFeatureMask;
+                                streamStatus.commonFeatureMask;
                     else
                         mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] =
                                 CAM_QCOM_FEATURE_NONE;
@@ -2052,19 +2085,21 @@
             case HAL_PIXEL_FORMAT_BLOB:
                 mStreamConfigInfo.type[mStreamConfigInfo.num_streams] = CAM_STREAM_TYPE_SNAPSHOT;
                 // No need to check bSmallJpegSize if ZSL is present since JPEG uses ZSL stream
-                if ((m_bIs4KVideo && !isZsl) || (bSmallJpegSize && !isZsl)) {
+                if ((m_bIs4KVideo && !streamStatus.isZsl) ||
+                        (streamStatus.bSmallJpegSize && !streamStatus.isZsl)) {
                      mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] =
                              CAM_QCOM_FEATURE_PP_SUPERSET_HAL3;
                 } else {
-                    if (bUseCommonFeatureMask &&
-                            isOnEncoder(maxViewfinderSize, newStream->width,
+                    if (streamStatus.bUseCommonFeatureMask &&
+                            isOnEncoder(streamStatus.maxViewfinderSize, newStream->width,
                             newStream->height)) {
-                        mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] = commonFeatureMask;
+                        mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] =
+                                streamStatus.commonFeatureMask;
                     } else {
                         mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams] = CAM_QCOM_FEATURE_NONE;
                     }
                 }
-                if (isZsl) {
+                if (streamStatus.isZsl) {
                     if (zslStream) {
                         mStreamConfigInfo.stream_sizes[mStreamConfigInfo.num_streams].width =
                                 (int32_t)zslStream->width;
@@ -2076,13 +2111,15 @@
                         return -EINVAL;
                     }
                 } else if (m_bIs4KVideo) {
-                    mStreamConfigInfo.stream_sizes[mStreamConfigInfo.num_streams].width = (int32_t)videoWidth;
-                    mStreamConfigInfo.stream_sizes[mStreamConfigInfo.num_streams].height = (int32_t)videoHeight;
-                } else if (bYuv888OverrideJpeg) {
                     mStreamConfigInfo.stream_sizes[mStreamConfigInfo.num_streams].width =
-                            (int32_t)largeYuv888Size.width;
+                        (int32_t) streamStatus.videoWidth;
                     mStreamConfigInfo.stream_sizes[mStreamConfigInfo.num_streams].height =
-                            (int32_t)largeYuv888Size.height;
+                        (int32_t) streamStatus.videoHeight;
+                } else if (streamStatus.bYuv888OverrideJpeg) {
+                    mStreamConfigInfo.stream_sizes[mStreamConfigInfo.num_streams].width =
+                            (int32_t) streamStatus.largeYuv888Size.width;
+                    mStreamConfigInfo.stream_sizes[mStreamConfigInfo.num_streams].height =
+                            (int32_t) streamStatus.largeYuv888Size.height;
                 }
                 break;
             case HAL_PIXEL_FORMAT_RAW_OPAQUE:
@@ -2244,7 +2281,7 @@
                             mCameraHandle->ops, captureResultCb,
                             setBufferErrorStatus, &padding_info, this, newStream,
                             mStreamConfigInfo.postprocess_mask[mStreamConfigInfo.num_streams],
-                            m_bIs4KVideo, isZsl, mMetadataChannel,
+                            m_bIs4KVideo, streamStatus.isZsl, mMetadataChannel,
                             (m_bIsVideo ? 1 : MAX_INFLIGHT_BLOB));
                     if (mPictureChannel == NULL) {
                         LOGE("allocation of channel failed");
@@ -2472,6 +2509,8 @@
     // Update state
     mState = CONFIGURED;
 
+    memset(&mLastEISCropInfo, 0, sizeof(mLastEISCropInfo));
+
     if (streamList->session_parameters != nullptr) {
         CameraMetadata meta;
         meta = streamList->session_parameters;
@@ -3475,6 +3514,56 @@
                     internalPproc = true;
                     QCamera3ProcessingChannel *channel =
                             (QCamera3ProcessingChannel *)iter->stream->priv;
+
+                    if (iter->need_crop) {
+                        QCamera3Stream *stream = channel->getStreamByIndex(0);
+
+                        // Map the EIS crop to respective stream crop and append it.
+                        IF_META_AVAILABLE(cam_crop_data_t, crop_data, CAM_INTF_META_CROP_DATA,
+                                metadata) {
+                            for (int j = 0; j < crop_data->num_of_streams; j++) {
+                                if ((stream != nullptr) &&
+                                        (stream->getMyServerID() ==
+                                         crop_data->crop_info[j].stream_id)) {
+
+                                    cam_dimension_t streamDim;
+                                    if (stream->getFrameDimension(streamDim) != NO_ERROR) {
+                                        LOGE("%s: Failed obtaining stream dimensions!", __func__);
+                                        continue;
+                                    }
+
+                                    mStreamCropMapper.update(
+                                            gCamCapability[mCameraId]->active_array_size.width,
+                                            gCamCapability[mCameraId]->active_array_size.height,
+                                            streamDim.width, streamDim.height);
+
+                                    cam_eis_crop_info_t eisCrop = iter->crop_info;
+                                    mStreamCropMapper.toSensor(eisCrop.delta_x, eisCrop.delta_y,
+                                            eisCrop.delta_width, eisCrop.delta_height);
+
+                                    int32_t crop[4] = {
+                                        crop_data->crop_info[j].crop.left   + eisCrop.delta_x,
+                                        crop_data->crop_info[j].crop.top    + eisCrop.delta_y,
+                                        crop_data->crop_info[j].crop.width  - eisCrop.delta_width,
+                                        crop_data->crop_info[j].crop.height - eisCrop.delta_height
+                                    };
+
+                                    if (isCropValid(crop[0], crop[1], crop[2], crop[3],
+                                                streamDim.width, streamDim.height)) {
+                                        crop_data->crop_info[j].crop.left   = crop[0];
+                                        crop_data->crop_info[j].crop.top    = crop[1];
+                                        crop_data->crop_info[j].crop.width  = crop[2];
+                                        crop_data->crop_info[j].crop.height = crop[3];
+                                    } else {
+                                        LOGE("Invalid EIS compensated crop region");
+                                    }
+
+                                    break;
+                                }
+                            }
+                        }
+                    }
+
                     channel->queueReprocMetadata(metadata_buf);
                     break;
                 }
@@ -4373,6 +4462,12 @@
                 }
 
                 pendingBufferIter->need_metadata = true;
+
+                if (isEISCropInSnapshotNeeded(meta)) {
+                    pendingBufferIter->need_crop = true;
+                    pendingBufferIter->crop_info = mLastEISCropInfo;
+                }
+
                 streams_need_metadata++;
             }
         } else if (output.stream->format == HAL_PIXEL_FORMAT_YCbCr_420_888) {
@@ -5495,6 +5590,14 @@
     camMetadata.update(ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL,
             &gCamCapability[mCameraId]->white_level, 1);
 
+    IF_META_AVAILABLE(cam_eis_crop_info_t, eisCropInfo,
+            CAM_INTF_META_EIS_CROP_INFO, metadata) {
+        mLastEISCropInfo = *eisCropInfo;
+
+        mCropRegionMapper.toActiveArray(mLastEISCropInfo.delta_x, mLastEISCropInfo.delta_y,
+                mLastEISCropInfo.delta_width, mLastEISCropInfo.delta_height);
+    }
+
     IF_META_AVAILABLE(cam_crop_region_t, hScalerCropRegion,
             CAM_INTF_META_SCALER_CROP_REGION, metadata) {
         int32_t scalerCropRegion[4];
@@ -6149,6 +6252,11 @@
     IF_META_AVAILABLE(uint8_t, afSceneChange, CAM_INTF_META_AF_SCENE_CHANGE, metadata) {
         camMetadata.update(NEXUS_EXPERIMENTAL_2016_AF_SCENE_CHANGE, afSceneChange, 1);
         camMetadata.update(ANDROID_CONTROL_AF_SCENE_CHANGE, afSceneChange, 1);
+    } else {
+        uint8_t noSceneChange = 0;
+        camMetadata.update(NEXUS_EXPERIMENTAL_2016_AF_SCENE_CHANGE, &noSceneChange, 1);
+        camMetadata.update(ANDROID_CONTROL_AF_SCENE_CHANGE, &noSceneChange, 1);
+        LOGE("Missing AF_SCENE_CHANGE metadata!");
     }
 
     resultMetadata = camMetadata.release();
@@ -7357,9 +7465,23 @@
     count = MIN(gCamCapability[cameraId]->picture_sizes_tbl_cnt, MAX_SIZES_CNT);
     /*android.scaler.availableStreamConfigurations*/
     Vector<int32_t> available_stream_configs;
+    std::vector<config_entry> stream_configs;
+    std::unordered_map<config_entry, int32_t, ConfigEntryHash> suggested_configs;
+    int32_t suggested_proc_formats[] = {
+        ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_888,
+        HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED};
+    size_t suggested_formats_count = sizeof(suggested_proc_formats) /
+        sizeof(suggested_proc_formats[0]);
     cam_dimension_t active_array_dim;
     active_array_dim.width = gCamCapability[cameraId]->active_array_size.width;
     active_array_dim.height = gCamCapability[cameraId]->active_array_size.height;
+    int32_t raw_usecase =
+            1 << ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW;
+    int32_t zsl_snapshot_usecase =
+            (1 << ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT) |
+            (1 << ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL);
+    int32_t zsl_usecase =
+            1 << ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL;
     /* Add input/output stream configurations for each scalar formats*/
     for (size_t j = 0; j < scalar_formats_count; j++) {
         switch (scalar_formats[j]) {
@@ -7371,6 +7493,14 @@
                 addStreamConfig(available_stream_configs, scalar_formats[j],
                         gCamCapability[cameraId]->raw_dim[i],
                         ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+                config_entry entry(gCamCapability[cameraId]->raw_dim[i].width,
+                        gCamCapability[cameraId]->raw_dim[i].height, scalar_formats[j],
+                        ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+                stream_configs.push_back(entry);
+                if ((scalar_formats[j] == HAL_PIXEL_FORMAT_RAW10) ||
+                        (scalar_formats[j] == ANDROID_SCALER_AVAILABLE_FORMATS_RAW_OPAQUE)) {
+                    suggested_configs[entry] |= raw_usecase;
+                }
             }
             break;
         case HAL_PIXEL_FORMAT_BLOB:
@@ -7379,6 +7509,15 @@
                 addStreamConfig(available_stream_configs, scalar_formats[j],
                         gCamCapability[cameraId]->picture_sizes_tbl[i],
                         ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+                stream_configs.push_back(config_entry(
+                            gCamCapability[cameraId]->picture_sizes_tbl[i].width,
+                            gCamCapability[cameraId]->picture_sizes_tbl[i].height,
+                            scalar_formats[j],
+                            ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT));
+                config_entry entry(gCamCapability[cameraId]->picture_sizes_tbl[i].width,
+                        gCamCapability[cameraId]->picture_sizes_tbl[i].height, scalar_formats[j],
+                        ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+                suggested_configs[entry] |= zsl_snapshot_usecase;
             }
             break;
         case HAL_PIXEL_FORMAT_YCbCr_420_888:
@@ -7391,6 +7530,12 @@
                 addStreamConfig(available_stream_configs, scalar_formats[j],
                         gCamCapability[cameraId]->picture_sizes_tbl[i],
                         ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+                config_entry entry(gCamCapability[cameraId]->picture_sizes_tbl[i].width,
+                        gCamCapability[cameraId]->picture_sizes_tbl[i].height,
+                        scalar_formats[j],
+                        ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+                stream_configs.push_back(entry);
+                suggested_configs[entry] |= zsl_snapshot_usecase;
                 /* Book keep largest */
                 if (gCamCapability[cameraId]->picture_sizes_tbl[i].width
                         >= largest_picture_size.width &&
@@ -7404,6 +7549,10 @@
                  addStreamConfig(available_stream_configs, scalar_formats[j],
                          largest_picture_size,
                          ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT);
+                 config_entry entry(largest_picture_size.width, largest_picture_size.height,
+                         scalar_formats[j],
+                         ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT);
+                 suggested_configs[entry] |= zsl_usecase;
             }
             break;
         }
@@ -7412,6 +7561,62 @@
     staticInfo.update(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS,
                       available_stream_configs.array(), available_stream_configs.size());
 
+    int32_t preview_usecase =
+            1 << ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW;
+    for (size_t i = 0; i < gCamCapability[cameraId]->preview_sizes_tbl_cnt; i++) {
+        for (size_t j = 0; j < suggested_formats_count; j++) {
+            config_entry entry(gCamCapability[cameraId]->preview_sizes_tbl[i].width,
+                    gCamCapability[cameraId]->preview_sizes_tbl[i].height,
+                    suggested_proc_formats[j],
+                    ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+            if (std::find(stream_configs.begin(), stream_configs.end(), entry) !=
+                    stream_configs.end()) {
+                suggested_configs[entry] |= preview_usecase;
+            }
+        }
+    }
+
+    int32_t record_usecase =
+            1 << ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD;
+    for (size_t i = 0; i < gCamCapability[cameraId]->video_sizes_tbl_cnt; i++) {
+        for (size_t j = 0; j < suggested_formats_count; j++) {
+            config_entry entry(gCamCapability[cameraId]->video_sizes_tbl[i].width,
+                    gCamCapability[cameraId]->video_sizes_tbl[i].height,
+                    suggested_proc_formats[j],
+                    ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+            if (std::find(stream_configs.begin(), stream_configs.end(), entry) !=
+                    stream_configs.end()) {
+                suggested_configs[entry] |= record_usecase;
+            }
+        }
+    }
+
+    int32_t video_snapshot_usecase =
+            1 << ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT;
+    for (size_t i = 0; i < gCamCapability[cameraId]->livesnapshot_sizes_tbl_cnt; i++) {
+        config_entry entry(gCamCapability[cameraId]->livesnapshot_sizes_tbl[i].width,
+                gCamCapability[cameraId]->livesnapshot_sizes_tbl[i].height,
+                HAL_PIXEL_FORMAT_BLOB,
+                ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+        if (std::find(stream_configs.begin(), stream_configs.end(), entry) !=
+                stream_configs.end()) {
+            suggested_configs[entry] |= video_snapshot_usecase;
+        }
+    }
+
+    std::vector<int32_t> suggested_array;
+    suggested_array.reserve(suggested_configs.size() * 5);
+    for (const auto &it : suggested_configs) {
+        suggested_array.push_back(std::get<0>(it.first));
+        suggested_array.push_back(std::get<1>(it.first));
+        suggested_array.push_back(std::get<2>(it.first));
+        suggested_array.push_back(std::get<3>(it.first));
+        suggested_array.push_back(it.second);
+    }
+
+    staticInfo.update(ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS,
+            suggested_array.data(), suggested_array.size());
+
     /* android.scaler.availableMinFrameDurations */
     Vector<int64_t> available_min_durations;
     for (size_t j = 0; j < scalar_formats_count; j++) {
@@ -7805,6 +8010,9 @@
     staticInfo.update(ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP,
                       io_format_map, sizeof(io_format_map)/sizeof(io_format_map[0]));
 
+    staticInfo.update(ANDROID_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP,
+            io_format_map, sizeof(io_format_map)/sizeof(io_format_map[0]));
+
     int32_t max_latency = ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL;
     staticInfo.update(ANDROID_SYNC_MAX_LATENCY,
                       &max_latency,
@@ -8125,7 +8333,9 @@
        ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE,
        ANDROID_SHADING_AVAILABLE_MODES,
        ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL,
-       ANDROID_SENSOR_OPAQUE_RAW_SIZE, QCAMERA3_OPAQUE_RAW_FORMAT
+       ANDROID_SENSOR_OPAQUE_RAW_SIZE, QCAMERA3_OPAQUE_RAW_FORMAT,
+       ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS,
+       ANDROID_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP
        };
 
     Vector<int32_t> available_characteristics_keys;
@@ -8453,6 +8663,55 @@
 }
 
 /*===========================================================================
+ * FUNCTION   : isStreamCombinationSupported
+ *
+ * DESCRIPTION: query camera support for specific stream combination
+ *
+ * PARAMETERS :
+ *   @cameraId  : camera Id
+ *   @comb      : stream combination
+ *
+ * RETURN     : int type of status
+ *              NO_ERROR  -- in case combination is supported
+ *              none-zero failure code
+ *==========================================================================*/
+int QCamera3HardwareInterface::isStreamCombinationSupported(uint32_t cameraId,
+        const camera_stream_combination_t *comb)
+{
+    int rc = BAD_VALUE;
+    pthread_mutex_lock(&gCamLock);
+
+    if (NULL == gCamCapability[cameraId]) {
+        rc = initCapabilities(cameraId);
+        if (rc < 0) {
+            pthread_mutex_unlock(&gCamLock);
+            return rc;
+        }
+    }
+
+    camera3_stream_configuration_t streamList = {comb->num_streams, /*streams*/ nullptr,
+            comb->operation_mode, /*session_parameters*/ nullptr};
+    streamList.streams = new camera3_stream_t * [comb->num_streams];
+    camera3_stream_t *streamBuffer = new camera3_stream_t[comb->num_streams];
+    for (size_t i = 0; i < comb->num_streams; i++) {
+        streamBuffer[i] = {comb->streams[i].stream_type, comb->streams[i].width,
+            comb->streams[i].height, comb->streams[i].format, comb->streams[i].usage,
+            /*max_buffers*/ 0, /*priv*/ nullptr, comb->streams[i].data_space,
+            comb->streams[i].rotation, comb->streams[i].physical_camera_id, /*reserved*/ {nullptr}};
+        streamList.streams[i] = &streamBuffer[i];
+    }
+
+    StreamValidateStatus validateStatus;
+    rc = validateStreamCombination(cameraId, &streamList, &validateStatus);
+
+    delete [] streamBuffer;
+    delete [] streamList.streams;
+    pthread_mutex_unlock(&gCamLock);
+
+    return rc;
+}
+
+/*===========================================================================
  * FUNCTION   : getCamInfo
  *
  * DESCRIPTION: query camera capabilities
@@ -9171,6 +9430,68 @@
 }
 
 /*===========================================================================
+ * FUNCTION   : isEISCropInSnapshotNeeded
+ *
+ * DESCRIPTION: In case EIS is active, check whether additional crop is needed
+ *              to avoid FOV jumps in snapshot streams.
+ *
+ * PARAMETERS : @metadata: Current request settings.
+ *
+ * RETURN     : True in case EIS crop is needed, False otherwise.
+ *==========================================================================*/
+bool QCamera3HardwareInterface::isEISCropInSnapshotNeeded(const CameraMetadata &metadata) const
+{
+    if (metadata.exists(ANDROID_CONTROL_VIDEO_STABILIZATION_MODE)) {
+        uint8_t vstabMode =
+            metadata.find(ANDROID_CONTROL_VIDEO_STABILIZATION_MODE).data.u8[0];
+        if (vstabMode == ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON) {
+            if ((mLastEISCropInfo.delta_x != 0) || (mLastEISCropInfo.delta_y != 0) ||
+                    (mLastEISCropInfo.delta_width != 0) || (mLastEISCropInfo.delta_height != 0)) {
+                return true;
+            }
+        }
+    }
+
+    return false;
+}
+
+/*===========================================================================
+ * FUNCTION   : isCropValid
+ *
+ * DESCRIPTION: Crop sanity checks.
+ *
+ * PARAMETERS : @startX: Horizontal crop offset.
+ *              @startY: Vertical crop offset.
+ *              @width: Crop width.
+ *              @height: Crop height.
+ *              @maxWidth: Horizontal maximum size.
+ *              @maxHeight: Vertical maximum size.
+ *
+ * RETURN     : True in case crop is valid, False otherwise.
+ *==========================================================================*/
+bool QCamera3HardwareInterface::isCropValid(int32_t startX, int32_t startY, int32_t width,
+        int32_t height, int32_t maxWidth, int32_t maxHeight) const
+{
+    if ((startX < 0) || (startY < 0) || (startX >= maxWidth) || (startY >= maxHeight)) {
+        LOGE("Crop offset is invalid: %dx%d", startX, startY);
+        return false;
+    }
+
+    if ((width < 0) || (height < 0) || (width >= maxWidth) || (height >= maxHeight)) {
+        LOGE("Crop dimensions are invalid: %dx%d", width, height);
+        return false;
+    }
+
+    if (((startX + width) > maxWidth)  || ((startY + height) > maxHeight)) {
+        LOGE("Crop is out of bounds: %dx%d max %dx%d", startX + width, startY + height, maxWidth,
+                maxHeight);
+        return false;
+    }
+
+    return true;
+}
+
+/*===========================================================================
  * FUNCTION   : saveRequestSettings
  *
  * DESCRIPTION: Add any settings that might have changed to the request settings
@@ -11154,7 +11475,12 @@
 
             // Go through the pending requests info and send error request to framework
             LOGE("Sending ERROR REQUEST for all pending requests");
+            // Some frame might be missing in mPendingRequestsList.
+            bool foundMatchingPendingReq = false;
             pendingRequestIterator i = mPendingRequestsList.begin(); //make sure i is at the beginning
+            if (i != mPendingRequestsList.end() && i->frame_number == req->frame_number) {
+                foundMatchingPendingReq = true;
+            }
 
             LOGE("Sending ERROR REQUEST for frame %d", req->frame_number);
 
@@ -11176,7 +11502,7 @@
 
             result.result = NULL;
             result.frame_number = req->frame_number;
-            result.input_buffer = i->input_buffer;
+            result.input_buffer = foundMatchingPendingReq ? i->input_buffer : nullptr;
             result.num_output_buffers = req->mPendingBufferList.size();
             result.output_buffers = pStream_Buf;
 
@@ -11200,7 +11526,9 @@
 
             mCallbackOps->process_capture_result(mCallbackOps, &result);
             delete [] pStream_Buf;
-            i = erasePendingRequest(i);
+            if (foundMatchingPendingReq) {
+                i = erasePendingRequest(i);
+            }
         }
     }
 
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.h b/camera/QCamera2/HAL3/QCamera3HWI.h
index 7739b51..bf9099b 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.h
+++ b/camera/QCamera2/HAL3/QCamera3HWI.h
@@ -151,6 +151,8 @@
     camera_metadata_t* translateCapabilityToMetadata(int type);
 
     static int getCamInfo(uint32_t cameraId, struct camera_info *info);
+    static int isStreamCombinationSupported(uint32_t cameraId,
+            const camera_stream_combination_t *streams);
     static int initCapabilities(uint32_t cameraId);
     static int initStaticMetadata(uint32_t cameraId);
     static void makeTable(cam_dimension_t *dimTable, size_t size,
@@ -280,11 +282,32 @@
             int32_t scalar_format, const cam_dimension_t &dim,
             int32_t config_type);
 
+    struct StreamValidateStatus {
+        bool bIsVideo, bIs4KVideo, bEisSupportedSize, depthPresent, bUseCommonFeatureMask;
+        bool isZsl, bSmallJpegSize, bYuv888OverrideJpeg, bEisSupported, bY80OnEncoder;
+        camera3_stream *inputStream;
+        cam_feature_mask_t commonFeatureMask;
+        size_t numStreamsOnEncoder;
+        uint32_t videoWidth, videoHeight;
+        cam_dimension_t maxViewfinderSize, largeYuv888Size;
+        StreamValidateStatus() :
+                bIsVideo(false), bIs4KVideo(false), bEisSupportedSize(true), depthPresent(false),
+                bUseCommonFeatureMask(false), isZsl(false), bSmallJpegSize(false),
+                bYuv888OverrideJpeg(false), bEisSupported(false), bY80OnEncoder(false),
+                inputStream(nullptr), commonFeatureMask(0), numStreamsOnEncoder(0),
+                videoWidth(0U), videoHeight(0U) {};
+    };
+    static int32_t validateStreamCombination(uint32_t cameraId,
+            camera3_stream_configuration_t *streamList /*in*/,
+            StreamValidateStatus *status /*out*/);
+
     int validateCaptureRequest(camera3_capture_request_t *request);
-    int validateStreamDimensions(camera3_stream_configuration_t *streamList);
-    int validateStreamRotations(camera3_stream_configuration_t *streamList);
-    int validateUsageFlags(const camera3_stream_configuration_t *streamList);
-    int validateUsageFlagsForEis(const camera3_stream_configuration_t *streamList);
+    static int validateStreamDimensions(uint32_t cameraId,
+            camera3_stream_configuration_t *streamList);
+    static int validateStreamRotations(camera3_stream_configuration_t *streamList);
+    static int validateUsageFlags(const camera3_stream_configuration_t *streamList);
+    static int validateUsageFlagsForEis(bool bEisEnable, bool bEisSupportedSize,
+            const camera3_stream_configuration_t *streamList);
     void deriveMinFrameDuration();
     void handleBuffersDuringFlushLock(camera3_stream_buffer_t *buffer);
     int32_t handlePendingReprocResults(uint32_t frame_number);
@@ -307,6 +330,13 @@
     void extractJpegMetadata(CameraMetadata& jpegMetadata,
             const camera3_capture_request_t *request);
 
+    // Check whether additional EIS crop is needed.
+    bool isEISCropInSnapshotNeeded(const CameraMetadata &metadata) const;
+
+    // Various crop sanity checks.
+    bool isCropValid(int32_t startX, int32_t startY, int32_t width,
+            int32_t height, int32_t maxWidth, int32_t maxHeight) const;
+
     bool isSupportChannelNeeded(camera3_stream_configuration_t *streamList,
             cam_stream_size_info_t stream_config_info);
     int32_t setMobicat();
@@ -334,7 +364,7 @@
     int32_t getReprocessibleOutputStreamId(uint32_t &id);
     int32_t handleCameraDeviceError();
 
-    bool isOnEncoder(const cam_dimension_t max_viewfinder_size,
+    static bool isOnEncoder(const cam_dimension_t max_viewfinder_size,
             uint32_t width, uint32_t height);
     void hdrPlusPerfLock(mm_camera_super_buf_t *metadata_buf);
 
@@ -406,6 +436,9 @@
         // metadata needs to be consumed by the corresponding stream
         // in order to generate the buffer.
         bool need_metadata;
+        // Do we need additional crop due to EIS.
+        bool need_crop;
+        cam_eis_crop_info_t crop_info;
     } RequestedBufferInfo;
     typedef struct {
         uint32_t frame_number;
@@ -566,6 +599,12 @@
     bool m60HzZone;
 
     cam_trigger_t mAfTrigger;
+
+    // Last cached EIS crop information.
+    cam_eis_crop_info_t mLastEISCropInfo;
+
+    // Maps between active region and specific stream crop.
+    QCamera3CropRegionMapper mStreamCropMapper;
 };
 
 }; // namespace qcamera
diff --git a/camera/QCamera2/HAL3/QCamera3PostProc.cpp b/camera/QCamera2/HAL3/QCamera3PostProc.cpp
index a11c789..b7e2f19 100644
--- a/camera/QCamera2/HAL3/QCamera3PostProc.cpp
+++ b/camera/QCamera2/HAL3/QCamera3PostProc.cpp
@@ -1439,7 +1439,11 @@
         // create jpeg encoding session
         mm_jpeg_encode_params_t encodeParam;
         memset(&encodeParam, 0, sizeof(mm_jpeg_encode_params_t));
-        getJpegEncodeConfig(encodeParam, main_stream, jpeg_settings);
+        ret = getJpegEncodeConfig(encodeParam, main_stream, jpeg_settings);
+        if (ret != NO_ERROR) {
+            LOGE("Error generating jpeg configuration: %d", ret);
+            return ret;
+        }
         LOGH("#src bufs:%d # tmb bufs:%d #dst_bufs:%d",
                      encodeParam.num_src_bufs,encodeParam.num_tmb_bufs,encodeParam.num_dst_bufs);
         if (!needJpegExifRotation &&
@@ -1741,6 +1745,7 @@
             pme->m_inputPPQ.init();
             pme->m_inputFWKPPQ.init();
             pme->m_inputMetaQ.init();
+            pme->m_jpegSettingsQ.init();
             cam_sem_post(&cmdThread->sync_sem);
 
             break;
@@ -1783,6 +1788,8 @@
 
                 pme->m_inputMetaQ.flush();
 
+                pme->m_jpegSettingsQ.flush();
+
                 // signal cmd is completed
                 cam_sem_post(&cmdThread->sync_sem);
             }
diff --git a/camera/QCamera2/QCamera2Factory.cpp b/camera/QCamera2/QCamera2Factory.cpp
index dfa900a..2caaa77 100644
--- a/camera/QCamera2/QCamera2Factory.cpp
+++ b/camera/QCamera2/QCamera2Factory.cpp
@@ -195,6 +195,71 @@
 }
 
 /*===========================================================================
+ * FUNCTION   : get_physical_camera_info
+ *
+ * DESCRIPTION: static function to query physical camera information
+ *
+ * PARAMETERS :
+ *   @physical_camera_id : physical camera ID
+ *   @static_metadata    : camera information
+ *
+ * RETURN     : int32_t type of status
+ *              NO_ERROR  -- success
+ *              none-zero failure code
+ *==========================================================================*/
+int QCamera2Factory::get_physical_camera_info(int /*physical_camera_id*/,
+        camera_metadata_t ** /*static_metadata*/)
+{
+    return BAD_VALUE;
+}
+
+/*===========================================================================
+ * FUNCTION   : is_camera_combination_supported
+ *
+ * DESCRIPTION: static function to query camera combination support
+ *
+ * PARAMETERS :
+ *   @camera_id : camera ID
+ *   @streams   : stream combination
+ *
+ * RETURN     : int32_t type of status
+ *              NO_ERROR  -- in case combination is supported
+ *              none-zero failure code
+ *==========================================================================*/
+int QCamera2Factory::is_stream_combination_supported(int camera_id,
+        const camera_stream_combination_t *streams)
+{
+    return gQCamera2Factory->isStreamCombinationSupported(camera_id, streams);
+}
+
+/*===========================================================================
+ * FUNCTION   : isStreamCombinationSupported
+ *
+ * DESCRIPTION: method to query camera combination support
+ *
+ * PARAMETERS :
+ *   @camera_id : camera ID
+ *   @streams   : stream combination
+ *
+ * RETURN     : int32_t type of status
+ *              NO_ERROR  -- in case combination is supported
+ *              none-zero failure code
+ *==========================================================================*/
+int QCamera2Factory::isStreamCombinationSupported(int camera_id,
+        const camera_stream_combination_t *streams)
+{
+    if (!mNumOfCameras || camera_id >= mNumOfCameras || !streams ||
+        (camera_id < 0)) {
+        LOGE("Error during stream combination query!! mNumOfCameras = %d,"
+                "camera_id = %d, info = %p",
+                 mNumOfCameras, camera_id, streams);
+        return BAD_VALUE;
+    }
+
+    return QCamera3HardwareInterface::isStreamCombinationSupported(camera_id, streams);
+}
+
+/*===========================================================================
  * FUNCTION   : set_callbacks
  *
  * DESCRIPTION: static function to set callbacks function to camera module
diff --git a/camera/QCamera2/QCamera2Factory.h b/camera/QCamera2/QCamera2Factory.h
index d9d965d..5dc7a92 100644
--- a/camera/QCamera2/QCamera2Factory.h
+++ b/camera/QCamera2/QCamera2Factory.h
@@ -52,11 +52,17 @@
     static int open_legacy(const struct hw_module_t* module,
             const char* id, uint32_t halVersion, struct hw_device_t** device);
     static int set_torch_mode(const char* camera_id, bool on);
+    static int get_physical_camera_info(int physical_camera_id,
+            camera_metadata_t **static_metadata);
+    static int is_stream_combination_supported(int camera_id,
+            const camera_stream_combination_t *streams);
     bool isDualCamAvailable(int hal3Enabled);
 
 private:
     int getNumberOfCameras();
     int getCameraInfo(int camera_id, struct camera_info *info);
+    int isStreamCombinationSupported(int camera_id,
+            const camera_stream_combination_t *streams);
     int setCallbacks(const camera_module_callbacks_t *callbacks);
     int cameraDeviceOpen(int camera_id, struct hw_device_t **hw_device);
     static int camera_device_open(const struct hw_module_t *module, const char *id,
diff --git a/camera/QCamera2/QCamera2Hal.cpp b/camera/QCamera2/QCamera2Hal.cpp
index 4a9b63d..daf6b0a 100644
--- a/camera/QCamera2/QCamera2Hal.cpp
+++ b/camera/QCamera2/QCamera2Hal.cpp
@@ -33,7 +33,7 @@
 
 static hw_module_t camera_common = {
     .tag                    = HARDWARE_MODULE_TAG,
-    .module_api_version     = CAMERA_MODULE_API_VERSION_2_4,
+    .module_api_version     = CAMERA_MODULE_API_VERSION_2_5,
     .hal_api_version        = HARDWARE_HAL_API_VERSION,
     .id                     = CAMERA_HARDWARE_MODULE_ID,
     .name                   = "QCamera Module",
@@ -46,6 +46,8 @@
 camera_module_t HAL_MODULE_INFO_SYM = {
     .common                 = camera_common,
     .get_number_of_cameras  = qcamera::QCamera2Factory::get_number_of_cameras,
+    .get_physical_camera_info = qcamera::QCamera2Factory::get_physical_camera_info,
+    .is_stream_combination_supported = qcamera::QCamera2Factory::is_stream_combination_supported,
     .get_camera_info        = qcamera::QCamera2Factory::get_camera_info,
     .set_callbacks          = qcamera::QCamera2Factory::set_callbacks,
     .get_vendor_tag_ops     = qcamera::QCamera3VendorTags::get_vendor_tag_ops,
diff --git a/camera/QCamera2/stack/common/cam_intf.h b/camera/QCamera2/stack/common/cam_intf.h
index 315f522..6099636 100644
--- a/camera/QCamera2/stack/common/cam_intf.h
+++ b/camera/QCamera2/stack/common/cam_intf.h
@@ -1013,6 +1013,7 @@
     /* DevCamDebug metadata end */
     INCLUDE(CAM_INTF_META_ISP_POST_STATS_SENSITIVITY,   float,                       1);
     INCLUDE(CAM_INTF_META_EARLY_AF_STATE,               uint32_t,                    1);
+    INCLUDE(CAM_INTF_META_EIS_CROP_INFO,                cam_eis_crop_info_t,         1);
 
 } metadata_data_t;
 
diff --git a/camera/QCamera2/stack/common/cam_types.h b/camera/QCamera2/stack/common/cam_types.h
index b1dd8af..98941ad 100644
--- a/camera/QCamera2/stack/common/cam_types.h
+++ b/camera/QCamera2/stack/common/cam_types.h
@@ -2231,6 +2231,8 @@
     CAM_INTF_META_ISP_POST_STATS_SENSITIVITY,
     /* Early AF state due to trigger */
     CAM_INTF_META_EARLY_AF_STATE,
+    /* EIS crop information */
+    CAM_INTF_META_EIS_CROP_INFO,
     CAM_INTF_PARM_MAX
 } cam_intf_parm_type_t;
 
@@ -2815,4 +2817,12 @@
     CAM_STREAM_CACHE_OPS_DISABLED
 } cam_stream_cache_ops_t;
 
+// Used with CAM_META_EIS_CROP_INFO
+typedef struct {
+    int32_t delta_x;
+    int32_t delta_y;
+    int32_t delta_width;
+    int32_t delta_height;
+} cam_eis_crop_info_t;
+
 #endif /* __QCAMERA_TYPES_H__ */
diff --git a/common/base.mk b/common/base.mk
index fbb1662..550dac8 100644
--- a/common/base.mk
+++ b/common/base.mk
@@ -334,6 +334,8 @@
 LIBCAMERA += mm-qcamera-app
 LIBCAMERA += camera_test
 LIBCAMERA += org.codeaurora.camera
+LIBCAMERA += libgooglecamerahal
+LIBCAMERA += libgoogle_camera_hal_tests
 
 # Shared by passthrough/binderized camera HAL
 LIBCAMERA += camera.device@3.2-impl
@@ -597,6 +599,9 @@
 WPA += wpa_supplicant_ath6kl.conf
 WPA += wpa_supplicant
 WPA += hs20-osu-client
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+WPA += wpa_cli
+endif
 
 #ZLIB
 ZLIB := gzip
@@ -644,7 +649,6 @@
     CellBroadcastReceiver \
     CertInstaller \
     DrmProvider \
-    Email \
     Gallery2 \
     LatinIME \
     Mms \
diff --git a/default-permissions.xml b/default-permissions.xml
index dcc9c0a..c8610a5 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -100,6 +100,26 @@
         <permission name="android.permission.READ_CALENDAR" fixed="true"/>
         <!-- Location -->
         <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="true"/>
+        <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="true"/>
     </exception>
 
+    <exception
+            package="com.google.android.projection.gearhead"
+            sha256-cert-digest="FD:B0:0C:43:DB:DE:8B:51:CB:31:2A:A8:1D:3B:5F:A1:77:13:AD:B9:4B:28:F5:98:D7:7F:8E:B8:9D:AC:EE:DF">
+        <!-- Gearhead legacy -->
+        <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/>
+        <permission name="android.permission.CALL_PHONE" fixed="false"/>
+        <permission name="android.permission.READ_CALL_LOG" fixed="false"/>
+        <permission name="android.permission.READ_CONTACTS" fixed="false"/>
+        <permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
+        <permission name="android.permission.RECEIVE_SMS" fixed="false"/>
+        <permission name="android.permission.RECORD_AUDIO" fixed="false"/>
+        <permission name="android.permission.SEND_SMS" fixed="false"/>
+        <!-- For Top Gear -->
+        <permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
+        <permission name="android.permission.READ_SMS" fixed="false"/>
+        <permission name="android.permission.RECEIVE_MMS" fixed="false"/>
+        <permission name="android.permission.WRITE_CALL_LOG" fixed="false"/>
+        <permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false"/>
+    </exception>
 </exceptions>
diff --git a/device-common.mk b/device-common.mk
index 35026a4..afbce29 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -26,6 +26,11 @@
 
 PRODUCT_SHIPPING_API_LEVEL := 25
 
+PRODUCT_SOONG_NAMESPACES += \
+    device/google/marlin \
+    vendor/google/camera \
+    hardware/google/pixel
+
 PRODUCT_COPY_FILES += \
     $(LOCAL_KERNEL):kernel \
     frameworks/native/data/etc/android.software.verified_boot.xml:system/etc/permissions/android.software.verified_boot.xml
@@ -178,9 +183,9 @@
     sound_trigger.primary.msm8996
 
 PRODUCT_PACKAGES += \
-    android.hardware.audio@4.0-impl:32 \
-    android.hardware.audio.effect@4.0-impl:32 \
-    android.hardware.soundtrigger@2.1-impl:32
+    android.hardware.audio@5.0-impl:32 \
+    android.hardware.audio.effect@5.0-impl:32 \
+    android.hardware.soundtrigger@2.2-impl:32
 
 PRODUCT_PACKAGES += \
     android.hardware.drm@1.0-impl:32
@@ -232,7 +237,6 @@
     libwpa_client \
     hostapd \
     wificond \
-    wifilogd \
     wpa_supplicant \
     wpa_supplicant.conf
 
@@ -478,6 +482,16 @@
 PRODUCT_PACKAGES += \
     android.hardware.vibrator@1.0-service.marlin \
 
+# Thermal HAL
+PRODUCT_PACKAGES += \
+    android.hardware.thermal@2.0-service.pixel
+
+PRODUCT_COPY_FILES += \
+    device/google/marlin/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
+
+PRODUCT_PROPERTY_OVERRIDES += \
+    vendor.thermal.config=thermal_info_config.json
+
 # VR
 PRODUCT_PACKAGES += \
     android.hardware.vr@1.0-impl:64
@@ -486,7 +500,7 @@
 PRODUCT_PACKAGES += \
     android.hardware.graphics.allocator@2.0-impl:64 \
     android.hardware.graphics.allocator@2.0-service \
-    android.hardware.graphics.mapper@2.0-impl
+    android.hardware.graphics.mapper@2.0-impl-2.1
 
 # HW Composer
 PRODUCT_PACKAGES += \
@@ -579,13 +593,6 @@
 PRODUCT_PACKAGES += \
     toybox_static
 
-ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
-ifeq (,$(filter aosp_marlin aosp_sailfish, $(TARGET_PRODUCT)))
-PRODUCT_PACKAGES += \
-    NexusLogger
-endif # filter it out for aosp build
-endif
-
 # b/30349163
 # Set Marlin/Sailfish default log size on userdebug/eng build to 1M
 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
@@ -623,3 +630,14 @@
 # health HAL
 PRODUCT_PACKAGES += \
     android.hardware.health@2.0-service.marlin
+
+# default atrace HAL
+PRODUCT_PACKAGES += \
+    android.hardware.atrace@1.0-service
+
+# a_sns_test for sensor testing
+PRODUCT_PACKAGES_DEBUG += a_sns_test
+
+# Write flags to the vendor space in /misc partition.
+PRODUCT_PACKAGES += \
+    misc_writer
diff --git a/dumpstate/Android.mk b/dumpstate/Android.mk
index 596ac90..0e5fdc5 100644
--- a/dumpstate/Android.mk
+++ b/dumpstate/Android.mk
@@ -30,8 +30,6 @@
     libcutils \
     libdumpstateutil \
     libhidlbase \
-    libhidltransport \
-    libhwbinder \
     liblog \
     libutils
 
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index 5174e79..a7d6155 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -21,7 +21,9 @@
 #include <android-base/properties.h>
 #include <android-base/unique_fd.h>
 #include <cutils/properties.h>
+#include <hidl/HidlBinderSupport.h>
 #include <libgen.h>
+
 #include <log/log.h>
 #include <stdlib.h>
 #include <string>
@@ -115,6 +117,11 @@
 
 // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
 Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
+    // Exit when dump is completed since this is a lazy HAL.
+    addPostCommandTask([]() {
+        exit(0);
+    });
+
     if (handle == nullptr || handle->numFds < 1) {
         ALOGE("no FDs\n");
         return Void();
diff --git a/dumpstate/android.hardware.dumpstate@1.0-service.marlin.rc b/dumpstate/android.hardware.dumpstate@1.0-service.marlin.rc
index 4ae80be..2299a69 100644
--- a/dumpstate/android.hardware.dumpstate@1.0-service.marlin.rc
+++ b/dumpstate/android.hardware.dumpstate@1.0-service.marlin.rc
@@ -3,3 +3,5 @@
     user system
     group system
     interface android.hardware.dumpstate@1.0::IDumpstateDevice default
+    oneshot
+    disabled
diff --git a/health/Android.bp b/health/Android.bp
index 2a6c4b5..af0d0f9 100644
--- a/health/Android.bp
+++ b/health/Android.bp
@@ -40,8 +40,6 @@
         "libbase",
         "libcutils",
         "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
         "libutils",
         "android.hardware.health@2.0",
     ],
diff --git a/health/LearnedCapacityBackupRestore.cpp b/health/LearnedCapacityBackupRestore.cpp
index f34b909..bf72526 100644
--- a/health/LearnedCapacityBackupRestore.cpp
+++ b/health/LearnedCapacityBackupRestore.cpp
@@ -25,17 +25,28 @@
 static constexpr char kSysCFPersistFile[] = "/persist/battery/qcom_charge_full";
 static constexpr int kBuffSize = 256;
 
-LearnedCapacityBackupRestore::LearnedCapacityBackupRestore() {}
+LearnedCapacityBackupRestore::LearnedCapacityBackupRestore() : sw_cap_(0), hw_cap_(0) {}
 
 void LearnedCapacityBackupRestore::Restore() {
     ReadFromStorage();
     ReadFromSRAM();
-    UpdateAndSave();
+    if (sw_cap_ == 0) {
+        // First backup
+        sw_cap_ = hw_cap_;
+        SaveToStorage();
+    } else {
+        // Always restore backup value
+        SaveToSRAM();
+    }
 }
 
 void LearnedCapacityBackupRestore::Backup() {
     ReadFromSRAM();
-    UpdateAndSave();
+    if (sw_cap_ != hw_cap_) {
+        // Always backup the new FG computed learned capacity
+        sw_cap_ = hw_cap_;
+        SaveToStorage();
+    }
 }
 
 void LearnedCapacityBackupRestore::ReadFromStorage() {
@@ -90,24 +101,6 @@
         LOG(ERROR) << "Write data error: " << strerror(errno);
 }
 
-void LearnedCapacityBackupRestore::UpdateAndSave() {
-    bool backup = false;
-    bool restore = false;
-    if (hw_cap_) {
-        if ((hw_cap_ < sw_cap_) || (sw_cap_ == 0)) {
-            sw_cap_ = hw_cap_;
-            backup = true;
-        } else if (hw_cap_ > sw_cap_) {
-            hw_cap_ = sw_cap_;
-            restore = true;
-        }
-    }
-    if (restore)
-        SaveToSRAM();
-    if (backup)
-        SaveToStorage();
-}
-
 }  // namespace health
 }  // namespace marlin
 }  // namespace google
diff --git a/health/LearnedCapacityBackupRestore.h b/health/LearnedCapacityBackupRestore.h
index 4e40ab5..8b52343 100644
--- a/health/LearnedCapacityBackupRestore.h
+++ b/health/LearnedCapacityBackupRestore.h
@@ -41,7 +41,6 @@
     void SaveToStorage();
     void ReadFromSRAM();
     void SaveToSRAM();
-    void UpdateAndSave();
 };
 
 }  // namespace health
diff --git a/init.common.rc b/init.common.rc
index 533a4ea..9c67151 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -4,7 +4,6 @@
     write /sys/module/lpm_levels/parameters/sleep_disabled 0
     wait /dev/block/platform/soc/624000.ufshc
     # Enable UFS powersaving
-    write /sys/devices/soc/624000.ufshc/clkscale_enable 1
     write /sys/devices/soc/624000.ufshc/clkgate_enable 1
     write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 1
     write /sys/module/lpm_levels/parameters/sleep_disabled N
@@ -19,7 +18,6 @@
 
 on init
     # Disable UFS powersaving
-    write /sys/devices/soc/624000.ufshc/clkscale_enable 0
     write /sys/devices/soc/624000.ufshc/clkgate_enable 0
     write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 0
     write /sys/module/lpm_levels/parameters/sleep_disabled Y
@@ -701,6 +699,7 @@
 #   group wifi inet keystore
     interface android.hardware.wifi.supplicant@1.0::ISupplicant default
     interface android.hardware.wifi.supplicant@1.1::ISupplicant default
+    interface android.hardware.wifi.supplicant@1.2::ISupplicant default
     class main
     socket wpa_wlan0 dgram 660 wifi wifi
     disabled
@@ -777,7 +776,6 @@
     start vendor.power_sh
 
     # Enable UFS powersaving
-    write /sys/devices/soc/624000.ufshc/clkscale_enable 1
     write /sys/devices/soc/624000.ufshc/clkgate_enable 1
     write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 1
     write /sys/module/lpm_levels/parameters/sleep_disabled N
@@ -889,3 +887,27 @@
 
 on property:sys.vdso=32
    write /sys/module/vdso/parameters/enable_64 0
+
+# Write the dark theme magic (`theme-dark`, or 0x7468656d652d6461726b in hex string) to /misc
+# partition. Offset 10814 in vendor space is effectively offset 12862 in /misc partition.
+service vendor.darkboot /vendor/bin/misc_writer --vendor-space-offset 10814 --hex-string 0x7468656d652d6461726b
+    disabled
+    oneshot
+
+# Clear the 10-byte dark theme magic in /misc partition. Offset 10814 in vendor space is effectively
+# offset 12862 in /misc partition.
+service vendor.darkboot_clear /vendor/bin/misc_writer --vendor-space-offset 10814 --hex-string 0x00000000000000000000
+    disabled
+    oneshot
+
+# Set the dark boot flag on dark mode (UiModeManager.MODE_NIGHT_YES == 2).
+on property:persist.sys.theme=2
+    start vendor.darkboot
+
+# Clear the dark theme flag on light mode (UiModeManager.MODE_NIGHT_NO == 1) or auto mode
+# (UiModeManager.MODE_NIGHT_AUTO == 0).
+on property:persist.sys.theme=1
+    start vendor.darkboot_clear
+
+on property:persist.sys.theme=0
+    start vendor.darkboot_clear
diff --git a/manifest.xml b/manifest.xml
index b25d1ca..3ace824 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -2,7 +2,7 @@
     <hal format="hidl">
         <name>android.hardware.audio</name>
         <transport>hwbinder</transport>
-        <version>4.0</version>
+        <version>5.0</version>
         <interface>
             <name>IDevicesFactory</name>
             <instance>default</instance>
@@ -11,7 +11,7 @@
     <hal format="hidl">
         <name>android.hardware.audio.effect</name>
         <transport>hwbinder</transport>
-        <version>4.0</version>
+        <version>5.0</version>
         <interface>
             <name>IEffectsFactory</name>
             <instance>default</instance>
@@ -92,8 +92,8 @@
             <name>IDrmFactory</name>
             <instance>default</instance>
         </interface>
-        <fqname>@1.1::ICryptoFactory/clearkey</fqname>
-        <fqname>@1.1::IDrmFactory/clearkey</fqname>
+        <fqname>@1.2::ICryptoFactory/clearkey</fqname>
+        <fqname>@1.2::IDrmFactory/clearkey</fqname>
         <fqname>@1.1::ICryptoFactory/widevine</fqname>
         <fqname>@1.1::IDrmFactory/widevine</fqname>
     </hal>
@@ -136,7 +136,7 @@
     <hal format="hidl">
         <name>android.hardware.graphics.mapper</name>
         <transport arch="32+64">passthrough</transport>
-        <version>2.0</version>
+        <version>2.1</version>
         <interface>
             <name>IMapper</name>
             <instance>default</instance>
@@ -261,22 +261,13 @@
     <hal format="hidl">
         <name>android.hardware.soundtrigger</name>
         <transport>hwbinder</transport>
-        <version>2.1</version>
+        <version>2.2</version>
         <interface>
             <name>ISoundTriggerHw</name>
             <instance>default</instance>
         </interface>
     </hal>
     <hal format="hidl">
-        <name>android.hardware.thermal</name>
-        <transport>hwbinder</transport>
-        <version>1.1</version>
-        <interface>
-            <name>IThermal</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
-    <hal format="hidl">
         <name>android.hardware.usb</name>
         <transport>hwbinder</transport>
         <version>1.1</version>
@@ -306,7 +297,7 @@
     <hal format="hidl">
         <name>android.hardware.wifi</name>
         <transport>hwbinder</transport>
-        <version>1.2</version>
+        <version>1.3</version>
         <interface>
             <name>IWifi</name>
             <instance>default</instance>
@@ -315,7 +306,7 @@
     <hal format="hidl">
         <name>android.hardware.wifi.hostapd</name>
         <transport>hwbinder</transport>
-        <version>1.0</version>
+        <version>1.1</version>
         <interface>
             <name>IHostapd</name>
             <instance>default</instance>
@@ -324,7 +315,7 @@
     <hal format="hidl">
         <name>android.hardware.wifi.supplicant</name>
         <transport>hwbinder</transport>
-        <version>1.1</version>
+        <version>1.2</version>
         <interface>
             <name>ISupplicant</name>
             <instance>default</instance>
@@ -350,4 +341,3 @@
     </hal>
 
 </manifest>
-
diff --git a/marlin/BoardConfig.mk b/marlin/BoardConfig.mk
index 36f8127..e621a2a 100644
--- a/marlin/BoardConfig.mk
+++ b/marlin/BoardConfig.mk
@@ -70,6 +70,7 @@
 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
 WIFI_DRIVER_FW_PATH_STA := "sta"
 WIFI_DRIVER_FW_PATH_AP  := "ap"
+WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION := true
 
 USE_OPENGL_RENDERER := true
 BOARD_USE_LEGACY_UI := true
@@ -84,6 +85,7 @@
 BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
 BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
 BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
 
 TARGET_USES_ION := true
 TARGET_USES_NEW_ION_API :=true
@@ -91,7 +93,7 @@
 TARGET_USES_QCOM_BSP := true
 endif
 
-BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=marlin user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff loop.max_part=7
+BOARD_KERNEL_CMDLINE += console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=marlin user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff loop.max_part=7
 
 BOARD_ROOT_EXTRA_FOLDERS := firmware firmware/radio persist
 BOARD_ROOT_EXTRA_SYMLINKS := /vendor/lib/dsp:/dsp
@@ -166,7 +168,8 @@
 
 #Add NON-HLOS files for ota upgrade
 ADD_RADIO_FILES := true
-TARGET_RECOVERY_UI_LIB := librecovery_ui_nanohub
+
+TARGET_RECOVERY_UI_LIB := librecovery_ui_nanohub libbootloader_message libfstab
 
 #Add support for firmare upgrade on 8996
 HAVE_SYNAPTICS_DSX_FW_UPGRADE := true
@@ -215,3 +218,6 @@
 
 # Partitions (listed in the file) to be wiped under recovery.
 TARGET_RECOVERY_WIPE := device/google/marlin/recovery.wipe.common
+
+# TODO(b/131162102): remove this after cleaning up accesses of sysprop
+BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true
diff --git a/media_codecs.xml b/media_codecs.xml
index 7512c8b..f50ce51 100644
--- a/media_codecs.xml
+++ b/media_codecs.xml
@@ -124,6 +124,9 @@
             <Limit name="bitrate" range="1-60000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-1920x1080" value="60" />
+            <Limit name="performance-point-1280x720" value="120" />
+            <Feature name="bitrate-modes" value="VBR,CBR" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -136,6 +139,9 @@
             <Limit name="bitrate" range="1-2000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-864x480" value="30" />
+            <Limit name="performance-point-720x480" value="30" />
+            <Feature name="bitrate-modes" value="VBR,CBR" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -149,6 +155,11 @@
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-3840x2160" value="30" />
+            <Limit name="performance-point-1920x1080" value="120" />
+            <Limit name="performance-point-1280x720" value="240" />
+            <Feature name="bitrate-modes" value="VBR,CBR" />
+            <Feature name="intra-refresh" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -162,6 +173,11 @@
             <Limit name="bitrate" range="1-20000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-3840x2160" value="30" />
+            <Limit name="performance-point-1920x1080" value="120" />
+            <Limit name="performance-point-1280x720" value="240" />
+            <Feature name="bitrate-modes" value="VBR,CBR" />
+            <Feature name="intra-refresh" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -175,6 +191,11 @@
             <Limit name="bitrate" range="1-100000000" />
             <Limit name="frame-rate" range="1-240" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-3840x2160" value="30" />
+            <Limit name="performance-point-1920x1080" value="120" />
+            <Limit name="performance-point-1280x720" value="240" />
+            <Feature name="bitrate-modes" value="VBR,CBR" />
+            <Feature name="intra-refresh" />
         </MediaCodec>
     </Encoders>
     <Decoders>
@@ -189,6 +210,9 @@
             <Limit name="bitrate" range="1-100000000" />
             <Feature name="adaptive-playback" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-4096x2160" value="56" />
+            <Limit name="performance-point-3840x2160" value="60" />
+            <Limit name="performance-point-1920x1080" value="240" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -202,6 +226,9 @@
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
             <Limit name="concurrent-instances" max="6" />
+            <Limit name="performance-point-4096x2160" value="56" />
+            <Limit name="performance-point-3840x2160" value="60" />
+            <Limit name="performance-point-1920x1080" value="240" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -213,6 +240,8 @@
             <Limit name="bitrate" range="1-60000000" />
             <Feature name="adaptive-playback" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-1920x1080" value="60" />
+            <Limit name="performance-point-1280x720" value="120" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -224,6 +253,8 @@
             <Limit name="bitrate" range="1-2000000" />
             <Feature name="adaptive-playback" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-864x480" value="30" />
+            <Limit name="performance-point-720x480" value="30" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -236,6 +267,9 @@
             <Limit name="bitrate" range="1-20000000" />
             <Feature name="adaptive-playback" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-3840x2160" value="30" />
+            <Limit name="performance-point-1920x1080" value="120" />
+            <Limit name="performance-point-1280x720" value="240" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -249,6 +283,9 @@
             <Limit name="frame-rate" range="1-240" />
             <Feature name="adaptive-playback" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-3840x2160" value="30" />
+            <Limit name="performance-point-1920x1080" value="120" />
+            <Limit name="performance-point-1280x720" value="240" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -262,6 +299,9 @@
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
             <Limit name="concurrent-instances" max="6" />
+            <Limit name="performance-point-3840x2160" value="30" />
+            <Limit name="performance-point-1920x1080" value="120" />
+            <Limit name="performance-point-1280x720" value="240" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -274,6 +314,9 @@
             <Limit name="bitrate" range="1-100000000" />
             <Feature name="adaptive-playback" />
             <Limit name="concurrent-instances" max="16" />
+            <Limit name="performance-point-4096x2160" value="56" />
+            <Limit name="performance-point-3840x2160" value="60" />
+            <Limit name="performance-point-1920x1080" value="240" />
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
             <Quirk name="requires-allocate-on-input-ports" />
@@ -287,6 +330,9 @@
             <Feature name="adaptive-playback" />
             <Feature name="secure-playback" required="true" />
             <Limit name="concurrent-instances" max="6" />
+            <Limit name="performance-point-4096x2160" value="56" />
+            <Limit name="performance-point-3840x2160" value="60" />
+            <Limit name="performance-point-1920x1080" value="240" />
         </MediaCodec>
     </Decoders>
     <Include href="media_codecs_google_video.xml" />
diff --git a/media_codecs_performance.xml b/media_codecs_performance.xml
index 7445b5a..b029fb9 100644
--- a/media_codecs_performance.xml
+++ b/media_codecs_performance.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright 2018 The Android Open Source Project
+<!-- Copyright 2019 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.
@@ -14,142 +14,123 @@
      limitations under the License.
 -->
 
-<!-- Generated file for marlin/sailfish using measurements between PPR1.180405.002 and PPR1.180514.002 -->
 <MediaCodecs>
-    <!-- Measurements between PPR1.180405.004 and PPR1.180514.002 -->
     <Encoders>
         <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" update="true">
-            <!-- measured 98%:105-256 med:146/146 FLAKY(73 - 292 < mx=293.2) -->
-            <Limit name="measured-frame-rate-176x144" range="146-146" /> <!-- N=258 v98%=1.6 -->
-            <Limit name="measured-frame-rate-352x288" range="106-106" /> <!-- N=268 v98%=1.4 -->
+            <Limit name="measured-frame-rate-176x144" range="173-173" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-352x288" range="134-134" /> <!-- N=148 v98%=1.2 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+            <Limit name="measured-frame-rate-176x144" range="327-345" /> <!-- N=148 v98%=1.2 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="116-116" /> <!-- N=244 v98%=1.5 -->
-            <Limit name="measured-frame-rate-720x480" range="60-60" /> <!-- N=252 v98%=1.3 -->
-            <Limit name="measured-frame-rate-1280x720" range="35-35" /> <!-- N=258 v98%=1.2 -->
-            <Limit name="measured-frame-rate-1920x1080" range="24-24" /> <!-- N=268 v98%=1.3 -->
+            <Limit name="measured-frame-rate-320x240" range="140-140" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-720x480" range="74-74" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1280x720" range="40-40" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="28-28" /> <!-- N=148 v98%=1.4 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="206-206" /> <!-- N=146 v98%=1.1 -->
+            <Limit name="measured-frame-rate-720x480" range="86-86" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1280x720" range="63-65" /> <!-- N=148 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1920x1080" range="36-36" /> <!-- N=148 v98%=1.1 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="113-113" /> <!-- N=244 v98%=1.5 -->
-            <Limit name="measured-frame-rate-720x480" range="60-60" /> <!-- N=268 v98%=1.3 -->
-            <Limit name="measured-frame-rate-1280x720" range="35-35" /> <!-- N=254 v98%=1.2 -->
-            <Limit name="measured-frame-rate-1920x1080" range="25-25" /> <!-- N=254 v98%=1.3 -->
-            <Limit name="measured-frame-rate-3840x2160" range="20-25" /> <!-- N=260 v98%=1.4 -->
+            <Limit name="measured-frame-rate-320x240" range="140-140" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-720x480" range="73-73" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1280x720" range="39-39" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="30-30" /> <!-- N=148 v98%=1.4 -->
+            <Limit name="measured-frame-rate-3840x2160" range="34-34" /> <!-- N=148 v98%=1.2 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="33-33" /> <!-- N=148 v98%=1.1 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" update="true">
-            <Limit name="measured-frame-rate-176x144" range="151-151" /> <!-- N=256 v98%=1.6 -->
-            <!-- measured 98%:69-182 med:99/99 FLAKY(50 - 198 < mx=206.1) -->
-            <Limit name="measured-frame-rate-352x288" range="99-99" /> <!-- N=260 v98%=1.6 (PPR1.180405.002-PPR1.180510.004) -->
-            <Limit name="measured-frame-rate-640x480" range="71-71" /> <!-- N=256 v98%=1.3 -->
+            <Limit name="measured-frame-rate-176x144" range="173-173" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-352x288" range="133-133" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-640x480" range="90-90" /> <!-- N=148 v98%=1.2 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+            <Limit name="measured-frame-rate-176x144" range="337-357" /> <!-- N=148 v98%=1.2 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="121-121" /> <!-- N=256 v98%=1.4 -->
-            <Limit name="measured-frame-rate-640x360" range="78-78" /> <!-- N=242 v98%=1.4 -->
-            <Limit name="measured-frame-rate-1280x720" range="34-34" /> <!-- N=254 v98%=1.3 -->
-            <!-- measured 98%:18-35 med:24/24 FLAKY(12 - 48 < mx=48.2) -->
-            <Limit name="measured-frame-rate-1920x1080" range="24-25" /> <!-- TWEAKED N=260 v98%=1.4 (PPR1.180405.002-PPR1.180510.004) -->
+            <Limit name="measured-frame-rate-320x180" range="138-138" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-640x360" range="93-93" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1280x720" range="39-39" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="28-28" /> <!-- N=148 v98%=1.4 -->
         </MediaCodec>
-        <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
-            <Limit name="measured-frame-rate-176x144" range="295-295" /> <!-- N=258 v98%=1.6 -->
-        </MediaCodec>
-        <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
-            <!-- measured 98%:112-285 med:242/242 FLAKY(mn=57.1 < 112 - 484) -->
-            <Limit name="measured-frame-rate-320x240" range="114-242" /> <!-- TWEAKED N=260 v98%=1.6 -->
-            <Limit name="measured-frame-rate-720x480" range="111-113" /> <!-- N=256 v98%=1.2 (PPR1.180405.002-PPR1.180510.004) -->
-            <Limit name="measured-frame-rate-1280x720" range="57-65" /> <!-- N=258 v98%=1.3 -->
-            <Limit name="measured-frame-rate-1920x1080" range="31-34" /> <!-- N=268 v98%=1.4 -->
-        </MediaCodec>
-        <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
-            <!-- measured 98%:158-464 med:308/309 FLAKY(mn=143.6 < 154 - 618) -->
-            <Limit name="measured-frame-rate-176x144" range="308-309" /> <!-- N=298 v98%=1.7 -->
-        </MediaCodec>
-        <!-- Measurements between PPR1.180405.004 and PPR1.180510.004 -->
-        <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
-            <!-- measured 98%:67-152 med:122/122 FLAKY(mn=50.3 < 61 - 244) -->
-            <Limit name="measured-frame-rate-320x180" range="122-122" /> <!-- N=256 v98%=1.5 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-640x360" range="57-60" /> <!-- N=256 v98%=1.4 (PPR1.180405.002-) -->
-            <Limit name="measured-frame-rate-1280x720" range="34-34" /> <!-- N=256 v98%=1.2 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-1920x1080" range="17-17" /> <!-- N=258 v98%=1.1 (PPR1.180405.002-) -->
-        </MediaCodec>
-        <!-- Measurements between PPR1.180329.007 and PPR1.180501.001 -->
-        <MediaCodec name="OMX.google.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
-            <!-- measured 90%:91-136 med:132/113 N=4 -->
-            <Limit name="measured-frame-rate-320x180" range="113-113" /> <!-- v90%=1.2 -->
-            <!-- measured 90%:51-57 med:55/54 N=4 -->
-            <Limit name="measured-frame-rate-640x360" range="54-54" /> <!-- v90%=1.0 -->
-            <!-- measured 90%:16-17 med:17/16 N=4 -->
-            <Limit name="measured-frame-rate-1280x720" range="16-16" /> <!-- v90%=1.0 -->
+        <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+            <Limit name="measured-frame-rate-320x180" range="275-275" /> <!-- N=148 v98%=1.2 -->
+            <Limit name="measured-frame-rate-640x360" range="116-116" /> <!-- N=148 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1280x720" range="32-32" /> <!-- N=148 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1920x1080" range="13-13" /> <!-- N=148 v98%=1.1 -->
         </MediaCodec>
     </Encoders>
     <Decoders>
         <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" update="true">
-            <Limit name="measured-frame-rate-176x144" range="160-160" /> <!-- N=262 v98%=1.1 -->
-            <Limit name="measured-frame-rate-352x288" range="155-155" /> <!-- N=248 v98%=1.1 -->
+            <Limit name="measured-frame-rate-176x144" range="148-149" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-352x288" range="147-147" /> <!-- N=156 v98%=1.0 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+            <Limit name="measured-frame-rate-176x144" range="439-439" /> <!-- N=156 v98%=1.2 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
-            <Limit name="measured-frame-rate-320x240" range="295-295" /> <!-- N=202 v98%=1.3 -->
-            <Limit name="measured-frame-rate-720x480" range="180-180" /> <!-- N=262 v98%=1.1 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-1280x720" range="327-327" /> <!-- N=248 v98%=1.1 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-1920x1080" range="200-200" /> <!-- N=202 v98%=1.0 -->
+            <Limit name="measured-frame-rate-320x240" range="205-225" /> <!-- N=156 v97%=1.2 -->
+            <Limit name="measured-frame-rate-720x480" range="159-160" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1280x720" range="331-331" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1920x1088" range="203-203" /> <!-- N=156 v98%=1.0 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="211-211" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-768x480" range="96-96" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1280x720" range="39-39" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="17-17" /> <!-- N=156 v98%=1.2 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
-            <Limit name="measured-frame-rate-352x288" range="342-342" /> <!-- N=232 v98%=1.2 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-640x360" range="237-237" /> <!-- N=202 v98%=1.1 -->
-            <Limit name="measured-frame-rate-720x480" range="181-181" /> <!-- N=202 v98%=1.1 -->
-            <Limit name="measured-frame-rate-1280x720" range="83-83" /> <!-- N=178 v98%=1.0 (PPR1.180327.002-) -->
-            <Limit name="measured-frame-rate-1920x1080" range="253-253" /> <!-- N=262 v98%=1.0 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-3840x2160" range="69-69" /> <!-- N=202 v98%=1.0 -->
+            <Limit name="measured-frame-rate-352x288" range="272-272" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-640x360" range="208-211" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-720x480" range="171-172" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1280x720" range="82-83" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1920x1080" range="251-251" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-3840x2160" range="68-69" /> <!-- N=156 v98%=1.0 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+            <Limit name="measured-frame-rate-384x288" range="257-257" /> <!-- N=156 v98%=1.1 -->
+            <Limit name="measured-frame-rate-640x360" range="148-148" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-768x480" range="137-137" /> <!-- N=156 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1280x720" range="62-62" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="39-39" /> <!-- N=156 v98%=1.1 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" update="true">
-            <Limit name="measured-frame-rate-176x144" range="151-151" /> <!-- N=247 v98%=1.1 -->
-            <Limit name="measured-frame-rate-480x360" range="152-152" /> <!-- N=262 v98%=1.1 -->
+            <Limit name="measured-frame-rate-176x144" range="143-144" /> <!-- N=158 v98%=1.0 -->
+            <Limit name="measured-frame-rate-480x360" range="142-143" /> <!-- N=158 v98%=1.0 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+            <Limit name="measured-frame-rate-176x144" range="497-497" /> <!-- N=158 v98%=1.1 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="358-358" /> <!-- N=232 v98%=1.0 -->
-            <Limit name="measured-frame-rate-640x360" range="273-273" /> <!-- N=262 v98%=1.0 -->
-            <Limit name="measured-frame-rate-1280x720" range="356-356" /> <!-- N=248 v98%=1.1 -->
-            <Limit name="measured-frame-rate-1920x1080" range="253-253" /> <!-- N=202 v98%=1.0 (-PPR1.180510.004) -->
+            <Limit name="measured-frame-rate-320x180" range="311-311" /> <!-- N=156 v98%=1.1 -->
+            <Limit name="measured-frame-rate-640x360" range="259-259" /> <!-- N=156 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1280x720" range="363-363" /> <!-- N=156 v98%=1.1 -->
+            <Limit name="measured-frame-rate-1920x1080" range="249-249" /> <!-- N=156 v98%=1.0 -->
+        </MediaCodec>
+        <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+            <Limit name="measured-frame-rate-320x180" range="267-267" /> <!-- N=158 v98%=1.2 -->
+            <Limit name="measured-frame-rate-640x360" range="120-120" /> <!-- N=157 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="17-17" /> <!-- N=156 v98%=1.0 -->
         </MediaCodec>
         <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
-            <Limit name="measured-frame-rate-320x180" range="284-285" /> <!-- N=248 v98%=1.0 -->
-            <Limit name="measured-frame-rate-640x360" range="256-256" /> <!-- N=248 v98%=1.0 -->
-            <Limit name="measured-frame-rate-1280x720" range="306-306" /> <!-- N=262 v98%=1.0 -->
-            <Limit name="measured-frame-rate-1920x1080" range="271-271" /> <!-- N=180 v98%=1.0 (PPR1.180403.002-PPR1.180510.004) -->
-            <Limit name="measured-frame-rate-3840x2160" range="45-45" /> <!-- N=248 v98%=1.0 -->
+            <Limit name="measured-frame-rate-320x180" range="279-280" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-640x360" range="255-255" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1280x720" range="303-303" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-1920x1080" range="269-269" /> <!-- N=156 v98%=1.0 -->
+            <Limit name="measured-frame-rate-3840x2160" range="45-45" /> <!-- N=156 v98%=1.0 -->
         </MediaCodec>
-        <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
-            <!-- measured 98%:191-442 med:258/257 FLAKY(129 - 514 < mx=525.5) -->
-            <Limit name="measured-frame-rate-176x144" range="257-257" /> <!-- N=202 v98%=1.5 -->
-        </MediaCodec>
-        <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
-            <!-- measured 98%:292-593 med:505/505 FLAKY(mn=228.0 < 253 - 1010) -->
-            <Limit name="measured-frame-rate-320x240" range="505-505" /> <!-- N=232 v98%=1.4 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-720x480" range="205-205" /> <!-- N=178 v98%=1.3 (PPR1.180327.002-) -->
-            <Limit name="measured-frame-rate-1280x720" range="73-73" /> <!-- N=262 v98%=1.2 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-1920x1080" range="34-34" /> <!-- N=178 v98%=1.1 (PPR1.180327.002-) -->
-        </MediaCodec>
-        <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
-            <Limit name="measured-frame-rate-352x288" range="544-544" /> <!-- N=202 v98%=1.1 -->
-            <Limit name="measured-frame-rate-640x360" range="312-312" /> <!-- N=202 v98%=1.2 -->
-            <Limit name="measured-frame-rate-720x480" range="274-274" /> <!-- N=232 v98%=1.2 (-PPR1.180514.002) -->
-            <Limit name="measured-frame-rate-1280x720" range="124-124" /> <!-- N=202 v98%=1.3 -->
-            <Limit name="measured-frame-rate-1920x1080" range="68-68" /> <!-- N=248 v98%=1.2 (-PPR1.180514.002) -->
-        </MediaCodec>
-        <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" update="true">
-            <Limit name="measured-frame-rate-176x144" range="314-314" /> <!-- N=202 v98%=1.4 -->
-        </MediaCodec>
-        <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="934-934" /> <!-- N=179 v98%=1.1 (PPR1.180403.002-) -->
-            <Limit name="measured-frame-rate-640x360" range="343-343" /> <!-- N=248 v98%=1.1 (-PPR1.180514.002) -->
-            <!-- measured 90%:76-77 med:77/76 N=2 -->
-            <Limit name="measured-frame-rate-1280x720" range="76-76" /> <!-- v90%=1.0 (PPR1.180510.003-PPR1.180510.003) -->
-            <Limit name="measured-frame-rate-1920x1080" range="34-34" /> <!-- N=232 v98%=1.0 (-PPR1.180514.002) -->
-        </MediaCodec>
-        <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
-            <Limit name="measured-frame-rate-320x180" range="627-628" /> <!-- N=248 v98%=1.0 -->
-            <Limit name="measured-frame-rate-640x360" range="191-191" /> <!-- N=178 v98%=1.1 (PPR1.180327.002-PPR1.180510.004) -->
-            <Limit name="measured-frame-rate-1280x720" range="91-91" /> <!-- N=232 v98%=1.2 -->
-            <Limit name="measured-frame-rate-1920x1080" range="53-53" /> <!-- N=248 v98%=1.1 -->
+        <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+            <Limit name="measured-frame-rate-320x180" range="280-280" /> <!-- N=156 v98%=1.3 -->
+            <Limit name="measured-frame-rate-640x360" range="153-153" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1280x720" range="69-69" /> <!-- N=156 v98%=1.2 -->
+            <Limit name="measured-frame-rate-1920x1080" range="46-46" /> <!-- N=156 v98%=1.1 -->
         </MediaCodec>
     </Decoders>
 </MediaCodecs>
diff --git a/mixer_paths.xml b/mixer_paths.xml
index e44f533..ded6f93 100644
--- a/mixer_paths.xml
+++ b/mixer_paths.xml
@@ -886,6 +886,11 @@
         <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="1" />
     </path>
 
+    <path name="voicemmode1-call usb-headphones">
+        <ctl name="AFE_PCM_RX_Voice Mixer VoiceMMode1" value="1" />
+        <ctl name="VoiceMMode1_Tx Mixer AFE_PCM_TX_MMode1" value="1" />
+    </path>
+
     <path name="voicemmode2-call">
         <ctl name="SLIM_0_RX_Voice Mixer VoiceMMode2" value="1" />
         <ctl name="VoiceMMode2_Tx Mixer SLIM_0_TX_MMode2" value="1" />
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc220/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc220/config.xml
deleted file mode 100644
index ce5d633..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc302-mnc220/config.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
-    <!-- Values for TELUS GPS configuration -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>LPP_PROFILE=3</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=0</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
-
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc610/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc610/config.xml
deleted file mode 100644
index 4d99aa2..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc302-mnc610/config.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-
-    <!-- Values for GPS configuration (Bell) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>LPP_PROFILE=2</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=0</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml
deleted file mode 100644
index c71e087..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Rogers) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>LPP_PROFILE=2</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=0</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
-
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml
index f6b7148..8826ee9 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml
@@ -34,24 +34,6 @@
     <!-- Use ERI text for network name on CDMA LTE -->
     <bool name="config_LTE_eri_for_network_name">false</bool>
 
-    <!-- Values for GPS configuration (Verizon) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>LPP_PROFILE=3</item>
-        <item>GPS_LOCK=3</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
     <!-- Entitlement APP provisioning for Tethering -->
     <string-array translatable="false" name="config_mobile_hotspot_provision_app">
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml
index e059d1c..4cb980d 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml
@@ -36,24 +36,6 @@
     <!-- Sometimes, PDU has garbages. So, need to use valid index -->
     <integer name="config_valid_wappush_index">4</integer>
 
-    <!-- Values for GPS configuration (Sprint) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
     <!-- sms encoded as octet is decoded by utf8 decoder. if it is true -->
     <bool name="config_sms_utf8_support">true</bool>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml
index d01e2fa..b15c6c8 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml
@@ -46,24 +46,6 @@
         <item>lte:786432,1572864,3840000,786432,1572864,3840000</item>
     </string-array>
 
-    <!-- Values for GPS configuration (T-Mobile) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=1</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
 </resources>
 
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
index 9c326c5..fce6bb7 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml
@@ -36,24 +36,6 @@
         <item>lte:524288,1048576,8388608,262144,524288,4194304</item>
     </string-array>
 
-    <!-- Values for GPS configuration (AT&T) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=1</item>
-        <item>LPP_PROFILE=3</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
     <!-- If Voice Radio Technology is RIL_RADIO_TECHNOLOGY_LTE:14 this is the Values
          that should be used instead. A value of RIL_RADIO_TECHNOLOGY_UNKNOWN:0 means
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc220/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc220/config.xml
deleted file mode 100644
index 8cb86bf..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc220/config.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc221/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc221/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc221/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc222/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc222/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc222/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc223/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc223/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc223/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc224/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc224/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc224/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc225/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc225/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc225/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc226/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc226/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc226/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc227/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc227/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc227/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc228/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc228/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc228/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc229/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc229/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc229/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml
index 6cab9c2..11ea93e 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml
@@ -34,24 +34,6 @@
     <!-- Use ERI text for network name on CDMA LTE -->
     <bool name="config_LTE_eri_for_network_name">false</bool>
 
-    <!-- Values for GPS configuration (Verizon) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=3</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
     <!-- Entitlement APP provisioning for Tethering -->
     <string-array translatable="false" name="config_mobile_hotspot_provision_app">
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc490/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc490/config.xml
index 7af13f3..bff3177 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc490/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc490/config.xml
@@ -36,24 +36,6 @@
     <!-- Default network policy warning threshold, in megabytes. -->
     <integer name="config_networkPolicyDefaultWarning">51200</integer>
 
-    <!-- Values for GPS configuration (Sprint) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
     <!-- Entitlement APP provisioning for Tethering -->
     <string-array translatable="false" name="config_mobile_hotspot_provision_app">
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc580/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc580/config.xml
deleted file mode 100644
index 8cb86bf..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc580/config.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc581/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc581/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc581/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc582/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc582/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc582/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc583/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc583/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc583/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc584/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc584/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc584/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc585/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc585/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc585/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc586/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc586/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc586/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc587/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc587/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc587/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc588/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc588/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc588/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc589/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc589/config.xml
deleted file mode 100644
index 5294355..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc589/config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (US Cellular) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc870/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc870/config.xml
index 7af13f3..bff3177 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc870/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc311-mnc870/config.xml
@@ -36,24 +36,6 @@
     <!-- Default network policy warning threshold, in megabytes. -->
     <integer name="config_networkPolicyDefaultWarning">51200</integer>
 
-    <!-- Values for GPS configuration (Sprint) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>GPS_LOCK=3</item>
-        <item>LPP_PROFILE=2</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
     <!-- Entitlement APP provisioning for Tethering -->
     <string-array translatable="false" name="config_mobile_hotspot_provision_app">
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc840/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc840/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc840/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc854/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc854/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc854/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc855/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc855/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc855/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc856/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc856/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc856/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc857/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc857/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc857/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc858/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc858/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc858/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc859/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc859/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc859/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc860/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc860/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc860/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc861/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc861/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc861/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc862/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc862/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc862/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc863/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc863/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc863/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc864/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc864/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc864/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc865/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc865/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc865/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc866/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc866/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc866/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc867/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc867/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc867/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc868/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc868/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc868/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc869/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc869/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc869/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc870/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc870/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc870/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc871/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc871/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc871/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc872/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc872/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc872/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc873/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc873/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc873/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc405-mnc874/config.xml b/overlay/frameworks/base/core/res/res/values-mcc405-mnc874/config.xml
deleted file mode 100644
index 113c401..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc405-mnc874/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
-     for different hardware and product builds. -->
-<resources>
-    <!-- Values for GPS configuration (Reliance) -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>LPP_PROFILE=2</item>
-    </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
old mode 100755
new mode 100644
index 64b6cb9..3bb3bd7
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -372,7 +372,7 @@
 
    <!-- Enable doze mode
          ComponentName of a dream to show whenever the system would otherwise have gone to sleep. -->
-    <string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
+    <string translatable="false" name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
 
     <!-- If true, the doze component is not started until after the screen has been turned off
          and the screen off animation has been performed. -->
@@ -385,7 +385,7 @@
     <string name="config_dozeDoubleTapSensorType" translatable="false">com.google.sensor.double_touch</string>
 
     <!-- ImsService package name to bind to by default, if config_dynamic_bind_ims is true -->
-    <string name="config_ims_package">org.codeaurora.ims</string>
+    <string name="config_ims_package" translatable="false">org.codeaurora.ims</string>
 
     <!-- Flag specifying whether or not IMS will use the ImsResolver dynamically -->
     <bool name="config_dynamic_bind_ims">true</bool>
@@ -438,23 +438,6 @@
     <!-- Use ERI text for network name on CDMA LTE -->
         <bool name="config_LTE_eri_for_network_name">false</bool>
 
-    <!-- Values for GPS configuration -->
-    <string-array translatable="false" name="config_gpsParameters">
-        <item>SUPL_HOST=supl.google.com</item>
-        <item>SUPL_PORT=7275</item>
-        <item>XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin</item>
-        <item>XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin</item>
-        <item>NTP_SERVER=north-america.pool.ntp.org</item>
-        <item>SUPL_MODE=1</item>
-        <item>SUPL_VER=0x20000</item>
-        <item>LPP_PROFILE=0</item>
-        <item>NMEA_PROVIDER=0</item>
-        <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
-        <item>ERR_ESTIMATE=0</item>
-        <item>INTERMEDIATE_POS=0</item>
-        <item>SUPL_ES=1</item>
-    </string-array>
 
     <!-- Values for USB port setting. in format of bootmode:current function:new function -->
     <string-array translatable="false" name="config_oemUsbModeOverride">
@@ -482,8 +465,8 @@
         <item>"/system/framework/services.jar"</item>
         <item>"/system/framework/arm64/boot.oat"</item>
         <item>"/system/framework/arm64/boot-core-libart.oat"</item>
-        <item>"/apex/com.android.runtime/javalib/core-oj.jar"</item>
-        <item>"/apex/com.android.runtime/javalib/core-libart.jar"</item>
+        <item>"/apex/com.android.art/javalib/core-oj.jar"</item>
+        <item>"/apex/com.android.art/javalib/core-libart.jar"</item>
         <item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
     </string-array>
 
@@ -498,4 +481,10 @@
 
      <!-- True if Unprocessed audio source supports the required frequency range and level -->
     <bool name="config_supportAudioSourceUnprocessed">true</bool>
+
+    <!-- Disable rounded corners on windows to improve graphics performance -->
+    <bool name="config_supportsRoundedCornersOnWindows">false</bool>
+
+    <!-- True if the firmware supports Wi-Fi link probing -->
+    <bool name="config_wifi_link_probing_supported">true</bool>
 </resources>
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index 057aa2c..5e22bd2 100644
--- a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -28,4 +28,7 @@
 
     <!-- Set the notificaiton pulse to be off by default. -->
     <bool name="def_notification_pulse">false</bool>
+
+    <!-- Default for Settings.Global.APPLY_RAMPING_RINGER -->
+    <bool name="def_apply_ramping_ringer">false</bool>
 </resources>
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml b/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
new file mode 100644
index 0000000..f41b5ae
--- /dev/null
+++ b/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2019, 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>
+    <dimen name="status_bar_padding_start">12dp</dimen>
+    <dimen name="status_bar_padding_end">12dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
index 9b897f8..0e8c392 100644
--- a/overlay/packages/apps/Bluetooth/res/values/config.xml
+++ b/overlay/packages/apps/Bluetooth/res/values/config.xml
@@ -32,5 +32,6 @@
     <bool name="profile_supported_avrcp_controller">false</bool>
     <bool name="profile_supported_a2dp_sink">false</bool>
     <bool name="profile_supported_sap">true</bool>
+    <bool name="profile_supported_hearing_aid">true</bool>
 </resources>
 
diff --git a/power/Android.mk b/power/Android.mk
index 06b2a8e..f986ff6 100644
--- a/power/Android.mk
+++ b/power/Android.mk
@@ -45,7 +45,6 @@
     libbase \
     libcutils \
     libhidlbase \
-    libhidltransport \
     liblog \
     libutils \
     android.hardware.power@1.1 \
diff --git a/recovery/nanohub/Android.mk b/recovery/nanohub/Android.mk
index 70ccb37..29bf171 100644
--- a/recovery/nanohub/Android.mk
+++ b/recovery/nanohub/Android.mk
@@ -14,7 +14,7 @@
 # limitations under the License.
 #
 
-ifeq ($(TARGET_RECOVERY_UI_LIB),librecovery_ui_nanohub)
+ifneq (,$(filter librecovery_ui_nanohub,$(TARGET_RECOVERY_UI_LIB)))
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
@@ -24,7 +24,9 @@
 
 LOCAL_SRC_FILES := nanohub_recovery_ui.cpp
 
-LOCAL_SHARED_LIBRARIES := librecovery_ui
+LOCAL_SHARED_LIBRARIES := libbase librecovery_ui
+
+LOCAL_STATIC_LIBRARIES := libbootloader_message
 
 include $(BUILD_STATIC_LIBRARY)
 endif
diff --git a/recovery/nanohub/nanohub_recovery_ui.cpp b/recovery/nanohub/nanohub_recovery_ui.cpp
index 9298c05..6f17530 100644
--- a/recovery/nanohub/nanohub_recovery_ui.cpp
+++ b/recovery/nanohub/nanohub_recovery_ui.cpp
@@ -20,38 +20,54 @@
 #include <unistd.h>
 #include <errno.h>
 
-#include "recovery_ui/device.h"
-#include "recovery_ui/screen_ui.h"
+#include <string>
 
-class Nanohub_Device : public Device
-{
-public:
+#include <android-base/logging.h>
+#include <bootloader_message/bootloader_message.h>
+#include <recovery_ui/device.h>
+#include <recovery_ui/screen_ui.h>
+
+// Wipes the dark theme flag as part of data wipe.
+static bool WipeDarkThemeFlag() {
+    // Must be consistent with the one in init.hardware.rc (10-byte `theme-dark`). The magic is at
+    // 10814 in vendor space, or (2048 + 10814) since the start of /misc.
+    const std::string wipe_str(10, '\x00');
+    constexpr size_t kDarkThemeFlagOffsetInVendorSpace = 10814;
+    if (std::string err; !WriteMiscPartitionVendorSpace(
+            wipe_str.data(), wipe_str.size(), kDarkThemeFlagOffsetInVendorSpace, &err)) {
+        LOG(ERROR) << "Failed to write wipe string: " << err;
+        return false;
+    }
+    LOG(INFO) << "Dark theme flag wiped successfully";
+    return true;
+}
+
+class Nanohub_Device : public Device {
+  public:
     Nanohub_Device(ScreenRecoveryUI* ui) : Device(ui) {}
     bool PostWipeData();
 };
 
-bool Nanohub_Device::PostWipeData()
-{
-    int fd;
-
-    fd = open("/sys/class/nanohub/nanohub/erase_shared", O_WRONLY);
+bool Nanohub_Device::PostWipeData() {
+    int fd = open("/sys/class/nanohub/nanohub/erase_shared", O_WRONLY);
     if (fd < 0) {
-        printf("error: open erase_shared failed: %s\n", strerror(errno));
+        PLOG(ERROR) << "open erase_shared failed";
     } else {
         if (write(fd, "1\n", 2) != 2) {
-            printf("error: write to erase_shared failed: %s\n", strerror(errno));
+            PLOG(ERROR) << "write to erase_shared failed";
         } else {
-            printf("Successfully erased nanoapps.\n");
+            LOG(INFO) << "Successfully erased nanoapps";
         }
         close(fd);
     }
 
+    WipeDarkThemeFlag();
+
     // open/write failure caused by permissions issues would persist across
     // reboots, so always return true to prevent a factory reset failure loop.
     return true;
 }
 
-Device *make_device()
-{
+Device* make_device() {
     return new Nanohub_Device(new ScreenRecoveryUI);
 }
diff --git a/sailfish/BoardConfig.mk b/sailfish/BoardConfig.mk
index f7128ac..77c0d3d 100644
--- a/sailfish/BoardConfig.mk
+++ b/sailfish/BoardConfig.mk
@@ -69,6 +69,7 @@
 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
 WIFI_DRIVER_FW_PATH_STA := "sta"
 WIFI_DRIVER_FW_PATH_AP  := "ap"
+WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION := true
 
 USE_OPENGL_RENDERER := true
 BOARD_USE_LEGACY_UI := true
@@ -83,6 +84,7 @@
 BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
 BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
 BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
 
 TARGET_USES_ION := true
 TARGET_USES_NEW_ION_API :=true
@@ -90,7 +92,7 @@
 TARGET_USES_QCOM_BSP := true
 endif
 
-BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=sailfish user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff loop.max_part=7
+BOARD_KERNEL_CMDLINE += console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=sailfish user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 cma=32M@0-0xffffffff loop.max_part=7
 
 BOARD_ROOT_EXTRA_FOLDERS := firmware firmware/radio persist
 BOARD_ROOT_EXTRA_SYMLINKS := /vendor/lib/dsp:/dsp
@@ -165,7 +167,8 @@
 
 #Add NON-HLOS files for ota upgrade
 ADD_RADIO_FILES := true
-TARGET_RECOVERY_UI_LIB := librecovery_ui_nanohub
+
+TARGET_RECOVERY_UI_LIB := librecovery_ui_nanohub libbootloader_message libfstab
 
 #Add support for firmare upgrade on 8996
 HAVE_SYNAPTICS_DSX_FW_UPGRADE := true
@@ -214,3 +217,6 @@
 
 # Partitions (listed in the file) to be wiped under recovery.
 TARGET_RECOVERY_WIPE := device/google/marlin/recovery.wipe.common
+
+# TODO(b/131162102): remove this after cleaning up accesses of sysprop
+BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true
diff --git a/sepolicy/OWNERS b/sepolicy/OWNERS
index c2705c9..e9baa1e 100644
--- a/sepolicy/OWNERS
+++ b/sepolicy/OWNERS
@@ -4,7 +4,9 @@
 jbires@google.com
 jeffv@google.com
 jgalenson@google.com
+jiyong@google.com
 nnk@google.com
+smoreland@google.com
 sspatil@google.com
 tomcherry@google.com
 trong@google.com
diff --git a/sepolicy/bug_map b/sepolicy/bug_map
index 89213aa..764f988 100644
--- a/sepolicy/bug_map
+++ b/sepolicy/bug_map
@@ -1,9 +1,10 @@
-cameraserver mediacodec binder 77924653
-cnd vendor_shell_exec file 77922167
-hal_audio_default priv_app fd 77926553
-hal_bluetooth_default ramdump_vendor_data_file dir 129298416
-hal_health_default persist_file file 127303305
-netd sysfs_pcie dir 77870037
-perfd perfd capability 77924406
-platform_app storage_stub_file dir 130218670
-vold_prepare_subdirs proc file 132093726
+cameraserver mediacodec binder b/77924653
+cnd vendor_shell_exec file b/77922167
+hal_audio_default priv_app fd b/77926553
+hal_bluetooth_default ramdump_vendor_data_file dir b/129298416
+hal_health_default persist_file file b/127303305
+init_mid exported2_default_prop property_service b/140189748
+netd sysfs_pcie dir b/77870037
+perfd perfd capability b/77924406
+platform_app storage_stub_file dir b/130218670
+vold_prepare_subdirs proc file b/132093726
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index e5f1faf..d217994 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -113,10 +113,13 @@
 # files in /vendor
 /vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service-qti          u:object_r:hal_bluetooth_default_exec:s0
 /vendor/bin/hw/android\.hardware\.drm@1\.1-service\.widevine          u:object_r:hal_drm_widevine_exec:s0
-/vendor/bin/hw/android\.hardware\.drm@1\.1-service\.clearkey          u:object_r:hal_drm_clearkey_exec:s0
+/vendor/bin/hw/android\.hardware\.drm@1\.1-service-lazy\.widevine     u:object_r:hal_drm_widevine_exec:s0
+/vendor/bin/hw/android\.hardware\.drm@1\.2-service\.clearkey          u:object_r:hal_drm_clearkey_exec:s0
+/vendor/bin/hw/android\.hardware\.drm@1\.2-service-lazy\.clearkey     u:object_r:hal_drm_clearkey_exec:s0
 /vendor/bin/hw/android\.hardware\.dumpstate@1\.0-service\.marlin      u:object_r:hal_dumpstate_impl_exec:s0
 /vendor/bin/hw/android\.hardware\.power@1\.1-service\.marlin          u:object_r:hal_power_default_exec:s0
 /vendor/bin/hw/android\.hardware\.usb@1\.1-service\.marlin            u:object_r:hal_usb_default_exec:s0
+/vendor/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel         u:object_r:hal_thermal_default_exec:s0
 /vendor/bin/hw/android\.hardware\.vibrator@1\.0-service\.marlin       u:object_r:hal_vibrator_default_exec:s0
 /vendor/bin/msm_irqbalance  u:object_r:irqbalance_exec:s0
 /vendor/bin/nanohub_slpi    u:object_r:nanohub_slpi_exec:s0
@@ -134,6 +137,7 @@
 ###############################################
 # same-process HAL files and their dependencies
 #
+/vendor/lib(64)?/hw/android\.hardware\.graphics\.mapper@2\.0-impl-2\.1\.so u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/hw/gralloc\.msm8996\.so   u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/libqdMetaData\.so         u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/libqservice\.so           u:object_r:same_process_hal_file:s0
diff --git a/sepolicy/hal_drm_clearkey.te b/sepolicy/hal_drm_clearkey.te
index 976b9fa..1a3b4af 100644
--- a/sepolicy/hal_drm_clearkey.te
+++ b/sepolicy/hal_drm_clearkey.te
@@ -1,4 +1,4 @@
-# policy for /vendor/bin/hw/android.hardware.drm@1.1-service.clearkey
+# policy for /vendor/bin/hw/android.hardware.drm clearkey service
 type hal_drm_clearkey, domain;
 type hal_drm_clearkey_exec, exec_type, vendor_file_type, file_type;
 
diff --git a/sepolicy/hal_dumpstate_impl.te b/sepolicy/hal_dumpstate_impl.te
index d7c1d35..50e7cb7 100644
--- a/sepolicy/hal_dumpstate_impl.te
+++ b/sepolicy/hal_dumpstate_impl.te
@@ -53,7 +53,7 @@
 # CPU stat
 r_dir_file(hal_dumpstate_impl, sysfs_devices_system_cpu)
 # usb logs
-userdebug_or_eng(`allow hal_dumpstate_impl debugfs_usb:file r_file_perms;')
+allow hal_dumpstate_impl debugfs_usb:file r_file_perms;
 
 # Access to UFS info
 allow hal_dumpstate_impl sysfs_scsi_devices_0000:dir r_dir_perms;
diff --git a/sepolicy/hal_thermal_default.te b/sepolicy/hal_thermal_default.te
new file mode 100644
index 0000000..13c129f
--- /dev/null
+++ b/sepolicy/hal_thermal_default.te
@@ -0,0 +1,7 @@
+allow hal_thermal_default sysfs_thermal:dir r_dir_perms;
+allow hal_thermal_default sysfs_thermal:file r_file_perms;
+allow hal_thermal_default sysfs_thermal:lnk_file read;
+allow hal_thermal_default proc_stat:file r_file_perms;
+
+# read thermal_config
+get_prop(hal_thermal_default, thermal_prop)
diff --git a/sepolicy/location.te b/sepolicy/location.te
index ef4bce0..29c22b0 100644
--- a/sepolicy/location.te
+++ b/sepolicy/location.te
@@ -31,7 +31,7 @@
 # files in /sys
 r_dir_file(location, sysfs_type)
 
-allow location proc_net:file r_file_perms;
+allow location proc_net_type:file r_file_perms;
 
 # execute /vendor/bin/slim_daemon
 allow location vendor_file:file rx_file_perms;
diff --git a/sepolicy/mediaswcodec.te b/sepolicy/mediaswcodec.te
new file mode 100644
index 0000000..3690750
--- /dev/null
+++ b/sepolicy/mediaswcodec.te
@@ -0,0 +1,2 @@
+allow mediaswcodec gpu_device:chr_file { ioctl open read write };
+
diff --git a/sepolicy/netmgrd.te b/sepolicy/netmgrd.te
index 354077f..a2e188d 100644
--- a/sepolicy/netmgrd.te
+++ b/sepolicy/netmgrd.te
@@ -14,7 +14,7 @@
 allow netmgrd netmgrd_socket:dir rw_dir_perms;
 allow netmgrd netmgrd_socket:sock_file create_file_perms;
 
-allow netmgrd proc_net:file rw_file_perms;
+allow netmgrd proc_net_type:file rw_file_perms;
 
 allow netmgrd self:capability { net_admin net_raw setgid setpcap setuid };
 
diff --git a/sepolicy/private/system_server.te b/sepolicy/private/system_server.te
deleted file mode 100644
index 581723e..0000000
--- a/sepolicy/private/system_server.te
+++ /dev/null
@@ -1 +0,0 @@
-allow system_server thermal_service:service_manager find;
diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts
index cb0b15d..d792e69 100644
--- a/sepolicy/property_contexts
+++ b/sepolicy/property_contexts
@@ -12,6 +12,7 @@
 vendor.debug.ramdump.               u:object_r:vendor_ramdump_prop:s0
 persist.vendor.sys.crash_rcu        u:object_r:vendor_ramdump_prop:s0
 sys.qcom.thermalcfg                 u:object_r:thermal_prop:s0
+vendor.thermal.config               u:object_r:thermal_prop:s0
 ctl.vendor.thermal-engine           u:object_r:thermal_prop:s0
 sys.time.set                        u:object_r:sys_time_prop:s0
 sys.post_boot.parsed                u:object_r:post_boot_prop:s0
diff --git a/sepolicy/public/thermalserviced.te b/sepolicy/public/thermalserviced.te
deleted file mode 100644
index aa6a085..0000000
--- a/sepolicy/public/thermalserviced.te
+++ /dev/null
@@ -1 +0,0 @@
-binder_call(thermalserviced, system_server)
diff --git a/sepolicy/seapp_contexts b/sepolicy/seapp_contexts
index 9e00f05..dcd24a8 100644
--- a/sepolicy/seapp_contexts
+++ b/sepolicy/seapp_contexts
@@ -17,7 +17,7 @@
 user=system seinfo=platform name=com.qualcomm.timeservice domain=qtimeservice type=system_app_data_file
 
 #Domain for connectivity monitor
-user=radio seinfo=platform name=com.google.android.connectivitymonitor domain=con_monitor_app type=app_data_file levelFrom=all
+user=_app isPrivApp=true seinfo=platform name=com.google.android.connectivitymonitor domain=con_monitor_app type=app_data_file levelFrom=all
 
 # Domain for WfcActivation app
 user=_app seinfo=wfcactivation name=com.google.android.wfcactivation domain=wfc_activation_app levelFrom=all
diff --git a/sepolicy/thermal-engine.te b/sepolicy/thermal-engine.te
index cd414c4..8036880 100644
--- a/sepolicy/thermal-engine.te
+++ b/sepolicy/thermal-engine.te
@@ -35,6 +35,3 @@
 
 # reboot/shutdown for thermal limits exceeded
 set_prop(thermal-engine, powerctl_prop)
-
-# IThermal Thermal HAL
-hal_server_domain(thermal-engine, hal_thermal)
diff --git a/thermal-engine-marlin-vr.conf b/thermal-engine-marlin-vr.conf
index 1c612c9..b185a4b 100755
--- a/thermal-engine-marlin-vr.conf
+++ b/thermal-engine-marlin-vr.conf
@@ -2,8 +2,8 @@
 algo_type monitor
 sampling 1000
 sensor emmc_therm
-thresholds           60000
-thresholds_clr       59000
+thresholds           62000
+thresholds_clr       61000
 actions              shutdown
 action_info          1
 
diff --git a/thermal-engine-marlin.conf b/thermal-engine-marlin.conf
index 1896e25..d22f240 100755
--- a/thermal-engine-marlin.conf
+++ b/thermal-engine-marlin.conf
@@ -2,8 +2,8 @@
 algo_type monitor
 sampling 1000
 sensor emmc_therm
-thresholds           60000
-thresholds_clr       59000
+thresholds           62000
+thresholds_clr       61000
 actions              shutdown
 action_info          1
 
diff --git a/thermal-engine/Android.mk b/thermal-engine/Android.mk
deleted file mode 100644
index bcb5423..0000000
--- a/thermal-engine/Android.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:=thermal-engine
-
-LOCAL_EXPORT_C_INCLUDE_DIRS:=$(LOCAL_PATH)
-
-include $(BUILD_HEADER_LIBRARY)
diff --git a/thermal-engine/thermal_client.h b/thermal-engine/thermal_client.h
deleted file mode 100644
index 5eb81ed..0000000
--- a/thermal-engine/thermal_client.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-#include <cutils/properties.h>
-#ifndef __THERMAL_CLIENT_H__
-#define __THERMAL_CLIENT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_ACTIONS  (32)
-
-/* Enum for supported fields */
-enum supported_fields {
-	UNKNOWN_FIELD = 0x0,
-	DISABLE_FIELD = 0x1,
-	SAMPLING_FIELD = 0x2,
-	THRESHOLDS_FIELD = 0x4,
-	SET_POINT_FIELD = THRESHOLDS_FIELD,
-	THRESHOLDS_CLR_FIELD = 0x8,
-	SET_POINT_CLR_FIELD = THRESHOLDS_CLR_FIELD,
-	ACTION_INFO_FIELD = 0x10,
-	SUPPORTED_FIELD_MAX = 0x20,
-};
-
-enum field_data_type {
-	FIELD_INT = 0,
-	FIELD_STR,
-	FIELD_INT_ARR,
-	FIELD_ARR_STR,
-	FIELD_ARR_INT_ARR,
-	FIELD_MAX
-};
-
-struct action_info_data {
-	int info[MAX_ACTIONS];
-	uint32_t num_actions;
-};
-
-struct field_data {
-	char *field_name;
-	enum field_data_type data_type;
-	uint32_t num_data;
-	void *data;
-};
-
-struct config_instance {
-	char *cfg_desc;
-	char *algo_type;
-	unsigned int fields_mask;  /* mask set by client to request to adjust supported fields */
-	uint32_t num_fields;
-	struct field_data *fields;
-};
-
-int thermal_client_config_query(char *algo_type, struct config_instance **configs);
-void thermal_client_config_cleanup(struct config_instance *configs, unsigned int config_size);
-int thermal_client_config_set(struct config_instance *configs, unsigned int config_size);
-
-int thermal_client_register_callback(char *client_name, int (*callback)(int , void *, void *), void *data);
-int thermal_client_request(char *client_name, int req_data);
-void thermal_client_unregister_callback(int client_cb_handle);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __THERMAL_CLIENT_H__ */
diff --git a/thermal_info_config.json b/thermal_info_config.json
new file mode 100644
index 0000000..b6edc7a
--- /dev/null
+++ b/thermal_info_config.json
@@ -0,0 +1,119 @@
+{
+    "Sensors":[
+        {
+            "Name":"tsens_tz_sensor3",
+            "Type":"CPU",
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                95.0,
+                "NAN",
+                "NAN",
+                125.0
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.1
+        },
+        {
+            "Name":"tsens_tz_sensor5",
+            "Type":"CPU",
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                95.0,
+                "NAN",
+                "NAN",
+                125.0
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.1
+        },
+        {
+            "Name":"tsens_tz_sensor8",
+            "Type":"CPU",
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                95.0,
+                "NAN",
+                "NAN",
+                125.0
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.1
+        },
+        {
+            "Name":"tsens_tz_sensor10",
+            "Type":"CPU",
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                95.0,
+                "NAN",
+                "NAN",
+                125.0
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.1
+        },
+        {
+            "Name":"tsens_tz_sensor13",
+            "Type":"GPU",
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                95.0,
+                "NAN",
+                "NAN",
+                125.0
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.1
+        },
+        {
+            "Name":"battery",
+            "Type":"BATTERY",
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                60.0
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.001
+        },
+        {
+            "Name":"emmc_therm",
+            "Type":"SKIN",
+            "HotThreshold":[
+                "NAN",
+                47.0,
+                51.0,
+                54.0,
+                56.0,
+                58.0,
+                60.0
+            ],
+            "HotHysteresis":[
+                0.0,
+                3.0,
+                1.0,
+                2.0,
+                1.0,
+                1.0,
+                1.0
+            ],
+            "VrThreshold":58.0,
+            "Multiplier":1.0,
+            "Monitor":true
+        }
+    ]
+}
diff --git a/usb/Android.bp b/usb/Android.bp
index 2f13b54..947a8dd 100644
--- a/usb/Android.bp
+++ b/usb/Android.bp
@@ -21,7 +21,6 @@
     shared_libs: [
         "libbase",
         "libhidlbase",
-        "libhidltransport",
         "liblog",
         "libutils",
         "libhardware",
diff --git a/vibrator/Android.bp b/vibrator/Android.bp
index 46fc452..f0ea153 100644
--- a/vibrator/Android.bp
+++ b/vibrator/Android.bp
@@ -20,9 +20,7 @@
     cflags: ["-Wall", "-Werror"],
     shared_libs: [
         "libhidlbase",
-        "libhidltransport",
         "liblog",
-        "libhwbinder",
         "libutils",
         "libhardware",
         "android.hardware.vibrator@1.0",
diff --git a/wpa_supplicant_overlay.conf b/wpa_supplicant_overlay.conf
index e1f530d..acbcff7 100644
--- a/wpa_supplicant_overlay.conf
+++ b/wpa_supplicant_overlay.conf
@@ -1,3 +1,6 @@
 disable_scan_offload=1
 p2p_disabled=1
 tdls_external_control=1
+interworking=1
+hs20=1
+auto_interworking=0