1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-02-25 07:32:46 +00:00

Set filter allowed for older Android versions

This commit is contained in:
M66B 2016-02-15 08:09:08 +01:00
parent 4ab9ebbfd8
commit 77212945b9

View file

@ -222,12 +222,16 @@ public class Receiver extends BroadcastReceiver {
} else {
editor.putBoolean("whitelist_wifi", false);
editor.putBoolean("whitelist_other", false);
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP_MR1)
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP_MR1) {
editor.putBoolean("filter", true); // Optional
editor.putBoolean("filter_allowed", true); // Optional
}
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
editor.putBoolean("filter", true); // Mandatory
editor.putBoolean("filter_allowed", true); // Mandatory
}
editor.putInt("version", newVersion);
editor.apply();