diff options
author | Joachim Sauer <jsauer@google.com> | 2017-09-14 15:49:22 +0100 |
---|---|---|
committer | Joachim Sauer <jsauer@google.com> | 2017-09-15 18:07:17 +0100 |
commit | aa5629e60809e4775ca1f05e6f1f296a04a450dc (patch) | |
tree | 759af2c8e870ac3f40ed2aeb5b9263bcb3cf8f85 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 54c6fa09d9d662d9c12e1b400d74ad6014b5ea4c (diff) |
Remove use of MeasureUnit.internalGetInstance
MeasureUnit.internalGetUnit() is a method on ICU MeasureUnit which is
used to construct and register MeasureUnits. Calling it from non-ICU
code makes future calls to MeasureUnit.getAvailable(type) return the
newly-created MeasureUnit, but that MeasureUnit will not be fully
supported by ICU (no translations, ...).
This code creates a MeasureUnit by calling a constructor reflectively to
avoid the registration, which is a workaround.
The correct long-term fix is for ICU/CLDR to support petabyte correctly
(http://bugs.icu-project.org/trac/ticket/13355) and for us to just use
that instead.
Bug: 65632959
Test: bit CtsIcuTestCases:android.icu.dev.test.format.MeasureUnitTest
Test: coretests android.text.format.FormatterTest
Change-Id: I494fb59a3b3742f35cbdf6b8705817f404a2c6b0
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions