diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-07-12 20:14:50 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-07-12 20:14:50 +0200 |
commit | 8768ec55bd24753f19f242139a99e6b29482e241 (patch) | |
tree | 193308bc45a0df06d9d3e8842febb3fb9e0832e8 /src/main/java/eu/siacs | |
parent | c61887c68d97c0e9d12c50555dc13e16bdfaf029 (diff) |
change foreground icon when not connected
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/NotificationService.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index f95408ca2..cef240f5f 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -556,13 +556,15 @@ public class NotificationService { mBuilder.setWhen(0); mBuilder.setPriority(Config.SHOW_CONNECTED_ACCOUNTS ? NotificationCompat.PRIORITY_DEFAULT : NotificationCompat.PRIORITY_MIN); final int cancelIcon; + cancelIcon = R.drawable.ic_cancel_white_24dp; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { mBuilder.setCategory(Notification.CATEGORY_SERVICE); - cancelIcon = R.drawable.ic_cancel_white_24dp; + } + if (mAccount.getStatus() == Account.State.ONLINE) { + mBuilder.setSmallIcon(R.drawable.ic_link_white_24dp); } else { - cancelIcon = R.drawable.ic_action_cancel; + mBuilder.setSmallIcon(R.drawable.ic_unlink_white_24dp); } - mBuilder.setSmallIcon(R.drawable.ic_link_white_24dp); if (Config.SHOW_DISABLE_FOREGROUND && !Config.USE_ALWAYS_FOREGROUND) { mBuilder.addAction(cancelIcon, mXmppConnectionService.getString(R.string.disable_foreground_service), |