From 424de3ea3a0100ae722ca2b2498c171078320cdb Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Fri, 21 Nov 2014 18:57:27 +0100 Subject: [PATCH] move task to back and not finish when hitting back button --- .../siacs/conversations/ui/ConversationActivity.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 0be3a957a..423b06404 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -639,14 +639,12 @@ public class ConversationActivity extends XmppActivity implements } @Override - public boolean onKeyDown(final int keyCode, final KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_BACK) { - if (!isConversationsOverviewVisable()) { - showConversationsOverview(); - return false; - } + public void onBackPressed() { + if (!isConversationsOverviewVisable()) { + showConversationsOverview(); + } else { + moveTaskToBack(true); } - return super.onKeyDown(keyCode, event); } @Override