Move slider into gs101 and <device>
from: 026342771c6642980cb4653b1ec4d857a5d8be54
Bug: 167996145
Change-Id: I08376762c559b3a7fd2cd2d743d090269ed52c94
diff --git a/whitefin/BoardConfig.mk b/whitefin/BoardConfig.mk
new file mode 100644
index 0000000..ee3e884
--- /dev/null
+++ b/whitefin/BoardConfig.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2020 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.
+#
+TARGET_BOARD_INFO_FILE := device/google/raviole/board-info.txt
+TARGET_BOOTLOADER_BOARD_NAME := whitefin
+TARGET_SCREEN_DENSITY := 440
+USES_DEVICE_GOOGLE_RAVIOLE := true
+
+include device/google/gs101/BoardConfig-common.mk
+-include vendor/google_devices/gs101/prebuilts/BoardConfigVendor.mk
diff --git a/whitefin/overlay/frameworks/base/core/res/res/values/config.xml b/whitefin/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..c2052a6
--- /dev/null
+++ b/whitefin/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2021, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Minimum screen brightness setting allowed by power manager.
+ The user is forbidden from setting the brightness below this level. -->
+ <item name="config_screenBrightnessSettingMinimumFloat" format="float" type="dimen">0.0</item>
+
+ <!-- Maximum screen brightness allowed by the power manager.
+ The user is forbidden from setting the brightness above this level. -->
+ <item name="config_screenBrightnessSettingMaximumFloat" format="float" type="dimen">1.0</item>
+
+ <!-- Default screen brightness setting
+ Must be in the range specified by minimum and maximum. -->
+ <item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.29019607843</item>
+
+ <array name="config_screenBrightnessNits">
+ <item>2.0</item>
+ <item>500.0</item>
+ </array>
+
+ <!-- Nonlinear coefficients for maximum panel brightness of 500 nits -->
+ <string-array name="config_reduceBrightColorsCoefficientsNonlinear">
+ <!-- a-coefficient --> <item>-0.4553233597</item>
+ <!-- b-coefficient --> <item>-0.2380196976</item>
+ <!-- y-intercept --> <item>0.9801096801</item>
+ </string-array>
+
+ <!-- Linear coefficients for maximum panel brightness of 500 nits -->
+ <string-array name="config_reduceBrightColorsCoefficients">
+ <!-- a-coefficient --> <item>0.0</item>
+ <!-- b-coefficient --> <item>-0.96</item>
+ <!-- y-intercept --> <item>1.0</item>
+ </string-array>
+
+ <integer-array name="config_screenBrightnessBacklight">
+ <item>1</item>
+ <item>255</item>
+ </integer-array>
+</resources>
diff --git a/whitefin/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/whitefin/overlay/frameworks/base/core/res/res/xml/power_profile.xml
new file mode 100644
index 0000000..9dcc198
--- /dev/null
+++ b/whitefin/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2018, 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.
+*/
+-->
+<device name="Android">
+ <!-- Number of cores each CPU cluster contains -->
+ <array name="cpu.clusters.cores">
+ <value>4</value> <!-- Cluster 0 has 4 cores (cpu0, cpu1, cpu2, cpu3) -->
+ <value>2</value> <!-- Cluster 1 has 2 cores (cpu4, cpu5) -->
+ <value>2</value> <!-- Cluster 2 has 2 cores (cpu6, cpu7) -->
+ </array>
+
+ <item name="cpu.suspend">4.35</item>
+ <item name="cpu.idle">5.78</item>
+ <item name="cpu.active">2.35</item>
+ <item name="cpu.cluster_power.cluster0">32.58</item>
+ <item name="cpu.cluster_power.cluster1">6.44</item>
+ <item name="cpu.cluster_power.cluster2">0</item>
+
+ <array name="cpu.core_speeds.cluster0">
+ <value>300000</value>
+ <value>574000</value>
+ <value>738000</value>
+ <value>889000</value>
+ <value>1098000</value>
+ <value>1197000</value>
+ <value>1328000</value>
+ <value>1459000</value>
+ <value>1598000</value>
+ <value>1745000</value>
+ <value>1868000</value>
+ </array>
+
+ <array name="cpu.core_speeds.cluster1">
+ <value>400000</value>
+ <value>553000</value>
+ <value>696000</value>
+ <value>799000</value>
+ <value>910000</value>
+ <value>1024000</value>
+ <value>1197000</value>
+ <value>1328000</value>
+ <value>1491000</value>
+ <value>1663000</value>
+ <value>1836000</value>
+ <value>1999000</value>
+ <value>2130000</value>
+ <value>2253000</value>
+ </array>
+
+ <array name="cpu.core_speeds.cluster2">
+ <value>500000</value>
+ <value>848000</value>
+ <value>984000</value>
+ <value>1106000</value>
+ <value>1237000</value>
+ <value>1426000</value>
+ <value>1582000</value>
+ <value>1745000</value>
+ <value>1901000</value>
+ <value>2048000</value>
+ <value>2188000</value>
+ <value>2302000</value>
+ <value>2401000</value>
+ <value>2507000</value>
+ <value>2630000</value>
+ </array>
+
+ <array name="cpu.core_power.cluster0">
+ <value>13.58</value>
+ <value>38.22</value>
+ <value>48.59</value>
+ <value>64.02</value>
+ <value>79.69</value>
+ <value>89.66</value>
+ <value>105.64</value>
+ <value>113.30</value>
+ <value>142.24</value>
+ <value>158.91</value>
+ <value>180.73</value>
+ </array>
+
+ <array name="cpu.core_power.cluster1">
+ <value>59.00</value>
+ <value>87.69</value>
+ <value>114.54</value>
+ <value>134.19</value>
+ <value>157.72</value>
+ <value>184.69</value>
+ <value>229.99</value>
+ <value>264.08</value>
+ <value>316.56</value>
+ <value>375.74</value>
+ <value>450.94</value>
+ <value>529.79</value>
+ <value>603.34</value>
+ <value>684.48</value>
+ </array>
+
+ <array name="cpu.core_power.cluster2">
+ <value>199.11</value>
+ <value>332.32</value>
+ <value>389.40</value>
+ <value>452.85</value>
+ <value>547.22</value>
+ <value>629.93</value>
+ <value>735.84</value>
+ <value>861.23</value>
+ <value>946.15</value>
+ <value>1137.98</value>
+ <value>1318.48</value>
+ <value>1396.56</value>
+ <value>1583.05</value>
+ <value>1811.61</value>
+ <value>2050.00</value>
+ </array>
+
+ <!-- Additional power used when screen is ambient mode -->
+ <item name="ambient.on">32</item>
+
+ <!-- Additional power used when screen is turned on at minimum brightness -->
+ <item name="screen.on">98</item>
+ <!-- Additional power used when screen is at maximum brightness, compared to
+ screen at minimum brightness -->
+ <item name="screen.full">470</item>
+
+ <!-- Average power used by the camera flash module when on -->
+ <item name="camera.flashlight">240.47</item>
+ <!-- Average power use by the camera subsystem for a typical camera
+ application. Intended as a rough estimate for an application running a
+ preview and capturing approximately 10 full-resolution pictures per
+ minute. -->
+ <item name="camera.avg">900</item>
+
+ <!-- Additional power used when video is playing -->
+ <item name="video">25</item>
+ <!-- Additional power used when audio is playing -->
+ <item name="audio">75</item>
+
+ <!-- Cellular modem related values.-->
+ <item name="modem.controller.sleep">0</item>
+ <item name="modem.controller.idle">156</item>
+ <item name="modem.controller.rx">145</item>
+ <array name="modem.controller.tx"> <!-- Strength 0 to 4 -->
+ <value>153</value>
+ <value>212</value>
+ <value>292</value>
+ <value>359</value>
+ <value>471</value>
+ </array>
+ <item name="modem.controller.voltage">3700</item>
+
+ <!-- GPS related values.-->
+ <array name="gps.signalqualitybased"> <!-- Strength 0 to 1 -->
+ <value>28</value>
+ <value>5</value>
+ </array>
+ <item name="gps.voltage">3700</item>
+
+ <!-- Idle Receive current for wifi radio in mA.-->
+ <item name="wifi.controller.idle">79</item>
+ <!-- Rx current for wifi radio in mA.-->
+ <item name="wifi.controller.rx">118</item>
+ <!-- Tx current for wifi radio in mA-->
+ <item name="wifi.controller.tx">331</item>
+ <!-- Operating volatage for wifi radio in mV.-->
+ <item name="wifi.controller.voltage">3700</item>
+</device>
+