Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Crypto: Rework device list tracking logic #172

Merged
merged 5 commits into from
May 11, 2017
Merged

Conversation

ylecollen
Copy link
Contributor

ylecollen added 4 commits May 10, 2017 17:42
tmp commit
fix some issues
add a public method to get device tracking status
Update unit tests
}

if (isUpdated) {
mCryptoStore.saveDeviceTrackingStatuses(deviceTrackingStatuses);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be tested on device. The risk is to overload the store IO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on a device, it seems working properly.

for (String userId : userIds) {
if (forceDownload) {
Integer trackingStatus = mCryptoStore.getDeviceTrackingStatus(userId, TRACKING_STATUS_UNDEFINED);
if (TRACKING_STATUS_UP_TO_DATE != trackingStatus) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case of forceDownload, we should do a download with no more checking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

add TRACKING_STATUS_UNREACHABLE_SERVER status to avoid retrying the "not ready to retry" server
@ylecollen ylecollen merged commit ab7f5e3 into develop May 11, 2017
ylecollen pushed a commit to element-hq/riot-android that referenced this pull request May 11, 2017
@ylecollen ylecollen deleted the fix_e2e_devices_list branch May 30, 2017 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants