From 141ee6565dfffd4b6cf42a17c9547769e72968fd Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Mon, 30 Mar 2015 12:34:57 -0700 Subject: [PATCH] add @Nullable annotation to outoging mms api Closes #2830 // FREEBIE --- .../securesms/mms/OutgoingLegacyMmsConnection.java | 3 ++- .../securesms/mms/OutgoingLollipopMmsConnection.java | 3 ++- src/org/thoughtcrime/securesms/mms/OutgoingMmsConnection.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java b/src/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java index 0d3056df40..3272b75d94 100644 --- a/src/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java +++ b/src/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java @@ -21,6 +21,7 @@ import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.util.Log; import org.apache.http.Header; @@ -71,7 +72,7 @@ public class OutgoingLegacyMmsConnection extends LegacyMmsConnection implements } @Override - public SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException { + public @Nullable SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException { try { MmsRadio radio = MmsRadio.getInstance(context); diff --git a/src/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java b/src/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java index b4178da103..20323247e0 100644 --- a/src/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java +++ b/src/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java @@ -22,6 +22,7 @@ import android.content.Intent; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.telephony.SmsManager; import android.util.Log; @@ -58,7 +59,7 @@ public class OutgoingLollipopMmsConnection extends LollipopMmsConnection impleme @Override @TargetApi(VERSION_CODES.LOLLIPOP) - public synchronized SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException { + public @Nullable synchronized SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException { beginTransaction(); try { MmsBodyProvider.Pointer pointer = MmsBodyProvider.makeTemporaryPointer(getContext()); diff --git a/src/org/thoughtcrime/securesms/mms/OutgoingMmsConnection.java b/src/org/thoughtcrime/securesms/mms/OutgoingMmsConnection.java index 6e0ff1f474..5fc669456e 100644 --- a/src/org/thoughtcrime/securesms/mms/OutgoingMmsConnection.java +++ b/src/org/thoughtcrime/securesms/mms/OutgoingMmsConnection.java @@ -1,11 +1,12 @@ package org.thoughtcrime.securesms.mms; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import org.thoughtcrime.securesms.transport.UndeliverableMessageException; import ws.com.google.android.mms.pdu.SendConf; public interface OutgoingMmsConnection { - SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException; + @Nullable SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException; }