Correct traversal of the UResourceBundle data structure in ICU.

At this point in the code, the UResourceBundle can either be a string or
an array of strings. In case there is an array, Android currently only
cares about the first string of that array, the rest of the array is
used by ICU for additional data ignored by Android.


The "DateTimePatterns" UResourceBundle can contain arrays where the
first string is a pattern and the second string is a numbering system
override for that pattern:

    "h:mm:ss a zzzz",
    "h:mm:ss a z",
    "h:mm:ss a",
    "h:mm a",
    "EEEE, d MMMM y G",
    "d MMMM y G",
    "d MMM y G",
        "d/M/yy GGGGG",
    "{1} {0}",
    "{1} {0}",
    "{1} {0}",
    "{1} {0}",
    "{1} {0}",

Without this patch, Android would get an empty pattern string. With this
patch, Android will get the pattern string while ignoring the numbering
system override.

(Note that Android will still not output a date as specified: In the
example above, the month will be written with decimal digits rather than
roman numerals.)

Bug: 26397197
Change-Id: I72ecdaad19facfecd65e329ee0ba0959f6c6565c
2 files changed