History log of /libcore/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java
Revision Date Author Comments
a3ed7c5ac9f007035fc7532db39bd342c75e1344 27-Jan-2016 Todd Kennedy <toddke@google.com> Modify dexpath dynamically

In order to add splits without restarting the process, we need to dynamically
modify the dex classpath. This isn't without its caveats; for example, if a
split modifies a previously loaded class, the modified class won't be loaded
until the process restarts.

(cherry picked from commit 104fb10863f65fe04af2b40526d0d0abe3ba3e92)

(cherry picked from commit 19916aa91deefffee7b3de3ef6b3df7e13f19d8a)

Change-Id: I083e0fe80ec413963e0ad233341af5d886b7f9b5
19c3551836aedca51e7e016007efca18d030763b 24-Feb-2016 Dimitry Ivanov <dimitry@google.com> Reduce number of namespace-related fields

This change is related to a change on how to
linker-namespaces initialized. They used to be
initialized on first load of a jni library,
With the related changes to frameworks/base
and art, they are now initialized at the time
of creating the ClassLoader.

This removes necessity of storing namespace
specific fields in DexPathList and in new
constructors for BaseDexClassLoaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Icf61e621862609de75e3a3f4caf03a4ea96e6398
(cherry picked from commit 68858c91eb15f183269cbaf2e4116c559aab2622)
104fb10863f65fe04af2b40526d0d0abe3ba3e92 27-Jan-2016 Todd Kennedy <toddke@google.com> Modify dexpath dynamically

In order to add splits without restarting the process, we need to dynamically
modify the dex classpath. This isn't without its caveats; for example, if a
split modifies a previously loaded class, the modified class won't be loaded
until the process restarts.

Change-Id: Iea3a2738b4ab03ca4fdb3d109be158ffce814780
68858c91eb15f183269cbaf2e4116c559aab2622 24-Feb-2016 Dimitry Ivanov <dimitry@google.com> Reduce number of namespace-related fields

This change is related to a change on how to
linker-namespaces initialized. They used to be
initialized on first load of a jni library,
With the related changes to frameworks/base
and art, they are now initialized at the time
of creating the ClassLoader.

This removes necessity of storing namespace
specific fields in DexPathList and in new
constructors for BaseDexClassLoaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Icf61e621862609de75e3a3f4caf03a4ea96e6398
86cc92ed3ded99ef0b1f6875a8bd885b5ba9c294 15-Dec-2015 Dimitry Ivanov <dimitry@google.com> Use shared namespace for bundled apps

This change adds support of shared namespaces when
creating classloader for bundled apps.

Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I4b4c89e68d83b57d4a9e462725d8b94b3562afef
(cherry picked from commit d3c9dabf5b57d5e4bd86829e6918e8ec732a523a)
d3c9dabf5b57d5e4bd86829e6918e8ec732a523a 15-Dec-2015 Dimitry Ivanov <dimitry@google.com> Use shared namespace for bundled apps

This change adds support of shared namespaces when
creating classloader for bundled apps.

Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I4b4c89e68d83b57d4a9e462725d8b94b3562afef
0d99a867450529afeee4e7add3db3701d1069c8c 08-Dec-2015 Dimitry Ivanov <dimitry@google.com> Provide libraryPermittedPath to android runtime

Opening native libraries in isolated namespaces is limited to
the search-path (librarySearchPath). The libraryPermittedPath allows
to expand the list of allowed directories for isolated namespaces.

Bug: http://b/22548808
Bug: http://b/25853516
Change-Id: Id229be7760c3c47b7307452493bbb8bdf3faabb7
(cherry picked from commit a2656629522f9d79e2dca7418ab5963f50d0fda8)
a2656629522f9d79e2dca7418ab5963f50d0fda8 08-Dec-2015 Dimitry Ivanov <dimitry@google.com> Provide libraryPermittedPath to android runtime

Opening native libraries in isolated namespaces is limited to
the search-path (librarySearchPath). The libraryPermittedPath allows
to expand the list of allowed directories for isolated namespaces.

Bug: http://b/22548808
Bug: http://b/25853516
Change-Id: Id229be7760c3c47b7307452493bbb8bdf3faabb7
384730cb57f41235f09829355d7ce67132625f7f 06-Jun-2015 Dmitriy Ivanov <dimitry@google.com> Fix lookup order when opening directly from APK

The order should be as follows:
1. Uncompressed native library dir (if any)
2. Directly from apk (<apk>!/lib/<abi>)
3. vendor/lib:/system/lib

Bug: http://b/21647354
Bug: http://b/21667767
Bug: http://b/21726698
Bug: http://b/8076853
Change-Id: I62cd76b7e4ae927d865d7d0ee81ceb91caa54e99
f38cae4f22e46c49f5fba94e6e0579dedd2d8fd1 06-Jun-2015 Dmitriy Ivanov <dimitry@google.com> Fix lookup order when opening directly from APK

The order should be as follows:
1. Uncompressed native library dir (if any)
2. Directly from apk (<apk>!/lib/<abi>)
3. vendor/lib:/system/lib

Bug: http://b/21647354
Bug: http://b/21667767
Bug: http://b/21726698
Bug: http://b/8076853
Change-Id: I62cd76b7e4ae927d865d7d0ee81ceb91caa54e99
7694b783f48e2cc57928b61c84fd90311cb0c35a 18-Jul-2014 Dmitriy Ivanov <dimitry@google.com> Pass getDexPath to Runtime.nativeLoad

getDexPath is used by Runtime.nativeLoad to
open libraries directly from apk. Given that
libraries are not compressed and are page-aligned.

Bug: 8076853
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
6c290d33a3585654db0500dabf5f937985e5b15d 13-Aug-2013 Brian Carlstrom <bdc@google.com> Move support files back with DexClassLoader and PathClassLoader

(cherry-picked from commit ca2c58ceaf2d35d30fe06b1676cc1436a24c4d30)

Bug: 9071417
Change-Id: Id97f12b4a1b1266b1bb21a323a8976f9df3dd0ad
b2525493e0a4d7019b0705fcb1001338737b4d86 13-Aug-2013 Brian Carlstrom <bdc@google.com> Share ClassLoader code

Bug: 9071417
Change-Id: Icdde3aace023d1d7509c932cdd71f203213b59d6
ca2c58ceaf2d35d30fe06b1676cc1436a24c4d30 13-Aug-2013 Brian Carlstrom <bdc@google.com> Share ClassLoader code

Bug: 9071417
Change-Id: Icdde3aace023d1d7509c932cdd71f203213b59d6
895bba44ff59d2225532a1fe9842c8b9a70a9f9a 13-May-2013 Brian Carlstrom <bdc@google.com> Move some files with dalvik dependencies to libdvm

Change-Id: I04498d8d8c4b065dbda8d7b30b8b77ce53e63a77
0cfd9bcaa70317a8c400c39b25ad42ba05c7531a 16-Jan-2013 Elliott Hughes <enh@google.com> Stop Facebook crashing with NoSuchFieldException.

The Facebook app uses reflection to access a private field of
BaseDexClassLoader, and won't start if we rename that field.

Bug: 7726934
Change-Id: I0b8febed1226655dbfeb5d1a539734b860558df4
652abda3efa231d431375677363f4a36327eeda7 20-Dec-2012 Elliott Hughes <enh@google.com> Support System.loadLibrary for libraries with transitive dependencies.

Bug: 7896159
Bug: http://code.google.com/p/android/issues/detail?id=34416
Change-Id: Id1225a353b52c50bb3eedfd48e92ec85dd60134b
f904678355f850a647f22e2689a836f895974fdf 04-Dec-2012 Elliott Hughes <enh@google.com> Support directories on the classpath, for resources.

This lets us run tests and legacy code that uses Class.getResource to
access resources, because we can put the resource directories on the
classpath.

I've also rewritten the toString implementation to show what path
we're _really_ using, rather than parroting back the original path we
were passed, because we won't actually look at all entries in the path,
so that can be very misleading. (It certainly confused the hell out of
me while working on this change.)

Change-Id: Iec4dca2244db9c9c793ac157e258fd61557a7a5d
75245fcfe3555e4dd06939b9bae366fd3e43b658 02-Apr-2012 Brian Carlstrom <bdc@google.com> Include library path information in BaseDexClassLoader for better error reporting in Runtime.loadLibrary

(cherry-pick of b6a576f43f1c23bb92493590a04bf9c72f092438.)

Change-Id: I6f34862327cf99d8c6f9a7e9aa3aeab47985969b
3bbe5318c343b1b7c945be717cc55b4ab15874f2 25-Jan-2012 Elliott Hughes <enh@google.com> Improve the BaseDexClassLoader detail message, and make ScopedLocalRef more unique_ptr-like.

(cherry-pick of 1c459db4ea31c1f284353bc71bfd2dbc97ca53d7.)

Conflicts:

include/ScopedLocalRef.h

Change-Id: Id01cb907406cc93f6b0f6ddaa8e7fb3714d18c53
ea52753a0f80fcd70acfe9150ecb854511ff38db 10-Feb-2011 Dan Bornstein <danfuzz@android.com> Refactor DexClassLoader and PathClassLoader.

This resulted in the creation of two new classes: DexPathList contains
most of the common functionality, namely managing the two path lists
(dex/resource files and native library directories) plus all the
salient initialization and lookup code. BaseDexClassLoader provides
the ClassLoader API, mostly by making calls to a contained DexPathList
instance. The two original classes just become trivial subclasses
which take different constructor args and make correspondingly
different super() calls in their respective constructors.

I took the opportunity to remove the ability for PathClassLoader to
take directories on the dex/resource list. This functionality hadn't
ever been used, at least not since well before 1.0.

Change-Id: I92ed300417431d0e0ac4c5ecf2f10d6a9b0691c7