dexopt: Drop native libraries from the class loader context.
Native shared libraries are recently introduced through <uses-native-library> manifest declaration. This value is intended to limit the native shared library loading path, not to limit Dex shared library path. This CL filters these native libraries from the class loader context encoded into the oat files. Without this change, the class loader specified in the odex and runtime class loader has a discrepancy and the runtime failed to verify the odex file, falling back to a slow execution path. Test: Followed the steps below: * Install the latest GoogleCamera APK. * Run following commands: $ adb shell am start com.google.android.GoogleCamera && \ sleep 5 && \ adb shell am force-stop com.google.android.GoogleCamera $ adb shell cmd package compile -m speed-profile \ -f com.google.android.GoogleCamera $ adb logcat -c && \ adb shell am start com.google.android.GoogleCamera && \ sleep 2 & adb shell 'logcat -d | grep "id.GoogleCamer:"' * No "ClassLoaderContext shared library size mismatch." warning is observed. Bug: 191182412 Change-Id: I069aff0386ac51c842703f5fcd75075a30f09cf5
Loading
Please register or sign in to comment