3ed8687e73cf28185d50a644a24a209ed2fa7ff8 |
|
30-Nov-2016 |
Shubham Ajmera <shubhamajmera@google.com> |
Fix ordering issue in view ByteBuffer View buffers use byte buffer object to perform all the read/write operations. While creating one, instead of creating a duplicate of the original byte buffer object, the view buffers were using it directly. As a result, when a property on the byte buffer object is changed, all the read and write operations on the view buffers were affected. To keep their properties independent of each other, instead of using the byte buffer directly, view buffers should make a copy of it, and then perform operations. Test: cts-tradefed run cts -m CtsLibcoreTestCases Bug: 32655865 (cherry-picked from commit c3005946d4806ca6a975fcfc63bdfd3e54b56b9a) Change-Id: I531d2642acf606391bb44b7209a72365cb19fede
|
c3005946d4806ca6a975fcfc63bdfd3e54b56b9a |
|
30-Nov-2016 |
Shubham Ajmera <shubhamajmera@google.com> |
Fix ordering issue in view ByteBuffer View buffers use byte buffer object to perform all the read/write operations. While creating one, instead of creating a duplicate of the origianl byte buffer object, the view buffers were using it directly. As a result, when a property on the byte buffer object is changed, all the read and write operations on the view buffers were affected. To keep their properties independent of each other, instead of using the byte buffer directly, view buffers should make a copy of it, and then perform operations. Test: cts-tradefed run cts -m CtsLibcoreTestCases Bug: 32655865 Change-Id: I531d2642acf606391bb44b7209a72365cb19fede
|
7b54756f6964018c41f0e12a1282d503f38cc683 |
|
04-Nov-2016 |
Shubham Ajmera <shubhamajmera@google.com> |
Fix byte ordering in ByteBufferAsXBuffer X: Short, Long, Double, Float, Int, Char When a readOnlyBuffer is created from ByteBufferAsXBuffer, the order of underlying bytebuffer is set to default(Big Endian). Therefore, when the buffer queries the underlying bytebuffer without explicitly setting the byteOrder, it returns result in the default order, i.e., BigEndian. Test: cts-tradefed run cts -m CtsLibcoreTestCases \ libcore.java.nio.BufferTest#test_ByteBufferAsXBuffer_ByteOrder Bug: 32655865 (cherry-picked from commit cdf4dbb3c1ee370333fdfa628def46a4250c292d) Change-Id: Iaa6fc72feb7d11bfe9c59ed2c7e00a26d31117bd
|
cdf4dbb3c1ee370333fdfa628def46a4250c292d |
|
04-Nov-2016 |
Shubham Ajmera <shubhamajmera@google.com> |
Fix byte ordering in ByteBufferAsXBuffer X: Short, Long, Double, Float, Int, Char When a readOnlyBuffer is created from ByteBufferAsXBuffer, the order of underlying bytebuffer is set to default(Big Endian). Therefore, when the buffer queries the underlying bytebuffer without explicitly setting the byteOrder, it returns result in the default order, i.e., BigEndian. Test: cts-tradefed run cts -m CtsLibcoreTestCases \ libcore.java.nio.BufferTest#test_ByteBufferAsXBuffer_ByteOrder Bug: 32655865 Change-Id: Iaa6fc72feb7d11bfe9c59ed2c7e00a26d31117bd
|
10bac63511d71b86bc753215c72bd805d407566a |
|
06-Jun-2016 |
Shubham Ajmera <shubhamajmera@google.com> |
Correct address fields in ByteBufferAsXBuffer classes The value of the address field should be equals to the first element of the ByteBufferAsXBuffer class, previously, it was pointing to the first element of the underlying directbytebuffer object. Bug: 28964300 (cherry-picked from commit e0f383ffa625e584e81061ef4ddef83a9f48809e) Change-Id: I6dfc98ba408c524580198ea168923981b23a0bc2
|
e0f383ffa625e584e81061ef4ddef83a9f48809e |
|
06-Jun-2016 |
Shubham Ajmera <shubhamajmera@google.com> |
Correct address fields in ByteBufferAsXBuffer classes The value of the address field should be equals to the first element of the ByteBufferAsXBuffer class, previously, it was pointing to the first element of the underlying directbytebuffer object. Bug: 28964300 Change-Id: I6dfc98ba408c524580198ea168923981b23a0bc2
|
190a49036750b8bb6c979d958ed56aa3fb4f408a |
|
15-Dec-2015 |
Shubham Ajmera <shubhamajmera@google.com> |
Formatted java.nio.* classes according to Android style guidelines and removed extra white spaces. Also, removed the templates from the package. Change-Id: Ibc96d75c48201987087c87f8ea0c66a495eeb94c
|
f28b09a791e4e5635e4fcdfd1adde27aec0a1ed6 |
|
11-Dec-2015 |
Shubham Ajmera <shubhamajmera@google.com> |
Modify get|putArray methods in ByteBufferAs*Buffers This will improve the performance of ByteBufferAs*Buffers. The past implemention was making independent get and set calls for each element of the array which resulted in the poor performance. The new implementation uses Memory methods to handle the requests. Change-Id: I6ee75a168946634164f85017d5fec25c47577dc6
|
e20e1b55eab0f2163e812a28cf3b3a682df38a1d |
|
09-Dec-2015 |
Shubham Ajmera <shubhamajmera@google.com> |
Modify getters/setters of ByteBufferAs*Buffers Added a different set of methods in DirectByteBuffer and HeapByteBuffer to handle request from the ByteBufferAs*Buffers. The getters and setters in ByteBufferAs*Buffer check limits instead of getters and setters of Heap/DirectByteBuffer, therefore it becomes easier to maintain local properties. The change avoids making an extra copy of Heap/DirectByteBuffer at the time of initialization. Bug: 26020981 Bug: 6085292 Change-Id: I8af6ab60ec00b3eb9564d2fafad14bef6e61c15f
|
cc060d48b3e7f013f00eebff5d079c59c1811207 |
|
07-Dec-2015 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Fix ByteBuffer#as*Buffer using parent limit (Direct|Heap)ByteBuffer#as*Buffer results were affected by the #limit(int) call on its parent - limit check was done on each call to the get/put operation. This is mitigated by creating a #duplicate of parent for each as*Buffer result. Bug: 26019694 Bug: 26019022 Bug: 26011790 Change-Id: If564ef9421ea0232b31aac048b3600e667c56c16
|
d80eadc041c833c2808beb823f4edb90ff7410f7 |
|
18-Nov-2015 |
Shubham Ajmera <shubhamajmera@google.com> |
FollowUp fixes for ByteBuffer There were some issues caused after changes #815174, #815055, #815164. Fixes include - using the correct constructor for deprecated classes, issues with readonly flag, offset for sliced bytebuffer, introducing isAccessible flag in place of isFreed flag, provided a method to set accessible flag. Change-Id: Ic6c7ae4e4f9a364b7dee4ed5ced382844f907ef5
|
46edfaf31e67122f4f67780a83a0bda4dfbbf6a7 |
|
13-Nov-2015 |
Shubham Ajmera <shubhamajmera@google.com> |
<T>Buffer: Removed Direct<T>BufferR?[U|S] and merged it with ByteBufferAs<T>Buffer (T = [Char|Float|Double|Int|Short|Long]). The change doesn't allow the classes to maintain its own readonly flag. It will use the readonly flag of the buffer itself. This will allow consistancy between the parent buffer and the class. The classes are also made to use the buffer's getter and setter methods. Change-Id: I6736dc521fc4b92d40521bab1314d8698925a402
|
cb270ef16cdf175422468ea7d69a8df47cfddff6 |
|
26-Oct-2015 |
Shubham Ajmera <shubhamajmera@google.com> |
ByteBufferAsLongBuffer: Merged variants Merged big endian, little endian and readonly variant of the class and corrected few following dependent changes. Change-Id: I845298697107559e11dedf8fd17eff96406a1ac5
|
eb7811487ecdbb75364b1bf1e4dfbb779be6b0b3 |
|
26-Oct-2015 |
Shubham Ajmera <shubhamajmera@google.com> |
ByteBufferAsLongBuffer: Merged variants Merged big endian, little endian and readonly variant of the class and corrected few following dependent changes. Change-Id: I845298697107559e11dedf8fd17eff96406a1ac5
|