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

Skip to content
Commit 4f32edc6 authored by Sal Savage's avatar Sal Savage Committed by Joseph Pirozzo
Browse files

Use Calendar.Builder for MAP Client timestamp parsing

MAP Client was reporting different timestamps for a given
message-listing object each time getUnreadMessages() was called. The
milliseconds value was always different. This was a result of the
Calendar object pre-populating all fields with the current date-time. The
reported date-time would always have the current time's milliseconds
field.

Datetime parsing has been updated to use a Calendar.Builder which is
clearer and doesn't use the current time when initializing. The
milliseconds field is explicitly set to zero.

Tests were added for the ObexTime class to prevent this from happening
in the future.

Bug: b/135606822
Test: atest ObexTimeTest.java
Change-Id: Ie872b4bb30f68e0c00b15767eb0413a6e67ba630
(cherry picked from commit 85fb0fe5)

Merged-In: Ie872b4bb30f68e0c00b15767eb0413a6e67ba630
Change-Id: Iab4e3cf5937958f500d58b9ba6fa64c439cd4dc9
parent 3dad0833
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