aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-01-22 20:46:24 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-01-22 20:46:24 +0100
commitba98fe4f864a7e9df9b001a84c5c4126c9d107be (patch)
treeb6c72977ed30f08c7b6cb688d391077216a7814b /src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
parenta6c5430cdd400389a311ea9c2ab8a6fabc2f72c5 (diff)
use extract account from intent method and final EXTRA_ACCOUNT variable
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
index 33ba1d15a..c5357a5ef 100644
--- a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
@@ -113,11 +113,11 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity {
final Intent data = new Intent();
final ListItem mListItem = getListItems().get(position);
data.putExtra("contact", mListItem.getJid().toString());
- String account = request.getStringExtra("account");
+ String account = request.getStringExtra(EXTRA_ACCOUNT);
if (account == null && mListItem instanceof Contact) {
account = ((Contact) mListItem).getAccount().getJid().toBareJid().toString();
}
- data.putExtra("account", account);
+ data.putExtra(EXTRA_ACCOUNT, account);
data.putExtra("conversation",
request.getStringExtra("conversation"));
data.putExtra("multiple", false);
@@ -181,7 +181,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity {
EnterJidDialog dialog = new EnterJidDialog(
this, mKnownHosts, mActivatedAccounts,
getString(R.string.enter_contact), getString(R.string.select),
- null, getIntent().getStringExtra("account"), true
+ null, getIntent().getStringExtra(EXTRA_ACCOUNT), true
);
dialog.setOnEnterJidDialogPositiveListener(new EnterJidDialog.OnEnterJidDialogPositiveListener() {
@@ -190,7 +190,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity {
final Intent request = getIntent();
final Intent data = new Intent();
data.putExtra("contact", contactJid.toString());
- data.putExtra("account", accountJid.toString());
+ data.putExtra(EXTRA_ACCOUNT, accountJid.toString());
data.putExtra("conversation",
request.getStringExtra("conversation"));
data.putExtra("multiple", false);