summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-05-01 14:51:40 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-05-01 14:51:40 +0000
commitbad1d7c385186ad0e7f4c55c2057a3251a1c83c9 (patch)
tree7924b627c8c6637ee697e9fef63d0f1e67146fda
parentd61c53c9b9e055f5460a4653663d10057e79c0bf (diff)
parentc858b2c6113cc8e67bdc7d80d9a7ed5b6209690c (diff)
Merge "Satellite demo mode : Simulated sending and receiving" into udc-dev am: c858b2c611
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22845479 Change-Id: Iaa9ed4231f9ded65ad771df5b519031e693dadd5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteManager.java25
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl19
2 files changed, 44 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java
index c5830b8249c8..431e9e628962 100644
--- a/telephony/java/android/telephony/satellite/SatelliteManager.java
+++ b/telephony/java/android/telephony/satellite/SatelliteManager.java
@@ -1503,6 +1503,31 @@ public class SatelliteManager {
}
}
+ /**
+ * Inform whether the device is aligned with the satellite for demo mode.
+ *
+ * @param isAligned {@true} Device is aligned with the satellite for demo mode
+ * {@false} Device is not aligned with the satellite for demo mode
+ *
+ * @throws SecurityException if the caller doesn't have required permission.
+ * @throws IllegalStateException if the Telephony process is not currently available.
+ */
+ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
+
+ public void onDeviceAlignedWithSatellite(boolean isAligned) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ telephony.onDeviceAlignedWithSatellite(mSubId, isAligned);
+ } else {
+ throw new IllegalStateException("telephony service is null.");
+ }
+ } catch (RemoteException ex) {
+ loge("informDeviceAlignedToSatellite() RemoteException:" + ex);
+ ex.rethrowFromSystemServer();
+ }
+ }
+
private static ITelephony getITelephony() {
ITelephony binder = ITelephony.Stub.asInterface(TelephonyFrameworkInitializer
.getTelephonyServiceManager()
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 18e4c37f3e23..21aad73ce005 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -2982,6 +2982,16 @@ interface ITelephony {
void requestTimeForNextSatelliteVisibility(int subId, in ResultReceiver receiver);
/**
+ * Inform whether the device is aligned with the satellite within in margin for demo mode.
+ *
+ * @param isAligned {@true} Device is aligned with the satellite for demo mode
+ * {@false} Device is not aligned with the satellite for demo mode
+ */
+ @JavaPassthrough(annotation="@android.annotation.RequiresPermission("
+ + "android.Manifest.permission.SATELLITE_COMMUNICATION)")
+ void onDeviceAlignedWithSatellite(int subId, in boolean isAligned);
+
+ /**
* 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.
@@ -3018,4 +3028,13 @@ interface ITelephony {
* {@code false} otherwise.
*/
boolean setSatellitePointingUiClassName(in String packageName, in String className);
+
+ /**
+ * This API can be used by only CTS to update the timeout duration in milliseconds whether
+ * the device is aligned with the satellite for demo mode
+ *
+ * @param timeoutMillis The timeout duration in millisecond.
+ * @return {@code true} if the timeout duration is set successfully, {@code false} otherwise.
+ */
+ boolean setSatelliteDeviceAlignedTimeoutDuration(long timeoutMillis);
}