From 9a7688fcc8d96aa5cbb15ac39dd335eb822cfd39 Mon Sep 17 00:00:00 2001 From: Andrey Skvortsov Date: Sat, 13 Mar 2021 20:10:01 +0300 Subject: [PATCH] [hybris-boot] Don't abort build if battery capacity isn't provided Not all devices even with Android >= 7 provide custom power_profile.xml --- Android.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Android.mk b/Android.mk index 88c21d9..97a36bc 100644 --- a/Android.mk +++ b/Android.mk @@ -311,8 +311,13 @@ endif ifeq ($(shell test $(ANDROID_VERSION_MAJOR) -ge 7 && echo true),true) PROVIDE_POWER_PROFILE := 1 -ifneq ($(shell find $(DEVICE_PACKAGE_OVERLAYS) -name power_profile.xml | wc -l),1) -$(error Multiple or missing power_profile.xml files) +PROFILES=$(shell find $(DEVICE_PACKAGE_OVERLAYS) -name power_profile.xml | wc -l) +ifneq ($(PROFILES),1) +ifeq ($(PROFILES),0) +$(warning Missing power_profile.xml file) +else +$(error Multiple power_profile.xml files) +endif PROVIDE_POWER_PROFILE := 0 endif