Reland "Pass all preferred locales to AssetManager"
This reverts commit cc6ff3876e395040748627353b7384e49d90e4f9.
Reason for revert: Fixed the tests in a separate change
Test: ran the previously failing tests in ab
Change-Id: I588d563375388ab1030c9de2072efe865286425c
diff --git a/native/android/configuration.cpp b/native/android/configuration.cpp
index b50514d..283445f 100644
--- a/native/android/configuration.cpp
+++ b/native/android/configuration.cpp
@@ -36,7 +36,7 @@
void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am) {
ScopedLock<AssetManager2> locked_mgr(*AssetManagerForNdkAssetManager(am));
- ResTable_config config = locked_mgr->GetConfiguration();
+ ResTable_config config = locked_mgr->GetConfigurations()[0];
// AConfiguration is not a virtual subclass, so we can memcpy.
memcpy(out, &config, sizeof(config));