diff --git a/charger/Android.mk b/charger/Android.mk deleted file mode 100644 index 6843d5a4..00000000 --- a/charger/Android.mk +++ /dev/null @@ -1,104 +0,0 @@ -# -# Copyright (C) 2021 The LineageOS 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. -# - -LOCAL_PATH := $(call my-dir) - -# Set lineage_charger_density to the density bucket of the device. -lineage_charger_density := mdpi -ifneq (,$(TARGET_SCREEN_DENSITY)) -lineage_charger_density := $(strip \ - $(or $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 560))),1),xxxhdpi),\ - $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 400))),1),xxhdpi),\ - $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 280))),1),xhdpi),\ - $(if $(filter $(shell echo $$(($(TARGET_SCREEN_DENSITY) >= 200))),1),hdpi,mdpi))) -else ifneq (,$(filter mdpi hdpi xhdpi xxhdpi xxxhdpi,$(PRODUCT_AAPT_PREF_CONFIG))) -# If PRODUCT_AAPT_PREF_CONFIG includes a dpi bucket, then use that value. -lineage_charger_density := $(PRODUCT_AAPT_PREF_CONFIG) -endif - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_battery_scale -LOCAL_MODULE_STEM := battery_scale.png -LOCAL_SRC_FILES := $(lineage_charger_density)/battery_scale.png -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/images/charger -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_battery_scale_vendor -LOCAL_MODULE_STEM := battery_scale.png -LOCAL_SRC_FILES := $(lineage_charger_density)/battery_scale.png -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/images/charger -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_battery_fail -LOCAL_MODULE_STEM := battery_fail.png -LOCAL_SRC_FILES := $(lineage_charger_density)/battery_fail.png -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/images/charger -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_battery_fail_vendor -LOCAL_MODULE_STEM := battery_fail.png -LOCAL_SRC_FILES := $(lineage_charger_density)/battery_fail.png -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/images/charger -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_font -LOCAL_MODULE_STEM := percent_font.png -LOCAL_SRC_FILES := $(lineage_charger_density)/percent_font.png -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/images/charger -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_font_vendor -LOCAL_MODULE_STEM := percent_font.png -LOCAL_SRC_FILES := $(lineage_charger_density)/percent_font.png -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/images/charger -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_animation -LOCAL_MODULE_STEM := animation.txt -LOCAL_SRC_FILES := animation.txt -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/res/values/charger -LOCAL_REQUIRED_MODULES := lineage_charger_battery_scale lineage_charger_battery_fail lineage_charger_font -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := lineage_charger_animation_vendor -LOCAL_MODULE_STEM := animation.txt -LOCAL_SRC_FILES := animation.txt -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/res/values/charger -LOCAL_REQUIRED_MODULES := lineage_charger_battery_scale_vendor lineage_charger_battery_fail_vendor lineage_charger_font_vendor -include $(BUILD_PREBUILT) diff --git a/charger/animation.txt b/charger/animation.txt deleted file mode 100644 index 62d2bc26..00000000 --- a/charger/animation.txt +++ /dev/null @@ -1,31 +0,0 @@ -# animation: num_cycles, first_frame_repeats, animation_file -animation: 7 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/percent_font - -fail: charger/battery_fail - -# frame: disp_time min_level max_level -frame: 500 0 4 -frame: 500 0 9 -frame: 500 5 14 -frame: 500 10 19 -frame: 500 15 24 -frame: 500 20 29 -frame: 500 25 34 -frame: 500 30 39 -frame: 500 35 44 -frame: 500 40 49 -frame: 500 45 54 -frame: 500 50 59 -frame: 500 55 64 -frame: 500 60 69 -frame: 500 65 74 -frame: 500 70 79 -frame: 500 75 84 -frame: 500 80 89 -frame: 500 85 94 -frame: 500 90 99 -frame: 500 95 99 -frame: 1000 100 100 diff --git a/charger/hdpi/battery_fail.png b/charger/hdpi/battery_fail.png deleted file mode 100644 index cade1574..00000000 Binary files a/charger/hdpi/battery_fail.png and /dev/null differ diff --git a/charger/hdpi/battery_scale.png b/charger/hdpi/battery_scale.png deleted file mode 100644 index 3d89e66b..00000000 Binary files a/charger/hdpi/battery_scale.png and /dev/null differ diff --git a/charger/hdpi/percent_font.png b/charger/hdpi/percent_font.png deleted file mode 100644 index 312a1f71..00000000 Binary files a/charger/hdpi/percent_font.png and /dev/null differ diff --git a/charger/mdpi/battery_fail.png b/charger/mdpi/battery_fail.png deleted file mode 100644 index 575f3aec..00000000 Binary files a/charger/mdpi/battery_fail.png and /dev/null differ diff --git a/charger/mdpi/battery_scale.png b/charger/mdpi/battery_scale.png deleted file mode 100644 index 3d38a2c8..00000000 Binary files a/charger/mdpi/battery_scale.png and /dev/null differ diff --git a/charger/mdpi/percent_font.png b/charger/mdpi/percent_font.png deleted file mode 100644 index 3043a889..00000000 Binary files a/charger/mdpi/percent_font.png and /dev/null differ diff --git a/charger/regenerate.sh b/charger/regenerate.sh deleted file mode 100755 index 9e0cef45..00000000 --- a/charger/regenerate.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -if [ -z "$(which convert)" ] || [ -z "$(which pngcrush)" ]; then - echo "Please install imagemagick and pngcrush" - exit 1 -fi - -for DENSITY in mdpi:160 hdpi:240 xhdpi:320 xxhdpi:480 xxxhdpi:640; do - DPI=$(echo $DENSITY | cut -f1 -d ':') - WIDTH=$(echo $DENSITY | cut -f2 -d ':') - - rm $DPI/battery_fail.png - rm $DPI/battery_scale.png - - for SVG in svg/*.svg; do - PNG="$DPI/$(basename $SVG | cut -f1 -d '.').png" - convert -density $WIDTH -resize ${WIDTH}x${WIDTH} $SVG png24:$PNG - done - - SCALEFILE="$DPI/battery_scale.png" - SCALEFILES="$(ls $DPI/battery_scale_*.png)" - FRAMES="$(ls -l $SCALEFILES | wc -l)" - SCALEHEIGHT=$(($WIDTH * $FRAMES)) - - convert -size ${WIDTH}x${SCALEHEIGHT} canvas:black $SCALEFILES -fx "u[j%$FRAMES+1].p{i,int(j/$FRAMES)}" png24:$SCALEFILE.tmp - pngcrush -text b "Frames" "$FRAMES" $SCALEFILE.tmp $SCALEFILE - rm $SCALEFILES $SCALEFILE.tmp -done diff --git a/charger/svg/battery_fail.svg b/charger/svg/battery_fail.svg deleted file mode 100644 index 23491405..00000000 --- a/charger/svg/battery_fail.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/charger/svg/battery_scale_00.svg b/charger/svg/battery_scale_00.svg deleted file mode 100644 index 27af6dcf..00000000 --- a/charger/svg/battery_scale_00.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/charger/svg/battery_scale_01.svg b/charger/svg/battery_scale_01.svg deleted file mode 100644 index 9d2b5426..00000000 --- a/charger/svg/battery_scale_01.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_02.svg b/charger/svg/battery_scale_02.svg deleted file mode 100644 index 7376b077..00000000 --- a/charger/svg/battery_scale_02.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_03.svg b/charger/svg/battery_scale_03.svg deleted file mode 100644 index 2bcb70a8..00000000 --- a/charger/svg/battery_scale_03.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_04.svg b/charger/svg/battery_scale_04.svg deleted file mode 100644 index 8711f398..00000000 --- a/charger/svg/battery_scale_04.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_05.svg b/charger/svg/battery_scale_05.svg deleted file mode 100644 index 79620606..00000000 --- a/charger/svg/battery_scale_05.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_06.svg b/charger/svg/battery_scale_06.svg deleted file mode 100644 index cd0114e3..00000000 --- a/charger/svg/battery_scale_06.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_07.svg b/charger/svg/battery_scale_07.svg deleted file mode 100644 index 6862ff91..00000000 --- a/charger/svg/battery_scale_07.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_08.svg b/charger/svg/battery_scale_08.svg deleted file mode 100644 index d3e200e8..00000000 --- a/charger/svg/battery_scale_08.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_09.svg b/charger/svg/battery_scale_09.svg deleted file mode 100644 index b2f74730..00000000 --- a/charger/svg/battery_scale_09.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_10.svg b/charger/svg/battery_scale_10.svg deleted file mode 100644 index ba788836..00000000 --- a/charger/svg/battery_scale_10.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_11.svg b/charger/svg/battery_scale_11.svg deleted file mode 100644 index c7d18b73..00000000 --- a/charger/svg/battery_scale_11.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_12.svg b/charger/svg/battery_scale_12.svg deleted file mode 100644 index 1981b743..00000000 --- a/charger/svg/battery_scale_12.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_13.svg b/charger/svg/battery_scale_13.svg deleted file mode 100644 index e7489b21..00000000 --- a/charger/svg/battery_scale_13.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_14.svg b/charger/svg/battery_scale_14.svg deleted file mode 100644 index c4f002f0..00000000 --- a/charger/svg/battery_scale_14.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_15.svg b/charger/svg/battery_scale_15.svg deleted file mode 100644 index 469ac8c5..00000000 --- a/charger/svg/battery_scale_15.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_16.svg b/charger/svg/battery_scale_16.svg deleted file mode 100644 index b983016e..00000000 --- a/charger/svg/battery_scale_16.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_17.svg b/charger/svg/battery_scale_17.svg deleted file mode 100644 index c9bf11d0..00000000 --- a/charger/svg/battery_scale_17.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_18.svg b/charger/svg/battery_scale_18.svg deleted file mode 100644 index 6ea6c80b..00000000 --- a/charger/svg/battery_scale_18.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_19.svg b/charger/svg/battery_scale_19.svg deleted file mode 100644 index 84597c3e..00000000 --- a/charger/svg/battery_scale_19.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/charger/svg/battery_scale_20.svg b/charger/svg/battery_scale_20.svg deleted file mode 100644 index 69fe8e76..00000000 --- a/charger/svg/battery_scale_20.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/charger/svg/battery_scale_21.svg b/charger/svg/battery_scale_21.svg deleted file mode 100644 index 5421dbed..00000000 --- a/charger/svg/battery_scale_21.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/charger/xhdpi/battery_fail.png b/charger/xhdpi/battery_fail.png deleted file mode 100644 index 47c593f2..00000000 Binary files a/charger/xhdpi/battery_fail.png and /dev/null differ diff --git a/charger/xhdpi/battery_scale.png b/charger/xhdpi/battery_scale.png deleted file mode 100644 index 61d14822..00000000 Binary files a/charger/xhdpi/battery_scale.png and /dev/null differ diff --git a/charger/xhdpi/percent_font.png b/charger/xhdpi/percent_font.png deleted file mode 100644 index b3b7a324..00000000 Binary files a/charger/xhdpi/percent_font.png and /dev/null differ diff --git a/charger/xxhdpi/battery_fail.png b/charger/xxhdpi/battery_fail.png deleted file mode 100644 index f722faa1..00000000 Binary files a/charger/xxhdpi/battery_fail.png and /dev/null differ diff --git a/charger/xxhdpi/battery_scale.png b/charger/xxhdpi/battery_scale.png deleted file mode 100644 index dab39728..00000000 Binary files a/charger/xxhdpi/battery_scale.png and /dev/null differ diff --git a/charger/xxhdpi/percent_font.png b/charger/xxhdpi/percent_font.png deleted file mode 100644 index 69284aea..00000000 Binary files a/charger/xxhdpi/percent_font.png and /dev/null differ diff --git a/charger/xxxhdpi/battery_fail.png b/charger/xxxhdpi/battery_fail.png deleted file mode 100644 index 3bee3859..00000000 Binary files a/charger/xxxhdpi/battery_fail.png and /dev/null differ diff --git a/charger/xxxhdpi/battery_scale.png b/charger/xxxhdpi/battery_scale.png deleted file mode 100644 index 8484a2f2..00000000 Binary files a/charger/xxxhdpi/battery_scale.png and /dev/null differ diff --git a/charger/xxxhdpi/percent_font.png b/charger/xxxhdpi/percent_font.png deleted file mode 100644 index 35e1af89..00000000 Binary files a/charger/xxxhdpi/percent_font.png and /dev/null differ diff --git a/config/common_mobile.mk b/config/common_mobile.mk index 2a644b35..23a1c448 100644 --- a/config/common_mobile.mk +++ b/config/common_mobile.mk @@ -32,16 +32,6 @@ PRODUCT_DEXPREOPT_SPEED_APPS += \ TrebuchetQuickStep endif -# Charger -PRODUCT_PACKAGES += \ - charger_res_images - -ifneq ($(WITH_LINEAGE_CHARGER),false) -PRODUCT_PACKAGES += \ - lineage_charger_animation \ - lineage_charger_animation_vendor -endif - # Customizations PRODUCT_PACKAGES += \ IconPackCircularAndroidOverlay \