Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -11178,10 +11178,12 @@ package android.telephony { public class CellBroadcastIntents { method public static void sendSmsCbReceivedBroadcast(@NonNull android.content.Context, @Nullable android.os.UserHandle, @NonNull android.telephony.SmsCbMessage, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, int); field public static final String ACTION_AREA_INFO_UPDATED = "android.telephony.action.AREA_INFO_UPDATED"; } public abstract class CellBroadcastService extends android.app.Service { ctor public CellBroadcastService(); method @NonNull @WorkerThread public abstract CharSequence getCellBroadcastAreaInfo(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>); core/java/android/telephony/CellBroadcastIntents.java +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.telephony; import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; import android.app.AppOpsManager; import android.content.BroadcastReceiver; Loading @@ -42,6 +44,14 @@ public class CellBroadcastIntents { private static final String EXTRA_MESSAGE = "message"; /** * Broadcast intent action for notifying area information has been updated. The information * can be retrieved by {@link CellBroadcastService#getCellBroadcastAreaInfo(int)} */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_AREA_INFO_UPDATED = "android.telephony.action.AREA_INFO_UPDATED"; /** * @hide */ Loading telephony/java/android/telephony/CellBroadcastService.java +24 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.CallSuper; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.WorkerThread; import android.app.Service; import android.content.Intent; import android.os.Bundle; Loading Loading @@ -101,6 +102,17 @@ public abstract class CellBroadcastService extends Service { @NonNull List<CdmaSmsCbProgramData> smsCbProgramData, @NonNull String originatingAddress, @NonNull Consumer<Bundle> callback); /** * Get broadcasted area information. * * @param slotIndex the index of the slot which received the area information. * * @return The area information string sent from the network. This is usually the human readable * string shown in Setting app's SIM status page. */ @WorkerThread public abstract @NonNull CharSequence getCellBroadcastAreaInfo(int slotIndex); /** * If overriding this method, call through to the super method for any unknown actions. * {@inheritDoc} Loading Loading @@ -162,5 +174,17 @@ public abstract class CellBroadcastService extends Service { CellBroadcastService.this.onCdmaScpMessage(slotIndex, smsCbProgramData, originatingAddress, consumer); } /** * Get broadcasted area information * * @param slotIndex the index of the slot which received the message * * @return The area information */ @Override public @NonNull CharSequence getCellBroadcastAreaInfo(int slotIndex) { return CellBroadcastService.this.getCellBroadcastAreaInfo(slotIndex); } } } telephony/java/android/telephony/ICellBroadcastService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,7 @@ interface ICellBroadcastService { /** @see android.telephony.CellBroadcastService#onCdmaScpMessage */ oneway void handleCdmaScpMessage(int slotId, in List<CdmaSmsCbProgramData> programData, String originatingAddress, in RemoteCallback callback); /** @see android.telephony.CellBroadcastService#getCellBroadcastAreaInfo */ CharSequence getCellBroadcastAreaInfo(int slotIndex); } Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -11178,10 +11178,12 @@ package android.telephony { public class CellBroadcastIntents { method public static void sendSmsCbReceivedBroadcast(@NonNull android.content.Context, @Nullable android.os.UserHandle, @NonNull android.telephony.SmsCbMessage, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, int); field public static final String ACTION_AREA_INFO_UPDATED = "android.telephony.action.AREA_INFO_UPDATED"; } public abstract class CellBroadcastService extends android.app.Service { ctor public CellBroadcastService(); method @NonNull @WorkerThread public abstract CharSequence getCellBroadcastAreaInfo(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>);
core/java/android/telephony/CellBroadcastIntents.java +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.telephony; import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; import android.app.AppOpsManager; import android.content.BroadcastReceiver; Loading @@ -42,6 +44,14 @@ public class CellBroadcastIntents { private static final String EXTRA_MESSAGE = "message"; /** * Broadcast intent action for notifying area information has been updated. The information * can be retrieved by {@link CellBroadcastService#getCellBroadcastAreaInfo(int)} */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_AREA_INFO_UPDATED = "android.telephony.action.AREA_INFO_UPDATED"; /** * @hide */ Loading
telephony/java/android/telephony/CellBroadcastService.java +24 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.CallSuper; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.WorkerThread; import android.app.Service; import android.content.Intent; import android.os.Bundle; Loading Loading @@ -101,6 +102,17 @@ public abstract class CellBroadcastService extends Service { @NonNull List<CdmaSmsCbProgramData> smsCbProgramData, @NonNull String originatingAddress, @NonNull Consumer<Bundle> callback); /** * Get broadcasted area information. * * @param slotIndex the index of the slot which received the area information. * * @return The area information string sent from the network. This is usually the human readable * string shown in Setting app's SIM status page. */ @WorkerThread public abstract @NonNull CharSequence getCellBroadcastAreaInfo(int slotIndex); /** * If overriding this method, call through to the super method for any unknown actions. * {@inheritDoc} Loading Loading @@ -162,5 +174,17 @@ public abstract class CellBroadcastService extends Service { CellBroadcastService.this.onCdmaScpMessage(slotIndex, smsCbProgramData, originatingAddress, consumer); } /** * Get broadcasted area information * * @param slotIndex the index of the slot which received the message * * @return The area information */ @Override public @NonNull CharSequence getCellBroadcastAreaInfo(int slotIndex) { return CellBroadcastService.this.getCellBroadcastAreaInfo(slotIndex); } } }
telephony/java/android/telephony/ICellBroadcastService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,7 @@ interface ICellBroadcastService { /** @see android.telephony.CellBroadcastService#onCdmaScpMessage */ oneway void handleCdmaScpMessage(int slotId, in List<CdmaSmsCbProgramData> programData, String originatingAddress, in RemoteCallback callback); /** @see android.telephony.CellBroadcastService#getCellBroadcastAreaInfo */ CharSequence getCellBroadcastAreaInfo(int slotIndex); }