From e62bb73257434ef973e02625e2a2dcba85644b32 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 20 Apr 2023 15:59:49 -0400 Subject: [PATCH 1/3] Add overlay for Unihertz Luna --- Unihertz/Luna/Android.mk | 8 ++ Unihertz/Luna/AndroidManifest.xml | 10 ++ Unihertz/Luna/res/values/config.xml | 68 +++++++++++ Unihertz/Luna/res/xml/power_profile.xml | 156 ++++++++++++++++++++++++ overlay.mk | 1 + 5 files changed, 243 insertions(+) create mode 100644 Unihertz/Luna/Android.mk create mode 100644 Unihertz/Luna/AndroidManifest.xml create mode 100644 Unihertz/Luna/res/values/config.xml create mode 100644 Unihertz/Luna/res/xml/power_profile.xml diff --git a/Unihertz/Luna/Android.mk b/Unihertz/Luna/Android.mk new file mode 100644 index 0000000..bcff7e5 --- /dev/null +++ b/Unihertz/Luna/Android.mk @@ -0,0 +1,8 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) +LOCAL_MODULE_TAGS := optional +LOCAL_PACKAGE_NAME := treble-overlay-unihertz-luna +LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/overlay +LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true +LOCAL_PRIVATE_PLATFORM_APIS := true +include $(BUILD_PACKAGE) diff --git a/Unihertz/Luna/AndroidManifest.xml b/Unihertz/Luna/AndroidManifest.xml new file mode 100644 index 0000000..c98db48 --- /dev/null +++ b/Unihertz/Luna/AndroidManifest.xml @@ -0,0 +1,10 @@ + + + diff --git a/Unihertz/Luna/res/values/config.xml b/Unihertz/Luna/res/values/config.xml new file mode 100644 index 0000000..bfd8580 --- /dev/null +++ b/Unihertz/Luna/res/values/config.xml @@ -0,0 +1,68 @@ + + + 0.4 + 1.0 + 0.0 + 10.0 + 10.0 + 40.0dip + 488.0px + 10.0dip + 108.0dip + 28.0dip + 97.0px + + 2000 + 2000 + 2 + 5 + + true + true + false + true + true + + M86.5,97 A38.5,38.5 0 1 0 86.5,20 38.5,38.5 0 1 0 86.5,97z @left + M 0.0,0.0 h 149 v 97 h -149 Z @left + + + 8 + 64 + 98 + 104 + 110 + 116 + 122 + 128 + 134 + 182 + 255 + 255 + 255 + 255 + 255 + 255 + 255 + 255 + + + 128 + 256 + 384 + 512 + 640 + 768 + 896 + 1024 + 2048 + 4096 + 6144 + 8192 + 10240 + 12288 + 14336 + 16384 + 18432 + + diff --git a/Unihertz/Luna/res/xml/power_profile.xml b/Unihertz/Luna/res/xml/power_profile.xml new file mode 100644 index 0000000..1b62ac9 --- /dev/null +++ b/Unihertz/Luna/res/xml/power_profile.xml @@ -0,0 +1,156 @@ + + + 0.1 + 98.5 + 270 + 25 + 0.61 + 0.12 + 201.5 + 39 + 17.55 + 34 + 0.1 + 0.1 + 34 + 750 + 5.7 + + 4.7 + 4.7 + + + 6 + 2 + + + 2000000 + 1916000 + 1812000 + 1750000 + 1645000 + 1500000 + 1390000 + 1280000 + 1115000 + 1032000 + 950000 + 840000 + 730000 + 675000 + 620000 + 500000 + + + 10558 + 612 + 204 + 312 + 762 + 360 + 394 + 714 + 500 + 608 + 1108 + 1057 + 776 + 788 + 2361 + 200211 + + + 2203000 + 2087000 + 1995000 + 1903000 + 1788000 + 1719000 + 1650000 + 1534000 + 1418000 + 1274000 + 1129000 + 1042000 + 985000 + 898000 + 840000 + 725000 + + + 11452 + 398 + 244 + 312 + 161 + 126 + 220 + 222 + 221 + 358 + 234 + 166 + 261 + 242 + 2029 + 229928 + + 5.8 + 5 + 2.55. 2.11 + 2.22 + + 300000 + 1000000 + 2000000 + + + 300000 + 1000000 + 2500000 + 3000000 + + + 10 + 20 + 30 + + + 25 + 35 + 50 + 60 + + + 22.7 + + 5000 + 0 + 0 + 0 + + 0 + + .0002 + .002 + .02 + .2 + 2 + + 0 + 0 + 0 + + 0 + 0 + 0 + 0 + 0 + + 0 + + 0 + 0 + + 0 + diff --git a/overlay.mk b/overlay.mk index bdf57db..8e8b9a6 100644 --- a/overlay.mk +++ b/overlay.mk @@ -289,6 +289,7 @@ PRODUCT_PACKAGES += \ treble-overlay-unihertz-jelly2 \ treble-overlay-unihertz-jelly2-systemui \ treble-overlay-unihertz-titanpocketeea \ + treble-overlay-unihertz-luna \ treble-overlay-vivo-y20 \ treble-overlay-vivo-y20-systemui \ treble-overlay-vivo-y31 \ From 299fc732ddf9a5a9e07f7fe9a83e94f00d1a810a Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 20 Apr 2023 23:24:58 -0400 Subject: [PATCH 2/3] Luna: Increase status bar height to center the cutout We have enough screen real estate to do this. --- Unihertz/Luna/res/values/config.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Unihertz/Luna/res/values/config.xml b/Unihertz/Luna/res/values/config.xml index bfd8580..1031a66 100644 --- a/Unihertz/Luna/res/values/config.xml +++ b/Unihertz/Luna/res/values/config.xml @@ -10,7 +10,9 @@ 10.0dip 108.0dip 28.0dip - 97.0px + 117.0px + 117.0px + 117.0px 2000 2000 From 0f6c1c26db4de0b065ee210e75021b5bd2b4cbe0 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Fri, 21 Apr 2023 07:55:57 -0400 Subject: [PATCH 3/3] Tune status bar layout for Qin 3 Ultra - Reduce the height of status bar - Pad the top of status bar so that the text aligns with the front-facing camera. --- DuoQin/Qin3Ultra-SystemUI/res/values/config.xml | 7 ++++--- DuoQin/Qin3Ultra/res/values/config.xml | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/DuoQin/Qin3Ultra-SystemUI/res/values/config.xml b/DuoQin/Qin3Ultra-SystemUI/res/values/config.xml index c38eae0..ff00022 100755 --- a/DuoQin/Qin3Ultra-SystemUI/res/values/config.xml +++ b/DuoQin/Qin3Ultra-SystemUI/res/values/config.xml @@ -2,9 +2,10 @@ 23px 37px - 137px + 27px + 110px 23px 37px - 137px - 137px + 110px + 110px diff --git a/DuoQin/Qin3Ultra/res/values/config.xml b/DuoQin/Qin3Ultra/res/values/config.xml index 2b8702e..0d754ad 100755 --- a/DuoQin/Qin3Ultra/res/values/config.xml +++ b/DuoQin/Qin3Ultra/res/values/config.xml @@ -4,11 +4,11 @@ true false - 137px - 137px - 137px + 110px + 110px + 110px 28dp - 137px + 110px 1