Android N uses Java nio buffer asReadOnlyBuffer() cause 8 bits shift bug

I've encountered a weird bug that a java.nio.buffer which is returned by asReadOnlyBuffer() method, could randomly 8 bits shift on get() result (mostly it's left shift).

I have no clue, but stop using buffer that returned by asReadOnlyBuffer() works fine. This issue only happens on Android N.

comments powered by Disqus