diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-05-21 16:43:19 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-05-21 16:43:19 +0200 |
commit | 0de9d57420e74282b09b7963017137fd32c98876 (patch) | |
tree | b39c000876dda9329da6e70748673f6948983f27 /src/eu/siacs/conversations/ui/XmppActivity.java | |
parent | 9d2ce5ff980d8469ee48efc25d645f2c9ca399c0 (diff) |
cleaned up shared text
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/XmppActivity.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 02900ac8..7c8c46b2 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -145,7 +145,7 @@ public abstract class XmppActivity extends Activity { ExceptionHelper.init(getApplicationContext()); } - public void switchToConversation(Conversation conversation, String text) { + public void switchToConversation(Conversation conversation, String text, boolean newTask) { Intent viewConversationIntent = new Intent(this, ConversationActivity.class); viewConversationIntent.setAction(Intent.ACTION_VIEW); @@ -155,8 +155,12 @@ public abstract class XmppActivity extends Activity { viewConversationIntent.putExtra(ConversationActivity.TEXT, text); } viewConversationIntent.setType(ConversationActivity.VIEW_CONVERSATION); - viewConversationIntent.setFlags(viewConversationIntent.getFlags() + if (newTask) { + viewConversationIntent.setFlags(viewConversationIntent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_TASK_ON_HOME ); + } else { + viewConversationIntent.setFlags(viewConversationIntent.getFlags() | Intent.FLAG_ACTIVITY_CLEAR_TOP); + } startActivity(viewConversationIntent); } |