diff --git a/api/system-current.txt b/api/system-current.txt index 1e6dee503b55b85c4f95de6b47670d1ddf4ec7ae..f903470bff7558ff7d6da2b7dbdc62fa8547b82f 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7246,9 +7246,9 @@ 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[]); - method public abstract void onGsmCellBroadcastSms(int, byte[]); + method @CallSuper @NonNull public android.os.IBinder onBind(@Nullable android.content.Intent); + method public abstract void onCdmaCellBroadcastSms(int, @NonNull byte[]); + method public abstract void onGsmCellBroadcastSms(int, @NonNull byte[]); field public static final String CELL_BROADCAST_SERVICE_INTERFACE = "android.telephony.CellBroadcastService"; } diff --git a/telephony/java/android/telephony/CellBroadcastService.java b/telephony/java/android/telephony/CellBroadcastService.java index d5e447e6c73d47826ddb2c190c845d490a79b09c..25babe5bb608e9684dcc2488dd748c2091b23b11 100644 --- a/telephony/java/android/telephony/CellBroadcastService.java +++ b/telephony/java/android/telephony/CellBroadcastService.java @@ -17,6 +17,8 @@ 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; @@ -64,14 +66,14 @@ 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. * @param slotIndex the index of the slot which received the message * @param message the SMS PDU */ - public abstract void onCdmaCellBroadcastSms(int slotIndex, byte[] message); + public abstract void onCdmaCellBroadcastSms(int slotIndex, @NonNull byte[] message); /** * If overriding this method, call through to the super method for any unknown actions. @@ -79,7 +81,8 @@ public abstract class CellBroadcastService extends Service { */ @Override @CallSuper - public IBinder onBind(Intent intent) { + @NonNull + public IBinder onBind(@Nullable Intent intent) { return mStubWrapper; }