[res] Preserve the resid order in ThemeKey

Resource ID order matters for ThemeKey objects - we apply them
one after another, overriding all attributes that happen to
repeat. This means duplicate filtering has to move the "newly
added" ids to the end of the list, making sure they have the
final word.

Bug: 278667073
Test: build + boot + bug repro
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:99be40df05ee108da49ca210c3300ee2ac77804b)
Merged-In: If547e16a15f5f7294fc863852171c96e10402cf7
Change-Id: If547e16a15f5f7294fc863852171c96e10402cf7
1 file changed