mirror of
https://github.com/M66B/NetGuard.git
synced 2025-03-15 08:29:02 +00:00
parent
4756cd12fa
commit
a3b7622c52
21 changed files with 141 additions and 171 deletions
|
@ -48,5 +48,16 @@
|
|||
<data android:scheme="package" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".Widget">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
<action android:name="eu.faircode.netguard.APPWIDGET_ON" />
|
||||
<action android:name="eu.faircode.netguard.APPWIDGET_OFF" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/widget" />
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -19,7 +19,6 @@ package eu.faircode.netguard;
|
|||
Copyright 2015 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.BroadcastReceiver;
|
||||
|
@ -38,7 +37,6 @@ import android.net.VpnService;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
|
@ -57,7 +55,6 @@ import android.view.MenuInflater;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
@ -87,7 +84,6 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
private IInAppBillingService IABService = null;
|
||||
private AlertDialog dialogFirst = null;
|
||||
private AlertDialog dialogVpn = null;
|
||||
private AlertDialog dialogDelay = null;
|
||||
private AlertDialog dialogAbout = null;
|
||||
|
||||
private static final int REQUEST_VPN = 1;
|
||||
|
@ -130,10 +126,6 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
swEnabled.setChecked(enabled);
|
||||
swEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
final AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
|
||||
final PendingIntent pi = SinkholeService.getStartIntent(ActivityMain.this);
|
||||
am.cancel(pi);
|
||||
|
||||
if (isChecked) {
|
||||
Log.i(TAG, "Switch on");
|
||||
final Intent prepare = VpnService.prepare(ActivityMain.this);
|
||||
|
@ -176,43 +168,6 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
Log.i(TAG, "Switch off");
|
||||
prefs.edit().putBoolean("enabled", false).apply();
|
||||
SinkholeService.stop(ActivityMain.this);
|
||||
|
||||
// Delayed auto enable
|
||||
final int minutes = Integer.parseInt(prefs.getString("delay_time", "5"));
|
||||
if (minutes > 0) {
|
||||
LayoutInflater inflater = LayoutInflater.from(ActivityMain.this);
|
||||
View view = inflater.inflate(R.layout.delay, null);
|
||||
TextView tvDelay = (TextView) view.findViewById(R.id.tvDelay);
|
||||
final CheckBox cbDontAskAgain = (CheckBox) view.findViewById(R.id.cbDontAskAgain);
|
||||
|
||||
tvDelay.setText(getString(R.string.setting_delay, minutes));
|
||||
|
||||
dialogDelay = new AlertDialog.Builder(ActivityMain.this)
|
||||
.setView(view)
|
||||
.setCancelable(true)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
long time = SystemClock.elapsedRealtime() + minutes * 60 * 1000L;
|
||||
am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, time, pi);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (cbDontAskAgain.isChecked())
|
||||
prefs.edit().putString("delay_time", "0").apply();
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialogInterface) {
|
||||
dialogDelay = null;
|
||||
}
|
||||
})
|
||||
.create();
|
||||
dialogDelay.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -333,10 +288,6 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
dialogVpn.dismiss();
|
||||
dialogVpn = null;
|
||||
}
|
||||
if (dialogDelay != null) {
|
||||
dialogDelay.dismiss();
|
||||
dialogDelay = null;
|
||||
}
|
||||
if (dialogAbout != null) {
|
||||
dialogAbout.dismiss();
|
||||
dialogAbout = null;
|
||||
|
|
|
@ -24,7 +24,6 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.preference.EditTextPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.preference.PreferenceScreen;
|
||||
|
@ -52,8 +51,6 @@ import javax.xml.parsers.SAXParserFactory;
|
|||
public class ActivitySettings extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private static final String TAG = "NetGuard.Settings";
|
||||
|
||||
private PreferenceScreen settings;
|
||||
|
||||
private static final int REQUEST_EXPORT = 1;
|
||||
private static final int REQUEST_IMPORT = 2;
|
||||
private static final Intent INTENT_VPN_SETTINGS = new Intent("android.net.vpn.SETTINGS");
|
||||
|
@ -74,14 +71,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
}
|
||||
|
||||
public void setup(PreferenceScreen screen) {
|
||||
this.settings = screen;
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
int minutes = Integer.parseInt(prefs.getString("delay_time", "5"));
|
||||
EditTextPreference pref_delay = (EditTextPreference) screen.findPreference("delay_time");
|
||||
pref_delay.setTitle(getString(R.string.setting_delay, minutes));
|
||||
|
||||
Preference pref_export = screen.findPreference("export");
|
||||
pref_export.setEnabled(getIntentCreateDocument().resolveActivity(getPackageManager()) != null);
|
||||
pref_export.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
|
@ -125,13 +114,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
|
||||
else if ("dark_theme".equals(name))
|
||||
recreate();
|
||||
|
||||
else if ("delay_time".equals(name)) {
|
||||
if (settings != null) {
|
||||
EditTextPreference pref_delay = (EditTextPreference) settings.findPreference("delay_time");
|
||||
pref_delay.setTitle(getString(R.string.setting_delay, Integer.parseInt(prefs.getString(name, "0"))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,25 +54,15 @@ public class SinkholeService extends VpnService {
|
|||
private static final int NOTIFY_DISABLED = 1;
|
||||
|
||||
private static final String EXTRA_COMMAND = "Command";
|
||||
private static final String EXTRA_UPDATE = "Update";
|
||||
|
||||
private enum Command {start, reload, stop}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(SinkholeService.this);
|
||||
|
||||
// Get command
|
||||
final Command cmd = (intent == null ? Command.start : (Command) intent.getSerializableExtra(EXTRA_COMMAND));
|
||||
Log.i(TAG, "Start intent=" + intent + " command=" + cmd + " vpn=" + (vpn != null));
|
||||
|
||||
// Update enabled state
|
||||
if (intent != null && intent.getBooleanExtra(EXTRA_UPDATE, false))
|
||||
if (cmd == Command.start)
|
||||
prefs.edit().putBoolean("enabled", true).apply();
|
||||
else if (cmd == Command.stop)
|
||||
prefs.edit().putBoolean("enabled", false).apply();
|
||||
|
||||
// Process command
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
|
@ -86,6 +76,7 @@ public class SinkholeService extends VpnService {
|
|||
vpn = startVPN();
|
||||
startDebug(vpn);
|
||||
removeDisabledNotification();
|
||||
Widget.updateWidgets(SinkholeService.this);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -104,6 +95,7 @@ public class SinkholeService extends VpnService {
|
|||
stopDebug();
|
||||
stopVPN(vpn);
|
||||
vpn = null;
|
||||
Widget.updateWidgets(SinkholeService.this);
|
||||
}
|
||||
stopSelf();
|
||||
break;
|
||||
|
@ -377,13 +369,6 @@ public class SinkholeService extends VpnService {
|
|||
context.startService(intent);
|
||||
}
|
||||
|
||||
public static PendingIntent getStartIntent(Context context) {
|
||||
Intent intent = new Intent(context, SinkholeService.class);
|
||||
intent.putExtra(EXTRA_COMMAND, Command.start);
|
||||
intent.putExtra(EXTRA_UPDATE, true);
|
||||
return PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
public static void reload(String network, Context context) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (prefs.getBoolean("enabled", false))
|
||||
|
|
|
@ -24,6 +24,10 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
|
@ -97,6 +101,26 @@ public class Util {
|
|||
});
|
||||
}
|
||||
|
||||
public static Bitmap drawableToBitmap(Drawable drawable) {
|
||||
if (drawable instanceof BitmapDrawable) {
|
||||
BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
|
||||
if (bitmapDrawable.getBitmap() != null)
|
||||
return bitmapDrawable.getBitmap();
|
||||
}
|
||||
|
||||
Bitmap bitmap;
|
||||
if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0)
|
||||
bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
|
||||
else
|
||||
bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
|
||||
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
drawable.draw(canvas);
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
public static boolean hasValidFingerprint(String tag, Context context) {
|
||||
try {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
|
|
82
app/src/main/java/eu/faircode/netguard/Widget.java
Normal file
82
app/src/main/java/eu/faircode/netguard/Widget.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
package eu.faircode.netguard;
|
||||
|
||||
/*
|
||||
This file is part of NetGuard.
|
||||
|
||||
NetGuard is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
NetGuard is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with NetGuard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2015 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.appwidget.AppWidgetProvider;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
public class Widget extends AppWidgetProvider {
|
||||
private static final String TAG = "NetGuard.Widget";
|
||||
|
||||
private static final String INTENT_ON = "eu.faircode.netguard.APPWIDGET_ON";
|
||||
private static final String INTENT_OFF = "eu.faircode.netguard.APPWIDGET_OFF";
|
||||
|
||||
@Override
|
||||
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
|
||||
update(appWidgetIds, appWidgetManager, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
super.onReceive(context, intent);
|
||||
|
||||
Log.i(TAG, "Received " + intent);
|
||||
Util.logExtras(TAG, intent);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
if (INTENT_OFF.equals(intent.getAction())) {
|
||||
prefs.edit().putBoolean("enabled", false).apply();
|
||||
SinkholeService.stop(context);
|
||||
|
||||
} else if (INTENT_ON.equals(intent.getAction())) {
|
||||
prefs.edit().putBoolean("enabled", true).apply();
|
||||
SinkholeService.start(context);
|
||||
}
|
||||
}
|
||||
|
||||
private static void update(int[] appWidgetIds, AppWidgetManager appWidgetManager, Context context) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean enabled = prefs.getBoolean("enabled", false);
|
||||
Intent intent = new Intent(enabled ? INTENT_OFF : INTENT_ON);
|
||||
PendingIntent pi = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
|
||||
|
||||
for (int id : appWidgetIds) {
|
||||
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);
|
||||
views.setOnClickPendingIntent(R.id.ivEnabled, pi);
|
||||
views.setImageViewResource(R.id.ivEnabled, enabled ? R.mipmap.ic_launcher : R.drawable.ic_security_white_24dp);
|
||||
appWidgetManager.updateAppWidget(id, views);
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateWidgets(Context context) {
|
||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
||||
int appWidgetIds[] = AppWidgetManager.getInstance(context).getAppWidgetIds(new ComponentName(context, Widget.class));
|
||||
update(appWidgetIds, appWidgetManager, context);
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="40dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Large"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDelay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbDontAskAgain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/msg_again"
|
||||
android:textAppearance="@android:style/TextAppearance.Material.Medium" />
|
||||
</LinearLayout>
|
12
app/src/main/res/layout/widget.xml
Normal file
12
app/src/main/res/layout/widget.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivEnabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
|
@ -18,21 +18,18 @@ This is caused by bugs in Android, or in the software provided by the manufactur
|
|||
<string name="setting_system">Manage system applications</string>
|
||||
<string name="setting_dark">استخدام الثيم الداكن</string>
|
||||
<string name="setting_indicators">Show state indicators</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Export settings</string>
|
||||
<string name="setting_import">Import settings</string>
|
||||
<string name="setting_vpn">فتح إعدادات الـVPN</string>
|
||||
|
||||
<string name="summary_system">Define rules for system applications, for experts only</string>
|
||||
<string name="summary_indicators">Display the network type and if the network is metered in the action bar</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">هل أنت متأكد؟</string>
|
||||
<string name="msg_disabled">التطبيق غير مُفعّل, قم بتفعيل التطبيق من الخيار أعلاه.</string>
|
||||
<string name="msg_revoked">NetGuard has been disabled</string>
|
||||
<string name="msg_completed">Action completed</string>
|
||||
<string name="msg_vpn">NetGuard uses a local VPN as a sinkhole for blocked internet traffic, for this reason you should allow a VPN connection in the next dialog</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">السماح عند استخدام الجهاز</string>
|
||||
<string name="title_roaming">Block when roaming</string>
|
||||
|
|
|
@ -17,21 +17,18 @@ Das wird von Fehlern in Android oder in Software vom Hersteller verursacht. Bitt
|
|||
<string name="setting_system">System Apps anzeigen</string>
|
||||
<string name="setting_dark">Verwende dunkles Theme</string>
|
||||
<string name="setting_indicators">Zustandsanzeigen</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Exportiere Einstellungen</string>
|
||||
<string name="setting_import">Importiere Einstellungen</string>
|
||||
<string name="setting_vpn">Öffne Android VPN Einstellungen</string>
|
||||
|
||||
<string name="summary_system">Regeln für System Apps definieren, nur für Experten</string>
|
||||
<string name="summary_indicators">Netzwerk Typ und ob Netzwerk getaktet ist in Action Bar anzeigen</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">Bist du sicher?</string>
|
||||
<string name="msg_disabled">NetGuard ist deaktiviert, verwende den Schalter um NetGuard zu aktivieren</string>
|
||||
<string name="msg_revoked">NetGuard wurde deaktiviert</string>
|
||||
<string name="msg_completed">Aktion abgeschlossen</string>
|
||||
<string name="msg_vpn">Netguard verwendet ein lokales VPN als Senkgrube für blockierten Netzwerkverkehr, daher muss im nächsten Dialog die VPN Verbindung bestätigt werden.</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">Erlauben wenn Gerät verwendet wird</string>
|
||||
<string name="title_roaming">Blockiere bei Roaming</string>
|
||||
|
|
|
@ -18,21 +18,18 @@ Esto es causado por errores en Android, o por el software proporcionado por el f
|
|||
<string name="setting_system">Administrar aplicaciones de sistema</string>
|
||||
<string name="setting_dark">Usar tema oscuro</string>
|
||||
<string name="setting_indicators">Show state indicators</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Exportar configuración</string>
|
||||
<string name="setting_import">Importar configuración</string>
|
||||
<string name="setting_vpn">Abrir configuración VPN de Android</string>
|
||||
|
||||
<string name="summary_system">Define rules for system applications, for experts only</string>
|
||||
<string name="summary_indicators">Display the network type and if the network is metered in the action bar</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">¿Estás seguro?</string>
|
||||
<string name="msg_disabled">NetGuard está deshabilitado, utiliza el interruptor de arriba para habilitar a NetGuard</string>
|
||||
<string name="msg_revoked">NetGuard ha sido deshabilitado</string>
|
||||
<string name="msg_completed">Acción completada</string>
|
||||
<string name="msg_vpn">NetGuard utiliza un VPN local como un "sumidero" para conexiones de internet bloqueadas, por esta razón debes permitir la conexión VPN en el siguiente diálogo</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">Permitir cuando el dispositivo esté en uso</string>
|
||||
<string name="title_roaming">Bloquear cuando se esté en roaming</string>
|
||||
|
|
|
@ -18,21 +18,18 @@ Ceci est causé par des bugs dans Android, ou dans le logiciel fourni par le con
|
|||
<string name="setting_system">Gérer les applications système</string>
|
||||
<string name="setting_dark">Utiliser le thème sombre</string>
|
||||
<string name="setting_indicators">Show state indicators</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Exporter paramètres</string>
|
||||
<string name="setting_import">Importer paramètres</string>
|
||||
<string name="setting_vpn">Ouvrir les paramètres VPN</string>
|
||||
|
||||
<string name="summary_system">Define rules for system applications, for experts only</string>
|
||||
<string name="summary_indicators">Display the network type and if the network is metered in the action bar</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">Etes-vous sûr ?</string>
|
||||
<string name="msg_disabled">NetGuard est désactivé, utilisez le bouton ci-dessus pour activer NetGuard</string>
|
||||
<string name="msg_revoked">NetGuard a été désactivé</string>
|
||||
<string name="msg_completed">Action completed</string>
|
||||
<string name="msg_vpn">NetGuard uses a local VPN as a sinkhole for blocked internet traffic, for this reason you should allow a VPN connection in the next dialog</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">Permettre quand l\'appareil est utilisé</string>
|
||||
<string name="title_roaming">Bloquer si roaming</string>
|
||||
|
|
|
@ -19,21 +19,18 @@ Ció è causato da alcuni bug contenuti in Android, o in programmi forniti dal p
|
|||
<string name="setting_system">Gestisci applicazioni di sistema</string>
|
||||
<string name="setting_dark">Usa il tema scuro</string>
|
||||
<string name="setting_indicators">Mostra indicatori di stato</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Esporta impostazioni</string>
|
||||
<string name="setting_import">Importa impostazioni</string>
|
||||
<string name="setting_vpn">Apri impostazioni VPN</string>
|
||||
|
||||
<string name="summary_system">Definisci regole per le applicazioni di sistema, solo per esperti</string>
|
||||
<string name="summary_indicators">Mostra, nella action bar, il tipo di rete e se la rete è a consumo</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">Sei sicuro?</string>
|
||||
<string name="msg_disabled">NetGuard è disabilitata, usa lo switch per abilitarla nuovamente</string>
|
||||
<string name="msg_revoked">NetGuard è stata disabilitata</string>
|
||||
<string name="msg_completed">Azione completata</string>
|
||||
<string name="msg_vpn">NetGuard utilizza una VPN locale come pozzo per bloccare il traffico internet, per questo motivo è necessario abilitare la connessione VPN nella schermata successiva</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">Consenti quando il dispositivo è in uso</string>
|
||||
<string name="title_roaming">Blocca quando in roaming</string>
|
||||
|
|
|
@ -18,21 +18,18 @@ This is caused by bugs in Android, or in the software provided by the manufactur
|
|||
<string name="setting_system">Manage system applications</string>
|
||||
<string name="setting_dark">어두운 테마 사용</string>
|
||||
<string name="setting_indicators">Show state indicators</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Export settings</string>
|
||||
<string name="setting_import">Import settings</string>
|
||||
<string name="setting_vpn">Android VPN 설정 열기</string>
|
||||
|
||||
<string name="summary_system">Define rules for system applications, for experts only</string>
|
||||
<string name="summary_indicators">Display the network type and if the network is metered in the action bar</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">계속 하시겠습니까?</string>
|
||||
<string name="msg_disabled">넷가드가 해제되어 있습니다. 상단 스위치를 사용해 넷가드를 활성화하세요.</string>
|
||||
<string name="msg_revoked">넷가드가 해제되었습니다</string>
|
||||
<string name="msg_completed">Action completed</string>
|
||||
<string name="msg_vpn">NetGuard uses a local VPN as a sinkhole for blocked internet traffic, for this reason you should allow a VPN connection in the next dialog</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">기기가 사용중일때 허용</string>
|
||||
<string name="title_roaming">Block when roaming</string>
|
||||
|
|
|
@ -18,21 +18,18 @@ This is caused by bugs in Android, or in the software provided by the manufactur
|
|||
<string name="setting_system">Beheer systeemapplicaties</string>
|
||||
<string name="setting_dark">Gebruik donker thema</string>
|
||||
<string name="setting_indicators">Toon staat indicatoren</string>
|
||||
<string name="setting_delay">Zet na %d minuten weer aan</string>
|
||||
<string name="setting_export">Exporteer instellingen</string>
|
||||
<string name="setting_import">Importeer instellingen</string>
|
||||
<string name="setting_vpn">Open Android VPN-instellingen</string>
|
||||
|
||||
<string name="summary_system">Define rules for system applications, for experts only</string>
|
||||
<string name="summary_indicators">Display the network type and if the network is metered in the action bar</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">Weet u het zeker?</string>
|
||||
<string name="msg_disabled">NetGuard staat uit, gebruik de schakelaar boven om NetGuard aan te zetten</string>
|
||||
<string name="msg_revoked">NetGuard is uitgezet</string>
|
||||
<string name="msg_completed">Actie uitgevoerd</string>
|
||||
<string name="msg_vpn">NetGuard gebruikt een lokaal VPN als een sinkhole voor geblokkeerd internetverkeer, om deze reden moet u een VPN-verbinding in de volgende dialoog toestaan.</string>
|
||||
<string name="msg_again">Niet meer vragen</string>
|
||||
|
||||
<string name="title_using">Sta toe als apparaat in gebruik</string>
|
||||
<string name="title_roaming">Blokkeer bij roamen</string>
|
||||
|
|
|
@ -18,21 +18,18 @@ Acest lucru este cauzat de bug-uri in Android sau in software-ul pus la dispozit
|
|||
<string name="setting_system">Gestionati aplicatiile de sistem</string>
|
||||
<string name="setting_dark">Foloseste tema intunecata</string>
|
||||
<string name="setting_indicators">Arata indicatorii de stare</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Exporta setari</string>
|
||||
<string name="setting_import">Importa setari</string>
|
||||
<string name="setting_vpn">Deschide setari VPN Android</string>
|
||||
|
||||
<string name="summary_system">Defineste reguli pentru aplicatiile de sistem, setare expert</string>
|
||||
<string name="summary_indicators">Arata tipul retelei conectate precum si daca aceasta este una contorizata</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">Esti sigur?</string>
|
||||
<string name="msg_disabled">NetGuard este momentan dezactivat, foloseste comutatorul de mai sus pentru a il activa</string>
|
||||
<string name="msg_revoked">NetGuard a fost dezactivat</string>
|
||||
<string name="msg_completed">Setari aplicate</string>
|
||||
<string name="msg_vpn">NetGuard foloseste o conexiune locala VPN ca o \"gaura neagra\" pentru traficul de internet blocat, din acest motiv la urmatoarea fereastra de dialog trebuie sa acceptati crearea conexiunii VPN.</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">Permite cand dispozitivul este folosit</string>
|
||||
<string name="title_roaming">Blocheaza in roaming</string>
|
||||
|
|
|
@ -18,21 +18,18 @@ Je to spôsobené chybami v Androide alebo v softvéri poskytovanom výrobcom, p
|
|||
<string name="setting_system">Spravovať systémové aplikácie</string>
|
||||
<string name="setting_dark">Použiť tmavú tému</string>
|
||||
<string name="setting_indicators">Show state indicators</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Exportovať nastavenia</string>
|
||||
<string name="setting_import">Importovať nastavenia</string>
|
||||
<string name="setting_vpn">Otvoriť nastavenia VPN</string>
|
||||
|
||||
<string name="summary_system">Define rules for system applications, for experts only</string>
|
||||
<string name="summary_indicators">Display the network type and if the network is metered in the action bar</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">Ste si istý?</string>
|
||||
<string name="msg_disabled">NetGuard je vypnutý, použite prepínač vyššie na zapnutie NetGuard</string>
|
||||
<string name="msg_revoked">NetGuard je vypnutý</string>
|
||||
<string name="msg_completed">Akcia bola dokončená</string>
|
||||
<string name="msg_vpn">NetGuard používa lokálnu VPN sieť na zablokovanie sieťovej prevádzky, a preto by ste mali povoliť VPN pripojenie v ďalšom okne</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">Povoliť pri používaní zariadenia</string>
|
||||
<string name="title_roaming">Blokovať pri roamingu</string>
|
||||
|
|
|
@ -18,21 +18,18 @@
|
|||
<string name="setting_system">管理系统应用</string>
|
||||
<string name="setting_dark">使用暗色主题</string>
|
||||
<string name="setting_indicators">显示状态指示器</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">导出设置</string>
|
||||
<string name="setting_import">导入设置</string>
|
||||
<string name="setting_vpn">打开安卓VPN设置</string>
|
||||
|
||||
<string name="summary_system">定义系统应用规则, 仅供专业用户</string>
|
||||
<string name="summary_indicators">在状态栏显示网络类型及网络是否按流量计费</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">是否确认?</string>
|
||||
<string name="msg_disabled">NetGuard已被停用, 请使用上方的开关启用NetGuard</string>
|
||||
<string name="msg_revoked">NetGuard已被停用</string>
|
||||
<string name="msg_completed">操作完成</string>
|
||||
<string name="msg_vpn">NetGuard使用一个本地VPN服务来重定向被阻挡的网络流量, 因此请在下一个对话框中允许建立VPN连接</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">设备使用时允许</string>
|
||||
<string name="title_roaming">漫游时阻止</string>
|
||||
|
|
|
@ -19,21 +19,18 @@ This is caused by bugs in Android, or in the software provided by the manufactur
|
|||
<string name="setting_system">Manage system applications</string>
|
||||
<string name="setting_dark">Use dark theme</string>
|
||||
<string name="setting_indicators">Show state indicators</string>
|
||||
<string name="setting_delay">Enable again after %d minutes</string>
|
||||
<string name="setting_export">Export settings</string>
|
||||
<string name="setting_import">Import settings</string>
|
||||
<string name="setting_vpn">Open Android VPN settings</string>
|
||||
|
||||
<string name="summary_system">Define rules for system applications, for experts only</string>
|
||||
<string name="summary_indicators">Display the network type and if the network is metered in the action bar</string>
|
||||
<string name="summary_delay">After disabling, enable again after the set number of minutes; zero means don\'t ask to enable again</string>
|
||||
|
||||
<string name="msg_sure">Are you sure?</string>
|
||||
<string name="msg_disabled">NetGuard is disabled, use the switch above to enable NetGuard</string>
|
||||
<string name="msg_revoked">NetGuard has been disabled</string>
|
||||
<string name="msg_completed">Action completed</string>
|
||||
<string name="msg_vpn">NetGuard uses a local VPN as a sinkhole for blocked internet traffic, for this reason you should allow a VPN connection in the next dialog</string>
|
||||
<string name="msg_again">Don\'t ask again</string>
|
||||
|
||||
<string name="title_using">Allow when device is in use</string>
|
||||
<string name="title_roaming">Block when roaming</string>
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
android:key="indicators"
|
||||
android:summary="@string/summary_indicators"
|
||||
android:title="@string/setting_indicators" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="5"
|
||||
android:inputType="number"
|
||||
android:key="delay_time"
|
||||
android:summary="@string/summary_delay" />
|
||||
<Preference
|
||||
android:key="export"
|
||||
android:title="@string/setting_export" />
|
||||
|
|
10
app/src/main/res/xml/widget.xml
Normal file
10
app/src/main/res/xml/widget.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:initialKeyguardLayout="@layout/widget"
|
||||
android:initialLayout="@layout/widget"
|
||||
android:minHeight="40dp"
|
||||
android:minWidth="40dp"
|
||||
android:previewImage="@mipmap/ic_launcher"
|
||||
android:resizeMode="none"
|
||||
android:updatePeriodMillis="0"
|
||||
android:widgetCategory="home_screen" />
|
Loading…
Add table
Reference in a new issue