Skip to content
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

Improve error text for other always on apps #7754

Merged

Conversation

Rawa
Copy link
Contributor

@Rawa Rawa commented Mar 4, 2025


This change is Reviewable

@Rawa Rawa self-assigned this Mar 4, 2025
@Rawa Rawa added the Android Issues related to Android label Mar 4, 2025
@Rawa Rawa requested a review from albin-mullvad March 4, 2025 15:31
@Rawa Rawa force-pushed the improve-error-text-for-android-12-and-above-when-we-are-droid-1857 branch from 75668a0 to 6594524 Compare March 4, 2025 15:35
@Rawa Rawa requested a review from mullmat March 5, 2025 09:10
Copy link
Collaborator

@mullmat mullmat 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: 0 of 25 files reviewed, 1 unresolved discussion


android/lib/resource/src/main/res/values/strings.xml line 119 at r1 (raw file):

    <string name="set_dns_error">Unable to set system DNS server. Please send a problem report.</string>
    <string name="start_tunnel_error">Unable to start tunnel connection. Please send a problem report.</string>
    <string name="vpn_permission_denied_error">VPN permission was denied when creating the tunnel. Ensure no other always-on vpn app are active and then try connecting again.</string>

VPN permission was denied or another app has "Always-on VPN" enabled.

Code quote:

VPN permission was denied when creating the tunnel. Ensure no other always-on vpn app are active and then try connecting again.

@Rawa Rawa force-pushed the improve-error-text-for-android-12-and-above-when-we-are-droid-1857 branch 2 times, most recently from 14ab61b to 73cd788 Compare March 5, 2025 09:54
@Rawa Rawa requested a review from mullmat March 5, 2025 10:13
@Rawa Rawa force-pushed the improve-error-text-for-android-12-and-above-when-we-are-droid-1857 branch from 73cd788 to 8f56220 Compare March 5, 2025 10:17
Copy link
Collaborator

@mullmat mullmat left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@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.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


android/lib/resource/src/main/res/values/strings.xml line 119 at r1 (raw file):

Previously, mullmat (MullMat) wrote…

VPN permission was denied or another app has "Always-on VPN" enabled.

Fixed!

Copy link
Collaborator

@mullmat mullmat left a comment

Choose a reason for hiding this comment

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

:lgtm: very nice 👍

Pururun
Pururun previously approved these changes Mar 6, 2025
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.

Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion


android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ContextExtensions.kt line 29 at r3 (raw file):

fun Context.resolveAlwaysOnVpnPackageName(): String? =
    try {
        Settings.Secure.getString(contentResolver, ALWAYS_ON_VPN_APP)

Nit: Can't we version gate this, since we know that it will always fail on Android 12+?

Copy link
Contributor Author

@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.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Pururun)


android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ContextExtensions.kt line 29 at r3 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

Nit: Can't we version gate this, since we know that it will always fail on Android 12+?

We could, if we don't care about debug builds showing the correct always on app. I'll ask for a second opinion if we should gate it.

@Rawa Rawa force-pushed the improve-error-text-for-android-12-and-above-when-we-are-droid-1857 branch 3 times, most recently from 5c05a2a to e78125f Compare March 7, 2025 07:10
Rawa added 2 commits March 7, 2025 08:11
Only before Android 11 and on test builds (running from Android studio)
it will report always-on vpn app.
@Rawa Rawa force-pushed the improve-error-text-for-android-12-and-above-when-we-are-droid-1857 branch from e78125f to 8354eb4 Compare March 7, 2025 07:11
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 3 of 3 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@Rawa Rawa merged commit 5e8dfc2 into main Mar 7, 2025
34 checks passed
@Rawa Rawa deleted the improve-error-text-for-android-12-and-above-when-we-are-droid-1857 branch March 7, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants