diff options
8 files changed, 49 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/satellite/PointingInfo.java b/telephony/java/android/telephony/satellite/PointingInfo.java index 7c79447399b2..e8a8576daf58 100644 --- a/telephony/java/android/telephony/satellite/PointingInfo.java +++ b/telephony/java/android/telephony/satellite/PointingInfo.java @@ -17,6 +17,7 @@ package android.telephony.satellite; import android.annotation.NonNull; +import android.compat.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; @@ -33,6 +34,7 @@ public final class PointingInfo implements Parcelable { /** * @hide */ + @UnsupportedAppUsage public PointingInfo(float satelliteAzimuthDegrees, float satelliteElevationDegrees) { mSatelliteAzimuthDegrees = satelliteAzimuthDegrees; mSatelliteElevationDegrees = satelliteElevationDegrees; diff --git a/telephony/java/android/telephony/satellite/SatelliteCapabilities.java b/telephony/java/android/telephony/satellite/SatelliteCapabilities.java index df80159780ec..87c8db317195 100644 --- a/telephony/java/android/telephony/satellite/SatelliteCapabilities.java +++ b/telephony/java/android/telephony/satellite/SatelliteCapabilities.java @@ -17,6 +17,7 @@ package android.telephony.satellite; import android.annotation.NonNull; +import android.compat.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; @@ -45,6 +46,7 @@ public final class SatelliteCapabilities implements Parcelable { /** * @hide */ + @UnsupportedAppUsage public SatelliteCapabilities(Set<Integer> supportedRadioTechnologies, boolean isPointingRequired, int maxBytesPerOutgoingDatagram) { mSupportedRadioTechnologies = supportedRadioTechnologies == null diff --git a/telephony/java/android/telephony/satellite/SatelliteDatagram.java b/telephony/java/android/telephony/satellite/SatelliteDatagram.java index d3cb8a07e4ba..44f56f3d315c 100644 --- a/telephony/java/android/telephony/satellite/SatelliteDatagram.java +++ b/telephony/java/android/telephony/satellite/SatelliteDatagram.java @@ -17,6 +17,7 @@ package android.telephony.satellite; import android.annotation.NonNull; +import android.compat.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; @@ -32,6 +33,7 @@ public final class SatelliteDatagram implements Parcelable { /** * @hide */ + @UnsupportedAppUsage public SatelliteDatagram(@NonNull byte[] data) { mData = data; } diff --git a/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java b/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java index f237ada9d1e0..d8a6fafcdd2f 100644 --- a/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java +++ b/telephony/java/android/telephony/satellite/SatelliteDatagramCallback.java @@ -17,6 +17,7 @@ package android.telephony.satellite; import android.annotation.NonNull; +import android.compat.annotation.UnsupportedAppUsage; import com.android.internal.telephony.ILongConsumer; @@ -36,6 +37,7 @@ public interface SatelliteDatagramCallback { * datagramId to Telephony. If the callback is not received within five minutes, * Telephony will resend the datagram. */ + @UnsupportedAppUsage void onSatelliteDatagramReceived(long datagramId, @NonNull SatelliteDatagram datagram, int pendingCount, @NonNull ILongConsumer callback); } diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java index e32566dc470f..7d82fd8d6d69 100644 --- a/telephony/java/android/telephony/satellite/SatelliteManager.java +++ b/telephony/java/android/telephony/satellite/SatelliteManager.java @@ -23,6 +23,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresFeature; import android.annotation.RequiresPermission; +import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.content.pm.PackageManager; import android.os.Binder; @@ -82,6 +83,7 @@ public class SatelliteManager { * @param context The context the SatelliteManager belongs to. * @hide */ + @UnsupportedAppUsage public SatelliteManager(@Nullable Context context) { this(context, SubscriptionManager.DEFAULT_SUBSCRIPTION_ID); } @@ -127,6 +129,7 @@ public class SatelliteManager { * {@link #requestIsSatelliteEnabled(Executor, OutcomeReceiver)}. * @hide */ + @UnsupportedAppUsage public static final String KEY_SATELLITE_ENABLED = "satellite_enabled"; /** @@ -134,6 +137,7 @@ public class SatelliteManager { * {@link #requestIsDemoModeEnabled(Executor, OutcomeReceiver)}. * @hide */ + @UnsupportedAppUsage public static final String KEY_DEMO_MODE_ENABLED = "demo_mode_enabled"; /** @@ -141,6 +145,7 @@ public class SatelliteManager { * {@link #requestIsSatelliteSupported(Executor, OutcomeReceiver)}. * @hide */ + @UnsupportedAppUsage public static final String KEY_SATELLITE_SUPPORTED = "satellite_supported"; /** @@ -148,6 +153,7 @@ public class SatelliteManager { * {@link #requestSatelliteCapabilities(Executor, OutcomeReceiver)}. * @hide */ + @UnsupportedAppUsage public static final String KEY_SATELLITE_CAPABILITIES = "satellite_capabilities"; /** @@ -155,6 +161,7 @@ public class SatelliteManager { * {@link #requestIsSatelliteProvisioned(Executor, OutcomeReceiver)}. * @hide */ + @UnsupportedAppUsage public static final String KEY_SATELLITE_PROVISIONED = "satellite_provisioned"; /** @@ -162,6 +169,7 @@ public class SatelliteManager { * {@link #requestIsSatelliteCommunicationAllowedForCurrentLocation(Executor, OutcomeReceiver)}. * @hide */ + @UnsupportedAppUsage public static final String KEY_SATELLITE_COMMUNICATION_ALLOWED = "satellite_communication_allowed"; @@ -170,6 +178,7 @@ public class SatelliteManager { * {@link #requestTimeForNextSatelliteVisibility(Executor, OutcomeReceiver)}. * @hide */ + @UnsupportedAppUsage public static final String KEY_SATELLITE_NEXT_VISIBILITY = "satellite_next_visibility"; /** @@ -340,6 +349,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void requestSatelliteEnabled(boolean enableSatellite, boolean enableDemoMode, @NonNull @CallbackExecutor Executor executor, @SatelliteError @NonNull Consumer<Integer> resultListener) { @@ -382,6 +392,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void requestIsSatelliteEnabled(@NonNull @CallbackExecutor Executor executor, @NonNull OutcomeReceiver<Boolean, SatelliteException> callback) { Objects.requireNonNull(executor); @@ -436,6 +447,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void requestIsDemoModeEnabled(@NonNull @CallbackExecutor Executor executor, @NonNull OutcomeReceiver<Boolean, SatelliteException> callback) { Objects.requireNonNull(executor); @@ -488,6 +500,7 @@ public class SatelliteManager { * * @throws IllegalStateException if the Telephony process is not currently available. */ + @UnsupportedAppUsage public void requestIsSatelliteSupported(@NonNull @CallbackExecutor Executor executor, @NonNull OutcomeReceiver<Boolean, SatelliteException> callback) { Objects.requireNonNull(executor); @@ -541,6 +554,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void requestSatelliteCapabilities(@NonNull @CallbackExecutor Executor executor, @NonNull OutcomeReceiver<SatelliteCapabilities, SatelliteException> callback) { Objects.requireNonNull(executor); @@ -707,6 +721,7 @@ public class SatelliteManager { */ public static final int DATAGRAM_TYPE_LOCATION_SHARING = 2; + /** @hide */ @IntDef(prefix = "DATAGRAM_TYPE_", value = { DATAGRAM_TYPE_UNKNOWN, DATAGRAM_TYPE_SOS_MESSAGE, @@ -732,6 +747,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void startSatelliteTransmissionUpdates(@NonNull @CallbackExecutor Executor executor, @SatelliteError @NonNull Consumer<Integer> resultListener, @NonNull SatelliteTransmissionUpdateCallback callback) { @@ -801,6 +817,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void stopSatelliteTransmissionUpdates( @NonNull SatelliteTransmissionUpdateCallback callback, @NonNull @CallbackExecutor Executor executor, @@ -856,6 +873,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void provisionSatelliteService(@NonNull String token, @NonNull String regionId, @Nullable CancellationSignal cancellationSignal, @NonNull @CallbackExecutor Executor executor, @@ -895,7 +913,7 @@ public class SatelliteManager { * {@link SatelliteProvisionStateCallback#onSatelliteProvisionStateChanged(boolean)} * should report as deprovisioned. * For provisioning satellite service, refer to - * {@link #provisionSatelliteService(String, CancellationSignal, Executor, Consumer)}. + * {@link #provisionSatelliteService(String, String, CancellationSignal, Executor, Consumer)} * * @param token The token of the device/subscription to be deprovisioned. * @param resultListener Listener for the {@link SatelliteError} result of the operation. @@ -904,6 +922,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void deprovisionSatelliteService(@NonNull String token, @NonNull @CallbackExecutor Executor executor, @SatelliteError @NonNull Consumer<Integer> resultListener) { @@ -943,6 +962,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage @SatelliteError public int registerForSatelliteProvisionStateChanged( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteProvisionStateCallback callback) { @@ -985,6 +1005,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void unregisterForSatelliteProvisionStateChanged( @NonNull SatelliteProvisionStateCallback callback) { Objects.requireNonNull(callback); @@ -1023,6 +1044,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void requestIsSatelliteProvisioned(@NonNull @CallbackExecutor Executor executor, @NonNull OutcomeReceiver<Boolean, SatelliteException> callback) { Objects.requireNonNull(executor); @@ -1074,6 +1096,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage @SatelliteError public int registerForSatelliteModemStateChanged( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteStateCallback callback) { @@ -1113,6 +1136,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void unregisterForSatelliteModemStateChanged(@NonNull SatelliteStateCallback callback) { Objects.requireNonNull(callback); ISatelliteStateCallback internalCallback = sSatelliteStateCallbackMap.remove(callback); @@ -1147,6 +1171,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage @SatelliteError public int registerForSatelliteDatagram( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteDatagramCallback callback) { @@ -1190,6 +1215,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void unregisterForSatelliteDatagram(@NonNull SatelliteDatagramCallback callback) { Objects.requireNonNull(callback); ISatelliteDatagramCallback internalCallback = @@ -1227,6 +1253,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void pollPendingSatelliteDatagrams(@NonNull @CallbackExecutor Executor executor, @SatelliteError @NonNull Consumer<Integer> resultListener) { Objects.requireNonNull(executor); @@ -1279,6 +1306,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void sendSatelliteDatagram(@DatagramType int datagramType, @NonNull SatelliteDatagram datagram, boolean needFullScreenPointingUI, @NonNull @CallbackExecutor Executor executor, @@ -1324,6 +1352,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void requestIsSatelliteCommunicationAllowedForCurrentLocation( @NonNull @CallbackExecutor Executor executor, @NonNull OutcomeReceiver<Boolean, SatelliteException> callback) { @@ -1381,6 +1410,7 @@ public class SatelliteManager { * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @UnsupportedAppUsage public void requestTimeForNextSatelliteVisibility(@NonNull @CallbackExecutor Executor executor, @NonNull OutcomeReceiver<Duration, SatelliteException> callback) { Objects.requireNonNull(executor); diff --git a/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java b/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java index a62eb8b8a5fb..20875af94f5a 100644 --- a/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java +++ b/telephony/java/android/telephony/satellite/SatelliteProvisionStateCallback.java @@ -16,6 +16,8 @@ package android.telephony.satellite; +import android.compat.annotation.UnsupportedAppUsage; + /** * A callback class for monitoring satellite provision state change events. * @@ -28,5 +30,6 @@ public interface SatelliteProvisionStateCallback { * @param provisioned The new provision state. {@code true} means satellite is provisioned * {@code false} means satellite is not provisioned. */ + @UnsupportedAppUsage void onSatelliteProvisionStateChanged(boolean provisioned); } diff --git a/telephony/java/android/telephony/satellite/SatelliteStateCallback.java b/telephony/java/android/telephony/satellite/SatelliteStateCallback.java index d9ecaa3467e3..3312e3a90281 100644 --- a/telephony/java/android/telephony/satellite/SatelliteStateCallback.java +++ b/telephony/java/android/telephony/satellite/SatelliteStateCallback.java @@ -16,6 +16,8 @@ package android.telephony.satellite; +import android.compat.annotation.UnsupportedAppUsage; + /** * A callback class for monitoring satellite modem state change events. * @@ -26,5 +28,6 @@ public interface SatelliteStateCallback { * Called when satellite modem state changes. * @param state The new satellite modem state. */ + @UnsupportedAppUsage void onSatelliteModemStateChanged(@SatelliteManager.SatelliteModemState int state); } diff --git a/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java b/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java index d4fe57a0be2e..17fff4480679 100644 --- a/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java +++ b/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java @@ -17,6 +17,7 @@ package android.telephony.satellite; import android.annotation.NonNull; +import android.compat.annotation.UnsupportedAppUsage; /** * A callback class for monitoring satellite position update and datagram transfer state change @@ -30,6 +31,7 @@ public interface SatelliteTransmissionUpdateCallback { * * @param pointingInfo The pointing info containing the satellite location. */ + @UnsupportedAppUsage void onSatellitePositionChanged(@NonNull PointingInfo pointingInfo); /** @@ -39,6 +41,7 @@ public interface SatelliteTransmissionUpdateCallback { * @param sendPendingCount The number of datagrams that are currently being sent. * @param errorCode If datagram transfer failed, the reason for failure. */ + @UnsupportedAppUsage void onSendDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount, @SatelliteManager.SatelliteError int errorCode); @@ -50,6 +53,7 @@ public interface SatelliteTransmissionUpdateCallback { * @param receivePendingCount The number of datagrams that are currently pending to be received. * @param errorCode If datagram transfer failed, the reason for failure. */ + @UnsupportedAppUsage void onReceiveDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount, @SatelliteManager.SatelliteError int errorCode); |