1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-01-04 06:23:04 +00:00

Subscription changes are relevant for national roaming only

This commit is contained in:
M66B 2016-02-11 22:07:48 +01:00
parent 52ceccd12b
commit 8a7061a1eb

View file

@ -231,7 +231,7 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
} }
private void handleIntent(Intent intent) { private void handleIntent(Intent intent) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(SinkholeService.this); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(SinkholeService.this);
Command cmd = (Command) intent.getSerializableExtra(EXTRA_COMMAND); Command cmd = (Command) intent.getSerializableExtra(EXTRA_COMMAND);
String reason = intent.getStringExtra(EXTRA_REASON); String reason = intent.getStringExtra(EXTRA_REASON);
@ -272,7 +272,8 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
@Override @Override
public void onSubscriptionsChanged() { public void onSubscriptionsChanged() {
Log.i(TAG, "Subscriptions changed"); Log.i(TAG, "Subscriptions changed");
SinkholeService.reload(null, "Subscriptions changed", SinkholeService.this); if (prefs.getBoolean("national_roaming", false))
SinkholeService.reload(null, "Subscriptions changed", SinkholeService.this);
} }
}; };
sm.addOnSubscriptionsChangedListener((SubscriptionManager.OnSubscriptionsChangedListener) subscriptionsChangedListener); sm.addOnSubscriptionsChangedListener((SubscriptionManager.OnSubscriptionsChangedListener) subscriptionsChangedListener);