diff options
author | M. Dietrich <mdt@emdete.de> | 2014-11-04 20:02:33 +0100 |
---|---|---|
committer | M. Dietrich <mdt@emdete.de> | 2014-11-04 20:05:45 +0100 |
commit | e22d3b49467d93ccf1fa3ebcf3471cbbe54cf2e9 (patch) | |
tree | 97624893b86085814d91a1cf659f6599922d1801 /src/main/java/eu/siacs/conversations/ui | |
parent | ff10b094a0a210bb1c7745bd0e0f92e9a7e3ec2d (diff) |
adjust api level wrapping
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index 5b0be9c7..ed6b2a85 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -573,7 +573,11 @@ public class StartConversationActivity extends XmppActivity { setIntent(null); } - @TargetApi(16) + @TargetApi(Build.VERSION_CODES.JELLY_BEAN) + Invite getInviteJellyBean(NdefRecord record) { + return new Invite(record.toUri()); + } + protected boolean handleIntent(Intent intent) { if (intent == null || intent.getAction() == null) { return false; @@ -589,10 +593,10 @@ public class StartConversationActivity extends XmppActivity { Log.d(Config.LOGTAG, "received message=" + message); for (NdefRecord record : ((NdefMessage)message).getRecords()) { switch (record.getTnf()) { - case NdefRecord.TNF_WELL_KNOWN: + case NdefRecord.TNF_WELL_KNOWN: if (Arrays.equals(record.getType(), NdefRecord.RTD_URI)) { if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - return new Invite(record.toUri()).invite(); + return getInviteJellyBean(record).invite(); } else { byte[] payload = record.getPayload(); if (payload[0] == 0) { |