Skip to content

Fix missing device refresh #6344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Conversation

albin-mullvad
Copy link
Collaborator

@albin-mullvad albin-mullvad commented Jun 13, 2024

This PR aims to fix an issue where the UI doesn't trigger automatic device updates/refresh. Instead, the app would rely on other mechanisms such as the tunnel connection or purchase flows to update/refresh the device. The consequence of this is that users could end up in strange scenarios such as a device being revoked immediately after purchasing time.

The new behavior is that we update/refresh the device similar to how we handle purchase verification as part of a few screens. This is a bit similar to how it's handled on desktop where they are even more aggressive on updating/refresh the device. On desktop it's done every time a gRPC connection is established.


This change is Reviewable

@albin-mullvad albin-mullvad added bug Android Issues related to Android labels Jun 13, 2024
@albin-mullvad albin-mullvad self-assigned this Jun 13, 2024
Copy link

linear bot commented Jun 13, 2024

@albin-mullvad albin-mullvad requested review from Rawa and Pururun June 13, 2024 07:41
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 5 files at r1, all commit messages.
Reviewable status: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @albin-mullvad)


android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt line 39 at r1 (raw file):

    suspend fun updateDevice() {
        Log.d("mullvad", "Update device")

This is to ensure we see that device is updated, e.g if we get new support ticket?

@albin-mullvad albin-mullvad force-pushed the fix-missing-device-refresh-droid-1058 branch from fea8251 to 8252bc2 Compare June 13, 2024 07:45
Copy link
Collaborator Author

@albin-mullvad albin-mullvad left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 5 files reviewed, 1 unresolved discussion (waiting on @Rawa)


android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt line 39 at r1 (raw file):

Previously, Rawa (David Göransson) wrote…

This is to ensure we see that device is updated, e.g if we get new support ticket?

Yup, I thought that could be valuable 👍

Copy link
Contributor

@Pururun Pururun left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 5 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rawa)

@albin-mullvad albin-mullvad requested review from Rawa and Pururun June 13, 2024 09:24
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@albin-mullvad albin-mullvad merged commit 889af23 into main Jun 13, 2024
26 checks passed
@albin-mullvad albin-mullvad deleted the fix-missing-device-refresh-droid-1058 branch June 13, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants