Tweak the confidence of ID3 tag encoding detection according to
the current system locale.
Bug: 109708246
Test: Check encoding for th-TH
Change-Id: I9e18df0d2e3cd07bf28c1fb3459ecee47ec17d56
Header files that are exported are moved to a specific place for
exporting.
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice
Bug: 63821829
Change-Id: Ia578e3c0dd1ff157335b3a49af896acb922586e8
Tags are first put together before being detected. When different tags
are encoded in different charset, the result could be very bad. So when
the best result is not good enough, we should not accept it. We give it
another chance by detecting tags separately.
For the test samples we collected, 6 songs out of 13 are now displayed
correctly.
Test: transfer mp3 to devices and see if the tags' charsets are detected
correctly.
Signed-off-by: caozhiyuan <cao.zhiyuan@zte.com.cn>
Change-Id: I90d11a612b9f9e8896696df85635c4a46d067f09
instead of media scanner. This way the java MediaMetadataRetriever API
will give the same result as the media scanner.
Also apply some tweaks to the encoding detector to improve handling of
ISO-8859-1 tags.
Bug: 16302581, 17205395
Change-Id: I1682a7a6a8bf04cffaa455044ba72dd7fd152d49
The detector only gave non-ascii data to ICU. In some cases that could
result in very short data, for which ICU would issue a low confidence
level for the actual encoding. By padding the data with additional
(ascii) tags, we improve accuracy for such files. Becauses this can
reduce accuracy in other cases, only do this when the initial confidence
is low.
b/13473604
Change-Id: I63d932043155c310b0e358cdf2d37787961e94b7
Id3 tags are supposed to be ISO-8859-1 or unicode, but often aren't.
To better detect the real encoding we now use ICU to detect possible
encodings for a given byte sequence, then apply additional heuristics
to determine the most likely one.
b/5564857
Change-Id: I53bc83b006433da5c2f2ccfcd770ddb3a26b64d0