瀏覽代碼

sm8450-common: overlay: Provide MIUI color mode options

Change-Id: I7faa409bf7069108f5bed64488b2a7c5566cd921
Adithya R 1 年之前
父節點
當前提交
8f107f22df

+ 10 - 0
overlay/FrameworksResXiaomi/res/values/config.xml

@@ -4,6 +4,16 @@
      SPDX-License-Identifier: Apache-2.0
 -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Indicate available ColorDisplayManager.COLOR_MODE_xxx. -->
+    <integer-array name="config_availableColorModes">
+        <item>258</item>
+        <item>256</item>
+        <item>257</item>
+        <item>269</item>
+        <item>268</item>
+        <item>267</item>
+    </integer-array>
+
     <!-- Shutdown if the battery temperature exceeds (this value * 0.1) Celsius. -->
     <integer name="config_shutdownBatteryTemperature">580</integer>
 

+ 24 - 0
overlay/SettingsResXiaomi/res/values/config.xml

@@ -26,6 +26,30 @@
     <!-- Whether to show Smooth Display feature in Settings Options -->
     <bool name="config_show_smooth_display">true</bool>
 
+    <!-- Display settings screen, Color mode options. Must be the same length and order as
+         config_color_mode_options_values below. Only the values that also appear in
+         frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
+    <string-array name="config_color_mode_options_strings" translatable="false">
+        <item>Vivid</item>
+        <item>Saturated</item>
+        <item>Standard</item>
+        <item>Original</item>
+        <item>P3</item>
+        <item>sRGB</item>
+    </string-array>
+
+    <!-- Display settings screen, Color mode options. Must be the same length and order as
+         config_color_mode_options_strings above. Only the values that also appear in
+         frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
+    <integer-array name="config_color_mode_options_values" translatable="false">
+        <item>258</item>
+        <item>256</item>
+        <item>257</item>
+        <item>269</item>
+        <item>268</item>
+        <item>267</item>
+    </integer-array>
+
     <!-- Max network scan search time in seconds -->
     <integer name="config_network_scan_helper_max_search_time_sec">254</integer>
 </resources>

+ 1 - 0
properties/vendor.prop

@@ -149,6 +149,7 @@ debug.sf.treat_170m_as_sRGB=1
 debug.sf.use_phase_offsets_as_durations=1
 persist.sys.sf.color_mode=0
 persist.sys.sf.color_saturation=1.0
+persist.sys.sf.native_mode=258
 ro.gfx.driver.1=com.qualcomm.qti.gpudrivers.taro.api31
 ro.hardware.egl=adreno
 ro.hardware.vulkan=adreno