Commit b80116c5 authored by Roumen Petrov's avatar Roumen Petrov

refactor name of TermService notification channel

Also use more suitable names.
parent 9a3c46d1
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
*/ */
public static final String APP_TAG = "TermOnePlus"; public static final String APP_TAG = "TermOnePlus";
public static final String NOTIFICATION_CHANNEL_SESSIONS = BuildConfig.APPLICATION_ID + ".sessions";
public static final String ACTION_OPEN_NEW_WINDOW = "com.termoneplus.OPEN_NEW_WINDOW"; public static final String ACTION_OPEN_NEW_WINDOW = "com.termoneplus.OPEN_NEW_WINDOW";
public static final String ACTION_SWITCH_WINDOW = "com.termoneplus.SWITCH_WINDOW"; public static final String ACTION_SWITCH_WINDOW = "com.termoneplus.SWITCH_WINDOW";
public static final String ACTION_RUN_SHORTCUT = "com.termoneplus.RUN_SHORTCUT"; public static final String ACTION_RUN_SHORTCUT = "com.termoneplus.RUN_SHORTCUT";
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
public class TermService extends Service { public class TermService extends Service {
private static final int RUNNING_NOTIFICATION = 1; private static final int RUNNING_NOTIFICATION = 1;
private static final String NOTIFICATION_CHANNEL_APPLICATION = "com.termoneplus.application";
private final IBinder mTSBinder = new TSBinder(); private final IBinder mTSBinder = new TSBinder();
private SessionList mTermSessions = new SessionList(); private SessionList mTermSessions = new SessionList();
...@@ -145,7 +144,7 @@ private Notification buildNotification() { ...@@ -145,7 +144,7 @@ private Notification buildNotification() {
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notifyIntent, 0); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notifyIntent, 0);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, NotificationCompat.Builder builder = new NotificationCompat.Builder(this,
NOTIFICATION_CHANNEL_APPLICATION) Application.NOTIFICATION_CHANNEL_SESSIONS)
.setSmallIcon(R.drawable.ic_stat_service_notification_icon) .setSmallIcon(R.drawable.ic_stat_service_notification_icon)
.setContentTitle(getText(R.string.application_terminal)) .setContentTitle(getText(R.string.application_terminal))
.setContentText(getText(R.string.service_notify_text)) .setContentText(getText(R.string.service_notify_text))
...@@ -170,7 +169,7 @@ private static void create(TermService service) { ...@@ -170,7 +169,7 @@ private static void create(TermService service) {
private static class Compat26 { private static class Compat26 {
private static void create(TermService service) { private static void create(TermService service) {
NotificationChannel channel = new NotificationChannel( NotificationChannel channel = new NotificationChannel(
NOTIFICATION_CHANNEL_APPLICATION, Application.NOTIFICATION_CHANNEL_SESSIONS,
"TermOnePlus", "TermOnePlus",
NotificationManager.IMPORTANCE_LOW); NotificationManager.IMPORTANCE_LOW);
channel.setDescription("TermOnePlus running notification"); channel.setDescription("TermOnePlus running notification");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment