Skip to content

Commit 5b02a1b

Browse files
committed
Avoid checking for updates while the VPN is active
1 parent f96181f commit 5b02a1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/tech/httptoolkit/android/HttpToolkitApplication.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ class HttpToolkitApplication : Application() {
157157

158158
suspend fun isUpdateRequired(): Boolean {
159159
return withContext(Dispatchers.IO) {
160+
if (isVpnActive()) {
161+
Log.i(TAG, "VPN currently active, so not checking for updates for now")
162+
return@withContext false
163+
}
164+
160165
if (wasInstalledFromStore(this@HttpToolkitApplication)) {
161166
// We only check for updates for side-loaded/ADB-loaded versions. This is useful
162167
// because otherwise anything outside the play store gets no updates.

0 commit comments

Comments
 (0)