Browse Source

lineage: Don't error out when screen size isn't set

* Generic AOSP devices don't set it and we don't really
  want to fork them just to set the bootanimation size.

Change-Id: I684454ae07348ee29c832f86f56bcfbd4f627b4d
LuK1337 2 years ago
parent
commit
24eaae6764
1 changed files with 9 additions and 7 deletions
  1. 9
    7
      bootanimation/Android.mk

+ 9
- 7
bootanimation/Android.mk View File

@@ -15,6 +15,15 @@
15 15
 # limitations under the License.
16 16
 #
17 17
 
18
+ifeq ($(TARGET_SCREEN_WIDTH),)
19
+    $(warning TARGET_SCREEN_WIDTH is not set, using default value: 1080)
20
+    TARGET_SCREEN_WIDTH := 1080
21
+endif
22
+ifeq ($(TARGET_SCREEN_HEIGHT),)
23
+    $(warning TARGET_SCREEN_HEIGHT is not set, using default value: 1920)
24
+    TARGET_SCREEN_HEIGHT := 1920
25
+endif
26
+
18 27
 define build-bootanimation
19 28
     sh vendor/aokp/bootanimation/generate-bootanimation.sh \
20 29
     $(TARGET_SCREEN_WIDTH) \
@@ -41,13 +50,6 @@ ifeq ($(TARGET_BOOTANIMATION),)
41 50
     endif
42 51
 endif
43 52
 
44
-ifeq ($(TARGET_SCREEN_WIDTH),)
45
-    $(error TARGET_SCREEN_WIDTH must be set)
46
-endif
47
-ifeq ($(TARGET_SCREEN_HEIGHT),)
48
-    $(error TARGET_SCREEN_HEIGHT must be set)
49
-endif
50
-
51 53
 include $(CLEAR_VARS)
52 54
 LOCAL_MODULE := bootanimation.zip
53 55
 LOCAL_MODULE_CLASS := ETC