android-rcs / rcsjta

RCS-e stack for Android with GSMA API
180 stars 74 forks source link

multiple IMDN Display reports #200

Closed zhouchunxu closed 8 years ago

zhouchunxu commented 8 years ago

When there are some unread messages in a thread, if markMessageAsRead method has been called many times at the same time, it will cause the ImdnManager's fifo buffer to be filled with many same display delivery objects and then sent to network. Because it is asynchronous between the action of queuing some display report in local and the action of updating message's status from "DISPLAY_REPORT_REQUESTED“ to "RECEIVED". Maybe every delivery report should be send immediately when DelayedDisplayNotificationDispatcher be called to avoid the duplicated queued delivery objects.

yplo6403 commented 8 years ago

I tried to reproduce the problem but I couldn't. I marked multiple messages as read but the display notification is always sent only once for each. This is normal since the DelayedDisplayNotificationDispatcher is serialized. Can you please describe the issue more accurately with the following information ?

Please provide also logcat and wireshark traces.

yplo6403 commented 8 years ago

• initial conditions: A and B are online, A send 5 messages to B • actions: B open the conversation • expected result: B send a display report to A for each message • result: B send many duplicated display reports to A

yplo6403 commented 8 years ago

Issue fixed by commit 7f5d7ed7676e09804e63805db4de97bf1d1f0d86