add @Nullable annotation to outoging mms api

Closes #2830

// FREEBIE
This commit is contained in:
Jake McGinty 2015-03-30 12:34:57 -07:00 committed by Moxie Marlinspike
parent 38fa4e91fa
commit 141ee6565d
3 changed files with 6 additions and 3 deletions

View File

@ -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);

View File

@ -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());

View File

@ -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;
}