OSDN Git Service

NativeActivity JNI: Retain VM reference to AssetManager
authorAdam Lesinski <adamlesinski@google.com>
Fri, 17 Mar 2017 22:17:12 +0000 (15:17 -0700)
committerAdam Lesinski <adamlesinski@google.com>
Mon, 20 Mar 2017 18:08:40 +0000 (11:08 -0700)
commit5c690d55dd2d0286db1ba3331a64769c07636ff8
treeecc0acaf0f64b423055ecd4c262a0496513e1c19
parent3910adfb62b6db705878058ccbae52af0fecb172
NativeActivity JNI: Retain VM reference to AssetManager

AssetManagers get destroyed when in MultiWindow or when loading
WebView. Retain an reference to the AssetManager given to
Native Code.

This AssetManager does not need to be updated since the changes
happening to the AssetManager involve non-application assets and
configuration changes, both which don't affect the native AAssetManager
which can only load files in assets/ which are unaffected by
configuration changes.

Test: none
Change-Id: Iedf30212fb85a8e6afec0645d689288f58fd77f1
core/jni/android_app_NativeActivity.cpp