Show original metered/roaming state

Refs #311
This commit is contained in:
M66B 2016-02-11 13:03:01 +01:00
parent 2f51938d1c
commit 67fb7427d1
1 changed files with 6 additions and 3 deletions

View File

@ -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);