d2s: adapt from beyond2lte

Change-Id: I6752fe0c7f8483483485174cf55345d876620bfd
diff --git a/Android.mk b/Android.mk
index 303a7d8..8bd4a2d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -16,6 +16,6 @@
 
 LOCAL_PATH := $(call my-dir)
 
-ifneq ($(filter beyond2lte, $(TARGET_DEVICE)),)
+ifneq ($(filter d2s, $(TARGET_DEVICE)),)
 include $(call all-subdir-makefiles,$(LOCAL_PATH))
 endif
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 67cc631..b24fb23 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -15,9 +15,9 @@
 #
 
 PRODUCT_MAKEFILES := \
-    $(LOCAL_DIR)/lineage_beyond2lte.mk
+    $(LOCAL_DIR)/lineage_d2s.mk
 
 COMMON_LUNCH_CHOICES := \
-    lineage_beyond2lte-eng \
-    lineage_beyond2lte-user \
-    lineage_beyond2lte-userdebug
+    lineage_d2s-eng \
+    lineage_d2s-user \
+    lineage_d2s-userdebug
diff --git a/BoardConfig.mk b/BoardConfig.mk
index d930ee7..9416ba0 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -17,9 +17,9 @@
 include device/samsung/exynos9820-common/BoardConfigCommon.mk
 
 ## Inherit from the proprietary configuration
-include vendor/samsung/beyond2lte/BoardConfigVendor.mk
+include vendor/samsung/d2s/BoardConfigVendor.mk
 
-DEVICE_PATH := device/samsung/beyond2lte
+DEVICE_PATH := device/samsung/d2s
 
 ## APEX image
 DEXPREOPT_GENERATE_APEX_IMAGE := true
@@ -30,7 +30,7 @@
 TARGET_SCREEN_DENSITY := 420
 
 ## Kernel
-TARGET_KERNEL_CONFIG := exynos9820-beyond2lte_defconfig
+TARGET_KERNEL_CONFIG := exynos9820-d2s_defconfig
 
 ## Properties
 TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
diff --git a/device.mk b/device.mk
index 663dae6..89b1fe5 100644
--- a/device.mk
+++ b/device.mk
@@ -18,7 +18,7 @@
 $(call inherit-product, device/samsung/exynos9820-common/common.mk)
 
 # Inherit proprietary files
-$(call inherit-product, vendor/samsung/beyond2lte/beyond2lte-vendor.mk)
+$(call inherit-product, vendor/samsung/d2s/d2s-vendor.mk)
 
 # Setup dalvik vm configs
 $(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
diff --git a/extract-files.sh b/extract-files.sh
index d096f5e..a8a94f3 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -14,7 +14,7 @@
 
 set -e
 
-export DEVICE=beyond2lte
+export DEVICE=d2s
 export DEVICE_COMMON=exynos9820-common
 export VENDOR=samsung
 
diff --git a/lineage_beyond2lte.mk b/lineage_d2s.mk
similarity index 88%
rename from lineage_beyond2lte.mk
rename to lineage_d2s.mk
index 6638d59..b2b70ca 100644
--- a/lineage_beyond2lte.mk
+++ b/lineage_d2s.mk
@@ -24,8 +24,8 @@
 ## Inscreen Fingerprint HAL
 TARGET_HAVE_FOD := true
 
-## Inherit from beyond2lte device
-$(call inherit-product, device/samsung/beyond2lte/device.mk)
+## Inherit from d2s device
+$(call inherit-product, device/samsung/d2s/device.mk)
 
 ## Boot Animation
 TARGET_BOOTANIMATION_HALF_RES := true
@@ -39,10 +39,10 @@
 $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
 
 ## Device identifier, this must come after all inclusions
-PRODUCT_NAME := lineage_beyond2lte
-PRODUCT_DEVICE := beyond2lte
+PRODUCT_NAME := lineage_d2s
+PRODUCT_DEVICE := d2s
 PRODUCT_BRAND := samsung
-PRODUCT_MODEL := SM-G975F
+PRODUCT_MODEL := SM-N975F
 PRODUCT_MANUFACTURER := samsung
 
 PRODUCT_GMS_CLIENTID_BASE := android-samsung
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 2ea24b2..fc6debe 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -41,5 +41,5 @@
 
          @see https://www.w3.org/TR/SVG/paths.html#PathData
          -->
-    <string translatable="false" name="config_mainBuiltInDisplayCutout">M 0,0 H -326 V 142 H 0 V 0 Z @right</string>
+    <string translatable="false" name="config_mainBuiltInDisplayCutout">M 0,0 H -33 V 84 H 33 V 0 H 0 Z</string>
 </resources>
diff --git a/overlay/frameworks/base/core/res/res/values/dimens.xml b/overlay/frameworks/base/core/res/res/values/dimens.xml
index c6074a4..902e7a9 100644
--- a/overlay/frameworks/base/core/res/res/values/dimens.xml
+++ b/overlay/frameworks/base/core/res/res/values/dimens.xml
@@ -19,5 +19,5 @@
 -->
 <resources>
     <!-- Height of the status bar in portrait -->
-    <dimen name="status_bar_height_portrait">7mm</dimen>
+    <dimen name="status_bar_height_portrait">5.76297mm</dimen>
 </resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
index 91ac449..0e665c4 100644
--- a/overlay/frameworks/base/core/res/res/xml/power_profile.xml
+++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -1,19 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
 <device name="Android">
     <item name="none">0</item>
-    <item name="ambient.on">21</item>
-    <item name="screen.on">72</item>
-    <item name="screen.full">339</item>
-    <item name="audio">35</item>
-    <item name="video">176</item>
-    <item name="camera.flashlight">107</item>
-    <item name="camera.avg">417</item>
-    <item name="gps.on">31</item>
-    <item name="radio.active">171</item>
-    <item name="radio.scanning">114</item>
+    <item name="ambient.on">21.9</item>
+    <item name="screen.on">68.5</item>
+    <item name="screen.full">356.5</item>
+    <item name="audio">74</item>
+    <item name="video">209</item>
+    <item name="camera.flashlight">150</item>
+    <item name="camera.avg">277</item>
+    <item name="gps.on">53</item>
+    <item name="radio.active">169</item>
+    <item name="radio.scanning">109</item>
     <array name="radio.on">
-        <value>7.7</value>
-        <value>7.7</value>
+        <value>10</value>
+        <value>10</value>
     </array>
     <item name="modem.controller.idle">0</item>
     <item name="modem.controller.rx">0</item>
@@ -40,21 +40,22 @@
         <value>442000</value>
     </array>
     <array name="cpu.core_power.cluster0">
-        <value>109</value>
-        <value>99</value>
-        <value>90</value>
-        <value>71</value>
-        <value>62</value>
-        <value>57</value>
-        <value>49</value>
-        <value>46</value>
+        <value>111</value>
+        <value>102</value>
+        <value>91</value>
+        <value>77</value>
+        <value>69</value>
+        <value>63</value>
+        <value>58</value>
+        <value>54</value>
+        <value>51</value>
+        <value>48</value>
+        <value>45</value>
         <value>43</value>
-        <value>39</value>
-        <value>35</value>
-        <value>34</value>
-        <value>32</value>
+        <value>42</value>
     </array>
     <array name="cpu.core_speeds.cluster1">
+        <value>2400000</value>
         <value>2314000</value>
         <value>2210000</value>
         <value>2106000</value>
@@ -74,23 +75,24 @@
         <value>507000</value>
     </array>
     <array name="cpu.core_power.cluster1">
-        <value>382</value>
-        <value>285</value>
-        <value>250</value>
-        <value>223</value>
-        <value>199</value>
-        <value>178</value>
-        <value>156</value>
+        <value>415</value>
+        <value>367</value>
+        <value>283</value>
+        <value>241</value>
+        <value>216</value>
+        <value>196</value>
+        <value>176</value>
+        <value>155</value>
         <value>139</value>
-        <value>130</value>
-        <value>117</value>
-        <value>100</value>
-        <value>86</value>
+        <value>129</value>
+        <value>119</value>
+        <value>104</value>
+        <value>91</value>
+        <value>84</value>
         <value>77</value>
-        <value>70</value>
-        <value>64</value>
-        <value>57</value>
-        <value>51</value>
+        <value>72</value>
+        <value>66</value>
+        <value>59</value>
     </array>
     <array name="cpu.core_speeds.cluster2">
         <value>2730000</value>
@@ -116,32 +118,32 @@
         <value>520000</value>
     </array>
     <array name="cpu.core_power.cluster2">
-        <value>1301</value>
-        <value>1208</value>
-        <value>1028</value>
-        <value>837</value>
-        <value>679</value>
-        <value>610</value>
-        <value>485</value>
-        <value>425</value>
-        <value>353</value>
-        <value>307</value>
-        <value>270</value>
-        <value>241</value>
-        <value>224</value>
-        <value>193</value>
-        <value>178</value>
-        <value>153</value>
-        <value>133</value>
-        <value>115</value>
-        <value>105</value>
-        <value>94</value>
-        <value>83</value>
+        <value>1067</value>
+        <value>1001</value>
+        <value>835</value>
+        <value>752</value>
+        <value>621</value>
+        <value>561</value>
+        <value>443</value>
+        <value>387</value>
+        <value>328</value>
+        <value>288</value>
+        <value>254</value>
+        <value>229</value>
+        <value>213</value>
+        <value>189</value>
+        <value>174</value>
+        <value>155</value>
+        <value>132</value>
+        <value>118</value>
+        <value>112</value>
+        <value>101</value>
+        <value>92</value>
     </array>
-    <item name="cpu.suspend">4.99</item>
-    <item name="cpu.idle">20</item>
-    <item name="battery.capacity">4000</item>
-    <item name="battery.typical.capacity">4100</item>
+    <item name="cpu.suspend">7.2</item>
+    <item name="cpu.idle">27</item>
+    <item name="battery.capacity">4170</item>
+    <item name="battery.typical.capacity">4300</item>
     <item name="wifi.controller.idle">1</item>
     <item name="wifi.controller.rx">65</item>
     <item name="wifi.controller.tx">265</item>
@@ -160,15 +162,15 @@
     <item name="bluetooth.controller.rx">10</item>
     <item name="bluetooth.controller.tx">10</item>
     <array name="gpu.active">
-        <value>78</value>
-        <value>105</value>
-        <value>128</value>
-        <value>160</value>
-        <value>230</value>
-        <value>266</value>
-        <value>389</value>
-        <value>458</value>
-        <value>516</value>
+        <value>73</value>
+        <value>95</value>
+        <value>115</value>
+        <value>138</value>
+        <value>205</value>
+        <value>235</value>
+        <value>333</value>
+        <value>408</value>
+        <value>515</value>
     </array>
     <array name="gpu.speeds">
         <value>156000</value>
@@ -179,40 +181,6 @@
         <value>433000</value>
         <value>572000</value>
         <value>650000</value>
-        <value>702000</value>
-    </array>
-    <array name="speaker.media">
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-    </array>
-    <array name="speaker.call">
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
-        <value>0</value>
+        <value>754000</value>
     </array>
 </device>
\ No newline at end of file
diff --git a/proprietary-files.txt b/proprietary-files.txt
index bb178f3..1b9b5eb 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -1,4 +1,4 @@
-# Proprietary files - from Samsung package version G975FXXSBFUE6, unless pinned
+# Proprietary files - from Samsung package version N975FXXS7FUEB, unless pinned
 
 ## Audio
 vendor/etc/floating_feature.xml
@@ -14,15 +14,13 @@
 vendor/firmware/SoundBoosterParam.bin
 
 ## Bluetooth Firmware
-vendor/firmware/bcm4375B0_murata.hcd
-vendor/firmware/bcm4375B0_semco.hcd
 vendor/firmware/bcm4375B1_murata.hcd
 vendor/firmware/bcm4375B1_semco.hcd
 vendor/firmware/bcm4375B1_semco_sem.hcd
 
 ## Camera
-vendor/lib/hw/camera.exynos9820.so
-vendor/lib64/hw/camera.exynos9820.so
+vendor/lib/hw/camera.exynos9825.so:vendor/lib/hw/camera.exynos9820.so
+vendor/lib64/hw/camera.exynos9825.so:vendor/lib64/hw/camera.exynos9820.so
 
 ## Camera dependencies
 vendor/lib/libexynoscamera3.so
@@ -41,7 +39,7 @@
 vendor/firmware/cs35l40-rcv-dsp1-spk-prot.bin
 vendor/firmware/fimc_is_fw_mcu.bin
 vendor/firmware/setfile_2l4.bin
-vendor/firmware/setfile_3m3.bin
+vendor/firmware/setfile_3m5.bin
 vendor/firmware/setfile_3p9.bin
 
 ## GPS
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
index d096f5e..a8a94f3 100755
--- a/setup-makefiles.sh
+++ b/setup-makefiles.sh
@@ -14,7 +14,7 @@
 
 set -e
 
-export DEVICE=beyond2lte
+export DEVICE=d2s
 export DEVICE_COMMON=exynos9820-common
 export VENDOR=samsung