OSDN Git Service

am 094ab99f: am bc3b9801: am c4954f39: Merge "Don\'t enable LOCAL_DEX_PREOPT for...
authorYing Wang <wangying@google.com>
Thu, 10 Jul 2014 00:42:53 +0000 (00:42 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Thu, 10 Jul 2014 00:42:53 +0000 (00:42 +0000)
* commit '094ab99f27e68cfb6a39c2355be377e27bd6df72':
  Don't enable LOCAL_DEX_PREOPT for apks outside system.img

core/dex_preopt_odex_install.mk

index caaa16d..613b058 100644 (file)
@@ -9,11 +9,13 @@ ifneq (true,$(WITH_DEXPREOPT))
 else # WITH_DEXPREOPT=true
   ifeq (,$(TARGET_BUILD_APPS)) # TARGET_BUILD_APPS empty
     ifndef LOCAL_DEX_PREOPT # LOCAL_DEX_PREOPT undefined
-      ifeq (,$(LOCAL_APK_LIBRARIES)) # LOCAL_APK_LIBRARIES empty
-        LOCAL_DEX_PREOPT := $(DEX_PREOPT_DEFAULT)
-      else # LOCAL_APK_LIBRARIES not empty
-        LOCAL_DEX_PREOPT := nostripping
-      endif # LOCAL_APK_LIBRARIES not empty
+      ifneq ($(filter $(TARGET_OUT)/%,$(my_module_path)),) # Installed to system.img.
+        ifeq (,$(LOCAL_APK_LIBRARIES)) # LOCAL_APK_LIBRARIES empty
+          LOCAL_DEX_PREOPT := $(DEX_PREOPT_DEFAULT)
+        else # LOCAL_APK_LIBRARIES not empty
+          LOCAL_DEX_PREOPT := nostripping
+        endif # LOCAL_APK_LIBRARIES not empty
+      endif # Installed to system.img.
     endif # LOCAL_DEX_PREOPT undefined
   endif # TARGET_BUILD_APPS empty
 endif # WITH_DEXPREOPT=true