create Config varibale to show the disable foreground service button
This commit is contained in:
parent
594e65bb2b
commit
c53c6cb6b6
|
@ -48,6 +48,7 @@ public final class Config {
|
|||
public static final boolean FORCE_ORBOT = false; // always use TOR
|
||||
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 ALWAYS_NOTIFY_BY_DEFAULT = false;
|
||||
|
||||
|
|
|
@ -544,9 +544,11 @@ public class NotificationService {
|
|||
cancelIcon = R.drawable.ic_action_cancel;
|
||||
}
|
||||
mBuilder.setSmallIcon(R.drawable.ic_link_white_24dp);
|
||||
mBuilder.addAction(cancelIcon,
|
||||
mXmppConnectionService.getString(R.string.disable_foreground_service),
|
||||
createDisableForeground());
|
||||
if (Config.SHOW_DISABLE_FOREGROUND) {
|
||||
mBuilder.addAction(cancelIcon,
|
||||
mXmppConnectionService.getString(R.string.disable_foreground_service),
|
||||
createDisableForeground());
|
||||
}
|
||||
return mBuilder.build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue