Skip to content

Commit cb5c7d9

Browse files
committed
Improve VPN-killed-in-the-background logic
1 parent e02a16d commit cb5c7d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ private val isProbablyEmulator =
3131
Build.FINGERPRINT.startsWith("generic")
3232
|| Build.FINGERPRINT.startsWith("unknown")
3333
|| Build.MODEL.contains("google_sdk")
34+
|| Build.MODEL.contains("sdk_gphone")
3435
|| Build.MODEL.contains("Emulator")
3536
|| Build.MODEL.contains("Android SDK built for x86")
3637
|| Build.BOARD == "QC_Reference_Phone"
@@ -89,7 +90,10 @@ class HttpToolkitApplication : Application() {
8990
*/
9091
fun popVpnKilledState(): Boolean {
9192
return vpnWasKilled
92-
.also { this.vpnWasKilled = false }
93+
.also {
94+
this.vpnWasKilled = false
95+
this.vpnShouldBeRunning = false
96+
}
9397
}
9498

9599
/**

0 commit comments

Comments
 (0)