Loading telephony/java/android/telephony/satellite/SatelliteManager.java +25 −0 Original line number Diff line number Diff line Loading @@ -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() Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +19 −0 Original line number Diff line number Diff line Loading @@ -2981,6 +2981,16 @@ interface ITelephony { + "android.Manifest.permission.SATELLITE_COMMUNICATION)") 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. * Loading Loading @@ -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); } Loading
telephony/java/android/telephony/satellite/SatelliteManager.java +25 −0 Original line number Diff line number Diff line Loading @@ -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() Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +19 −0 Original line number Diff line number Diff line Loading @@ -2981,6 +2981,16 @@ interface ITelephony { + "android.Manifest.permission.SATELLITE_COMMUNICATION)") 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. * Loading Loading @@ -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); }