Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8edad8f7 authored by Ulya Trafimovich's avatar Ulya Trafimovich
Browse files

Preserve <uses-library> order in dexpreopt.config files.

Library order is important because it is used to construct class loader
context, which is then written into OAT/ODEX files and chacked against
class loader context constructed by PackageManager on the device. If the
orders are different, dexpreopted code is rejected.

This CL fixes a few problems that caused reordering:

- 'filter' function arguments are swapped so that patterns list comes
  first, and the library list second

- JSON representation of class loader context is changed to avoid
  unmarshaling it to Go maps, which may reorder keys

- library list is no longer sorted (it's unclear why it was sorted)

Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
      adb wait-for-device && adb root && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
      # empty grep output, no errors
Change-Id: Ie76996d497e60da0948f1879d6db589ff3e968a2
parent b976c07d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment