Merge "Add nullable and nonnull annotations"

This commit is contained in:
Jordan Liu
2019-11-01 18:11:55 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 6 deletions

View File

@@ -7484,10 +7484,10 @@ package android.telephony {
public abstract class CellBroadcastService extends android.app.Service {
ctor public CellBroadcastService();
method @CallSuper public android.os.IBinder onBind(android.content.Intent);
method public abstract void onCdmaCellBroadcastSms(int, byte[], int);
method @CallSuper public android.os.IBinder onBind(@Nullable android.content.Intent);
method public abstract void onCdmaCellBroadcastSms(int, @NonNull byte[], int);
method public abstract void onCdmaScpMessage(int, @NonNull java.util.List<android.telephony.cdma.CdmaSmsCbProgramData>, @NonNull String, @NonNull java.util.function.Consumer<android.os.Bundle>);
method public abstract void onGsmCellBroadcastSms(int, byte[]);
method public abstract void onGsmCellBroadcastSms(int, @NonNull byte[]);
field public static final String CELL_BROADCAST_SERVICE_INTERFACE = "android.telephony.CellBroadcastService";
}

View File

@@ -18,6 +18,7 @@ package android.telephony;
import android.annotation.CallSuper;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -73,7 +74,7 @@ public abstract class CellBroadcastService extends Service {
* @param slotIndex the index of the slot which received the message
* @param message the SMS PDU
*/
public abstract void onGsmCellBroadcastSms(int slotIndex, byte[] message);
public abstract void onGsmCellBroadcastSms(int slotIndex, @NonNull byte[] message);
/**
* Handle a CDMA cell broadcast SMS message forwarded from the system.
@@ -82,7 +83,7 @@ public abstract class CellBroadcastService extends Service {
* @param bearerData the CDMA SMS bearer data
* @param serviceCategory the CDMA SCPT service category
*/
public abstract void onCdmaCellBroadcastSms(int slotIndex, byte[] bearerData,
public abstract void onCdmaCellBroadcastSms(int slotIndex, @NonNull byte[] bearerData,
@CdmaSmsCbProgramData.Category int serviceCategory);
/**
@@ -106,7 +107,7 @@ public abstract class CellBroadcastService extends Service {
*/
@Override
@CallSuper
public IBinder onBind(Intent intent) {
public IBinder onBind(@Nullable Intent intent) {
return mStubWrapper;
}