Add a unit test around the flag in ZipFile#onZipEntryAccess()

This change adds a unit test for the 2nd parameter of
ZipFile#onZipEntryAccess(byte[] bname, int flag). The flag parameter
is important when a ZipFile object uses a non UTF-8 decoder, but the
entry names are encoded with UTF-8. In these cases, the flag will
indicate that there's a mismatch and the entry name will be decoded
with UTF-8.

Bug: 285101950
Test: atest CtsLibcoreTestCases:libcore.dalvik.system.ZipPathValidatorTest
Change-Id: I28e8e2718f6a948dca6a3e82d6cbce17a7ceb2ab
1 file changed