mirror of https://github.com/M66B/NetGuard.git
parent
2f51938d1c
commit
67fb7427d1
|
@ -1035,12 +1035,15 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
||||||
// Update connected state
|
// Update connected state
|
||||||
last_connected = Util.isConnected(SinkholeService.this);
|
last_connected = Util.isConnected(SinkholeService.this);
|
||||||
|
|
||||||
|
boolean org_metered = metered;
|
||||||
|
boolean org_roaming = roaming;
|
||||||
|
|
||||||
// Update metered state
|
// Update metered state
|
||||||
if (wifi && !useMetered)
|
if (wifi && !useMetered)
|
||||||
metered = false;
|
metered = false;
|
||||||
if (wifi && ssidHomes.size() > 0 && !ssidHomes.contains(ssidNetwork)) {
|
if (wifi && ssidHomes.size() > 0 && !ssidHomes.contains(ssidNetwork)) {
|
||||||
metered = true;
|
metered = true;
|
||||||
Log.i(TAG, "Not at home");
|
Log.i(TAG, "!@home");
|
||||||
}
|
}
|
||||||
if (unmetered_2g && "2G".equals(generation))
|
if (unmetered_2g && "2G".equals(generation))
|
||||||
metered = false;
|
metered = false;
|
||||||
|
@ -1059,9 +1062,9 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
||||||
" wifi=" + wifi +
|
" wifi=" + wifi +
|
||||||
" home=" + TextUtils.join(",", ssidHomes) +
|
" home=" + TextUtils.join(",", ssidHomes) +
|
||||||
" network=" + ssidNetwork +
|
" network=" + ssidNetwork +
|
||||||
" metered=" + metered +
|
" metered=" + metered + "/" + org_metered +
|
||||||
" generation=" + generation +
|
" generation=" + generation +
|
||||||
" roaming=" + roaming +
|
" roaming=" + roaming + "/" + org_roaming +
|
||||||
" interactive=" + last_interactive +
|
" interactive=" + last_interactive +
|
||||||
" tethering=" + tethering +
|
" tethering=" + tethering +
|
||||||
" filter=" + filter);
|
" filter=" + filter);
|
||||||
|
|
Loading…
Reference in New Issue