potter: Use Pixel offline charger animation
Signed-off-by: Arseniy Graur <argraur@gmail.com> Change-Id: Ie0d25e37912fffd337731d4c5eb9e9ccf09a2696 Signed-off-by: ashwatthama <sai404142@gmail.com>
This commit is contained in:
54
charger/Android.mk
Normal file
54
charger/Android.mk
Normal file
@@ -0,0 +1,54 @@
|
||||
# Copyright 2013 The Android Open Source Project
|
||||
# Copyright 2020 The PixelROM Project
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
### pixel_charger_res_images ###
|
||||
ifneq ($(strip $(LOCAL_CHARGER_NO_UI)),true)
|
||||
define _add-product-charger-image
|
||||
include $$(CLEAR_VARS)
|
||||
LOCAL_MODULE := pixel_charger_res_images_charger_$(notdir $(1))
|
||||
LOCAL_MODULE_STEM := $(notdir $(1))
|
||||
_img_modules += $$(LOCAL_MODULE)
|
||||
LOCAL_SRC_FILES := $1
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $$(TARGET_OUT_PRODUCT)/etc/res/images/charger
|
||||
LOCAL_PRODUCT_MODULE := true
|
||||
include $$(BUILD_PREBUILT)
|
||||
endef
|
||||
|
||||
_img_modules :=
|
||||
_images :=
|
||||
$(foreach _img, $(call find-subdir-subdir-files, "images/charger", "*.png"), \
|
||||
$(eval $(call _add-product-charger-image,$(_img))))
|
||||
|
||||
### pixel_charger_animation_file ###
|
||||
define _add-product-charger-animation-file
|
||||
include $$(CLEAR_VARS)
|
||||
LOCAL_MODULE := pixel_charger_res_values_charger_$(notdir $(1))
|
||||
LOCAL_MODULE_STEM := $(notdir $(1))
|
||||
_anim_modules += $$(LOCAL_MODULE)
|
||||
LOCAL_SRC_FILES := $1
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE_PATH := $$(TARGET_OUT_PRODUCT)/etc/res/values/charger
|
||||
LOCAL_PRODUCT_MODULE := true
|
||||
include $$(BUILD_PREBUILT)
|
||||
endef
|
||||
|
||||
_anim_modules :=
|
||||
$(foreach _txt, $(call find-subdir-subdir-files, "values/charger", "*.txt"), \
|
||||
$(eval $(call _add-product-charger-animation-file,$(_txt))))
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := product_charger_res_images
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_REQUIRED_MODULES := $(_img_modules) $(_anim_modules)
|
||||
include $(BUILD_PHONY_PACKAGE)
|
||||
|
||||
_add-product-charger-image :=
|
||||
_add-product-charger-animation-file :=
|
||||
_img_modules :=
|
||||
_anim_modules :=
|
||||
endif # LOCAL_CHARGER_NO_UI
|
||||
BIN
charger/images/charger/battery_fail.png
Normal file
BIN
charger/images/charger/battery_fail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 947 B |
BIN
charger/images/charger/battery_scale.png
Normal file
BIN
charger/images/charger/battery_scale.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 632 KiB |
BIN
charger/images/charger/main_font.png
Normal file
BIN
charger/images/charger/main_font.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
81
charger/values/charger/animation.txt
Normal file
81
charger/values/charger/animation.txt
Normal file
@@ -0,0 +1,81 @@
|
||||
## Google Pixel animation
|
||||
|
||||
# animation: num_cycles, first_frame_repeats, animation_file
|
||||
animation: 2 1 charger/battery_scale
|
||||
|
||||
# percent_display: text_percent_pos_x, text_percent_pos_y, color_r, color_g, color_b, color_a, font_file
|
||||
percent_display: c c 255 255 255 255 charger/main_font
|
||||
|
||||
fail: charger/battery_fail
|
||||
|
||||
# frame: disp_time min_level max_level
|
||||
frame: 300 0 100 # 0
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 5
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 10
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 15
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 20
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 25
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 30
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 35
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 40
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 45
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 50
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 55
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 60
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100 # 65
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
frame: 15 0 100
|
||||
Reference in New Issue
Block a user