commit | 212799338d7be336e73eb65de3dcd0338a705a11 | [log] [tgz] |
---|---|---|
author | Bjorn Bringert <bringert@android.com> | Thu Dec 02 11:34:28 2010 +0000 |
committer | Bjorn Bringert <bringert@android.com> | Thu Dec 02 11:36:47 2010 +0000 |
tree | 6501a52a998b90d77fe660a4c0fe4e760f63ca46 | |
parent | e41bb535a3aefa3f830d828f7f0ebfa6aee60f20 [diff] |
Only decrement mRemaining once in read(). In the old code AssetFileDescriptor.AutoCloseInputStream.read() called super.read(), which calls read(byte[] buffer, int offset, int count), which decrements mRemaining. Then read() decremented mRemaining again after super.read() returned. I'm extending the CTS tests for AssetFileDescriptor.AutoCloseInputStream to cover this. Bug: 3240844 Change-Id: I70b945abc773d3ce5c1317dad23a0d797b31f111