Merge "QCamera2: Validate dimensions set from framework" into lmp-dev
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 2564998..78721de 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -2636,8 +2636,8 @@
     int32_t hotPixelMap[2];
     camMetadata.update(ANDROID_STATISTICS_HOT_PIXEL_MAP, &hotPixelMap[0], 0);
 
-    uint8_t cac = ANDROID_COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF;
-    camMetadata.update(ANDROID_COLOR_CORRECTION_ABERRATION_CORRECTION_MODE,
+    uint8_t cac = ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF;
+    camMetadata.update(ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
                        &cac,
                        1);
 
@@ -3915,7 +3915,7 @@
 
     int32_t available_request_keys[] = {ANDROID_COLOR_CORRECTION_MODE,
        ANDROID_COLOR_CORRECTION_TRANSFORM, ANDROID_COLOR_CORRECTION_GAINS,
-       ANDROID_COLOR_CORRECTION_ABERRATION_CORRECTION_MODE,
+       ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
        ANDROID_CONTROL_AE_ANTIBANDING_MODE, ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
        ANDROID_CONTROL_AE_LOCK, ANDROID_CONTROL_AE_MODE,
        ANDROID_CONTROL_AE_REGIONS, ANDROID_CONTROL_AE_TARGET_FPS_RANGE,
@@ -3947,7 +3947,7 @@
 
     int32_t available_result_keys[] = {ANDROID_COLOR_CORRECTION_TRANSFORM,
        ANDROID_COLOR_CORRECTION_GAINS,
-       ANDROID_COLOR_CORRECTION_ABERRATION_CORRECTION_MODE,
+       ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
        ANDROID_CONTROL_AE_MODE, ANDROID_CONTROL_AE_REGIONS,
        ANDROID_CONTROL_AE_STATE, ANDROID_CONTROL_AF_MODE, ANDROID_CONTROL_AF_REGIONS,
        ANDROID_CONTROL_AF_STATE, ANDROID_CONTROL_AWB_MODE, ANDROID_CONTROL_AWB_REGIONS,
@@ -3982,7 +3982,7 @@
        ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES,
        ANDROID_CONTROL_AWB_AVAILABLE_MODES, ANDROID_CONTROL_MAX_REGIONS,
        ANDROID_CONTROL_SCENE_MODE_OVERRIDES,ANDROID_FLASH_INFO_AVAILABLE,
-       ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES,
+       ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES,
        ANDROID_FLASH_INFO_CHARGE_DURATION, ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES,
        ANDROID_JPEG_MAX_SIZE, ANDROID_LENS_INFO_AVAILABLE_APERTURES,
        ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES,
@@ -4059,9 +4059,9 @@
                       idx);
 
     uint8_t available_correction_modes[] =
-        {ANDROID_COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF};
+        {ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF};
     staticInfo.update(
-        ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES,
+        ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES,
         available_correction_modes,
         1);
 
diff --git a/init.hammerhead.rc b/init.hammerhead.rc
index 551f00b..2ad8ba6 100644
--- a/init.hammerhead.rc
+++ b/init.hammerhead.rc
@@ -92,12 +92,6 @@
     write /proc/sys/net/core/rmem_max  2097152
     write /proc/sys/net/core/wmem_max  2097152
 
-    # Define TCP buffer sizes
-    # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax
-    setprop net.tcp.buffersize.hsdpa    4094,87380,704512,4096,16384,110208
-    setprop net.tcp.buffersize.hspa     4094,87380,704512,4096,16384,110208
-    setprop net.tcp.buffersize.hsupa    4094,87380,704512,4096,16384,110208
-
     # create symlink for fb1 as HDMI
     symlink /dev/graphics/fb1 /dev/graphics/hdmi
 
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 1ec9aee..8caef0c 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -276,4 +276,15 @@
 
     <!-- Is the device capable of hot swapping an UICC Card -->
     <bool name="config_hotswapCapable">true</bool>
+
+    <!-- Configure mobile tcp buffer sizes in the form:
+         rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
+         If no value is found for the rat-name in use, the system default will be applied.
+    -->
+    <string-array name="config_mobile_tcp_buffers">
+        <item>hsdpa:4094,87380,704512,4096,16384,110208</item>
+        <item>hspa:4094,87380,704512,4096,16384,110208</item>
+        <item>hsupa:4094,87380,704512,4096,16384,110208</item>
+    </string-array>
+
 </resources>