OPP: Fix "0%" progress even after file transfer finished
When the file is small enough to be sent together with header in one packet, PrivateOutputStream#write() never calls back ClientOperation, because OBEX Client has no more data to send. In this case, response code in ClientOperation is not updated from default value (-1) until the PrivateOutputStream is closed. It causes progress bar not updated from 0%. The patch adds PrivateOutputStream#close() call after the first write operation when file and header are sent in one packet, and ensures progress bar to be updated properly. Bug: 31895670 Test: manual Change-Id: I735a872b756ab1c8892c2f8bbf2dce51ae24fc5a
Loading
Please register or sign in to comment