From 073813d192067a2b91c50d2108a0cb98fc865ab4 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Mon, 18 Apr 2016 09:38:55 +0200 Subject: Related to FS#199: Removed unnecessary build configuration variable to hide disable button on foreground service notification --- src/main/java/de/thedevstack/conversationsplus/Config.java | 1 - .../conversationsplus/services/NotificationService.java | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/main') diff --git a/src/main/java/de/thedevstack/conversationsplus/Config.java b/src/main/java/de/thedevstack/conversationsplus/Config.java index b77489e9..45347648 100644 --- a/src/main/java/de/thedevstack/conversationsplus/Config.java +++ b/src/main/java/de/thedevstack/conversationsplus/Config.java @@ -47,7 +47,6 @@ public final class Config { public static final boolean ALLOW_NON_TLS_CONNECTIONS = false; //very dangerous. you should have a good reason to set this to true public static final boolean HIDE_MESSAGE_TEXT_IN_NOTIFICATION = false; public static final boolean SHOW_CONNECTED_ACCOUNTS = false; //show number of connected accounts in foreground notification - public static final boolean SHOW_DISABLE_FOREGROUND = true; //if set to true the foreground notification has a button to disable it public static final boolean LEGACY_NAMESPACE_HTTP_UPLOAD = false; diff --git a/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java b/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java index b06dd95c..a3142df4 100644 --- a/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java +++ b/src/main/java/de/thedevstack/conversationsplus/services/NotificationService.java @@ -522,11 +522,9 @@ public class NotificationService { cancelIcon = R.drawable.ic_action_cancel; } mBuilder.setSmallIcon(R.drawable.ic_link_white_24dp); - if (Config.SHOW_DISABLE_FOREGROUND) { - mBuilder.addAction(cancelIcon, - mXmppConnectionService.getString(R.string.disable_foreground_service), - createDisableForeground()); - } + mBuilder.addAction(cancelIcon, + mXmppConnectionService.getString(R.string.disable_foreground_service), + createDisableForeground()); return mBuilder.build(); } -- cgit v1.2.3