OSDN Git Service

Construct classloader for apps with no java code
authorDimitry Ivanov <dimitry@google.com>
Fri, 19 Feb 2016 22:09:20 +0000 (14:09 -0800)
committerDimitry Ivanov <dimitry@google.com>
Wed, 24 Feb 2016 00:09:24 +0000 (16:09 -0800)
commit70b6130db7b53ed9a159f45b42342e136c9323f0
tree208d2d18320d2c51f791094e2598aa00cb4ad418
parentde384452846c1f84ce9d88b470f0ca5129446055
Construct classloader for apps with no java code

The commit 6f06ad7df1362e9e5b252689f452bdeee2e5af46
fixed a way to load native library for NativeActivity
by using classloader logic to find the library; which
also fixed the problem of native activity not working
when library is supposed to be opened directly from
the apk.

As a side effect it introduced regression - apps without
java code did not have correctly initialized classloader.
This change fixes this by constructing classloader with
empty dexpath but valid nativeLibrarySearchPath.

Bug: http://b/26015561
Bug: http://b/27250344
Change-Id: I50f1119f0976a95edd75d88efb9fcdedc57efbc3
(cherry picked from commit b9c9026bdd0076014aeca62b088053d8fbce2326)
core/java/android/app/LoadedApk.java
core/java/android/app/NativeActivity.java