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.NetworkInfo;
import android.net.Uri; import android.net.Uri;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log; import android.util.Log;
import org.apache.http.Header; import org.apache.http.Header;
@ -71,7 +72,7 @@ public class OutgoingLegacyMmsConnection extends LegacyMmsConnection implements
} }
@Override @Override
public SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException { public @Nullable SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException {
try { try {
MmsRadio radio = MmsRadio.getInstance(context); 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;
import android.os.Build.VERSION_CODES; import android.os.Build.VERSION_CODES;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.telephony.SmsManager; import android.telephony.SmsManager;
import android.util.Log; import android.util.Log;
@ -58,7 +59,7 @@ public class OutgoingLollipopMmsConnection extends LollipopMmsConnection impleme
@Override @Override
@TargetApi(VERSION_CODES.LOLLIPOP) @TargetApi(VERSION_CODES.LOLLIPOP)
public synchronized SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException { public @Nullable synchronized SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException {
beginTransaction(); beginTransaction();
try { try {
MmsBodyProvider.Pointer pointer = MmsBodyProvider.makeTemporaryPointer(getContext()); MmsBodyProvider.Pointer pointer = MmsBodyProvider.makeTemporaryPointer(getContext());

View file

@ -1,11 +1,12 @@
package org.thoughtcrime.securesms.mms; package org.thoughtcrime.securesms.mms;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import org.thoughtcrime.securesms.transport.UndeliverableMessageException; import org.thoughtcrime.securesms.transport.UndeliverableMessageException;
import ws.com.google.android.mms.pdu.SendConf; import ws.com.google.android.mms.pdu.SendConf;
public interface OutgoingMmsConnection { public interface OutgoingMmsConnection {
SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException; @Nullable SendConf send(@NonNull byte[] pduBytes) throws UndeliverableMessageException;
} }