mirror of https://github.com/M66B/NetGuard.git
Notification channel names
This commit is contained in:
parent
9aef8e8ef0
commit
99f4a0dd78
|
@ -39,13 +39,17 @@ public class ApplicationEx extends Application {
|
|||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
NotificationChannel foreground = new NotificationChannel("foreground", getString(R.string.app_name), NotificationManager.IMPORTANCE_MIN);
|
||||
NotificationChannel foreground = new NotificationChannel("foreground", getString(R.string.channel_foreground), NotificationManager.IMPORTANCE_MIN);
|
||||
foreground.setSound(null, new AudioAttributes.Builder().build());
|
||||
nm.createNotificationChannel(foreground);
|
||||
|
||||
NotificationChannel notify = new NotificationChannel("notify", getString(R.string.app_name), NotificationManager.IMPORTANCE_DEFAULT);
|
||||
NotificationChannel notify = new NotificationChannel("notify", getString(R.string.channel_notify), NotificationManager.IMPORTANCE_DEFAULT);
|
||||
notify.setSound(null, new AudioAttributes.Builder().build());
|
||||
nm.createNotificationChannel(notify);
|
||||
|
||||
NotificationChannel access = new NotificationChannel("access", getString(R.string.channel_access), NotificationManager.IMPORTANCE_DEFAULT);
|
||||
access.setSound(null, new AudioAttributes.Builder().build());
|
||||
nm.createNotificationChannel(access);
|
||||
}
|
||||
|
||||
mPrevHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
|
|
|
@ -2595,7 +2595,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
getTheme().resolveAttribute(R.attr.colorOff, tv, true);
|
||||
int colorOff = tv.data;
|
||||
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "notify");
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "access");
|
||||
builder.setSmallIcon(R.drawable.ic_cloud_upload_white_24dp)
|
||||
.setGroup("AccessAttempt")
|
||||
.setContentIntent(pi)
|
||||
|
|
|
@ -11,6 +11,10 @@ however it is impossible to guarantee NetGuard will work correctly on every devi
|
|||
<string name="app_agree">I agree</string>
|
||||
<string name="app_disagree">I disagree</string>
|
||||
|
||||
<string name="channel_foreground">Running services</string>
|
||||
<string name="channel_notify">General notifications</string>
|
||||
<string name="channel_access">Access notifications</string>
|
||||
|
||||
<string name="menu_search">Search for application</string>
|
||||
<string name="menu_filter">Filter applications</string>
|
||||
<string name="menu_app_user">Show user applications</string>
|
||||
|
|
Loading…
Reference in New Issue