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

Skip to content
Commit 9227c592 authored by Sravan Kumar V's avatar Sravan Kumar V Committed by Gerrit - the friendly Code Review server
Browse files

OPP: Calculate file size if not provided.

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

Result:
Sometimes DUT is unable to begin the vcard sharing
A toast is showed saying "File unknown file could not be sent".

Root cause:
In Some race conditions InputStream.available() returns zero which
causing error.

Fix:
According to java documentation InputStream.available() method provides such a
weak guarantee, as it isn't guaranteed to return the total number of
bytes in the stream. This is fixed by reading the stream to
calculate the length.

Change-Id: I6d1b85a4f63fee9a2a6ce2e9c4bc77346114537c
CRs-Fixed: 1068783
parent cb9e2557
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