fix: start foreground
Fixes issue where auto tunnel should be starting service foreground
This commit is contained in:
parent
dd16bd977f
commit
61e3751321
|
@ -70,7 +70,7 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
# fix hardcode changelog file name
|
# fix hardcode changelog file name
|
||||||
body_path: ${{ github.workspace }}/fastlane/metadata/android/en-US/changelogs/33100.txt
|
body_path: ${{ github.workspace }}/fastlane/metadata/android/en-US/changelogs/33200.txt
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ github.ref_name }}
|
||||||
name: Release ${{ github.ref_name }}
|
name: Release ${{ github.ref_name }}
|
||||||
draft: false
|
draft: false
|
||||||
|
|
|
@ -26,7 +26,7 @@ class NotificationActionReceiver : BroadcastReceiver() {
|
||||||
if (settings.defaultTunnel != null) {
|
if (settings.defaultTunnel != null) {
|
||||||
ServiceManager.stopVpnService(context)
|
ServiceManager.stopVpnService(context)
|
||||||
delay(Constants.TOGGLE_TUNNEL_DELAY)
|
delay(Constants.TOGGLE_TUNNEL_DELAY)
|
||||||
ServiceManager.startVpnService(context, settings.defaultTunnel.toString())
|
ServiceManager.startVpnServiceForeground(context, settings.defaultTunnel.toString())
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
cancel()
|
cancel()
|
||||||
|
|
|
@ -311,7 +311,7 @@ class WireGuardConnectivityWatcherService : ForegroundService() {
|
||||||
((it.isEthernetConnected &&
|
((it.isEthernetConnected &&
|
||||||
it.settings.isTunnelOnEthernetEnabled &&
|
it.settings.isTunnelOnEthernetEnabled &&
|
||||||
!it.isVpnConnected)) -> {
|
!it.isVpnConnected)) -> {
|
||||||
ServiceManager.startVpnService(this, it.settings.defaultTunnel!!)
|
ServiceManager.startVpnServiceForeground(this, it.settings.defaultTunnel!!)
|
||||||
Timber.i("Condition 1 met")
|
Timber.i("Condition 1 met")
|
||||||
}
|
}
|
||||||
(!it.isEthernetConnected &&
|
(!it.isEthernetConnected &&
|
||||||
|
@ -319,7 +319,7 @@ class WireGuardConnectivityWatcherService : ForegroundService() {
|
||||||
!it.isWifiConnected &&
|
!it.isWifiConnected &&
|
||||||
it.isMobileDataConnected &&
|
it.isMobileDataConnected &&
|
||||||
!it.isVpnConnected) -> {
|
!it.isVpnConnected) -> {
|
||||||
ServiceManager.startVpnService(this, it.settings.defaultTunnel!!)
|
ServiceManager.startVpnServiceForeground(this, it.settings.defaultTunnel!!)
|
||||||
Timber.i("Condition 2 met")
|
Timber.i("Condition 2 met")
|
||||||
}
|
}
|
||||||
(!it.isEthernetConnected &&
|
(!it.isEthernetConnected &&
|
||||||
|
@ -334,7 +334,7 @@ class WireGuardConnectivityWatcherService : ForegroundService() {
|
||||||
!it.settings.trustedNetworkSSIDs.contains(it.currentNetworkSSID) &&
|
!it.settings.trustedNetworkSSIDs.contains(it.currentNetworkSSID) &&
|
||||||
it.settings.isTunnelOnWifiEnabled &&
|
it.settings.isTunnelOnWifiEnabled &&
|
||||||
(!it.isVpnConnected)) -> {
|
(!it.isVpnConnected)) -> {
|
||||||
ServiceManager.startVpnService(this, it.settings.defaultTunnel!!)
|
ServiceManager.startVpnServiceForeground(this, it.settings.defaultTunnel!!)
|
||||||
Timber.i("Condition 4 met")
|
Timber.i("Condition 4 met")
|
||||||
}
|
}
|
||||||
(!it.isEthernetConnected &&
|
(!it.isEthernetConnected &&
|
||||||
|
|
|
@ -62,7 +62,7 @@ class ShortcutsActivity : ComponentActivity() {
|
||||||
Action.STOP.name -> ServiceManager.stopVpnService(
|
Action.STOP.name -> ServiceManager.stopVpnService(
|
||||||
this@ShortcutsActivity
|
this@ShortcutsActivity
|
||||||
)
|
)
|
||||||
Action.START.name -> ServiceManager.startVpnService(
|
Action.START.name -> ServiceManager.startVpnServiceForeground(
|
||||||
this@ShortcutsActivity,
|
this@ShortcutsActivity,
|
||||||
tunnelConfig.toString()
|
tunnelConfig.toString()
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
object Constants {
|
object Constants {
|
||||||
const val VERSION_NAME = "3.3.1"
|
const val VERSION_NAME = "3.3.2"
|
||||||
const val JVM_TARGET = "17"
|
const val JVM_TARGET = "17"
|
||||||
const val VERSION_CODE = 33100
|
const val VERSION_CODE = 33200
|
||||||
const val TARGET_SDK = 34
|
const val TARGET_SDK = 34
|
||||||
const val MIN_SDK = 26
|
const val MIN_SDK = 26
|
||||||
const val APP_ID = "com.zaneschepke.wireguardautotunnel"
|
const val APP_ID = "com.zaneschepke.wireguardautotunnel"
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
Enhancements:
|
||||||
|
- Refactor state management
|
||||||
|
- Improve AndroidTV navigation
|
||||||
|
- Improve auto-tunneling efficiency
|
||||||
|
- Improve navigation
|
||||||
|
- Auto-tunneling pause feature
|
||||||
|
- Fix foreground start auto-tunnel
|
||||||
|
- Many bugfixes
|
Loading…
Reference in New Issue