Skip to content

Commit

Permalink
Merge pull request #201 from AndreySV/optional-power-profile
Browse files Browse the repository at this point in the history
[hybris-boot] Don't abort build if battery capacity isn't provided
  • Loading branch information
mlehtima authored Mar 14, 2021
2 parents abd984a + 9a7688f commit f018aa2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f018aa2

Please sign in to comment.