adjust api level wrapping
This commit is contained in:
parent
ff10b094a0
commit
e22d3b4946
|
@ -573,7 +573,11 @@ public class StartConversationActivity extends XmppActivity {
|
||||||
setIntent(null);
|
setIntent(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(16)
|
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
|
||||||
|
Invite getInviteJellyBean(NdefRecord record) {
|
||||||
|
return new Invite(record.toUri());
|
||||||
|
}
|
||||||
|
|
||||||
protected boolean handleIntent(Intent intent) {
|
protected boolean handleIntent(Intent intent) {
|
||||||
if (intent == null || intent.getAction() == null) {
|
if (intent == null || intent.getAction() == null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -592,7 +596,7 @@ public class StartConversationActivity extends XmppActivity {
|
||||||
case NdefRecord.TNF_WELL_KNOWN:
|
case NdefRecord.TNF_WELL_KNOWN:
|
||||||
if (Arrays.equals(record.getType(), NdefRecord.RTD_URI)) {
|
if (Arrays.equals(record.getType(), NdefRecord.RTD_URI)) {
|
||||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
return new Invite(record.toUri()).invite();
|
return getInviteJellyBean(record).invite();
|
||||||
} else {
|
} else {
|
||||||
byte[] payload = record.getPayload();
|
byte[] payload = record.getPayload();
|
||||||
if (payload[0] == 0) {
|
if (payload[0] == 0) {
|
||||||
|
|
Loading…
Reference in a new issue