Skip to content

Commit e7a41ef

Browse files
authored
Merge pull request #54 from ivpn/GAA-51
GAA-51
2 parents 87c627d + d294a74 commit e7a41ef

6 files changed

Lines changed: 18 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## Version 2.4.0 - 2021-04-16
5+
## Version 2.4.0(2.4.1) - 2021-04-16
66

77
[NEW] Possibility to mock GPS location
88
[NEW] Bypass VPN for local networks

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ android {
2828
applicationId "net.ivpn.client"
2929
minSdkVersion 21
3030
targetSdkVersion 30
31-
versionCode 95
32-
versionName "2.4.0"
31+
versionCode 96
32+
versionName "2.4.1"
3333

3434
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3535
testInstrumentationRunnerArguments clearPackageData: 'true'

app/src/main/java/net/ivpn/client/common/utils/ComponentUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public void performBaseComponentsInit() {
9797
}
9898

9999
public void resetComponents() {
100-
networkController.finishAll();
101100
preference.removeAll();
101+
networkController.finishAll();
102102
globalBehaviorController.finishAll();
103103
updatesJobServiceUtil.clearUpdateJob(IVPNApplication.getApplication());
104104
updateHelper.skipUpdate();

app/src/main/java/net/ivpn/client/v2/network/NetworkViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class NetworkViewModel @Inject internal constructor(
223223
return
224224
}
225225
if (source == NetworkSource.WIFI) {
226-
LOGGER.info("NetworkController", "onNetworkSourceChanged: ssid = " + source.ssid)
226+
LOGGER.info("onNetworkSourceChanged: ssid = " + source.ssid)
227227
}
228228
networkSource.set(source)
229229
networkState.set(source.finalState)

app/src/main/java/net/ivpn/client/vpn/controller/VpnBehaviorController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void onServerUpdated(Boolean forceConnect) {
137137

138138
public void connectActionByRules() {
139139
LOGGER.info("connectActionByRules");
140-
behavior.startConnecting(true);
140+
behavior.startConnecting(false);
141141
}
142142

143143
public void connectionActionByUser() {

app/src/main/java/net/ivpn/client/vpn/local/NetworkController.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,21 @@ public NetworkController(NetworkProtectionPreference networkProtectionPreference
9494

9595
public void init() {
9696
LOGGER.info("Init");
97+
initInnerState();
98+
// isWifiWatcherSettingEnabled = settingsPreference.getSettingNetworkRules();
99+
// defaultState = networkProtectionPreference.getDefaultNetworkState();
100+
// mobileState = networkProtectionPreference.getMobileDataNetworkState();
101+
// trustedWiFis = networkProtectionPreference.getTrustedWifiList();
102+
// untrustedWiFis = networkProtectionPreference.getUntrustedWifiList();
103+
registerReceiver();
104+
}
105+
106+
private void initInnerState() {
97107
isWifiWatcherSettingEnabled = settingsPreference.getSettingNetworkRules();
98108
defaultState = networkProtectionPreference.getDefaultNetworkState();
99109
mobileState = networkProtectionPreference.getMobileDataNetworkState();
100110
trustedWiFis = networkProtectionPreference.getTrustedWifiList();
101111
untrustedWiFis = networkProtectionPreference.getUntrustedWifiList();
102-
registerReceiver();
103112
}
104113

105114
public boolean isWifiWatcherSettingEnabled() {
@@ -541,7 +550,8 @@ public void finishAll() {
541550
LOGGER.info("finishAll");
542551
stopWifiWatcherService();
543552
source = null;
544-
isWifiWatcherSettingEnabled = false;
553+
initInnerState();
554+
// isWifiWatcherSettingEnabled = false;
545555
}
546556

547557
public void changeConnectToVpnRule(boolean isEnabled) {

0 commit comments

Comments
 (0)