Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f4e8a77a authored by Hemant Gupta's avatar Hemant Gupta Committed by Myles Watson
Browse files

OPP: Fix file sending error by calculating size of file properly.

Use case:
Send and receive vcard file through OBEX multiple times (above 30 times)

Result:
Sometimes DUT is unable to begin the vcard sharing and a message is displayed
saying "File unknown file could not be sent".

Root cause:
In Some race conditions InputStream.available() returns zero which causing error.
According to java documentation InputStream.available() method provides a weak
guarantee so it isn't guaranteed to return the total number of bytes in the stream.

Fix:
Read the InputStream by read() API to calculate the actual length of data.

Change-Id: I3448d6d3c410ae9dc8213c1c1d5f23dba4a56982
parent f51c53da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment