Clean up satellite provision APIS
1) report current status on callback registration
2) No need to have vendors implement provision related apis. We can remove these interfaces
3) store provision status in persistent memory in sim table
Bug: 348272056
Flag: com.android.internal.telephony.flags.carrier_roaming_nb_iot_ntn
Test: atest SatelliteControllerTest, SatelliteSOSMessageRecommenderTest,
SubscriptionDatabaseManagerTest, SubscriptionInfoInternalTest
Test: manual e2e test with several times of provision/deprovision then
check SIM DB
Change-Id: I7b57435345f4718b0a9e99946575903315a9efd5
diff --git a/src/java/com/android/internal/telephony/satellite/SatelliteController.java b/src/java/com/android/internal/telephony/satellite/SatelliteController.java
index 110d5b9..621f355 100644
--- a/src/java/com/android/internal/telephony/satellite/SatelliteController.java
+++ b/src/java/com/android/internal/telephony/satellite/SatelliteController.java
@@ -218,7 +218,6 @@
private static final int EVENT_RADIO_STATE_CHANGED = 23;
private static final int CMD_IS_SATELLITE_PROVISIONED = 24;
private static final int EVENT_IS_SATELLITE_PROVISIONED_DONE = 25;
- private static final int EVENT_SATELLITE_PROVISION_STATE_CHANGED = 26;
private static final int EVENT_PENDING_DATAGRAMS = 27;
private static final int EVENT_SATELLITE_MODEM_STATE_CHANGED = 28;
private static final int EVENT_SET_SATELLITE_PLMN_INFO_DONE = 29;
@@ -295,8 +294,6 @@
private boolean mWaitingForDisableSatelliteModemResponse = false;
private boolean mWaitingForSatelliteModemOff = false;
- private final AtomicBoolean mRegisteredForProvisionStateChangedWithSatelliteService =
- new AtomicBoolean(false);
private final AtomicBoolean mRegisteredForPendingDatagramCountWithSatelliteService =
new AtomicBoolean(false);
private final AtomicBoolean mRegisteredForSatelliteModemStateChangedWithSatelliteService =
@@ -349,9 +346,11 @@
private final Object mIsRadioOnLock = new Object();
@GuardedBy("mIsRadioOnLock")
private boolean mIsRadioOn = false;
- private final Object mSatelliteViaOemProvisionLock = new Object();
+ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE)
+ protected final Object mSatelliteViaOemProvisionLock = new Object();
+ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE)
@GuardedBy("mSatelliteViaOemProvisionLock")
- private Boolean mIsSatelliteViaOemProvisioned = null;
+ protected Boolean mIsSatelliteViaOemProvisioned = null;
@GuardedBy("mSatelliteViaOemProvisionLock")
private Boolean mOverriddenIsSatelliteViaOemProvisioned = null;
private final Object mSatelliteCapabilitiesLock = new Object();
@@ -584,7 +583,6 @@
mIsRadioOn = phone.isRadioOn();
}
- registerForSatelliteProvisionStateChanged();
registerForPendingDatagramCount();
registerForSatelliteModemStateChanged();
registerForServiceStateChanged();
@@ -1022,11 +1020,12 @@
break;
}
mSatelliteProvisionCallbacks.put(argument.subId, argument.callback);
- onCompleted = obtainMessage(EVENT_PROVISION_SATELLITE_SERVICE_DONE, request);
// Log the current time for provision triggered
mProvisionMetricsStats.setProvisioningStartTime();
- mSatelliteModemInterface.provisionSatelliteService(argument.token,
- argument.provisionData, onCompleted);
+ Message provisionSatelliteServiceDoneEvent = this.obtainMessage(
+ EVENT_PROVISION_SATELLITE_SERVICE_DONE,
+ new AsyncResult(request, SATELLITE_RESULT_SUCCESS, null));
+ provisionSatelliteServiceDoneEvent.sendToTarget();
break;
}
@@ -1045,11 +1044,13 @@
request = (SatelliteControllerHandlerRequest) msg.obj;
ProvisionSatelliteServiceArgument argument =
(ProvisionSatelliteServiceArgument) request.argument;
- onCompleted = obtainMessage(EVENT_DEPROVISION_SATELLITE_SERVICE_DONE, request);
if (argument.callback != null) {
mProvisionMetricsStats.setProvisioningStartTime();
}
- mSatelliteModemInterface.deprovisionSatelliteService(argument.token, onCompleted);
+ Message deprovisionSatelliteServiceDoneEvent = this.obtainMessage(
+ EVENT_DEPROVISION_SATELLITE_SERVICE_DONE,
+ new AsyncResult(request, SATELLITE_RESULT_SUCCESS, null));
+ deprovisionSatelliteServiceDoneEvent.sendToTarget();
break;
}
@@ -1346,8 +1347,10 @@
case CMD_IS_SATELLITE_PROVISIONED: {
request = (SatelliteControllerHandlerRequest) msg.obj;
- onCompleted = obtainMessage(EVENT_IS_SATELLITE_PROVISIONED_DONE, request);
- mSatelliteModemInterface.requestIsSatelliteProvisioned(onCompleted);
+ Message isProvisionedDoneEvent = this.obtainMessage(
+ EVENT_IS_SATELLITE_PROVISIONED_DONE,
+ new AsyncResult(request, SATELLITE_RESULT_SUCCESS, null));
+ isProvisionedDoneEvent.sendToTarget();
break;
}
@@ -1356,15 +1359,6 @@
break;
}
- case EVENT_SATELLITE_PROVISION_STATE_CHANGED:
- ar = (AsyncResult) msg.obj;
- if (ar.result == null) {
- ploge("EVENT_SATELLITE_PROVISION_STATE_CHANGED: result is null");
- } else {
- handleEventSatelliteProvisionStateChanged((boolean) ar.result);
- }
- break;
-
case EVENT_PENDING_DATAGRAMS:
plogd("Received EVENT_PENDING_DATAGRAMS");
IIntegerConsumer internalCallback = new IIntegerConsumer.Stub() {
@@ -2051,12 +2045,7 @@
return;
}
- Boolean satelliteProvisioned = isSatelliteViaOemProvisioned();
- if (satelliteProvisioned == null) {
- result.accept(SatelliteManager.SATELLITE_RESULT_INVALID_TELEPHONY_STATE);
- return;
- }
- if (!satelliteProvisioned) {
+ if (Boolean.FALSE.equals(isSatelliteViaOemProvisioned())) {
result.accept(SATELLITE_RESULT_SUCCESS);
return;
}
@@ -2083,6 +2072,18 @@
}
mSatelliteProvisionStateChangedListeners.put(callback.asBinder(), callback);
+
+ boolean isProvisioned = Boolean.TRUE.equals(isSatelliteViaOemProvisioned());
+ try {
+ callback.onSatelliteProvisionStateChanged(isProvisioned);
+ } catch (RemoteException ex) {
+ loge("setSatelliteServicePackageName: " + ex);
+ }
+ synchronized (mSatelliteViaOemProvisionLock) {
+ plogd("registerForSatelliteProvisionStateChanged: report current provisioned "
+ + "state, state=" + isProvisioned);
+ }
+
return SATELLITE_RESULT_SUCCESS;
}
@@ -2584,26 +2585,28 @@
* This API can be used by only CTS to update satellite vendor service package name.
*
* @param servicePackageName The package name of the satellite vendor service.
+ * @param provisioned Whether satellite should be provisioned or not.
* @return {@code true} if the satellite vendor service is set successfully,
* {@code false} otherwise.
*/
- public boolean setSatelliteServicePackageName(@Nullable String servicePackageName) {
- if (!mFeatureFlags.oemEnabledSatelliteFlag()) {
- plogd("setSatelliteServicePackageName: oemEnabledSatelliteFlag is disabled");
- return false;
- }
+ public boolean setSatelliteServicePackageName(@Nullable String servicePackageName,
+ String provisioned) {
if (!isMockModemAllowed()) {
plogd("setSatelliteServicePackageName: mock modem not allowed");
return false;
}
// Cached states need to be cleared whenever switching satellite vendor services.
- plogd("setSatelliteServicePackageName: Resetting cached states");
+ plogd("setSatelliteServicePackageName: Resetting cached states, provisioned="
+ + provisioned);
synchronized (mIsSatelliteSupportedLock) {
mIsSatelliteSupported = null;
}
synchronized (mSatelliteViaOemProvisionLock) {
- mIsSatelliteViaOemProvisioned = null;
+ mIsSatelliteViaOemProvisioned = Optional.ofNullable(provisioned)
+ .filter(s -> s.equalsIgnoreCase("true") || s.equalsIgnoreCase("false"))
+ .map(s -> s.equalsIgnoreCase("true"))
+ .orElse(null);
}
synchronized (mIsSatelliteEnabledLock) {
mIsSatelliteEnabled = null;
@@ -3484,38 +3487,6 @@
}
/**
- * Posts the specified command to be executed on the main thread. As this is a synchronous
- * request, it waits until the request is complete and then return the result.
- *
- * @param command command to be executed on the main thread
- * @param argument additional parameters required to perform of the operation
- * @param phone phone object used to perform the operation.
- * @return result of the operation
- */
- private @Nullable Object sendRequest(int command, @NonNull Object argument,
- @Nullable Phone phone) {
- if (Looper.myLooper() == this.getLooper()) {
- throw new RuntimeException("This method will deadlock if called from the main thread");
- }
-
- SatelliteControllerHandlerRequest request = new SatelliteControllerHandlerRequest(
- argument, phone);
- Message msg = this.obtainMessage(command, request);
- msg.sendToTarget();
-
- synchronized (request) {
- while(request.result == null) {
- try {
- request.wait();
- } catch (InterruptedException e) {
- // Do nothing, go back and wait until the request is complete.
- }
- }
- }
- return request.result;
- }
-
- /**
* Check if satellite is provisioned for a subscription on the device.
* @return true if satellite is provisioned on the given subscription else return false.
*/
@@ -3530,16 +3501,13 @@
if (mIsSatelliteViaOemProvisioned != null) {
return mIsSatelliteViaOemProvisioned;
}
- }
- requestIsSatelliteProvisioned(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,
- new ResultReceiver(this) {
- @Override
- protected void onReceiveResult(int resultCode, Bundle resultData) {
- plogd("isSatelliteViaOemProvisioned: resultCode=" + resultCode);
- }
- });
- return null;
+ if (mIsSatelliteViaOemProvisioned == null) {
+ mIsSatelliteViaOemProvisioned = getPersistedOemEnabledSatelliteProvisionStatus();
+ }
+
+ return mIsSatelliteViaOemProvisioned;
+ }
}
private void handleSatelliteEnabled(SatelliteControllerHandlerRequest request) {
@@ -3595,7 +3563,6 @@
+ "changed to " + supported);
if (supported) {
- registerForSatelliteProvisionStateChanged();
registerForPendingDatagramCount();
registerForSatelliteModemStateChanged();
registerForNtnSignalStrengthChanged();
@@ -3644,16 +3611,6 @@
}
}
- private void registerForSatelliteProvisionStateChanged() {
- if (mSatelliteModemInterface.isSatelliteServiceSupported()) {
- if (!mRegisteredForProvisionStateChangedWithSatelliteService.get()) {
- mSatelliteModemInterface.registerForSatelliteProvisionStateChanged(
- this, EVENT_SATELLITE_PROVISION_STATE_CHANGED, null);
- mRegisteredForProvisionStateChangedWithSatelliteService.set(true);
- }
- }
- }
-
private void registerForPendingDatagramCount() {
if (mSatelliteModemInterface.isSatelliteServiceSupported()) {
if (!mRegisteredForPendingDatagramCountWithSatelliteService.get()) {
@@ -4627,6 +4584,7 @@
return SatelliteManager.SATELLITE_RESULT_INVALID_TELEPHONY_STATE;
}
if (!satelliteProvisioned) {
+ plogd("evaluateOemSatelliteRequestAllowed: satellite service is not provisioned");
return SatelliteManager.SATELLITE_RESULT_SERVICE_NOT_PROVISIONED;
}
}
@@ -4882,28 +4840,58 @@
private void persistOemEnabledSatelliteProvisionStatus(boolean isProvisioned) {
synchronized (mSatelliteViaOemProvisionLock) {
plogd("persistOemEnabledSatelliteProvisionStatus: isProvisioned=" + isProvisioned);
-
- if (!loadSatelliteSharedPreferences()) return;
-
- if (mSharedPreferences == null) {
- ploge("persistOemEnabledSatelliteProvisionStatus: mSharedPreferences is null");
+ if (mFeatureFlags.carrierRoamingNbIotNtn()) {
+ int subId = SatelliteServiceUtils.getOemBasedNonTerrestrialSubscriptionId(mContext);
+ if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
+ try {
+ mSubscriptionManagerService.setIsSatelliteProvisionedForNonIpDatagram(subId,
+ isProvisioned);
+ plogd("persistOemEnabledSatelliteProvisionStatus: subId=" + subId);
+ } catch (IllegalArgumentException | SecurityException ex) {
+ ploge("setIsSatelliteProvisionedForNonIpDatagram: subId=" + subId + ", ex="
+ + ex);
+ }
+ } else {
+ plogd("persistOemEnabledSatelliteProvisionStatus: INVALID_SUBSCRIPTION_ID");
+ }
} else {
- mSharedPreferences.edit().putBoolean(
- OEM_ENABLED_SATELLITE_PROVISION_STATUS_KEY, isProvisioned).apply();
+ if (!loadSatelliteSharedPreferences()) return;
+
+ if (mSharedPreferences == null) {
+ ploge("persistOemEnabledSatelliteProvisionStatus: mSharedPreferences is null");
+ } else {
+ mSharedPreferences.edit().putBoolean(
+ OEM_ENABLED_SATELLITE_PROVISION_STATUS_KEY, isProvisioned).apply();
+ }
}
}
}
- private boolean getPersistedOemEnabledSatelliteProvisionStatus() {
+ @Nullable
+ private Boolean getPersistedOemEnabledSatelliteProvisionStatus() {
+ plogd("getPersistedOemEnabledSatelliteProvisionStatus:");
synchronized (mSatelliteViaOemProvisionLock) {
- if (!loadSatelliteSharedPreferences()) return false;
-
- if (mSharedPreferences == null) {
- ploge("getPersistedOemEnabledSatelliteProvisionStatus: mSharedPreferences is null");
- return false;
+ if (mFeatureFlags.carrierRoamingNbIotNtn()) {
+ int subId = SatelliteServiceUtils.getOemBasedNonTerrestrialSubscriptionId(mContext);
+ if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
+ return mSubscriptionManagerService.isSatelliteProvisionedForNonIpDatagram(
+ subId);
+ } else {
+ plogd("getPersistedOemEnabledSatelliteProvisionStatus: "
+ + "subId=INVALID_SUBSCRIPTION_ID, return null");
+ return null;
+ }
} else {
- return mSharedPreferences.getBoolean(
- OEM_ENABLED_SATELLITE_PROVISION_STATUS_KEY, false);
+ if (!loadSatelliteSharedPreferences()) return false;
+
+ if (mSharedPreferences == null) {
+ ploge("getPersistedOemEnabledSatelliteProvisionStatus: mSharedPreferences is "
+ + "null");
+ return false;
+ } else {
+ return mSharedPreferences.getBoolean(
+ OEM_ENABLED_SATELLITE_PROVISION_STATUS_KEY, false);
+ }
}
}
}
@@ -4924,31 +4912,13 @@
}
private void handleIsSatelliteProvisionedDoneEvent(@NonNull AsyncResult ar) {
+ logd("handleIsSatelliteProvisionedDoneEvent:");
SatelliteControllerHandlerRequest request = (SatelliteControllerHandlerRequest) ar.userObj;
- int error = SatelliteServiceUtils.getSatelliteError(
- ar, "handleIsSatelliteProvisionedDoneEvent");
- boolean isSatelliteProvisionedInModem = false;
- if (error == SATELLITE_RESULT_SUCCESS) {
- if (ar.result == null) {
- ploge("handleIsSatelliteProvisionedDoneEvent: result is null");
- error = SatelliteManager.SATELLITE_RESULT_INVALID_TELEPHONY_STATE;
- } else {
- isSatelliteProvisionedInModem = ((int[]) ar.result)[0] == 1;
- }
- } else if (error == SATELLITE_RESULT_REQUEST_NOT_SUPPORTED) {
- plogd("handleIsSatelliteProvisionedDoneEvent: Modem does not support this request");
- isSatelliteProvisionedInModem = true;
- }
- boolean isSatelliteViaOemProvisioned =
- isSatelliteProvisionedInModem && getPersistedOemEnabledSatelliteProvisionStatus();
- plogd("isSatelliteProvisionedInModem=" + isSatelliteProvisionedInModem
- + ", isSatelliteViaOemProvisioned=" + isSatelliteViaOemProvisioned);
+
Bundle bundle = new Bundle();
- bundle.putBoolean(SatelliteManager.KEY_SATELLITE_PROVISIONED, isSatelliteViaOemProvisioned);
- synchronized (mSatelliteViaOemProvisionLock) {
- mIsSatelliteViaOemProvisioned = isSatelliteViaOemProvisioned;
- }
- ((ResultReceiver) request.argument).send(error, bundle);
+ bundle.putBoolean(SatelliteManager.KEY_SATELLITE_PROVISIONED,
+ Boolean.TRUE.equals(isSatelliteViaOemProvisioned()));
+ ((ResultReceiver) request.argument).send(SATELLITE_RESULT_SUCCESS, bundle);
}
private long getWaitForSatelliteEnablingResponseTimeoutMillis() {
diff --git a/src/java/com/android/internal/telephony/satellite/SatelliteModemInterface.java b/src/java/com/android/internal/telephony/satellite/SatelliteModemInterface.java
index f0a96c2..849004a 100644
--- a/src/java/com/android/internal/telephony/satellite/SatelliteModemInterface.java
+++ b/src/java/com/android/internal/telephony/satellite/SatelliteModemInterface.java
@@ -86,8 +86,6 @@
private boolean mIsBinding;
@Nullable private PersistentLogger mPersistentLogger = null;
- @NonNull private final RegistrantList mSatelliteProvisionStateChangedRegistrants =
- new RegistrantList();
@NonNull private final RegistrantList mSatellitePositionInfoChangedRegistrants =
new RegistrantList();
@NonNull private final RegistrantList mDatagramTransferStateChangedRegistrants =
@@ -113,11 +111,6 @@
}
@Override
- public void onSatelliteProvisionStateChanged(boolean provisioned) {
- mSatelliteProvisionStateChangedRegistrants.notifyResult(provisioned);
- }
-
- @Override
public void onSatelliteDatagramReceived(
android.telephony.satellite.stub.SatelliteDatagram datagram, int pendingCount) {
if (notifyResultIfExpectedListener()) {
@@ -403,27 +396,6 @@
}
/**
- * Registers for the satellite provision state changed.
- *
- * @param h Handler for notification message.
- * @param what User-defined message code.
- * @param obj User object.
- */
- public void registerForSatelliteProvisionStateChanged(
- @NonNull Handler h, int what, @Nullable Object obj) {
- mSatelliteProvisionStateChangedRegistrants.add(h, what, obj);
- }
-
- /**
- * Unregisters for the satellite provision state changed.
- *
- * @param h Handler to be removed from the registrant list.
- */
- public void unregisterForSatelliteProvisionStateChanged(@NonNull Handler h) {
- mSatelliteProvisionStateChangedRegistrants.remove(h);
- }
-
- /**
* Registers for satellite position info changed from satellite modem.
*
* @param h Handler for notification message.
@@ -889,113 +861,6 @@
}
/**
- * Provision the device with a satellite provider.
- * This is needed if the provider allows dynamic registration.
- * Once provisioned, ISatelliteListener#onSatelliteProvisionStateChanged should report true.
- *
- * @param token The token to be used as a unique identifier for provisioning with satellite
- * gateway.
- * @param provisionData Data from the provisioning app that can be used by provisioning server
- * @param message The Message to send to result of the operation to.
- */
- public void provisionSatelliteService(@NonNull String token, @NonNull byte[] provisionData,
- @NonNull Message message) {
- if (mSatelliteService != null) {
- try {
- mSatelliteService.provisionSatelliteService(token, provisionData,
- new IIntegerConsumer.Stub() {
- @Override
- public void accept(int result) {
- int error = SatelliteServiceUtils.fromSatelliteError(result);
- plogd("provisionSatelliteService: " + error);
- Binder.withCleanCallingIdentity(() ->
- sendMessageWithResult(message, null, error));
- }
- });
- } catch (RemoteException e) {
- ploge("provisionSatelliteService: RemoteException " + e);
- sendMessageWithResult(message, null,
- SatelliteManager.SATELLITE_RESULT_SERVICE_ERROR);
- }
- } else {
- ploge("provisionSatelliteService: Satellite service is unavailable.");
- sendMessageWithResult(message, null,
- SatelliteManager.SATELLITE_RESULT_RADIO_NOT_AVAILABLE);
- }
- }
-
- /**
- * Deprovision the device with the satellite provider.
- * This is needed if the provider allows dynamic registration.
- * Once deprovisioned, ISatelliteListener#onSatelliteProvisionStateChanged should report false.
- *
- * @param token The token of the device/subscription to be deprovisioned.
- * @param message The Message to send to result of the operation to.
- */
- public void deprovisionSatelliteService(@NonNull String token, @NonNull Message message) {
- if (mSatelliteService != null) {
- try {
- mSatelliteService.deprovisionSatelliteService(token, new IIntegerConsumer.Stub() {
- @Override
- public void accept(int result) {
- int error = SatelliteServiceUtils.fromSatelliteError(result);
- plogd("deprovisionSatelliteService: " + error);
- Binder.withCleanCallingIdentity(() ->
- sendMessageWithResult(message, null, error));
- }
- });
- } catch (RemoteException e) {
- ploge("deprovisionSatelliteService: RemoteException " + e);
- sendMessageWithResult(message, null,
- SatelliteManager.SATELLITE_RESULT_SERVICE_ERROR);
- }
- } else {
- ploge("deprovisionSatelliteService: Satellite service is unavailable.");
- sendMessageWithResult(message, null,
- SatelliteManager.SATELLITE_RESULT_RADIO_NOT_AVAILABLE);
- }
- }
-
- /**
- * Request to get whether this device is provisioned with a satellite provider.
- *
- * @param message The Message to send to result of the operation to.
- */
- public void requestIsSatelliteProvisioned(@NonNull Message message) {
- if (mSatelliteService != null) {
- try {
- mSatelliteService.requestIsSatelliteProvisioned(new IIntegerConsumer.Stub() {
- @Override
- public void accept(int result) {
- int error = SatelliteServiceUtils.fromSatelliteError(result);
- plogd("requestIsSatelliteProvisioned: " + error);
- Binder.withCleanCallingIdentity(() ->
- sendMessageWithResult(message, null, error));
- }
- }, new IBooleanConsumer.Stub() {
- @Override
- public void accept(boolean result) {
- // Convert for compatibility with SatelliteResponse
- // TODO: This should just report result instead.
- int[] provisioned = new int[] {result ? 1 : 0};
- plogd("requestIsSatelliteProvisioned: " + Arrays.toString(provisioned));
- Binder.withCleanCallingIdentity(() -> sendMessageWithResult(
- message, provisioned, SatelliteManager.SATELLITE_RESULT_SUCCESS));
- }
- });
- } catch (RemoteException e) {
- ploge("requestIsSatelliteProvisioned: RemoteException " + e);
- sendMessageWithResult(message, null,
- SatelliteManager.SATELLITE_RESULT_SERVICE_ERROR);
- }
- } else {
- ploge("requestIsSatelliteProvisioned: Satellite service is unavailable.");
- sendMessageWithResult(message, null,
- SatelliteManager.SATELLITE_RESULT_RADIO_NOT_AVAILABLE);
- }
- }
-
- /**
* Poll the pending datagrams to be received over satellite.
* The satellite service should check if there are any pending datagrams to be received over
* satellite and report them via ISatelliteListener#onSatelliteDatagramsReceived.
diff --git a/src/java/com/android/internal/telephony/satellite/SatelliteServiceUtils.java b/src/java/com/android/internal/telephony/satellite/SatelliteServiceUtils.java
index 33bdfaa..405cf59 100644
--- a/src/java/com/android/internal/telephony/satellite/SatelliteServiceUtils.java
+++ b/src/java/com/android/internal/telephony/satellite/SatelliteServiceUtils.java
@@ -33,6 +33,7 @@
import android.telephony.NetworkRegistrationInfo;
import android.telephony.Rlog;
import android.telephony.ServiceState;
+import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.satellite.AntennaPosition;
import android.telephony.satellite.NtnSignalStrength;
@@ -305,6 +306,26 @@
}
/**
+ * Get the subscription ID which supports OEM based NTN satellite service.
+ *
+ * @return ID of the subscription that supports OEM-based satellite if any,
+ * return {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID} otherwise.
+ */
+ public static int getOemBasedNonTerrestrialSubscriptionId(@NonNull Context context) {
+ List<SubscriptionInfo> infoList =
+ SubscriptionManagerService.getInstance().getAllSubInfoList(
+ context.getOpPackageName(), null);
+
+ int subId = infoList.stream()
+ .filter(info -> info.isOnlyNonTerrestrialNetwork())
+ .mapToInt(SubscriptionInfo::getSubscriptionId)
+ .findFirst()
+ .orElse(SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+ logd("getOemBasedNonTerrestrialSubscriptionId: subId=" + subId);
+ return subId;
+ }
+
+ /**
* Expected format of the input dictionary bundle is:
* <ul>
* <li>Key: PLMN string.</li>
diff --git a/src/java/com/android/internal/telephony/subscription/SubscriptionDatabaseManager.java b/src/java/com/android/internal/telephony/subscription/SubscriptionDatabaseManager.java
index cd6e6aa..d835f2d 100644
--- a/src/java/com/android/internal/telephony/subscription/SubscriptionDatabaseManager.java
+++ b/src/java/com/android/internal/telephony/subscription/SubscriptionDatabaseManager.java
@@ -296,7 +296,10 @@
SubscriptionInfoInternal::getSatelliteEntitlementPlmns),
new AbstractMap.SimpleImmutableEntry<>(
SimInfo.COLUMN_SATELLITE_ESOS_SUPPORTED,
- SubscriptionInfoInternal::getSatelliteESOSSupported)
+ SubscriptionInfoInternal::getSatelliteESOSSupported),
+ new AbstractMap.SimpleImmutableEntry<>(
+ SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM,
+ SubscriptionInfoInternal::getIsSatelliteProvisionedForNonIpDatagram)
);
/**
@@ -439,7 +442,10 @@
SubscriptionDatabaseManager::setSatelliteEntitlementStatus),
new AbstractMap.SimpleImmutableEntry<>(
SimInfo.COLUMN_SATELLITE_ESOS_SUPPORTED,
- SubscriptionDatabaseManager::setSatelliteESOSSupported)
+ SubscriptionDatabaseManager::setSatelliteESOSSupported),
+ new AbstractMap.SimpleImmutableEntry<>(
+ SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM,
+ SubscriptionDatabaseManager::setIsSatelliteProvisionedForNonIpDatagram)
);
/**
@@ -2185,6 +2191,24 @@
}
/**
+ * Set whether the subscription is provisioned for OEM-enabled or carrier roaming NB-IOT
+ * satellite service.
+ *
+ * @param subId Subscription ID.
+ * @param isSatelliteProvisionedForNonIpDatagram {@code 1} if it is provisioned for OEM-enabled
+ * or carrier roaming NB-IOT satellite service. {@code 0} otherwise.
+ *
+ * @throws IllegalArgumentException if the subscription does not exist.
+ */
+ public void setIsSatelliteProvisionedForNonIpDatagram(int subId,
+ int isSatelliteProvisionedForNonIpDatagram) {
+ writeDatabaseAndCacheHelper(subId,
+ SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM,
+ isSatelliteProvisionedForNonIpDatagram,
+ SubscriptionInfoInternal.Builder::setIsSatelliteProvisionedForNonIpDatagram);
+ }
+
+ /**
* Reload the database from content provider to the cache. This must be a synchronous operation
* to prevent cache/database out-of-sync. Callers should be cautious to call this method because
* it might take longer time to complete.
@@ -2422,7 +2446,10 @@
SimInfo.COLUMN_SATELLITE_ENTITLEMENT_STATUS)))
.setSatelliteEntitlementPlmns(cursor.getString(
cursor.getColumnIndexOrThrow(
- SimInfo.COLUMN_SATELLITE_ENTITLEMENT_PLMNS)));
+ SimInfo.COLUMN_SATELLITE_ENTITLEMENT_PLMNS)))
+ .setIsSatelliteProvisionedForNonIpDatagram(cursor.getInt(
+ cursor.getColumnIndexOrThrow(
+ SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM)));
if (mFeatureFlags.oemEnabledSatelliteFlag()) {
builder.setOnlyNonTerrestrialNetwork(cursor.getInt(cursor.getColumnIndexOrThrow(
SimInfo.COLUMN_IS_ONLY_NTN)));
diff --git a/src/java/com/android/internal/telephony/subscription/SubscriptionInfoInternal.java b/src/java/com/android/internal/telephony/subscription/SubscriptionInfoInternal.java
index 7684864..92e112d 100644
--- a/src/java/com/android/internal/telephony/subscription/SubscriptionInfoInternal.java
+++ b/src/java/com/android/internal/telephony/subscription/SubscriptionInfoInternal.java
@@ -498,6 +498,13 @@
private final int mIsSatelliteESOSSupported;
/**
+ * Whether this subscription is provisioned for OEM-enabled or carrier roaming NB-IOT satellite
+ * service or not.
+ * By default, its disabled. It is intended to use integer to fit the database format.
+ */
+ private final int mIsSatelliteProvisionedForNonIpDatagram;
+
+ /**
* Constructor from builder.
*
* @param builder Builder of {@link SubscriptionInfoInternal}.
@@ -577,6 +584,8 @@
this.mIsSatelliteEntitlementStatus = builder.mIsSatelliteEntitlementStatus;
this.mSatelliteEntitlementPlmns = builder.mSatelliteEntitlementPlmns;
this.mIsSatelliteESOSSupported = builder.mIsSatelliteESOSSupported;
+ this.mIsSatelliteProvisionedForNonIpDatagram =
+ builder.mIsSatelliteProvisionedForNonIpDatagram;
}
/**
@@ -1280,6 +1289,16 @@
return mIsSatelliteESOSSupported;
}
+ /**
+ * Return whether the subscription is provisioned for oem satellite service or not.
+ *
+ * @return {@code 1} if the subscription is provisioned for oem stellite service. {@code 0}
+ * otherwise.
+ */
+ public int getIsSatelliteProvisionedForNonIpDatagram() {
+ return mIsSatelliteProvisionedForNonIpDatagram;
+ }
+
/** @return converted {@link SubscriptionInfo}. */
@NonNull
public SubscriptionInfo toSubscriptionInfo() {
@@ -1384,6 +1403,8 @@
+ " satelliteEntitlementStatus=" + mIsSatelliteEntitlementStatus
+ " satelliteEntitlementPlmns=" + mSatelliteEntitlementPlmns
+ " isSatelliteESOSSupported=" + mIsSatelliteESOSSupported
+ + " isSatelliteProvisionedForNonIpDatagram="
+ + mIsSatelliteProvisionedForNonIpDatagram
+ "]";
}
@@ -1447,7 +1468,9 @@
&& mTransferStatus == that.mTransferStatus
&& mIsSatelliteEntitlementStatus == that.mIsSatelliteEntitlementStatus
&& mSatelliteEntitlementPlmns.equals(that.mSatelliteEntitlementPlmns)
- && mIsSatelliteESOSSupported == that.mIsSatelliteESOSSupported;
+ && mIsSatelliteESOSSupported == that.mIsSatelliteESOSSupported
+ && mIsSatelliteProvisionedForNonIpDatagram
+ == that.mIsSatelliteProvisionedForNonIpDatagram;
}
@Override
@@ -1480,7 +1503,8 @@
mIsSatelliteEnabled, mCardId, mIsGroupDisabled,
mIsSatelliteAttachEnabledForCarrier, mIsOnlyNonTerrestrialNetwork,
mServiceCapabilities, mTransferStatus, mIsSatelliteEntitlementStatus,
- mSatelliteEntitlementPlmns, mIsSatelliteESOSSupported);
+ mSatelliteEntitlementPlmns, mIsSatelliteESOSSupported,
+ mIsSatelliteProvisionedForNonIpDatagram);
result = 31 * result + Arrays.hashCode(mNativeAccessRules);
result = 31 * result + Arrays.hashCode(mCarrierConfigAccessRules);
result = 31 * result + Arrays.hashCode(mRcsConfig);
@@ -1894,6 +1918,11 @@
private int mIsSatelliteESOSSupported = 0;
/**
+ * Whether this subscription is provisioned for oem satellite service or not.
+ */
+ private int mIsSatelliteProvisionedForNonIpDatagram = 0;
+
+ /**
* Default constructor.
*/
public Builder() {
@@ -1976,6 +2005,7 @@
mIsSatelliteEntitlementStatus = info.mIsSatelliteEntitlementStatus;
mSatelliteEntitlementPlmns = info.mSatelliteEntitlementPlmns;
mIsSatelliteESOSSupported = info.mIsSatelliteESOSSupported;
+ mIsSatelliteProvisionedForNonIpDatagram = info.mIsSatelliteProvisionedForNonIpDatagram;
}
/**
@@ -2959,6 +2989,20 @@
}
/**
+ * Set whether the subscription is provisioned for oem satellite service or not.
+ *
+ * @param isSatelliteProvisionedForNonIpDatagram {@code 1} if the subscription is for NTN,
+ * {@code 0} otherwise.
+ * @return The builder.
+ */
+ @NonNull
+ public Builder setIsSatelliteProvisionedForNonIpDatagram(
+ int isSatelliteProvisionedForNonIpDatagram) {
+ mIsSatelliteProvisionedForNonIpDatagram = isSatelliteProvisionedForNonIpDatagram;
+ return this;
+ }
+
+ /**
* Build the {@link SubscriptionInfoInternal}.
*
* @return The {@link SubscriptionInfoInternal} instance.
diff --git a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java
index eeb2239..5f2272b 100644
--- a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java
+++ b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java
@@ -196,7 +196,8 @@
SimInfo.COLUMN_IS_ONLY_NTN,
SimInfo.COLUMN_SATELLITE_ENTITLEMENT_STATUS,
SimInfo.COLUMN_SATELLITE_ENTITLEMENT_PLMNS,
- SimInfo.COLUMN_SATELLITE_ESOS_SUPPORTED
+ SimInfo.COLUMN_SATELLITE_ESOS_SUPPORTED,
+ SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM
);
/**
@@ -4659,6 +4660,24 @@
}
/**
+ * Set whether the subscription is provisioned for OEM-enabled or carrier roaming NB-IOT
+ * satellite service or not.
+ *
+ * @param subId subscription id.
+ * @param isSatelliteProvisionedForNonIpDatagram {@code true} if subId is provisioned.
+ * {@code false} otherwise.
+ */
+ public void setIsSatelliteProvisionedForNonIpDatagram(int subId,
+ boolean isSatelliteProvisionedForNonIpDatagram) {
+ try {
+ mSubscriptionDatabaseManager.setIsSatelliteProvisionedForNonIpDatagram(
+ subId, (isSatelliteProvisionedForNonIpDatagram ? 1 : 0));
+ } catch (IllegalArgumentException e) {
+ loge("setIsSatelliteProvisionedForNonIpDatagram: invalid subId=" + subId);
+ }
+ }
+
+ /**
* Get the satellite ESOS supported value in the subscription database.
*
* @param subId subscription id.
@@ -4678,6 +4697,20 @@
}
/**
+ * Get whether the subscription is provisioned for OEM-enabled or carrier roaming NB-IOT
+ * satellite service or not.
+ *
+ * @param subId subscription id.
+ * @return {@code true} if it is provisioned for oem satellite service. {@code false} otherwise.
+ */
+ public boolean isSatelliteProvisionedForNonIpDatagram(int subId) {
+ SubscriptionInfoInternal subInfo = mSubscriptionDatabaseManager.getSubscriptionInfoInternal(
+ subId);
+
+ return subInfo.getIsSatelliteProvisionedForNonIpDatagram() == 1;
+ }
+
+ /**
* checks whether esim bootstrap is activated for any of the available active subscription info
* list.
*
diff --git a/tests/telephonytests/src/com/android/internal/telephony/FakeTelephonyProvider.java b/tests/telephonytests/src/com/android/internal/telephony/FakeTelephonyProvider.java
index 4af6f7e..c923f69 100644
--- a/tests/telephonytests/src/com/android/internal/telephony/FakeTelephonyProvider.java
+++ b/tests/telephonytests/src/com/android/internal/telephony/FakeTelephonyProvider.java
@@ -136,7 +136,9 @@
+ Telephony.SimInfo.COLUMN_TRANSFER_STATUS + " INTEGER DEFAULT 0,"
+ Telephony.SimInfo.COLUMN_SATELLITE_ENTITLEMENT_STATUS + " INTEGER DEFAULT 0,"
+ Telephony.SimInfo.COLUMN_SATELLITE_ENTITLEMENT_PLMNS + " TEXT,"
- + Telephony.SimInfo.COLUMN_SATELLITE_ESOS_SUPPORTED + " INTEGER DEFAULT 0"
+ + Telephony.SimInfo.COLUMN_SATELLITE_ESOS_SUPPORTED + " INTEGER DEFAULT 0,"
+ + Telephony.SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM
+ + " INTEGER DEFAULT 0"
+ ");";
}
diff --git a/tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteControllerTest.java b/tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteControllerTest.java
index a449187..9493dc7 100644
--- a/tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteControllerTest.java
+++ b/tests/telephonytests/src/com/android/internal/telephony/satellite/SatelliteControllerTest.java
@@ -53,7 +53,6 @@
import static android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_INVALID_TELEPHONY_STATE;
import static android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_MODEM_ERROR;
import static android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_MODEM_TIMEOUT;
-import static android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NOT_AUTHORIZED;
import static android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NOT_SUPPORTED;
import static android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NO_RESOURCES;
import static android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_RADIO_NOT_AVAILABLE;
@@ -93,6 +92,7 @@
import static org.mockito.Mockito.when;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.app.NotificationManager;
import android.content.Context;
import android.content.SharedPreferences;
@@ -581,10 +581,6 @@
Context.NOTIFICATION_SERVICE);
mSatelliteControllerUT =
new TestSatelliteController(mContext, Looper.myLooper(), mFeatureFlags);
- verify(mMockSatelliteModemInterface).registerForSatelliteProvisionStateChanged(
- any(Handler.class),
- eq(26) /* EVENT_SATELLITE_PROVISION_STATE_CHANGED */,
- eq(null));
verify(mMockSatelliteModemInterface).registerForPendingDatagrams(
any(Handler.class),
eq(27) /* EVENT_PENDING_DATAGRAMS */,
@@ -633,7 +629,7 @@
mSatelliteVisibilityTimeReceiver);
processAllMessages();
assertTrue(waitForRequestTimeForNextSatelliteVisibilityResult(1));
- assertEquals(SATELLITE_RESULT_INVALID_TELEPHONY_STATE,
+ assertEquals(SATELLITE_RESULT_SERVICE_NOT_PROVISIONED,
mQueriedSatelliteVisibilityTimeResultCode);
resetSatelliteControllerUT();
@@ -804,7 +800,7 @@
assertEquals(SATELLITE_RESULT_SERVICE_NOT_PROVISIONED,
(long) mIIntegerConsumerResults.get(0));
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
@@ -979,7 +975,13 @@
assertEquals(SATELLITE_RESULT_REQUEST_IN_PROGRESS, (long) mIIntegerConsumerResults.get(0));
mIIntegerConsumerResults.clear();
- resetSatelliteControllerUTToSupportedAndProvisionedState();
+ resetSatelliteControllerUT();
+ setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
+ setProvisionedState(false);
+ verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
+ setProvisionedState(true);
+ processAllMessages();
+ verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
// Should receive callback for the above request when satellite modem is turned off.
assertTrue(waitForIIntegerConsumerResult(1));
assertEquals(SATELLITE_RESULT_INVALID_MODEM_STATE, (long) mIIntegerConsumerResults.get(0));
@@ -1005,13 +1007,13 @@
assertTrue(waitForIIntegerConsumerResult(1));
assertEquals(SATELLITE_RESULT_INVALID_MODEM_STATE, (long) mIIntegerConsumerResults.get(0));
- verify(mMockSessionMetricsStats, times(16)).setInitializationResult(anyInt());
- verify(mMockSessionMetricsStats, times(16)).setSatelliteTechnology(anyInt());
+ verify(mMockSessionMetricsStats, times(17)).setInitializationResult(anyInt());
+ verify(mMockSessionMetricsStats, times(17)).setSatelliteTechnology(anyInt());
verify(mMockSessionMetricsStats, times(3)).setInitializationProcessingTime(anyLong());
verify(mMockSessionMetricsStats, times(2)).setTerminationResult(anyInt());
verify(mMockSessionMetricsStats, times(2)).setTerminationProcessingTime(anyLong());
verify(mMockSessionMetricsStats, times(2)).setSessionDurationSec(anyInt());
- verify(mMockSessionMetricsStats, times(16)).reportSessionMetrics();
+ verify(mMockSessionMetricsStats, times(17)).reportSessionMetrics();
/**
* Make areAllRadiosDisabled return false and move mWaitingForRadioDisabled to true, which
@@ -1078,7 +1080,7 @@
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
// Set provisioned state
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
@@ -1181,7 +1183,7 @@
mStartTransmissionUpdateCallback);
processAllMessages();
assertTrue(waitForIIntegerConsumerResult(1));
- assertEquals(SATELLITE_RESULT_INVALID_TELEPHONY_STATE,
+ assertEquals(SATELLITE_RESULT_SERVICE_NOT_PROVISIONED,
(long) mIIntegerConsumerResults.get(0));
resetSatelliteControllerUT();
@@ -1255,7 +1257,7 @@
mStopTransmissionUpdateCallback);
processAllMessages();
assertTrue(waitForIIntegerConsumerResult(1));
- assertEquals(SATELLITE_RESULT_INVALID_TELEPHONY_STATE,
+ assertEquals(SATELLITE_RESULT_SERVICE_NOT_PROVISIONED,
(long) mIIntegerConsumerResults.get(0));
resetSatelliteControllerUT();
@@ -1319,7 +1321,7 @@
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.requestIsDemoModeEnabled(SUB_ID, mIsDemoModeEnabledReceiver);
assertTrue(waitForRequestIsDemoModeEnabledResult(1));
- assertEquals(SATELLITE_RESULT_INVALID_TELEPHONY_STATE, mQueriedIsDemoModeEnabledResultCode);
+ assertEquals(SATELLITE_RESULT_SERVICE_NOT_PROVISIONED, mQueriedIsDemoModeEnabledResultCode);
assertFalse(mQueriedIsDemoModeEnabled);
resetSatelliteControllerUT();
@@ -1365,7 +1367,6 @@
public void testOnSatelliteServiceConnected() {
verifySatelliteSupported(false, SATELLITE_RESULT_RADIO_NOT_AVAILABLE);
verifySatelliteEnabled(false, SATELLITE_RESULT_INVALID_TELEPHONY_STATE);
- verifySatelliteProvisioned(false, SATELLITE_RESULT_INVALID_TELEPHONY_STATE);
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
setUpResponseForRequestIsSatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
@@ -1377,7 +1378,7 @@
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteEnabled(false, SATELLITE_RESULT_SUCCESS);
- verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
+ verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
}
@Test
@@ -1462,15 +1463,27 @@
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
errorCode = mSatelliteControllerUT.registerForSatelliteProvisionStateChanged(
SUB_ID, callback);
+ processAllMessages();
+ assertTrue(waitForForEvents(
+ semaphore, 1, "testRegisterForSatelliteProvisionStateChanged"));
assertEquals(SATELLITE_RESULT_SUCCESS, errorCode);
- sendProvisionedStateChangedEvent(true, null);
+ String mText = "This is test provision data.";
+ byte[] testProvisionData = mText.getBytes();
+ CancellationSignal cancellationSignal = new CancellationSignal();
+ ICancellationSignal cancelRemote = null;
+ mIIntegerConsumerResults.clear();
+ cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
+ TEST_SATELLITE_TOKEN,
+ testProvisionData, mIIntegerConsumer);
processAllMessages();
assertTrue(waitForForEvents(
semaphore, 1, "testRegisterForSatelliteProvisionStateChanged"));
mSatelliteControllerUT.unregisterForSatelliteProvisionStateChanged(SUB_ID, callback);
- sendProvisionedStateChangedEvent(true, null);
+ cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
+ TEST_SATELLITE_TOKEN,
+ testProvisionData, mIIntegerConsumer);
processAllMessages();
assertFalse(waitForForEvents(
semaphore, 1, "testRegisterForSatelliteProvisionStateChanged"));
@@ -1539,7 +1552,7 @@
mIIntegerConsumerResults.clear();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- sendProvisionedStateChangedEvent(false, null);
+ setProvisionedState(false);
processAllMessages();
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.sendDatagram(SUB_ID, datagramType, datagram, true,
@@ -1552,7 +1565,7 @@
eq(datagramType), eq(datagram), eq(true), any());
mIIntegerConsumerResults.clear();
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.sendDatagram(SUB_ID, datagramType, datagram, true,
@@ -1579,7 +1592,7 @@
mIIntegerConsumerResults.clear();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- sendProvisionedStateChangedEvent(false, null);
+ setProvisionedState(false);
processAllMessages();
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.pollPendingDatagrams(SUB_ID, mIIntegerConsumer);
@@ -1590,7 +1603,7 @@
verify(mMockDatagramController, never()).pollPendingSatelliteDatagrams(anyInt(), any());
mIIntegerConsumerResults.clear();
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.pollPendingDatagrams(SUB_ID, mIIntegerConsumer);
@@ -1633,8 +1646,6 @@
setUpResponseForRequestIsSatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- setUpResponseForProvisionSatelliteService(TEST_SATELLITE_TOKEN, testProvisionData,
- SATELLITE_RESULT_SUCCESS);
cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN,
testProvisionData, mIIntegerConsumer);
@@ -1653,61 +1664,12 @@
assertEquals(SATELLITE_RESULT_SUCCESS, (long) mIIntegerConsumerResults.get(0));
assertNull(cancelRemote);
- // Vendor service does not support the request requestIsSatelliteProvisioned. Telephony will
- // make decision itself
- resetSatelliteControllerUT();
- mIIntegerConsumerResults.clear();
- setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- setUpResponseForRequestIsSatelliteProvisioned(
- false, SATELLITE_RESULT_REQUEST_NOT_SUPPORTED);
- verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
-
- // Vendor service does not support the requests requestIsSatelliteProvisioned and
- // provisionSatelliteService. Telephony will make decision itself
- deprovisionSatelliteService();
- resetSatelliteControllerUT();
- mIIntegerConsumerResults.clear();
- setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- setUpResponseForRequestIsSatelliteProvisioned(
- false, SATELLITE_RESULT_REQUEST_NOT_SUPPORTED);
- verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- setUpResponseForProvisionSatelliteService(TEST_SATELLITE_TOKEN, testProvisionData,
- SATELLITE_RESULT_REQUEST_NOT_SUPPORTED);
- cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
- TEST_SATELLITE_TOKEN,
- testProvisionData, mIIntegerConsumer);
- processAllMessages();
- assertTrue(waitForIIntegerConsumerResult(1));
- assertEquals(SATELLITE_RESULT_SUCCESS, (long) mIIntegerConsumerResults.get(0));
- assertNotNull(cancelRemote);
- verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
-
- resetSatelliteControllerUT();
- mIIntegerConsumerResults.clear();
- setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- setUpResponseForRequestIsSatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- setUpResponseForProvisionSatelliteService(TEST_SATELLITE_TOKEN, testProvisionData,
- SATELLITE_RESULT_NOT_AUTHORIZED);
- cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
- TEST_SATELLITE_TOKEN,
- testProvisionData, mIIntegerConsumer);
- processAllMessages();
- assertTrue(waitForIIntegerConsumerResult(1));
- assertEquals(SATELLITE_RESULT_NOT_AUTHORIZED, (long) mIIntegerConsumerResults.get(0));
- assertNotNull(cancelRemote);
-
resetSatelliteControllerUT();
mIIntegerConsumerResults.clear();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
setUpResponseForRequestIsSatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- setUpResponseForProvisionSatelliteService(TEST_NEXT_SATELLITE_TOKEN, testProvisionData,
- SATELLITE_RESULT_SUCCESS);
cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
TEST_NEXT_SATELLITE_TOKEN, testProvisionData, mIIntegerConsumer);
cancellationSignal.setRemote(cancelRemote);
@@ -1715,8 +1677,6 @@
processAllMessages();
assertTrue(waitForIIntegerConsumerResult(1));
assertEquals(SATELLITE_RESULT_SUCCESS, (long) mIIntegerConsumerResults.get(0));
- verify(mMockSatelliteModemInterface).deprovisionSatelliteService(
- eq(TEST_NEXT_SATELLITE_TOKEN), any(Message.class));
resetSatelliteControllerUT();
mIIntegerConsumerResults.clear();
@@ -1724,9 +1684,6 @@
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
setUpResponseForRequestIsSatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- setUpNoResponseForProvisionSatelliteService(TEST_SATELLITE_TOKEN);
- setUpResponseForProvisionSatelliteService(TEST_NEXT_SATELLITE_TOKEN, testProvisionData,
- SATELLITE_RESULT_SUCCESS);
cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN,
testProvisionData, mIIntegerConsumer);
@@ -1764,13 +1721,11 @@
mIIntegerConsumerResults.clear();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- setUpResponseForDeprovisionSatelliteService(TEST_SATELLITE_TOKEN, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.deprovisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN, mIIntegerConsumer);
processAllMessages();
assertTrue(waitForIIntegerConsumerResult(1));
- assertEquals(SATELLITE_RESULT_INVALID_TELEPHONY_STATE,
- (long) mIIntegerConsumerResults.get(0));
+ assertEquals(SATELLITE_RESULT_SUCCESS, (long) mIIntegerConsumerResults.get(0));
resetSatelliteControllerUT();
mIIntegerConsumerResults.clear();
@@ -1778,7 +1733,6 @@
setUpResponseForRequestIsSatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- setUpResponseForDeprovisionSatelliteService(TEST_SATELLITE_TOKEN, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.deprovisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN, mIIntegerConsumer);
processAllMessages();
@@ -1788,20 +1742,6 @@
resetSatelliteControllerUT();
provisionSatelliteService();
mIIntegerConsumerResults.clear();
- setUpResponseForDeprovisionSatelliteService(TEST_SATELLITE_TOKEN, SATELLITE_RESULT_SUCCESS);
- mSatelliteControllerUT.deprovisionSatelliteService(SUB_ID,
- TEST_SATELLITE_TOKEN, mIIntegerConsumer);
- processAllMessages();
- assertTrue(waitForIIntegerConsumerResult(1));
- assertEquals(SATELLITE_RESULT_SUCCESS, (long) mIIntegerConsumerResults.get(0));
- verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
-
- // Vendor service does not support deprovisionSatelliteService
- resetSatelliteControllerUT();
- provisionSatelliteService();
- mIIntegerConsumerResults.clear();
- setUpResponseForDeprovisionSatelliteService(
- TEST_SATELLITE_TOKEN, SATELLITE_RESULT_REQUEST_NOT_SUPPORTED);
mSatelliteControllerUT.deprovisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN, mIIntegerConsumer);
processAllMessages();
@@ -1810,16 +1750,16 @@
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
resetSatelliteControllerUT();
- provisionSatelliteService();
+ setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
+ verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
+ setProvisionedState(null);
mIIntegerConsumerResults.clear();
- setUpResponseForDeprovisionSatelliteService(TEST_SATELLITE_TOKEN,
- SATELLITE_RESULT_INVALID_MODEM_STATE);
mSatelliteControllerUT.deprovisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN, mIIntegerConsumer);
processAllMessages();
assertTrue(waitForIIntegerConsumerResult(1));
- assertEquals(SATELLITE_RESULT_INVALID_MODEM_STATE, (long) mIIntegerConsumerResults.get(0));
- verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
+ assertEquals(SATELLITE_RESULT_SUCCESS, (long) mIIntegerConsumerResults.get(0));
+ verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
}
@Test
@@ -3452,7 +3392,7 @@
mIIntegerConsumerResults.clear();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
@@ -3549,9 +3489,9 @@
doReturn(true).when(mMockSatelliteModemInterface).isSatelliteServiceSupported();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
setUpResponseForRequestIsSatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
@@ -3693,7 +3633,7 @@
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
// Successfully enable satellite
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
mIIntegerConsumerResults.clear();
@@ -4012,12 +3952,13 @@
setUpResponseForRequestIsSatelliteSupported(false, SATELLITE_RESULT_RADIO_NOT_AVAILABLE);
doNothing().when(mMockSatelliteModemInterface)
.setSatelliteServicePackageName(anyString());
- mSatelliteControllerUT.setSatelliteServicePackageName("TestSatelliteService");
+ mSatelliteControllerUT.setSatelliteServicePackageName("TestSatelliteService", null);
processAllMessages();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
+ setProvisionedState(false);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
}
@@ -4032,7 +3973,7 @@
setUpResponseForRequestIsSatelliteSupported(false, SATELLITE_RESULT_RADIO_NOT_AVAILABLE);
doNothing().when(mMockSatelliteModemInterface)
.setSatelliteServicePackageName(anyString());
- mSatelliteControllerUT.setSatelliteServicePackageName("TestSatelliteService");
+ mSatelliteControllerUT.setSatelliteServicePackageName("TestSatelliteService", null);
processAllMessages();
}
@@ -4040,7 +3981,7 @@
resetSatelliteControllerUT();
setUpResponseForRequestIsSatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
- sendProvisionedStateChangedEvent(true, null);
+ setProvisionedState(true);
processAllMessages();
verifySatelliteProvisioned(true, SATELLITE_RESULT_SUCCESS);
}
@@ -4121,15 +4062,7 @@
private void setUpResponseForRequestIsSatelliteProvisioned(
boolean isSatelliteProvisioned, @SatelliteManager.SatelliteResult int error) {
- SatelliteException exception = (error == SATELLITE_RESULT_SUCCESS)
- ? null : new SatelliteException(error);
- int[] provisioned = new int[]{isSatelliteProvisioned ? 1 : 0};
- doAnswer(invocation -> {
- Message message = (Message) invocation.getArguments()[0];
- AsyncResult.forMessage(message, provisioned, exception);
- message.sendToTarget();
- return null;
- }).when(mMockSatelliteModemInterface).requestIsSatelliteProvisioned(any(Message.class));
+ mSatelliteControllerUT.setSatelliteProvisioned(isSatelliteProvisioned);
}
private void setUpResponseForRequestSatelliteEnabled(
@@ -4170,37 +4103,6 @@
any(Message.class));
}
- private void setUpResponseForProvisionSatelliteService(
- String token, byte[] provisionData, @SatelliteManager.SatelliteResult int error) {
- SatelliteException exception = (error == SATELLITE_RESULT_SUCCESS)
- ? null : new SatelliteException(error);
- doAnswer(invocation -> {
- Message message = (Message) invocation.getArguments()[2];
- AsyncResult.forMessage(message, null, exception);
- message.sendToTarget();
- return null;
- }).when(mMockSatelliteModemInterface)
- .provisionSatelliteService(eq(token), any(byte[].class), any(Message.class));
- }
-
- private void setUpNoResponseForProvisionSatelliteService(String token) {
- doNothing().when(mMockSatelliteModemInterface)
- .provisionSatelliteService(eq(token), any(), any(Message.class));
- }
-
- private void setUpResponseForDeprovisionSatelliteService(String token,
- @SatelliteManager.SatelliteResult int error) {
- SatelliteException exception = (error == SATELLITE_RESULT_SUCCESS)
- ? null : new SatelliteException(error);
- doAnswer(invocation -> {
- Message message = (Message) invocation.getArguments()[1];
- AsyncResult.forMessage(message, null, exception);
- message.sendToTarget();
- return null;
- }).when(mMockSatelliteModemInterface)
- .deprovisionSatelliteService(eq(token), any(Message.class));
- }
-
private void setUpResponseForRequestSatelliteCapabilities(
SatelliteCapabilities satelliteCapabilities,
@SatelliteManager.SatelliteResult int error) {
@@ -4476,11 +4378,8 @@
assertEquals(signalStrengthLevel, mQueriedNtnSignalStrengthLevel);
}
- private void sendProvisionedStateChangedEvent(boolean provisioned, Throwable exception) {
- Message msg = mSatelliteControllerUT.obtainMessage(
- 26 /* EVENT_SATELLITE_PROVISION_STATE_CHANGED */);
- msg.obj = new AsyncResult(null, provisioned, exception);
- msg.sendToTarget();
+ private void setProvisionedState(@Nullable Boolean provisioned) {
+ mSatelliteControllerUT.setSatelliteProvisioned(provisioned);
}
private void sendSatelliteModemStateChangedEvent(int state, Throwable exception) {
@@ -4566,8 +4465,6 @@
setUpResponseForRequestIsSatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
verifySatelliteSupported(true, SATELLITE_RESULT_SUCCESS);
verifySatelliteProvisioned(false, SATELLITE_RESULT_SUCCESS);
- setUpResponseForProvisionSatelliteService(TEST_SATELLITE_TOKEN, testProvisionData,
- SATELLITE_RESULT_SUCCESS);
cancelRemote = mSatelliteControllerUT.provisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN,
testProvisionData, mIIntegerConsumer);
@@ -4580,7 +4477,6 @@
private void deprovisionSatelliteService() {
mIIntegerConsumerResults.clear();
- setUpResponseForDeprovisionSatelliteService(TEST_SATELLITE_TOKEN, SATELLITE_RESULT_SUCCESS);
mSatelliteControllerUT.deprovisionSatelliteService(SUB_ID,
TEST_SATELLITE_TOKEN, mIIntegerConsumer);
processAllMessages();
@@ -4810,5 +4706,11 @@
}
return false;
}
+
+ void setSatelliteProvisioned(@Nullable Boolean isProvisioned) {
+ synchronized (mSatelliteViaOemProvisionLock) {
+ mIsSatelliteViaOemProvisioned = isProvisioned;
+ }
+ }
}
}
diff --git a/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionDatabaseManagerTest.java b/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionDatabaseManagerTest.java
index 5a0d0d8..4b1b4a5 100644
--- a/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionDatabaseManagerTest.java
+++ b/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionDatabaseManagerTest.java
@@ -143,6 +143,9 @@
static final int FAKE_TRANSFER_STATUS_TRANSFERRED_OUT = 1;
static final int FAKE_TRANSFER_STATUS_CONVERTED = 2;
+ static final int FAKE_SATELLITE_PROVISIONED = 1;
+ static final int FAKE_SATELLITE_NOT_PROVISIONED = 0;
+
static final SubscriptionInfoInternal FAKE_SUBSCRIPTION_INFO1 =
new SubscriptionInfoInternal.Builder()
.setId(1)
@@ -217,6 +220,7 @@
.setSatelliteEntitlementStatus(FAKE_SATELLITE_ENTITLEMENT_STATUS_DISABLED)
.setSatelliteEntitlementPlmns(FAKE_SATELLITE_ENTITLEMENT_PLMNS2)
.setSatelliteESOSSupported(FAKE_SATELLITE_ESOS_SUPPORTED_DISABLED)
+ .setIsSatelliteProvisionedForNonIpDatagram(FAKE_SATELLITE_NOT_PROVISIONED)
.build();
static final SubscriptionInfoInternal FAKE_SUBSCRIPTION_INFO2 =
@@ -293,6 +297,7 @@
.setSatelliteEntitlementStatus(FAKE_SATELLITE_ENTITLEMENT_STATUS_ENABLED)
.setSatelliteEntitlementPlmns(FAKE_SATELLITE_ENTITLEMENT_PLMNS1)
.setSatelliteESOSSupported(FAKE_SATELLITE_ESOS_SUPPORTED_ENABLED)
+ .setIsSatelliteProvisionedForNonIpDatagram(FAKE_SATELLITE_PROVISIONED)
.build();
private SubscriptionDatabaseManager mDatabaseManagerUT;
@@ -2393,4 +2398,38 @@
FAKE_SUBSCRIPTION_INFO1.getSubscriptionId())
.getSatelliteESOSSupported()).isEqualTo(FAKE_SATELLITE_ESOS_SUPPORTED_DISABLED);
}
+
+ @Test
+ public void testUpdateSatelliteProvisionedStatus() throws Exception {
+ // exception is expected if there is nothing in the database.
+ assertThrows(IllegalArgumentException.class,
+ () -> mDatabaseManagerUT.setIsSatelliteProvisionedForNonIpDatagram(
+ FAKE_SUBSCRIPTION_INFO1.getSubscriptionId(),
+ FAKE_SATELLITE_PROVISIONED));
+
+ SubscriptionInfoInternal subInfo = insertSubscriptionAndVerify(FAKE_SUBSCRIPTION_INFO1);
+ mDatabaseManagerUT.setIsSatelliteProvisionedForNonIpDatagram(
+ FAKE_SUBSCRIPTION_INFO1.getSubscriptionId(),
+ FAKE_SATELLITE_PROVISIONED);
+ processAllMessages();
+
+ subInfo = new SubscriptionInfoInternal.Builder(subInfo)
+ .setIsSatelliteProvisionedForNonIpDatagram(FAKE_SATELLITE_PROVISIONED)
+ .build();
+ verifySubscription(subInfo);
+ verify(mSubscriptionDatabaseManagerCallback, times(2)).onSubscriptionChanged(eq(1));
+
+ assertThat(mDatabaseManagerUT.getSubscriptionProperty(
+ FAKE_SUBSCRIPTION_INFO1.getSubscriptionId(),
+ SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM))
+ .isEqualTo(FAKE_SATELLITE_PROVISIONED);
+
+ mDatabaseManagerUT.setSubscriptionProperty(FAKE_SUBSCRIPTION_INFO1.getSubscriptionId(),
+ SimInfo.COLUMN_IS_SATELLITE_PROVISIONED_FOR_NON_IP_DATAGRAM,
+ FAKE_SATELLITE_NOT_PROVISIONED);
+ assertThat(mDatabaseManagerUT.getSubscriptionInfoInternal(
+ FAKE_SUBSCRIPTION_INFO1.getSubscriptionId())
+ .getIsSatelliteProvisionedForNonIpDatagram())
+ .isEqualTo(FAKE_SATELLITE_NOT_PROVISIONED);
+ }
}
diff --git a/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionInfoInternalTest.java b/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionInfoInternalTest.java
index 30a4d8e..925cf71 100644
--- a/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionInfoInternalTest.java
+++ b/tests/telephonytests/src/com/android/internal/telephony/subscription/SubscriptionInfoInternalTest.java
@@ -124,6 +124,8 @@
.FAKE_SATELLITE_ENTITLEMENT_PLMNS1)
.setSatelliteESOSSupported(
SubscriptionDatabaseManagerTest.FAKE_SATELLITE_ESOS_SUPPORTED_ENABLED)
+ .setIsSatelliteProvisionedForNonIpDatagram(
+ SubscriptionDatabaseManagerTest.FAKE_SATELLITE_PROVISIONED)
.build();
private final SubscriptionInfoInternal mSubInfoNull =
@@ -256,6 +258,8 @@
.FAKE_SATELLITE_ENTITLEMENT_PLMNS1);
assertThat(mSubInfo.getSatelliteESOSSupported())
.isEqualTo(SubscriptionDatabaseManagerTest.FAKE_SATELLITE_ESOS_SUPPORTED_ENABLED);
+ assertThat(mSubInfo.getIsSatelliteProvisionedForNonIpDatagram())
+ .isEqualTo(SubscriptionDatabaseManagerTest.FAKE_SATELLITE_PROVISIONED);
}
@Test