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
Loading
Please register or sign in to comment