Add APIs to update satellite listening timeout duration from CTS
Bug: 276762737
Test: Call/SMS/MMS with live network.
atest android.telephony.satellite.cts.SatelliteManagerTestOnMockService
atest android.telephony.satellite.cts.SatelliteManagerTest
Change-Id: I234cd2acd0627036c9e48cb3f5d021df99bf42cd
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 8849a77..538e2b2 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -180,7 +180,6 @@
import com.android.internal.telephony.ICallForwardingInfoCallback;
import com.android.internal.telephony.IImsStateCallback;
import com.android.internal.telephony.IIntegerConsumer;
-import com.android.internal.telephony.ILongConsumer;
import com.android.internal.telephony.INumberVerificationCallback;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.IccCard;
@@ -12513,6 +12512,24 @@
}
/**
+ * This API can be used by only CTS to update the timeout duration in milliseconds that
+ * satellite should stay at listening mode to wait for the next incoming page before disabling
+ * listening mode.
+ *
+ * @param timeoutMillis The timeout duration in millisecond.
+ * @return {@code true} if the timeout duration is set successfully, {@code false} otherwise.
+ */
+ public boolean setSatelliteListeningTimeoutDuration(long timeoutMillis) {
+ Log.d(LOG_TAG, "setSatelliteListeningTimeoutDuration - " + timeoutMillis);
+ TelephonyPermissions.enforceShellOnly(
+ Binder.getCallingUid(), "setSatelliteListeningTimeoutDuration");
+ TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(mApp,
+ SubscriptionManager.INVALID_SUBSCRIPTION_ID,
+ "setSatelliteListeningTimeoutDuration");
+ return mSatelliteController.setSatelliteListeningTimeoutDuration(timeoutMillis);
+ }
+
+ /**
* Check whether the caller (or self, if not processing an IPC) can read device identifiers.
*
* <p>This method behaves in one of the following ways: