Skip to content

Commit 8e4d66f

Browse files
Chippa-atechyminati
authored andcommitted
charger: Improve cipher charger
* Display charging level in percent and update graphics for it * Use lineage teal as the main color and red for low charging level * Update battery fail to match new style * Define battery fail file to actually use our custom image Change-Id: I6907da5116f6bbd1788902b177ed999c1568815c Signed-off-by: Chippa-a <[email protected]>
1 parent aa1804f commit 8e4d66f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+90
-53
lines changed

charger/Android.mk

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,32 @@ LOCAL_MODULE_CLASS := ETC
6565
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/images/charger
6666
include $(BUILD_PREBUILT)
6767

68+
include $(CLEAR_VARS)
69+
LOCAL_MODULE := cipher_charger_font
70+
LOCAL_MODULE_STEM := percent_font.png
71+
LOCAL_SRC_FILES := $(cipher_charger_density)/percent_font.png
72+
LOCAL_MODULE_TAGS := optional
73+
LOCAL_MODULE_CLASS := ETC
74+
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/images/charger
75+
include $(BUILD_PREBUILT)
76+
77+
include $(CLEAR_VARS)
78+
LOCAL_MODULE := cipher_charger_font_vendor
79+
LOCAL_MODULE_STEM := percent_font.png
80+
LOCAL_SRC_FILES := $(cipher_charger_density)/percent_font.png
81+
LOCAL_MODULE_TAGS := optional
82+
LOCAL_MODULE_CLASS := ETC
83+
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/images/charger
84+
include $(BUILD_PREBUILT)
85+
6886
include $(CLEAR_VARS)
6987
LOCAL_MODULE := cipher_charger_animation
7088
LOCAL_MODULE_STEM := animation.txt
7189
LOCAL_SRC_FILES := animation.txt
7290
LOCAL_MODULE_TAGS := optional
7391
LOCAL_MODULE_CLASS := ETC
7492
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/values/charger
75-
LOCAL_REQUIRED_MODULES := cipher_charger_battery_scale cipher_charger_battery_fail
93+
LOCAL_REQUIRED_MODULES := cipher_charger_battery_scale cipher_charger_battery_fail cipher_charger_font
7694
include $(BUILD_PREBUILT)
7795

7896
include $(CLEAR_VARS)
@@ -82,5 +100,5 @@ LOCAL_SRC_FILES := animation.txt
82100
LOCAL_MODULE_TAGS := optional
83101
LOCAL_MODULE_CLASS := ETC
84102
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/values/charger
85-
LOCAL_REQUIRED_MODULES := cipher_charger_battery_scale_vendor cipher_charger_battery_fail_vendor
103+
LOCAL_REQUIRED_MODULES := cipher_charger_battery_scale_vendor cipher_charger_battery_fail_vendor cipher_charger_font_vendor
86104
include $(BUILD_PREBUILT)

charger/animation.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# animation: num_cycles, first_frame_repeats, animation_file
22
animation: 7 1 charger/battery_scale
33

4+
# percent_display: text_percent_pos_x, text_percent_pos_y, color_r, color_g, color_b, color_a, font_file
5+
percent_display: c c 255 255 255 255 charger/percent_font
6+
7+
fail: charger/battery_fail
8+
49
# frame: disp_time min_level max_level
510
frame: 500 0 4
611
frame: 500 0 9
@@ -23,4 +28,4 @@ frame: 500 80 89
2328
frame: 500 85 94
2429
frame: 500 90 99
2530
frame: 500 95 99
26-
frame: 1000 100 100
31+
frame: 1000 100 100

charger/hdpi/battery_fail.png

10 KB
Loading

charger/hdpi/battery_scale.png

19.9 KB
Loading

charger/hdpi/percent_font.png

7.01 KB
Loading

charger/images/battery_fail.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

charger/mdpi/battery_fail.png

6.54 KB
Loading

charger/mdpi/battery_scale.png

10.4 KB
Loading

charger/mdpi/percent_font.png

4.7 KB
Loading

charger/svg/battery_fail.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)