diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-11-04 17:10:35 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-11-04 17:10:35 +0100 |
commit | b824e55277cf4a4a9042dc0fe30d0cc8939445dc (patch) | |
tree | 1b4bf896006988ac2eff135b30fdbb4384344501 /src/main/java/eu/siacs | |
parent | 11ecf43da7b3b850866402eea17627b3988309aa (diff) |
register nfc callback in every activity that provides a proper sharable uri
Diffstat (limited to 'src/main/java/eu/siacs')
5 files changed, 18 insertions, 16 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 5606208c..cc9fca26 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -144,7 +144,7 @@ public class ConferenceDetailsActivity extends XmppActivity { if (conversation!=null) { return "xmpp:"+conversation.getContactJid().split("/")[0]+"?join"; } else { - return super.getShareableUri(); + return ""; } } diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index ea790667..7ac30e39 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -166,7 +166,7 @@ public class ContactDetailsActivity extends XmppActivity { if (contact!=null) { return "xmpp:"+contact.getJid(); } else { - return super.getShareableUri(); + return ""; } } diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 85b05e5b..6c3dff87 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -116,7 +116,7 @@ public class ConversationActivity extends XmppActivity implements if (conversation!=null) { return "xmpp:"+conversation.getAccount().getJid(); } else { - return super.getShareableUri(); + return ""; } } @@ -660,18 +660,6 @@ public class ConversationActivity extends XmppActivity implements } @Override - public void onResume() { - super.onResume(); - this.registerNdefPushMessageCallback(); - } - - @Override - public void onPause() { - super.onPause(); - this.unregisterNdefPushMessageCallback(); - } - - @Override protected void onStop() { if (xmppConnectionServiceBound) { xmppConnectionService.removeOnConversationListChangedListener(); diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index aadf05b2..c5529613 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -287,7 +287,7 @@ public class EditAccountActivity extends XmppActivity { if (mAccount!=null) { return "xmpp:"+mAccount.getJid(); } else { - return super.getShareableUri(); + return ""; } } diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 4c17dd56..052385f6 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -588,6 +588,20 @@ public abstract class XmppActivity extends Activity { return null; } + @Override + public void onResume() { + super.onResume(); + if (this.getShareableUri()!=null) { + this.registerNdefPushMessageCallback(); + } + } + + @Override + public void onPause() { + super.onPause(); + this.unregisterNdefPushMessageCallback(); + } + protected void showQrCode() { String uri = getShareableUri(); if (uri!=null) { |