summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/Script.java
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-10-02 10:23:25 +0100
committerPaul Duffin <paulduffin@google.com>2017-10-05 10:03:04 +0100
commitee405a2cfd597848e1e7521089de9b852f4f88bb (patch)
tree15829df618010bcf2206440f3a5c6289719b0e6e /rs/java/android/renderscript/Script.java
parentaff38adc4346fbb37843d25b6f27bf0d7492990c (diff)
Preserve order of shared library files
Shared libraries are stored in a list so order is preserved. However, when they are resolved to files, e.g. for use as a class path the file names are added to an ArraySet which loses the order. Presumably they are added to a Set to eliminate duplicates. This switches to a LinkedHashSet which will preserve the order in which the files are added while still avoiding duplicates. It is possible that this could cause app compatibility issues as the order in which shared libraries is being added is changing. Problems can only arise if two libraries whose order changes have duplicate classes and/or resources. In that case the app was only working by luck, as the order provided by ArraySet is based on the numerical order of hash codes. This was found while investigating performance regressions in GoogleDialer, unfortunately it does not fix the regressions. Bug: 65552462 Test: flash -w and systrace GoogleDialer to ensure correct order Change-Id: Ia01ce4821fa53e4785716b72c4f87a0b0ab4dcc8
Diffstat (limited to 'rs/java/android/renderscript/Script.java')
0 files changed, 0 insertions, 0 deletions