Replace HashMap with ArrayMap in LocaleUtils
LocaleUtils#filterByLanguage() always perform sort before returning the result hence enumeration order of HashMap/ArrayMap does not affect the final result. Hence we should be able to safely replace HashMap with ArrayMap. Also, ArrayMap#valueAt() allows us to copy values into an array without iterator object. Bug: 119839847 Test: atest FrameworksServicesTests:com.android.server.inputmethod.LocaleUtilsTest Change-Id: I898ffcf18110538cbb777e85df21c815e8ed030c
Loading
Please register or sign in to comment