When screen on Wi-Fi/mobile

This commit is contained in:
M66B 2015-11-21 09:48:33 +01:00
parent e3f8e7d22c
commit 29258ce20a
27 changed files with 319 additions and 112 deletions

View File

@ -8,8 +8,8 @@ android {
applicationId "eu.faircode.netguard"
minSdkVersion 21
targetSdkVersion 23
versionCode 37
versionName "0.37"
versionCode 38
versionName "0.38"
}
buildTypes {
release {

View File

@ -294,7 +294,8 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
} else if ("whitelist_wifi".equals(name) ||
"whitelist_other".equals(name) ||
"unused".equals(name) ||
"screen_wifi".equals(name) ||
"screen_other".equals(name) ||
"whitelist_roaming".equals(name) ||
"manage_system".equals(name) ||
"imported".equals(name))

View File

@ -143,7 +143,8 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
else if ("whitelist_roaming".equals(name))
SinkholeService.reload("other", this);
else if ("unused".equals(name) ||
else if ("screen_wifi".equals(name) ||
"screen_other".equals(name) ||
"use_metered".equals(name) ||
"manage_system".equals(name))
SinkholeService.reload(null, this);
@ -309,9 +310,13 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
xmlExport(getSharedPreferences("other", Context.MODE_PRIVATE), serializer);
serializer.endTag(null, "mobile");
serializer.startTag(null, "unused");
xmlExport(getSharedPreferences("unused", Context.MODE_PRIVATE), serializer);
serializer.endTag(null, "unused");
serializer.startTag(null, "screen_wifi");
xmlExport(getSharedPreferences("screen_wifi", Context.MODE_PRIVATE), serializer);
serializer.endTag(null, "screen_wifi");
serializer.startTag(null, "screen_other");
xmlExport(getSharedPreferences("screen_other", Context.MODE_PRIVATE), serializer);
serializer.endTag(null, "screen_other");
serializer.endTag(null, "netguard");
serializer.endDocument();
@ -358,7 +363,13 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
xmlImport(handler.application, prefs);
xmlImport(handler.wifi, getSharedPreferences("wifi", Context.MODE_PRIVATE));
xmlImport(handler.mobile, getSharedPreferences("other", Context.MODE_PRIVATE));
xmlImport(handler.unused, getSharedPreferences("unused", Context.MODE_PRIVATE));
if (handler.unused.size() > 0) {
xmlImport(handler.unused, getSharedPreferences("screen_wifi", Context.MODE_PRIVATE));
xmlImport(handler.unused, getSharedPreferences("screen_other", Context.MODE_PRIVATE));
} else {
xmlImport(handler.screen_wifi, getSharedPreferences("screen_wifi", Context.MODE_PRIVATE));
xmlImport(handler.screen_other, getSharedPreferences("screen_other", Context.MODE_PRIVATE));
}
xmlImport(handler.roaming, getSharedPreferences("roaming", Context.MODE_PRIVATE));
// Refresh UI
@ -377,7 +388,11 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
for (String key : settings.keySet()) {
Object value = settings.get(key);
if (value instanceof Boolean)
editor.putBoolean(key, (Boolean) value);
if ("unused".equals(key)) {
editor.putBoolean("screen_wifi", (Boolean) value);
editor.putBoolean("screen_other", (Boolean) value);
} else
editor.putBoolean(key, (Boolean) value);
else if (value instanceof Integer)
editor.putInt(key, (Integer) value);
else
@ -393,6 +408,8 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
public Map<String, Object> wifi = new HashMap<>();
public Map<String, Object> mobile = new HashMap<>();
public Map<String, Object> unused = new HashMap<>();
public Map<String, Object> screen_wifi = new HashMap<>();
public Map<String, Object> screen_other = new HashMap<>();
public Map<String, Object> roaming = new HashMap<>();
private Map<String, Object> current = null;
@ -413,8 +430,14 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
else if (qName.equals("unused"))
current = unused;
else if (qName.equals("screen_wifi"))
current = screen_wifi;
else if (qName.equals("screen_other"))
current = screen_other;
else if (qName.equals("roaming"))
roaming = unused;
current = roaming;
else if (qName.equals("setting")) {
String key = attributes.getValue("key");

View File

@ -27,6 +27,8 @@ import android.net.VpnService;
import android.preference.PreferenceManager;
import android.util.Log;
import java.util.Map;
public class Receiver extends BroadcastReceiver {
private static final String TAG = "NetGuard.Receiver";
@ -42,11 +44,13 @@ public class Receiver extends BroadcastReceiver {
Log.i(TAG, "Deleting settings package=" + packageName);
context.getSharedPreferences("wifi", Context.MODE_PRIVATE).edit().remove(packageName).apply();
context.getSharedPreferences("other", Context.MODE_PRIVATE).edit().remove(packageName).apply();
context.getSharedPreferences("unused", Context.MODE_PRIVATE).edit().remove(packageName).apply();
context.getSharedPreferences("screen_wifi", Context.MODE_PRIVATE).edit().remove(packageName).apply();
context.getSharedPreferences("screen_other", Context.MODE_PRIVATE).edit().remove(packageName).apply();
context.getSharedPreferences("roaming", Context.MODE_PRIVATE).edit().remove(packageName).apply();
}
} else {
// Upgrade settings
upgrade(true, context);
// Start service
@ -64,7 +68,32 @@ public class Receiver extends BroadcastReceiver {
Log.i(TAG, "Upgrading from version " + oldVersion + " to " + newVersion);
SharedPreferences.Editor editor = prefs.edit();
if (!initialized) {
if (initialized) {
if (oldVersion < 38) {
Log.i(TAG, "Converting screen wifi/mobile");
SharedPreferences.Editor edit = prefs.edit();
edit.putBoolean("screen_wifi", prefs.getBoolean("unused", false));
edit.putBoolean("screen_other", prefs.getBoolean("unused", false));
edit.remove("unused");
edit.apply();
SharedPreferences unused = context.getSharedPreferences("unused", Context.MODE_PRIVATE);
SharedPreferences screen_wifi = context.getSharedPreferences("screen_wifi", Context.MODE_PRIVATE);
SharedPreferences screen_other = context.getSharedPreferences("screen_other", Context.MODE_PRIVATE);
Map<String, ?> punused = unused.getAll();
SharedPreferences.Editor edit_screen_wifi = screen_wifi.edit();
SharedPreferences.Editor edit_screen_other = screen_other.edit();
for (String key : punused.keySet()) {
edit_screen_wifi.putBoolean(key, (Boolean) punused.get(key));
edit_screen_other.putBoolean(key, (Boolean) punused.get(key));
}
edit_screen_wifi.apply();
edit_screen_other.apply();
// TODO: delete unused
}
} else {
editor.putBoolean("whitelist_wifi", false);
editor.putBoolean("whitelist_other", false);
}

View File

@ -47,12 +47,14 @@ public class Rule implements Comparable<Rule> {
public boolean wifi_default;
public boolean other_default;
public boolean unused_default;
public boolean screen_wifi_default;
public boolean screen_other_default;
public boolean roaming_default;
public boolean wifi_blocked;
public boolean other_blocked;
public boolean unused;
public boolean screen_wifi;
public boolean screen_other;
public boolean roaming;
public String[] related = null;
@ -84,19 +86,20 @@ public class Rule implements Comparable<Rule> {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences wifi = context.getSharedPreferences("wifi", Context.MODE_PRIVATE);
SharedPreferences other = context.getSharedPreferences("other", Context.MODE_PRIVATE);
SharedPreferences unused = context.getSharedPreferences("unused", Context.MODE_PRIVATE);
SharedPreferences screen_wifi = context.getSharedPreferences("screen_wifi", Context.MODE_PRIVATE);
SharedPreferences screen_other = context.getSharedPreferences("screen_other", Context.MODE_PRIVATE);
SharedPreferences roaming = context.getSharedPreferences("roaming", Context.MODE_PRIVATE);
// Get settings
boolean default_wifi = prefs.getBoolean("whitelist_wifi", true);
boolean default_other = prefs.getBoolean("whitelist_other", true);
boolean default_unused = prefs.getBoolean("unused", false);
boolean default_screen_wifi = prefs.getBoolean("screen_wifi", true);
boolean default_screen_other = prefs.getBoolean("screen_other", true);
boolean default_roaming = prefs.getBoolean("whitelist_roaming", true);
boolean manage_system = prefs.getBoolean("manage_system", false);
// Get predefined rules
Map<String, Boolean> pre_blocked = new HashMap<>();
Map<String, Boolean> pre_unused = new HashMap<>();
Map<String, Boolean> pre_roaming = new HashMap<>();
Map<String, String[]> pre_related = new HashMap<>();
try {
@ -107,19 +110,17 @@ public class Rule implements Comparable<Rule> {
if ("rule".equals(xml.getName())) {
String pkg = xml.getAttributeValue(null, "package");
boolean pblocked = xml.getAttributeBooleanValue(null, "blocked", false);
boolean punused = xml.getAttributeBooleanValue(null, "unused", default_unused);
boolean proaming = xml.getAttributeBooleanValue(null, "roaming", default_roaming);
pre_blocked.put(pkg, pblocked);
pre_unused.put(pkg, punused);
pre_roaming.put(pkg, proaming);
Log.i(tag, "Predefined " + pkg + " blocked=" + pblocked + " unused=" + punused + " roaming=" + proaming);
Log.d(tag, "Predefined " + pkg + " blocked=" + pblocked + " roaming=" + proaming);
} else if ("relation".equals(xml.getName())) {
String pkg = xml.getAttributeValue(null, "package");
String[] rel = xml.getAttributeValue(null, "related").split(",");
pre_related.put(pkg, rel);
Log.i(tag, "Relation " + pkg + " related=" + TextUtils.join(",", rel));
Log.d(tag, "Relation " + pkg + " related=" + TextUtils.join(",", rel));
}
eventType = xml.next();
@ -140,12 +141,14 @@ public class Rule implements Comparable<Rule> {
rule.wifi_default = (pre_blocked.containsKey(info.packageName) ? pre_blocked.get(info.packageName) : default_wifi);
rule.other_default = (pre_blocked.containsKey(info.packageName) ? pre_blocked.get(info.packageName) : default_other);
rule.unused_default = (pre_unused.containsKey(info.packageName) ? pre_unused.get(info.packageName) : default_unused);
rule.screen_wifi_default = default_screen_wifi;
rule.screen_other_default = default_screen_other;
rule.roaming_default = (pre_roaming.containsKey(info.packageName) ? pre_roaming.get(info.packageName) : default_roaming);
rule.wifi_blocked = (system && !manage_system ? false : wifi.getBoolean(info.packageName, rule.wifi_default));
rule.other_blocked = (system && !manage_system ? false : other.getBoolean(info.packageName, rule.other_default));
rule.unused = unused.getBoolean(info.packageName, rule.unused_default);
rule.screen_wifi = screen_wifi.getBoolean(info.packageName, rule.screen_wifi_default);
rule.screen_other = screen_other.getBoolean(info.packageName, rule.screen_other_default);
rule.roaming = roaming.getBoolean(info.packageName, rule.roaming_default);
if (pre_related.containsKey(info.packageName))
@ -153,8 +156,9 @@ public class Rule implements Comparable<Rule> {
rule.changed = (rule.wifi_blocked != default_wifi ||
rule.other_blocked != default_other ||
((rule.wifi_blocked || rule.other_blocked) && rule.unused != default_unused) ||
((!rule.other_blocked || rule.unused) && rule.roaming != default_roaming));
(rule.wifi_blocked && rule.screen_wifi != rule.screen_wifi_default) ||
(rule.other_blocked && rule.screen_other != rule.screen_other_default) ||
((!rule.other_blocked || rule.screen_other) && rule.roaming != default_roaming));
listRules.add(rule);
}

View File

@ -68,8 +68,11 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
public CheckBox cbWifi;
public CheckBox cbOther;
public LinearLayout llAttributes;
public ImageView ivUsing;
public LinearLayout llAttributesWifi;
public ImageView ivScreenWifi;
public LinearLayout llAttributesOther;
public ImageView ivScreenOther;
public TextView tvRoaming;
public LinearLayout llConfiguration;
@ -78,7 +81,8 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
public TextView tvVersion;
public TextView tvDisabled;
public TextView tvInternet;
public CheckBox cbUsing;
public CheckBox cbScreenWifi;
public CheckBox cbScreenOther;
public CheckBox cbRoaming;
public ImageButton btnSettings;
public Button btnLaunch;
@ -95,8 +99,11 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
cbWifi = (CheckBox) itemView.findViewById(R.id.cbWifi);
cbOther = (CheckBox) itemView.findViewById(R.id.cbOther);
llAttributes = (LinearLayout) itemView.findViewById(R.id.llAttributes);
ivUsing = (ImageView) itemView.findViewById(R.id.ivUsing);
llAttributesWifi = (LinearLayout) itemView.findViewById(R.id.llAttributesWifi);
ivScreenWifi = (ImageView) itemView.findViewById(R.id.ivScreenWifi);
llAttributesOther = (LinearLayout) itemView.findViewById(R.id.llAttributesOther);
ivScreenOther = (ImageView) itemView.findViewById(R.id.ivScreenOther);
tvRoaming = (TextView) itemView.findViewById(R.id.tvRoaming);
llConfiguration = (LinearLayout) itemView.findViewById(R.id.llConfiguration);
@ -105,7 +112,8 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
tvVersion = (TextView) itemView.findViewById(R.id.tvVersion);
tvDisabled = (TextView) itemView.findViewById(R.id.tvDisabled);
tvInternet = (TextView) itemView.findViewById(R.id.tvInternet);
cbUsing = (CheckBox) itemView.findViewById(R.id.cbUsing);
cbScreenWifi = (CheckBox) itemView.findViewById(R.id.cbScreenWifi);
cbScreenOther = (CheckBox) itemView.findViewById(R.id.cbScreenOther);
cbRoaming = (CheckBox) itemView.findViewById(R.id.cbRoaming);
btnSettings = (ImageButton) itemView.findViewById(R.id.btnSettings);
btnLaunch = (Button) itemView.findViewById(R.id.btnLaunch);
@ -178,7 +186,8 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
for (Rule related : listAll)
if (related.info.packageName.equals(pkg)) {
updateRule(related, network, isChecked);
updateUnused(related, rule.unused);
updateScreenWifi(related, rule.screen_wifi);
updateScreenOther(related, rule.screen_other);
updateRoaming(related, rule.roaming);
}
notifyDataSetChanged();
@ -222,9 +231,11 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
holder.cbOther.setChecked(rule.other_blocked);
holder.cbOther.setOnCheckedChangeListener(cbListener);
holder.llAttributes.setOnClickListener(llListener);
holder.ivUsing.setVisibility(rule.unused && (rule.wifi_blocked || rule.other_blocked) ? View.VISIBLE : View.INVISIBLE);
holder.tvRoaming.setVisibility(rule.roaming && (!rule.other_blocked || rule.unused) ? View.VISIBLE : View.INVISIBLE);
holder.llAttributesWifi.setOnClickListener(llListener);
holder.ivScreenWifi.setVisibility(rule.screen_wifi && rule.wifi_blocked ? View.VISIBLE : View.INVISIBLE);
holder.llAttributesOther.setOnClickListener(llListener);
holder.ivScreenOther.setVisibility(rule.screen_other && rule.other_blocked ? View.VISIBLE : View.INVISIBLE);
holder.tvRoaming.setVisibility(rule.roaming && (!rule.other_blocked || rule.screen_other) ? View.VISIBLE : View.INVISIBLE);
holder.llConfiguration.setVisibility(rule.attributes ? View.VISIBLE : View.GONE);
@ -239,15 +250,15 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
holder.tvDisabled.setVisibility(rule.disabled ? View.VISIBLE : View.GONE);
holder.tvInternet.setVisibility(rule.internet ? View.GONE : View.VISIBLE);
holder.cbUsing.setOnCheckedChangeListener(null);
holder.cbUsing.setChecked(rule.unused);
holder.cbUsing.setEnabled(rule.wifi_blocked || rule.other_blocked);
holder.cbScreenWifi.setOnCheckedChangeListener(null);
holder.cbScreenWifi.setChecked(rule.screen_wifi);
holder.cbScreenWifi.setEnabled(rule.wifi_blocked);
holder.cbUsing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
holder.cbScreenWifi.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// Update rule
updateUnused(rule, isChecked);
updateScreenWifi(rule, isChecked);
// Update relations
if (rule.related == null)
@ -256,7 +267,33 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
for (String pkg : rule.related)
for (Rule related : listAll)
if (related.info.packageName.equals(pkg))
updateUnused(related, rule.unused);
updateScreenWifi(related, rule.screen_wifi);
notifyDataSetChanged();
}
// Apply updated rule
SinkholeService.reload(null, context);
}
});
holder.cbScreenOther.setOnCheckedChangeListener(null);
holder.cbScreenOther.setChecked(rule.screen_other);
holder.cbScreenOther.setEnabled(rule.other_blocked);
holder.cbScreenOther.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// Update rule
updateScreenOther(rule, isChecked);
// Update relations
if (rule.related == null)
notifyItemChanged(position);
else {
for (String pkg : rule.related)
for (Rule related : listAll)
if (related.info.packageName.equals(pkg))
updateScreenOther(related, rule.screen_other);
notifyDataSetChanged();
}
@ -267,7 +304,7 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
holder.cbRoaming.setOnCheckedChangeListener(null);
holder.cbRoaming.setChecked(rule.roaming);
holder.cbRoaming.setEnabled(!rule.other_blocked || rule.unused);
holder.cbRoaming.setEnabled(!rule.other_blocked || rule.screen_other);
holder.cbRoaming.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
@ -339,13 +376,22 @@ public class RuleAdapter extends RecyclerView.Adapter<RuleAdapter.ViewHolder> im
}
}
private void updateUnused(Rule rule, boolean enabled) {
rule.unused = enabled;
SharedPreferences unused = context.getSharedPreferences("unused", Context.MODE_PRIVATE);
if (rule.unused == rule.unused_default)
unused.edit().remove(rule.info.packageName).apply();
private void updateScreenWifi(Rule rule, boolean enabled) {
rule.screen_wifi = enabled;
SharedPreferences screen_wifi = context.getSharedPreferences("screen_wifi", Context.MODE_PRIVATE);
if (rule.screen_wifi == rule.screen_wifi_default)
screen_wifi.edit().remove(rule.info.packageName).apply();
else
unused.edit().putBoolean(rule.info.packageName, rule.unused).apply();
screen_wifi.edit().putBoolean(rule.info.packageName, rule.screen_wifi).apply();
}
private void updateScreenOther(Rule rule, boolean enabled) {
rule.screen_other = enabled;
SharedPreferences screen_other = context.getSharedPreferences("screen_other", Context.MODE_PRIVATE);
if (rule.screen_other == rule.screen_other_default)
screen_other.edit().remove(rule.info.packageName).apply();
else
screen_other.edit().putBoolean(rule.info.packageName, rule.screen_other).apply();
}
private void updateRoaming(Rule rule, boolean enabled) {

View File

@ -169,7 +169,8 @@ public class SinkholeService extends VpnService {
int nBlocked = 0;
for (Rule rule : Rule.getRules(true, TAG, this)) {
boolean blocked = (metered ? rule.other_blocked : rule.wifi_blocked);
if ((!blocked || (rule.unused && interactive)) && (!metered || !(rule.roaming && last_roaming))) {
boolean screen = (metered ? rule.screen_other : rule.screen_wifi);
if ((!blocked || (screen && interactive)) && (!metered || !(rule.roaming && last_roaming))) {
nAllowed++;
if (debug)
Log.i(TAG, "Allowing " + rule.info.packageName);

View File

@ -41,7 +41,7 @@
</LinearLayout>
<RelativeLayout
android:layout_width="?android:attr/listPreferredItemHeightSmall"
android:layout_width="wrap_content"
android:layout_height="?android:attr/listPreferredItemHeightSmall">
<CheckBox
@ -52,9 +52,31 @@
android:button="@drawable/wifi" />
</RelativeLayout>
<LinearLayout
android:id="@+id/llAttributesWifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<ImageView
android:id="@+id/ivScreenWifi"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/screen_on" />
<View
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_horizontal"
android:visibility="invisible" />
</LinearLayout>
<RelativeLayout
android:layout_width="?android:attr/listPreferredItemHeightSmall"
android:layout_height="?android:attr/listPreferredItemHeightSmall">
android:layout_width="wrap_content"
android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:layout_marginStart="8dp">
<CheckBox
android:id="@+id/cbOther"
@ -65,25 +87,25 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/llAttributes"
android:id="@+id/llAttributesOther"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="4dp"
android:orientation="vertical">
<ImageView
android:id="@+id/ivUsing"
android:id="@+id/ivScreenOther"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/using" />
android:src="@drawable/screen_on" />
<TextView
android:id="@+id/tvRoaming"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:gravity="center_horizontal"
android:text="R"
android:textAppearance="@android:style/TextAppearance.Material.Small"
android:textColor="@color/colorAccent"
@ -95,7 +117,7 @@
android:id="@+id/llConfiguration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_marginStart="8dp"
android:orientation="vertical"
android:paddingStart="?android:attr/listPreferredItemHeightSmall"
android:paddingTop="0dp"
@ -143,21 +165,69 @@
android:textStyle="italic"
android:visibility="gone" />
<CheckBox
android:id="@+id/cbUsing"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/title_using"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
android:orientation="horizontal">
<CheckBox
android:id="@+id/cbRoaming"
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:src="@drawable/screen_on" />
<CheckBox
android:id="@+id/cbScreenWifi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_screen_wifi"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/title_roaming"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
android:orientation="horizontal">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:src="@drawable/screen_on" />
<CheckBox
android:id="@+id/cbScreenOther"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_screen_other"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="horizontal">
<TextView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:gravity="center_horizontal"
android:text="R"
android:textAppearance="@android:style/TextAppearance.Material.Small"
android:textColor="@color/colorAccent"
android:textSize="12dp" />
<CheckBox
android:id="@+id/cbRoaming"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_roaming"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"

View File

@ -15,7 +15,8 @@ These issues are caused by bugs in Android, or in the software provided by the m
<string name="menu_about">حول</string>
<string name="setting_whitelist_wifi">حظر الواي فاي بشكل افتراضي</string>
<string name="setting_whitelist_other">حظر الشبكة بشكل افتراضي</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Block roaming by default</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Manage system applications</string>
@ -38,7 +39,8 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_voluntary">Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Allow when screen is on</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Block when roaming</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -14,7 +14,8 @@ Das wird von Fehlern in Android oder in Software vom Hersteller verursacht. Bitt
<string name="menu_about">Über</string>
<string name="setting_whitelist_wifi">WLAN standardmäßig blockieren</string>
<string name="setting_whitelist_other">Mobilfunk standardmäßig blockieren</string>
<string name="setting_unused">Standardmäßig erlauben, wenn Bildschirm an</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Roaming standardmäßig blockieren</string>
<string name="setting_metered">Gemessenes WLAN-Netzwerk handhaben</string>
<string name="setting_system">System-Apps anzeigen</string>
@ -35,7 +36,8 @@ Das wird von Fehlern in Android oder in Software vom Hersteller verursacht. Bitt
<string name="msg_voluntary">Spenden sind vollkommen freiwillig und schalten keine Funktionen frei. Spenden helfen, die App weiterzuentwickeln und stellen eine Anerkennung für die Arbeit dar.</string>
<string name="msg_dimming">Falls Sie nicht auf OK im nächsten Fenster tippen können, manipuliert eine andere Anwendung Ihren Bildschirm.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Erlauben, wenn Bildschirm an</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Bei Roaming blockieren</string>
<string name="title_disabled">ist deaktiviert</string>
<string name="title_internet">hat keine Internet-Berechtigung</string>

View File

@ -15,7 +15,8 @@ Esto es causado por errores en Android, o por el software proporcionado por el f
<string name="menu_about">Acerca de</string>
<string name="setting_whitelist_wifi">Bloquear Wi-Fi por defecto</string>
<string name="setting_whitelist_other">Bloquear red móvil por defecto</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Bloquear roaming por defecto</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Administrar aplicaciones de sistema</string>
@ -38,7 +39,8 @@ Puesto que NetGuard no tiene permisos de internet, ya sabes que tu tráfico de i
<string name="msg_voluntary">Las donaciones son completamente voluntarias y no desbloquean ninguna funcionalidad. Las donaciones son una forma de mostrar tu apreciación por el trabajo hecho.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Permitir cuando la pantalla esté encendida</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Bloquear cuando se esté en roaming</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -15,7 +15,8 @@ Ceci est causé par des bugs dans Android, ou dans le logiciel fourni par le con
<string name="menu_about">À propos</string>
<string name="setting_whitelist_wifi">Blocage Wi-Fi par défaut</string>
<string name="setting_whitelist_other">Blocage données mobiles par défaut</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Blocage roaming par défaut</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Gérer les applications système</string>
@ -39,7 +40,8 @@ Netguard n\'a pas access a internet,vous savez que votre trafic Internet n\'est
Faire un don est une de façon de montrer votre soutiens aux développeur et votre appréciation pour le travail accompli.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Accepter si l\'ecran est allumé</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Bloquer si roaming</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -16,7 +16,8 @@ Ció è causato da alcuni bug contenuti in Android, o in programmi forniti dal p
<string name="menu_about">Info</string>
<string name="setting_whitelist_wifi">Blocca Wi-Fi di default</string>
<string name="setting_whitelist_other">Blocca rete dati di default</string>
<string name="setting_unused">Permetti di default quando lo schermo è acceso</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Blocca roaming di default</string>
<string name="setting_metered">Gestisci reti Wi-Fi a consumo</string>
<string name="setting_system">Gestisci applicazioni di sistema</string>
@ -40,7 +41,8 @@ Ció è causato da alcuni bug contenuti in Android, o in programmi forniti dal p
<string name="msg_voluntary">Le donazioni sono totalmente volontarie e non sbloccano nessuna funzionalitá aggiuntiva. Le donazioni mostrano il tuo apprezzamento per il lavoro svolto.</string>
<string name="msg_dimming">Se non riesci a cliccare OK nella prossima schermata, è probabile che un\'altra applicazione (di oscuramento schermo) stia manipolando lo schermo.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Permetti quando lo schermo è acceso</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Blocca quando in roaming</string>
<string name="title_disabled">è disabilitata</string>
<string name="title_internet">non ha accesso a internet</string>

View File

@ -15,7 +15,8 @@
<string name="menu_about">アプリについて</string>
<string name="setting_whitelist_wifi">デフォルトで Wi-Fi をブロック</string>
<string name="setting_whitelist_other">デフォルトでモバイル通信をブロック</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">デフォルトでローミングをブロック</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">システムアプリケーションの管理</string>
@ -38,7 +39,8 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_voluntary">Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Allow when screen is on</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">ローミング時にブロック</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -15,7 +15,8 @@ These issues are caused by bugs in Android, or in the software provided by the m
<string name="menu_about">넷가드 정보</string>
<string name="setting_whitelist_wifi">Wi-Fi 차단을 기본 설정으로</string>
<string name="setting_whitelist_other">모바일 데이터 차단을 기본 설정으로</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Block roaming by default</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Manage system applications</string>
@ -38,7 +39,8 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_voluntary">Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Allow when screen is on</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Block when roaming</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -15,7 +15,8 @@ These issues are caused by bugs in Android, or in the software provided by the m
<string name="menu_about">Over</string>
<string name="setting_whitelist_wifi">Blokkeer standaard Wi-Fi</string>
<string name="setting_whitelist_other">Blokkeer standaard mobiel</string>
<string name="setting_unused">Sta standaard toe als scherm aan is</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Blokkeer standaard roaming</string>
<string name="setting_metered">Behandel gemeten Wi-Fi netwerken</string>
<string name="setting_system">Beheer systeemapplicaties</string>
@ -38,7 +39,8 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_voluntary">Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Sta toe als scherm aan is</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Blokkeer bij roamen</string>
<string name="title_disabled">is uitgezet</string>
<string name="title_internet">heeft geen internet toegang</string>

View File

@ -15,7 +15,8 @@ Problemy te są spowodowane błędami w samym Androidzie, lub oprogramowaniu dos
<string name="menu_about">O...</string>
<string name="setting_whitelist_wifi">Domyślnie blokuj Wi-Fi</string>
<string name="setting_whitelist_other">Domyślnie blokuj Mobilne</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Domyślnie blokuj Roaming</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Zarządzaj aplikacjami systemowymi</string>
@ -38,7 +39,8 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_voluntary">Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Allow when screen is on</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Blokuj gdy roaming</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -15,7 +15,8 @@ Acest lucru este cauzat de bug-uri in Android sau in software-ul pus la dispozit
<string name="menu_about">Despre</string>
<string name="setting_whitelist_wifi">Blocheaza implicit Wi-Fi</string>
<string name="setting_whitelist_other">Blocheaza implicit date mobile</string>
<string name="setting_unused">Permite implicit cand ecranul este pornit</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Blocheaza implicit in roaming</string>
<string name="setting_metered">Gestionati conexiunile Wi-Fi contorizate</string>
<string name="setting_system">Gestionati aplicatiile de sistem</string>
@ -38,7 +39,8 @@ Cum NetGuard efectiv nu are permisiunea de a accesa internetul, esti sigur ca tr
<string name="msg_voluntary">Donatiile sunt voluntare si nu deblocheaza vreo functie ascunsa. Donatiile sunt doar un mod de a iti arata aprecierea pentru munca depusa la aceasta aplicatie.</string>
<string name="msg_dimming">Daca in urmatoarea fereastra de dialog nu poti apasa OK inseamna ca o aplicatie ce manipuleaza ecranul (luminozitatea sau nuanta) blocheaza interactiunea.</string>
<string name="msg_bug">A aparut o problema, pentru a ajuta la imbunatatirea NetGuard te rog ca in urmatoarea fereastra de dialog sa descrii ce operatii realizai.</string>
<string name="title_using">Permite doar cand ecranul este pornit</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Blocheaza in roaming</string>
<string name="title_disabled">Este dezactivata</string>
<string name="title_internet">Nu are permisiunea de a accesa internetul</string>

View File

@ -12,7 +12,8 @@
<string name="menu_about">О приложении</string>
<string name="setting_whitelist_wifi">Блокировать Wi-Fi по умолч.</string>
<string name="setting_whitelist_other">Блокировать моб. сеть по умолч.</string>
<string name="setting_unused">Разрешить сети, когда экран включен, по умолч.</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Блокировать роуминг по умолч.</string>
<string name="setting_metered">Регулировать огранич. Wi-Fi сети</string>
<string name="setting_system">Управлять сист. приложениями</string>
@ -35,7 +36,8 @@ NetGuard не имеет разрешения доступа в интернет
<string name="msg_voluntary">Пожертвования являются абсолютно добровольными и не добавляют никаких возможностей в программу. Пожертвования предназначены сугубо для того, чтобы выразить вашу признательность за проделанную работу.</string>
<string name="msg_dimming">Если вам не удается нажать ОК в следующем диалоговом окне (затемнение экрана), то, скорее всего, какое то другое приложение использует экран.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Разрешить сети, когда экран включен</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Блокировать в роуминге</string>
<string name="title_disabled">отключено</string>
<string name="title_internet">не имеет доступа в интернет</string>

View File

@ -15,7 +15,8 @@ Je to spôsobené chybami v Androide alebo v softvéri poskytovanom výrobcom, p
<string name="menu_about">O aplikácii</string>
<string name="setting_whitelist_wifi">Predvolene blokovať Wi-Fi</string>
<string name="setting_whitelist_other">Predvolene blokovať mobilné dáta</string>
<string name="setting_unused">Predvolene povoliť pri zapnutej obrazovke</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Predvolene blokovať roaming</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Spravovať systémové aplikácie</string>
@ -38,7 +39,8 @@ Keďže NetGuard nemá internetové povolenie, vaša sieťová prevádzka nemô
<string name="msg_voluntary">Dary sú úplne dobrovoľné a neodomknú žiadne funkcie. Dary sú určené ako spôsob, akým možete prejaviť vašu vďačnosť za vykonanú prácu.</string>
<string name="msg_dimming">Ak nemôžete stlačiť tlačidlo OK na ďalšom okne, tak iná aplikácia (na ovladanie jasu) prekrýva obrazovkou.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Povoliť pri zapnutej obrazovke</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Blokovať pri roamingu</string>
<string name="title_disabled">Zakázané</string>
<string name="title_internet">Nemá prístup k internetu</string>

View File

@ -11,7 +11,8 @@
<string name="menu_about">Про</string>
<string name="setting_whitelist_wifi">Блокувати типово у Wi-Fi мережі</string>
<string name="setting_whitelist_other">Блокувати типово у мобільній мережі</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Блокувати типово у роумінгу</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Керувати системними додатками</string>
@ -34,7 +35,8 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_voluntary">Donations are completely voluntary and do not unlock any feature. Donations are meant as a way to show your appreciation for the work done.</string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Дозволити, коли екран увімкнуто</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Блокувати у роумінгу</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -15,7 +15,8 @@
<string name="menu_about">关于</string>
<string name="setting_whitelist_wifi">默认阻止Wi-Fi网络</string>
<string name="setting_whitelist_other">默认阻止移动网络</string>
<string name="setting_unused">默认亮屏时允许</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">默认阻止漫游</string>
<string name="setting_metered">控制按流量计费Wi-Fi网络</string>
<string name="setting_system">管理系统应用</string>
@ -38,7 +39,8 @@ NetGuard不具有网络访问权限, 所以您无需担心您的网络流量被
<string name="msg_voluntary">捐赠完全出于自愿并且不会解锁任何功能. 捐赠仅作为您对开发者付出劳动的感谢.</string>
<string name="msg_dimming">如果您在下一个对话框中无法点击确定, 可能是另一个应用正在控制屏幕(如屏幕亮度调节软件).</string>
<string name="msg_bug">程序发生错误, 请在下一个对话框中描述您刚才的操作过程以便帮助我们改进NetGuard</string>
<string name="title_using">亮屏时允许</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">漫游时阻止</string>
<string name="title_disabled">已禁用</string>
<string name="title_internet">无网络访问权限</string>

View File

@ -16,7 +16,8 @@ These issues are caused by bugs in Android, or in the software provided by the m
<string name="setting_whitelist_wifi">Block Wi-Fi by default</string>
<string name="setting_whitelist_other">Block mobile by default</string>
<string name="setting_unused">Default allow when screen is on</string>
<string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>
<string name="setting_screen_other">Default allow mobile when screen is on</string>
<string name="setting_whitelist_roaming">Block roaming by default</string>
<string name="setting_metered">Handle metered Wi-Fi networks</string>
<string name="setting_system">Manage system applications</string>
@ -42,7 +43,8 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>
<string name="title_using">Allow when screen is on</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Block when roaming</string>
<string name="title_disabled">is disabled</string>
<string name="title_internet">has no internet permission</string>

View File

@ -13,13 +13,4 @@
package="com.android.chrome"
related="com.android.providers.downloads"
title="Chrome" />
<!--rule
blocked="true"
package="com.android.chrome"
title="Chrome Browser"
unused="true" /-->
<!--rule
blocked="false"
package="com.fsck.k9"
title="K-9 Mail" /-->
</predefined>

View File

@ -10,8 +10,12 @@
android:title="@string/setting_whitelist_other" />
<SwitchPreference
android:defaultValue="false"
android:key="unused"
android:title="@string/setting_unused" />
android:key="screen_wifi"
android:title="@string/setting_screen_wifi" />
<SwitchPreference
android:defaultValue="false"
android:key="screen_other"
android:title="@string/setting_screen_other" />
<SwitchPreference
android:defaultValue="true"
android:key="whitelist_roaming"

View File

@ -1,8 +1,16 @@
#!/bin/bash
grep -RIl "\<string name=\"msg_bug" app/src/main/res | xargs sed -i -e '/msg_bug/d'
grep -RIl "\<string name=\"msg_dimming" app/src/main/res | xargs sed -i -e '/msg_dimming/a\
\ \ \ \ <string name="msg_bug">Something has gone wrong, please describe in the next dialog what you were doing to help improve NetGuard</string>'
#grep -RIl "\<string name=\"title_using" app/src/main/res | xargs sed -i -e '/title_using/a\
#\ \ \ \ <string name="title_screen_other">Allow mobile when screen is on</string>'
#grep -RIl "\<string name=\"title_using" app/src/main/res | xargs sed -i -e '/title_using/a\
#\ \ \ \ <string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>'
#grep -RIl "\<string name=\"title_using" app/src/main/res | xargs sed -i -e '/title_using/d'
grep -RIl "\<string name=\"setting_unused" app/src/main/res | xargs sed -i -e '/setting_unused/a\
\ \ \ \ <string name="setting_screen_other">Default allow mobile when screen is on</string>'
grep -RIl "\<string name=\"setting_unused" app/src/main/res | xargs sed -i -e '/setting_unused/a\
\ \ \ \ <string name="setting_screen_wifi">Default allow Wi-Fi when screen is on</string>'
grep -RIl "\<string name=\"setting_unused" app/src/main/res | xargs sed -i -e '/setting_unused/d'
#grep -RIl "\<string name=\"title_disabled" app/src/main/res | xargs sed -i -e 's/Is disabled/is disabled/g'
#grep -RIl "\<string name=\"title_internet" app/src/main/res | xargs sed -i -e 's/Has no internet access/has no internet permission/g'