Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efdceb68 authored by Jaewoong Jung's avatar Jaewoong Jung Committed by Automerger Merge Worker
Browse files

Merge "Remove unwanted JNI libs outside inflating action." am: b6d7c5cc

Original change: https://android-review.googlesource.com/c/platform/build/+/1595573

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idb9e716ad5f7c6534916ac346095697b8bf0a8cd
parents 90cfe287 b6d7c5cc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -237,6 +237,7 @@ endif
$(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(ZIP2ZIP) $(SIGNAPK_JAR)
	$(transform-prebuilt-to-target)
	$(uncompress-prebuilt-embedded-jni-libs)
	$(remove-unwanted-prebuilt-embedded-jni-libs)
ifeq (true, $(LOCAL_UNCOMPRESS_DEX))
	$(uncompress-dexs)
endif  # LOCAL_UNCOMPRESS_DEX
+10 −5
Original line number Diff line number Diff line
@@ -2396,14 +2396,19 @@ endef
#
define uncompress-prebuilt-embedded-jni-libs
  if (zipinfo $@ 'lib/*.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then \
    $(ZIP2ZIP) -i $@ -o $@.tmp -0 'lib/**/*.so' \
      $(if $(PRIVATE_EMBEDDED_JNI_LIBS), \
        -x 'lib/**/*.so' \
        $(addprefix -X ,$(PRIVATE_EMBEDDED_JNI_LIBS))) && \
    mv -f $@.tmp $@ ; \
    $(ZIP2ZIP) -i $@ -o $@.tmp -0 'lib/**/*.so' && mv -f $@.tmp $@ ; \
  fi
endef

# Remove unwanted shared JNI libraries embedded in an apk.
#
define remove-unwanted-prebuilt-embedded-jni-libs
  $(if $(PRIVATE_EMBEDDED_JNI_LIBS), \
    $(ZIP2ZIP) -i $@ -o $@.tmp \
      -x 'lib/**/*.so' $(addprefix -X ,$(PRIVATE_EMBEDDED_JNI_LIBS)) && \
    mv -f $@.tmp $@)
endef

# TODO(joeo): If we can ever upgrade to post 3.81 make and get the
# new prebuilt rules to work, we should change this to copy the
# resources to the out directory and then copy the resources.