summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/system-current.txt16
-rw-r--r--core/java/android/telephony/TelephonyCallback.java18
-rw-r--r--core/java/android/telephony/TelephonyRegistryManager.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImpl.kt16
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImplTest.kt20
-rw-r--r--telephony/java/android/telephony/satellite/ISatelliteCommunicationAccessStateCallback.aidl (renamed from telephony/java/android/telephony/satellite/ISatelliteCommunicationAllowedStateCallback.aidl)10
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteCommunicationAccessStateCallback.java (renamed from telephony/java/android/telephony/satellite/SatelliteCommunicationAllowedStateCallback.java)12
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteManager.java62
-rw-r--r--telephony/java/android/telephony/satellite/SatellitePosition.java1
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteSubscriberInfo.java28
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl12
13 files changed, 108 insertions, 95 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 080f7cf7d92c..dec8dd1e19b1 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -15956,7 +15956,7 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public default void onCallStatesChanged(@NonNull java.util.List<android.telephony.CallState>);
}
- @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static interface TelephonyCallback.CarrierRoamingNtnModeListener {
+ @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public static interface TelephonyCallback.CarrierRoamingNtnListener {
method public default void onCarrierRoamingNtnAvailableServicesChanged(@NonNull int[]);
method public default void onCarrierRoamingNtnEligibleStateChanged(boolean);
method public void onCarrierRoamingNtnModeChanged(boolean);
@@ -18634,9 +18634,9 @@ package android.telephony.satellite {
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public void onSatelliteCapabilitiesChanged(@NonNull android.telephony.satellite.SatelliteCapabilities);
}
- @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public interface SatelliteCommunicationAllowedStateCallback {
- method public default void onSatelliteAccessConfigurationChanged(@Nullable android.telephony.satellite.SatelliteAccessConfiguration);
- method public void onSatelliteCommunicationAllowedStateChanged(boolean);
+ @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public interface SatelliteCommunicationAccessStateCallback {
+ method public void onAccessAllowedStateChanged(boolean);
+ method public default void onAccessConfigurationChanged(@Nullable android.telephony.satellite.SatelliteAccessConfiguration);
}
@FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public final class SatelliteDatagram implements android.os.Parcelable {
@@ -18675,7 +18675,7 @@ package android.telephony.satellite {
method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void provisionSatellite(@NonNull java.util.List<android.telephony.satellite.SatelliteSubscriberInfo>, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void provisionService(@NonNull String, @NonNull byte[], @Nullable android.os.CancellationSignal, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForCapabilitiesChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteCapabilitiesCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForCommunicationAllowedStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteCommunicationAllowedStateCallback);
+ method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForCommunicationAccessStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteCommunicationAccessStateCallback);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForIncomingDatagram(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteDatagramCallback);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public int registerForModemStateChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.SatelliteModemStateCallback);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void registerForNtnSignalStrengthChanged(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.satellite.NtnSignalStrengthCallback);
@@ -18704,7 +18704,7 @@ package android.telephony.satellite {
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void startTransmissionUpdates(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>, @NonNull android.telephony.satellite.SatelliteTransmissionUpdateCallback);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void stopTransmissionUpdates(@NonNull android.telephony.satellite.SatelliteTransmissionUpdateCallback, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForCapabilitiesChanged(@NonNull android.telephony.satellite.SatelliteCapabilitiesCallback);
- method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForCommunicationAllowedStateChanged(@NonNull android.telephony.satellite.SatelliteCommunicationAllowedStateCallback);
+ method @FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForCommunicationAccessStateChanged(@NonNull android.telephony.satellite.SatelliteCommunicationAccessStateCallback);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForIncomingDatagram(@NonNull android.telephony.satellite.SatelliteDatagramCallback);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForModemStateChanged(@NonNull android.telephony.satellite.SatelliteModemStateCallback);
method @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") @RequiresPermission(android.Manifest.permission.SATELLITE_COMMUNICATION) public void unregisterForNtnSignalStrengthChanged(@NonNull android.telephony.satellite.NtnSignalStrengthCallback);
@@ -18833,9 +18833,9 @@ package android.telephony.satellite {
method public int describeContents();
method public int getCarrierId();
method @NonNull public String getNiddApn();
- method public int getSubId();
method @NonNull public String getSubscriberId();
method public int getSubscriberIdType();
+ method public int getSubscriptionId();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.satellite.SatelliteSubscriberInfo> CREATOR;
field public static final int SUBSCRIBER_ID_TYPE_ICCID = 0; // 0x0
@@ -18847,9 +18847,9 @@ package android.telephony.satellite {
method @NonNull public android.telephony.satellite.SatelliteSubscriberInfo build();
method @NonNull public android.telephony.satellite.SatelliteSubscriberInfo.Builder setCarrierId(int);
method @NonNull public android.telephony.satellite.SatelliteSubscriberInfo.Builder setNiddApn(@NonNull String);
- method @NonNull public android.telephony.satellite.SatelliteSubscriberInfo.Builder setSubId(int);
method @NonNull public android.telephony.satellite.SatelliteSubscriberInfo.Builder setSubscriberId(@NonNull String);
method @NonNull public android.telephony.satellite.SatelliteSubscriberInfo.Builder setSubscriberIdType(int);
+ method @NonNull public android.telephony.satellite.SatelliteSubscriberInfo.Builder setSubscriptionId(int);
}
@FlaggedApi("com.android.internal.telephony.flags.satellite_system_apis") public final class SatelliteSubscriberProvisionStatus implements android.os.Parcelable {
diff --git a/core/java/android/telephony/TelephonyCallback.java b/core/java/android/telephony/TelephonyCallback.java
index cc19e7cab537..d05fa9e43cd4 100644
--- a/core/java/android/telephony/TelephonyCallback.java
+++ b/core/java/android/telephony/TelephonyCallback.java
@@ -1819,7 +1819,7 @@ public class TelephonyCallback {
*/
@SystemApi
@FlaggedApi(Flags.FLAG_SATELLITE_SYSTEM_APIS)
- public interface CarrierRoamingNtnModeListener {
+ public interface CarrierRoamingNtnListener {
/**
* Callback invoked when carrier roaming non-terrestrial network mode changes.
*
@@ -2332,8 +2332,8 @@ public class TelephonyCallback {
public void onCarrierRoamingNtnModeChanged(boolean active) {
if (!Flags.carrierEnabledSatelliteFlag()) return;
- CarrierRoamingNtnModeListener listener =
- (CarrierRoamingNtnModeListener) mTelephonyCallbackWeakRef.get();
+ CarrierRoamingNtnListener listener =
+ (CarrierRoamingNtnListener) mTelephonyCallbackWeakRef.get();
if (listener == null) return;
Binder.withCleanCallingIdentity(
@@ -2343,8 +2343,8 @@ public class TelephonyCallback {
public void onCarrierRoamingNtnEligibleStateChanged(boolean eligible) {
if (!Flags.carrierRoamingNbIotNtn()) return;
- CarrierRoamingNtnModeListener listener =
- (CarrierRoamingNtnModeListener) mTelephonyCallbackWeakRef.get();
+ CarrierRoamingNtnListener listener =
+ (CarrierRoamingNtnListener) mTelephonyCallbackWeakRef.get();
if (listener == null) return;
Binder.withCleanCallingIdentity(() -> mExecutor.execute(
@@ -2355,8 +2355,8 @@ public class TelephonyCallback {
@NetworkRegistrationInfo.ServiceType int[] availableServices) {
if (!Flags.carrierRoamingNbIotNtn()) return;
- CarrierRoamingNtnModeListener listener =
- (CarrierRoamingNtnModeListener) mTelephonyCallbackWeakRef.get();
+ CarrierRoamingNtnListener listener =
+ (CarrierRoamingNtnListener) mTelephonyCallbackWeakRef.get();
if (listener == null) return;
Binder.withCleanCallingIdentity(() -> mExecutor.execute(
@@ -2367,8 +2367,8 @@ public class TelephonyCallback {
@NonNull NtnSignalStrength ntnSignalStrength) {
if (!Flags.carrierRoamingNbIotNtn()) return;
- CarrierRoamingNtnModeListener listener =
- (CarrierRoamingNtnModeListener) mTelephonyCallbackWeakRef.get();
+ CarrierRoamingNtnListener listener =
+ (CarrierRoamingNtnListener) mTelephonyCallbackWeakRef.get();
if (listener == null) return;
Binder.withCleanCallingIdentity(() -> mExecutor.execute(
diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java
index 4ec429d0c4ad..fa44fcf0dffa 100644
--- a/core/java/android/telephony/TelephonyRegistryManager.java
+++ b/core/java/android/telephony/TelephonyRegistryManager.java
@@ -1341,7 +1341,7 @@ public class TelephonyRegistryManager {
TelephonyCallback.EVENT_SIMULTANEOUS_CELLULAR_CALLING_SUBSCRIPTIONS_CHANGED);
}
- if (telephonyCallback instanceof TelephonyCallback.CarrierRoamingNtnModeListener) {
+ if (telephonyCallback instanceof TelephonyCallback.CarrierRoamingNtnListener) {
eventList.add(TelephonyCallback.EVENT_CARRIER_ROAMING_NTN_MODE_CHANGED);
eventList.add(TelephonyCallback.EVENT_CARRIER_ROAMING_NTN_ELIGIBLE_STATE_CHANGED);
eventList.add(TelephonyCallback.EVENT_CARRIER_ROAMING_NTN_AVAILABLE_SERVICES_CHANGED);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
index 99b4aa4b0cf6..d69dc1e06cd6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
@@ -143,7 +143,7 @@ class MobileConnectionRepositoryImpl(
object :
TelephonyCallback(),
TelephonyCallback.CarrierNetworkListener,
- TelephonyCallback.CarrierRoamingNtnModeListener,
+ TelephonyCallback.CarrierRoamingNtnListener,
TelephonyCallback.DataActivityListener,
TelephonyCallback.DataConnectionStateListener,
TelephonyCallback.DataEnabledListener,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImpl.kt
index 7aab47a5d64a..3a6716ab4c7e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImpl.kt
@@ -21,7 +21,7 @@ import android.os.OutcomeReceiver
import android.telephony.TelephonyCallback
import android.telephony.TelephonyManager
import android.telephony.satellite.NtnSignalStrengthCallback
-import android.telephony.satellite.SatelliteCommunicationAllowedStateCallback
+import android.telephony.satellite.SatelliteCommunicationAccessStateCallback
import android.telephony.satellite.SatelliteManager
import android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_SUCCESS
import android.telephony.satellite.SatelliteModemStateCallback
@@ -263,9 +263,9 @@ constructor(
private fun isSatelliteAvailableFlow(sm: SupportedSatelliteManager): Flow<Boolean> =
conflatedCallbackFlow {
- val callback = SatelliteCommunicationAllowedStateCallback { allowed ->
+ val callback = SatelliteCommunicationAccessStateCallback { allowed ->
logBuffer.i({ bool1 = allowed }) {
- "onSatelliteCommunicationAllowedStateChanged: $bool1"
+ "onSatelliteCommunicationAccessAllowedStateChanged: $bool1"
}
trySend(allowed)
@@ -273,20 +273,20 @@ constructor(
var registered = false
try {
- logBuffer.i { "registerForCommunicationAllowedStateChanged" }
- sm.registerForCommunicationAllowedStateChanged(
+ logBuffer.i { "registerForCommunicationAccessStateChanged" }
+ sm.registerForCommunicationAccessStateChanged(
bgDispatcher.asExecutor(),
callback,
)
registered = true
} catch (e: Exception) {
- logBuffer.e("Error calling registerForCommunicationAllowedStateChanged", e)
+ logBuffer.e("Error calling registerForCommunicationAccessStateChanged", e)
}
awaitClose {
if (registered) {
- logBuffer.i { "unRegisterForCommunicationAllowedStateChanged" }
- sm.unregisterForCommunicationAllowedStateChanged(callback)
+ logBuffer.i { "unRegisterForCommunicationAccessStateChanged" }
+ sm.unregisterForCommunicationAccessStateChanged(callback)
}
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
index 728f4183ccce..3a25ecb27404 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
@@ -37,7 +37,7 @@ import android.telephony.ServiceState.STATE_OUT_OF_SERVICE
import android.telephony.SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX
import android.telephony.SubscriptionManager.PROFILE_CLASS_UNSET
import android.telephony.TelephonyCallback
-import android.telephony.TelephonyCallback.CarrierRoamingNtnModeListener
+import android.telephony.TelephonyCallback.CarrierRoamingNtnListener
import android.telephony.TelephonyCallback.DataActivityListener
import android.telephony.TelephonyCallback.DisplayInfoListener
import android.telephony.TelephonyCallback.ServiceStateListener
@@ -1311,7 +1311,7 @@ class MobileConnectionRepositoryTest : SysuiTestCase() {
// Starts out false
assertThat(latest).isFalse()
- val callback = getTelephonyCallbackForType<CarrierRoamingNtnModeListener>()
+ val callback = getTelephonyCallbackForType<CarrierRoamingNtnListener>()
callback.onCarrierRoamingNtnModeChanged(true)
assertThat(latest).isTrue()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImplTest.kt
index 89f2d3db7f40..599729d953d4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/satellite/data/prod/DeviceBasedSatelliteRepositoryImplTest.kt
@@ -22,7 +22,7 @@ import android.telephony.TelephonyCallback
import android.telephony.TelephonyManager
import android.telephony.satellite.NtnSignalStrength
import android.telephony.satellite.NtnSignalStrengthCallback
-import android.telephony.satellite.SatelliteCommunicationAllowedStateCallback
+import android.telephony.satellite.SatelliteCommunicationAccessStateCallback
import android.telephony.satellite.SatelliteManager
import android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_CONNECTED
import android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_DATAGRAM_RETRYING
@@ -193,19 +193,19 @@ class DeviceBasedSatelliteRepositoryImplTest : SysuiTestCase() {
runCurrent()
val callback =
- withArgCaptor<SatelliteCommunicationAllowedStateCallback> {
+ withArgCaptor<SatelliteCommunicationAccessStateCallback> {
verify(satelliteManager)
- .registerForCommunicationAllowedStateChanged(any(), capture())
+ .registerForCommunicationAccessStateChanged(any(), capture())
}
// WHEN satellite manager says it's not available
- callback.onSatelliteCommunicationAllowedStateChanged(false)
+ callback.onAccessAllowedStateChanged(false)
// THEN it's not!
assertThat(latest).isFalse()
// WHEN satellite manager says it's changed to available
- callback.onSatelliteCommunicationAllowedStateChanged(true)
+ callback.onAccessAllowedStateChanged(true)
// THEN it is!
assertThat(latest).isTrue()
@@ -219,7 +219,7 @@ class DeviceBasedSatelliteRepositoryImplTest : SysuiTestCase() {
// GIVEN SatelliteManager gon' throw exceptions when we ask to register the callback
doThrow(RuntimeException("Test exception"))
.`when`(satelliteManager)
- .registerForCommunicationAllowedStateChanged(any(), any())
+ .registerForCommunicationAccessStateChanged(any(), any())
// WHEN the latest value is requested (and thus causes an exception to be thrown)
val latest by collectLastValue(underTest.isSatelliteAllowedForCurrentLocation)
@@ -236,9 +236,9 @@ class DeviceBasedSatelliteRepositoryImplTest : SysuiTestCase() {
runCurrent()
val callback =
- withArgCaptor<SatelliteCommunicationAllowedStateCallback> {
+ withArgCaptor<SatelliteCommunicationAccessStateCallback> {
verify(satelliteManager)
- .registerForCommunicationAllowedStateChanged(any(), capture())
+ .registerForCommunicationAccessStateChanged(any(), capture())
}
val telephonyCallback =
@@ -249,7 +249,7 @@ class DeviceBasedSatelliteRepositoryImplTest : SysuiTestCase() {
)
// GIVEN satellite is currently provisioned
- callback.onSatelliteCommunicationAllowedStateChanged(true)
+ callback.onAccessAllowedStateChanged(true)
assertThat(latest).isTrue()
@@ -261,7 +261,7 @@ class DeviceBasedSatelliteRepositoryImplTest : SysuiTestCase() {
// THEN listener is re-registered
verify(satelliteManager, times(2))
- .registerForCommunicationAllowedStateChanged(any(), any())
+ .registerForCommunicationAccessStateChanged(any(), any())
}
@Test
diff --git a/telephony/java/android/telephony/satellite/ISatelliteCommunicationAllowedStateCallback.aidl b/telephony/java/android/telephony/satellite/ISatelliteCommunicationAccessStateCallback.aidl
index 2730f90c4e5e..a3c66a03fd7f 100644
--- a/telephony/java/android/telephony/satellite/ISatelliteCommunicationAllowedStateCallback.aidl
+++ b/telephony/java/android/telephony/satellite/ISatelliteCommunicationAccessStateCallback.aidl
@@ -19,18 +19,18 @@ package android.telephony.satellite;
import android.telephony.satellite.SatelliteAccessConfiguration;
/**
- * Interface for satellite communication allowed state callback.
+ * Interface for satellite communication access state callback.
* @hide
*/
-oneway interface ISatelliteCommunicationAllowedStateCallback {
+oneway interface ISatelliteCommunicationAccessStateCallback {
/**
* Telephony does not guarantee that whenever there is a change in communication allowed
* state, this API will be called. Telephony does its best to detect the changes and notify
- * its listners accordingly.
+ * its listeners accordingly.
*
* @param allowed whether satellite communication state or not
*/
- void onSatelliteCommunicationAllowedStateChanged(in boolean isAllowed);
+ void onAccessAllowedStateChanged(in boolean isAllowed);
/**
* Callback method invoked when the satellite access configuration changes
@@ -39,6 +39,6 @@ oneway interface ISatelliteCommunicationAllowedStateCallback {
* When satellite is not allowed at the current location,
* {@code satelliteRegionalConfiguration} will be null.
*/
- void onSatelliteAccessConfigurationChanged(in SatelliteAccessConfiguration
+ void onAccessConfigurationChanged(in SatelliteAccessConfiguration
satelliteAccessConfiguration);
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteCommunicationAllowedStateCallback.java b/telephony/java/android/telephony/satellite/SatelliteCommunicationAccessStateCallback.java
index 6291102cd6e3..7fb8a968a6e3 100644
--- a/telephony/java/android/telephony/satellite/SatelliteCommunicationAllowedStateCallback.java
+++ b/telephony/java/android/telephony/satellite/SatelliteCommunicationAccessStateCallback.java
@@ -25,24 +25,24 @@ import com.android.internal.telephony.flags.Flags;
/**
- * A callback class for monitoring satellite communication allowed state changed events.
+ * A callback class for monitoring satellite communication access state changed events.
*
* @hide
*/
@SystemApi
@FlaggedApi(Flags.FLAG_SATELLITE_SYSTEM_APIS)
-public interface SatelliteCommunicationAllowedStateCallback {
+public interface SatelliteCommunicationAccessStateCallback {
/**
* Telephony does not guarantee that whenever there is a change in communication allowed state,
* this API will be called. Telephony does its best to detect the changes and notify its
- * listeners accordingly. Satellite communication is allowed at a location when it is legally
- * allowed by the local authority and satellite signal coverage is available.
+ * listeners accordingly. Satellite communication access is allowed at a location when it is
+ * legally allowed by the local authority and satellite signal coverage is available.
*
* @param isAllowed {@code true} means satellite is allowed,
* {@code false} satellite is not allowed.
*/
- void onSatelliteCommunicationAllowedStateChanged(boolean isAllowed);
+ void onAccessAllowedStateChanged(boolean isAllowed);
/**
* Callback method invoked when the satellite access configuration changes
@@ -52,6 +52,6 @@ public interface SatelliteCommunicationAllowedStateCallback {
* the current location,
* {@code satelliteRegionalConfiguration} will be null.
*/
- default void onSatelliteAccessConfigurationChanged(
+ default void onAccessConfigurationChanged(
@Nullable SatelliteAccessConfiguration satelliteAccessConfiguration) {};
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java
index b885b30d17d7..63a12816f783 100644
--- a/telephony/java/android/telephony/satellite/SatelliteManager.java
+++ b/telephony/java/android/telephony/satellite/SatelliteManager.java
@@ -100,9 +100,9 @@ public final class SatelliteManager {
private static final ConcurrentHashMap<Consumer<Boolean>,
IBooleanConsumer> sSatelliteSupportedStateCallbackMap =
new ConcurrentHashMap<>();
- private static final ConcurrentHashMap<SatelliteCommunicationAllowedStateCallback,
- ISatelliteCommunicationAllowedStateCallback>
- sSatelliteCommunicationAllowedStateCallbackMap =
+ private static final ConcurrentHashMap<SatelliteCommunicationAccessStateCallback,
+ ISatelliteCommunicationAccessStateCallback>
+ sSatelliteCommunicationAccessStateCallbackMap =
new ConcurrentHashMap<>();
private static final ConcurrentHashMap<SatelliteDisallowedReasonsCallback,
ISatelliteDisallowedReasonsCallback>
@@ -3398,10 +3398,10 @@ public final class SatelliteManager {
}
/**
- * Registers for the satellite communication allowed state changed.
+ * Registers for the satellite communication access state changed event.
*
* @param executor The executor on which the callback will be called.
- * @param callback The callback to handle satellite communication allowed state changed event.
+ * @param callback The callback to handle satellite communication access state changed event.
* @return The {@link SatelliteResult} result of the operation.
* @throws SecurityException if the caller doesn't have required permission.
* @throws IllegalStateException if the Telephony process is not currently available.
@@ -3411,54 +3411,54 @@ public final class SatelliteManager {
@FlaggedApi(Flags.FLAG_SATELLITE_SYSTEM_APIS)
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
@SatelliteResult
- public int registerForCommunicationAllowedStateChanged(
+ public int registerForCommunicationAccessStateChanged(
@NonNull @CallbackExecutor Executor executor,
- @NonNull SatelliteCommunicationAllowedStateCallback callback) {
+ @NonNull SatelliteCommunicationAccessStateCallback callback) {
Objects.requireNonNull(executor);
Objects.requireNonNull(callback);
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
- ISatelliteCommunicationAllowedStateCallback internalCallback =
- new ISatelliteCommunicationAllowedStateCallback.Stub() {
+ ISatelliteCommunicationAccessStateCallback internalCallback =
+ new ISatelliteCommunicationAccessStateCallback.Stub() {
@Override
- public void onSatelliteCommunicationAllowedStateChanged(
+ public void onAccessAllowedStateChanged(
boolean isAllowed) {
executor.execute(() -> Binder.withCleanCallingIdentity(
- () -> callback.onSatelliteCommunicationAllowedStateChanged(
+ () -> callback.onAccessAllowedStateChanged(
isAllowed)));
}
@Override
- public void onSatelliteAccessConfigurationChanged(
+ public void onAccessConfigurationChanged(
@Nullable SatelliteAccessConfiguration
satelliteAccessConfiguration) {
executor.execute(() -> Binder.withCleanCallingIdentity(
- () -> callback.onSatelliteAccessConfigurationChanged(
+ () -> callback.onAccessConfigurationChanged(
satelliteAccessConfiguration)));
}
};
- sSatelliteCommunicationAllowedStateCallbackMap.put(callback, internalCallback);
- return telephony.registerForCommunicationAllowedStateChanged(
+ sSatelliteCommunicationAccessStateCallbackMap.put(callback, internalCallback);
+ return telephony.registerForCommunicationAccessStateChanged(
mSubId, internalCallback);
} else {
throw new IllegalStateException("telephony service is null.");
}
} catch (RemoteException ex) {
- loge("registerForCommunicationAllowedStateChanged() RemoteException: " + ex);
+ loge("registerForCommunicationAccessStateChanged() RemoteException: " + ex);
ex.rethrowAsRuntimeException();
}
return SATELLITE_RESULT_REQUEST_FAILED;
}
/**
- * Unregisters for the satellite communication allowed state changed.
+ * Unregisters for the satellite communication access state changed event.
* If callback was not registered before, the request will be ignored.
*
* @param callback The callback that was passed to
- * {@link #registerForCommunicationAllowedStateChanged(Executor,
- * SatelliteCommunicationAllowedStateCallback)}
+ * {@link #registerForCommunicationAccessStateChanged(Executor,
+ * SatelliteCommunicationAccessStateCallback)}
* @throws SecurityException if the caller doesn't have required permission.
* @throws IllegalStateException if the Telephony process is not currently available.
* @hide
@@ -3466,26 +3466,26 @@ public final class SatelliteManager {
@SystemApi
@RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
@FlaggedApi(Flags.FLAG_SATELLITE_SYSTEM_APIS)
- public void unregisterForCommunicationAllowedStateChanged(
- @NonNull SatelliteCommunicationAllowedStateCallback callback) {
+ public void unregisterForCommunicationAccessStateChanged(
+ @NonNull SatelliteCommunicationAccessStateCallback callback) {
Objects.requireNonNull(callback);
- ISatelliteCommunicationAllowedStateCallback internalCallback =
- sSatelliteCommunicationAllowedStateCallbackMap.remove(callback);
+ ISatelliteCommunicationAccessStateCallback internalCallback =
+ sSatelliteCommunicationAccessStateCallbackMap.remove(callback);
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
if (internalCallback != null) {
- telephony.unregisterForCommunicationAllowedStateChanged(mSubId,
+ telephony.unregisterForCommunicationAccessStateChanged(mSubId,
internalCallback);
} else {
- loge("unregisterForCommunicationAllowedStateChanged: No internal callback.");
+ loge("unregisterForCommunicationAccessStateChanged: No internal callback.");
}
} else {
throw new IllegalStateException("telephony service is null.");
}
} catch (RemoteException ex) {
- loge("unregisterForCommunicationAllowedStateChanged() RemoteException: " + ex);
+ loge("unregisterForCommunicationAccessStateChanged() RemoteException: " + ex);
ex.rethrowAsRuntimeException();
}
}
@@ -3690,6 +3690,11 @@ public final class SatelliteManager {
* @param list The list of provisioned satellite subscriber infos.
* @param executor The executor on which the callback will be called.
* @param callback The callback object to which the result will be delivered.
+ * If the request is successful, {@link OutcomeReceiver#onResult(Object)}
+ * will return {@code true}.
+ * If the request is not successful,
+ * {@link OutcomeReceiver#onError(Throwable)} will return an error with
+ * a SatelliteException.
*
* @throws SecurityException if the caller doesn't have required permission.
* @hide
@@ -3746,6 +3751,11 @@ public final class SatelliteManager {
* @param list The list of deprovisioned satellite subscriber infos.
* @param executor The executor on which the callback will be called.
* @param callback The callback object to which the result will be delivered.
+ * If the request is successful, {@link OutcomeReceiver#onResult(Object)}
+ * will return {@code true}.
+ * If the request is not successful,
+ * {@link OutcomeReceiver#onError(Throwable)} will return an error with
+ * a SatelliteException.
*
* @throws SecurityException if the caller doesn't have required permission.
* @hide
diff --git a/telephony/java/android/telephony/satellite/SatellitePosition.java b/telephony/java/android/telephony/satellite/SatellitePosition.java
index 46af5c827571..354b729f3854 100644
--- a/telephony/java/android/telephony/satellite/SatellitePosition.java
+++ b/telephony/java/android/telephony/satellite/SatellitePosition.java
@@ -33,6 +33,7 @@ import java.util.Objects;
* Longitude is the angular distance, measured in degrees, east or west of the prime longitude line
* ranging from -180 to 180 degrees
* Altitude is the distance from the center of the Earth to the satellite, measured in kilometers
+ * Latitude is not added as only geo stationary satellite are handled for now.
*
* @hide
*/
diff --git a/telephony/java/android/telephony/satellite/SatelliteSubscriberInfo.java b/telephony/java/android/telephony/satellite/SatelliteSubscriberInfo.java
index 6e33995f1a3c..9d9cac9702bb 100644
--- a/telephony/java/android/telephony/satellite/SatelliteSubscriberInfo.java
+++ b/telephony/java/android/telephony/satellite/SatelliteSubscriberInfo.java
@@ -47,7 +47,7 @@ public final class SatelliteSubscriberInfo implements Parcelable {
/** apn */
private String mNiddApn;
- private int mSubId;
+ private int mSubscriptionId;
/** SubscriberId format is the ICCID. */
public static final int SUBSCRIBER_ID_TYPE_ICCID = 0;
@@ -75,7 +75,7 @@ public final class SatelliteSubscriberInfo implements Parcelable {
this.mSubscriberId = builder.mSubscriberId;
this.mCarrierId = builder.mCarrierId;
this.mNiddApn = builder.mNiddApn;
- this.mSubId = builder.mSubId;
+ this.mSubscriptionId = builder.mSubscriptionId;
this.mSubscriberIdType = builder.mSubscriberIdType;
}
@@ -87,7 +87,7 @@ public final class SatelliteSubscriberInfo implements Parcelable {
private int mCarrierId;
@NonNull
private String mNiddApn;
- private int mSubId;
+ private int mSubscriptionId;
@SubscriberIdType
private int mSubscriberIdType;
@@ -125,8 +125,8 @@ public final class SatelliteSubscriberInfo implements Parcelable {
* Set the subId and returns the Builder class.
*/
@NonNull
- public Builder setSubId(int subId) {
- mSubId = subId;
+ public Builder setSubscriptionId(int subId) {
+ mSubscriptionId = subId;
return this;
}
@@ -153,7 +153,7 @@ public final class SatelliteSubscriberInfo implements Parcelable {
out.writeString(mSubscriberId);
out.writeInt(mCarrierId);
out.writeString(mNiddApn);
- out.writeInt(mSubId);
+ out.writeInt(mSubscriptionId);
out.writeInt(mSubscriberIdType);
}
@@ -203,8 +203,8 @@ public final class SatelliteSubscriberInfo implements Parcelable {
/**
* Return the subscriptionId of the subscription which is used for satellite attachment.
*/
- public int getSubId() {
- return mSubId;
+ public int getSubscriptionId() {
+ return mSubscriptionId;
}
/**
@@ -231,8 +231,8 @@ public final class SatelliteSubscriberInfo implements Parcelable {
sb.append(mNiddApn);
sb.append(",");
- sb.append("SubId:");
- sb.append(mSubId);
+ sb.append("SubscriptionId:");
+ sb.append(mSubscriptionId);
sb.append(",");
sb.append("SubscriberIdType:");
@@ -242,7 +242,8 @@ public final class SatelliteSubscriberInfo implements Parcelable {
@Override
public int hashCode() {
- return Objects.hash(mSubscriberId, mCarrierId, mNiddApn, mSubId, mSubscriberIdType);
+ return Objects.hash(
+ mSubscriberId, mCarrierId, mNiddApn, mSubscriptionId, mSubscriberIdType);
}
@Override
@@ -251,7 +252,8 @@ public final class SatelliteSubscriberInfo implements Parcelable {
if (!(o instanceof SatelliteSubscriberInfo)) return false;
SatelliteSubscriberInfo that = (SatelliteSubscriberInfo) o;
return Objects.equals(mSubscriberId, that.mSubscriberId) && mCarrierId == that.mCarrierId
- && Objects.equals(mNiddApn, that.mNiddApn) && mSubId == that.mSubId
+ && Objects.equals(mNiddApn, that.mNiddApn)
+ && mSubscriptionId == that.mSubscriptionId
&& mSubscriberIdType == that.mSubscriberIdType;
}
@@ -259,7 +261,7 @@ public final class SatelliteSubscriberInfo implements Parcelable {
mSubscriberId = in.readString();
mCarrierId = in.readInt();
mNiddApn = in.readString();
- mSubId = in.readInt();
+ mSubscriptionId = in.readInt();
mSubscriberIdType = in.readInt();
}
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index aa577304c564..08c003027c5b 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -69,7 +69,7 @@ import android.telephony.ims.aidl.IImsRegistrationCallback;
import android.telephony.ims.aidl.IRcsConfigCallback;
import android.telephony.satellite.INtnSignalStrengthCallback;
import android.telephony.satellite.ISatelliteCapabilitiesCallback;
-import android.telephony.satellite.ISatelliteCommunicationAllowedStateCallback;
+import android.telephony.satellite.ISatelliteCommunicationAccessStateCallback;
import android.telephony.satellite.ISatelliteDatagramCallback;
import android.telephony.satellite.ISatelliteDisallowedReasonsCallback;
import android.telephony.satellite.ISatelliteTransmissionUpdateCallback;
@@ -3446,20 +3446,20 @@ interface ITelephony {
*/
@JavaPassthrough(annotation="@android.annotation.RequiresPermission("
+ "android.Manifest.permission.SATELLITE_COMMUNICATION)")
- int registerForCommunicationAllowedStateChanged(int subId,
- in ISatelliteCommunicationAllowedStateCallback callback);
+ int registerForCommunicationAccessStateChanged(int subId,
+ in ISatelliteCommunicationAccessStateCallback callback);
/**
* Unregisters for satellite communication allowed state.
* If callback was not registered before, the request will be ignored.
*
* @param subId The subId of the subscription to unregister for supported state changed.
- * @param callback The callback that was passed to registerForCommunicationAllowedStateChanged.
+ * @param callback The callback that was passed to registerForCommunicationAccessStateChanged.
*/
@JavaPassthrough(annotation="@android.annotation.RequiresPermission("
+ "android.Manifest.permission.SATELLITE_COMMUNICATION)")
- void unregisterForCommunicationAllowedStateChanged(int subId,
- in ISatelliteCommunicationAllowedStateCallback callback);
+ void unregisterForCommunicationAccessStateChanged(int subId,
+ in ISatelliteCommunicationAccessStateCallback callback);
/**
* This API can be used by only CTS to override the boolean configs used by the