commit | cfc559b1891f594775185608ed50ca0bd0e43ced | [log] [tgz] |
---|---|---|
author | Iurii Makhno <iuriimak@google.com> | Thu Aug 25 15:57:52 2022 +0000 |
committer | Iurii Makhno <iuriimak@google.com> | Thu Aug 25 15:57:52 2022 +0000 |
tree | 46df586b4bc89e8524d4f68ba2f8b19b15267439 | |
parent | a833d0f25bab61cb3b9c089bc760f68664ede8b2 [diff] |
Expose default ('--_--') locale in proto format. Bug: b/243145989 Test: Dump_test Change-Id: Ie56aabb0f9b4b923d560470db7b426ab6ee34bd2
diff --git a/tools/aapt2/dump/DumpManifest.cpp b/tools/aapt2/dump/DumpManifest.cpp index b3165d3..2a5ad96 100644 --- a/tools/aapt2/dump/DumpManifest.cpp +++ b/tools/aapt2/dump/DumpManifest.cpp
@@ -2845,7 +2845,9 @@ supports_screen_->ToProtoScreens(out_badging, target_sdk_); for (auto& config : locales_) { - if (!config.first.empty()) { + if (config.first.empty()) { + out_badging->add_locales("--_--"); + } else { out_badging->add_locales(config.first); } }
diff --git a/tools/aapt2/integration-tests/DumpTest/components_expected_proto.txt b/tools/aapt2/integration-tests/DumpTest/components_expected_proto.txt index 7756410..4aed4af 100644 --- a/tools/aapt2/integration-tests/DumpTest/components_expected_proto.txt +++ b/tools/aapt2/integration-tests/DumpTest/components_expected_proto.txt
@@ -94,6 +94,7 @@ provided_components: "camera" provided_components: "camera-secure" } + locales: "--_--" densities: 160 densities: 240 densities: 320
diff --git a/tools/aapt2/integration-tests/DumpTest/components_full_proto.txt b/tools/aapt2/integration-tests/DumpTest/components_full_proto.txt index 8e733a5..c783f47 100644 --- a/tools/aapt2/integration-tests/DumpTest/components_full_proto.txt +++ b/tools/aapt2/integration-tests/DumpTest/components_full_proto.txt
@@ -94,6 +94,7 @@ provided_components: "camera" provided_components: "camera-secure" } + locales: "--_--" densities: 160 densities: 240 densities: 320