diff options
author | 2025-01-16 13:18:42 +0000 | |
---|---|---|
committer | 2025-02-12 04:18:35 +0000 | |
commit | 121e42f03a1d58df30c9d7ad8cffba6655ae5c11 (patch) | |
tree | a2fc1d96df9136b78fa906f7cb756f3c43640ad2 /telephony | |
parent | 5e9dbc58381e3a2160fb972741a0762596e9ccbc (diff) |
Updating Satellite Optimized apps api's info.
Bug: 388441098
Flag:com.android.internal.telephony.flags.satellite_25q4_apis
Test: CTS verified
Change-Id: Iff79f883b9bbaa85520a024a190c688b08da107d
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/satellite/SatelliteManager.java | 48 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 11 |
2 files changed, 59 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java index b7b209b78300..100690dcbb65 100644 --- a/telephony/java/android/telephony/satellite/SatelliteManager.java +++ b/telephony/java/android/telephony/satellite/SatelliteManager.java @@ -821,6 +821,25 @@ public final class SatelliteManager { "android.telephony.METADATA_SATELLITE_MANUAL_CONNECT_P2P_SUPPORT"; /** + * A boolean value indicating whether application is optimized to utilize low bandwidth + * satellite data. + * The applications that are optimized for low bandwidth satellite data should set this + * property to {@code true} in the manifest to indicate to platform about the same. + * {@code + * <application> + * <meta-data + * android:name="android.telephony.PROPERTY_SATELLITE_DATA_OPTIMIZED" + * android:value="true"/> + * </application> + * } + * <p> + * When {@code true}, satellite data optimized network is available for applications. + */ + @FlaggedApi(Flags.FLAG_SATELLITE_25Q4_APIS) + public static final String PROPERTY_SATELLITE_DATA_OPTIMIZED = + "android.telephony.PROPERTY_SATELLITE_DATA_OPTIMIZED"; + + /** * Registers a {@link SatelliteStateChangeListener} to receive callbacks when the satellite * state may have changed. * @@ -3840,6 +3859,35 @@ public final class SatelliteManager { } } + /** + * Get list of application packages name that are optimized for low bandwidth satellite data. + * + * @return List of application packages name with data optimized network property. + * + * {@link #PROPERTY_SATELLITE_DATA_OPTIMIZED} + * + * @hide + */ + @SystemApi + @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) + @FlaggedApi(Flags.FLAG_SATELLITE_25Q4_APIS) + public @NonNull List<String> getSatelliteDataOptimizedApps() { + List<String> appsNames = new ArrayList<>(); + try { + ITelephony telephony = getITelephony(); + if (telephony != null) { + appsNames = telephony.getSatelliteDataOptimizedApps(); + } else { + throw new IllegalStateException("telephony service is null."); + } + } catch (RemoteException ex) { + loge("getSatelliteDataOptimizedApps() RemoteException:" + ex); + ex.rethrowAsRuntimeException(); + } + + return appsNames; + } + @Nullable private static ITelephony getITelephony() { ITelephony binder = ITelephony.Stub.asInterface(TelephonyFrameworkInitializer diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 08c003027c5b..1c6652daf498 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -3596,4 +3596,15 @@ interface ITelephony { * @hide */ int getCarrierIdFromIdentifier(in CarrierIdentifier carrierIdentifier); + + + /** + * Get list of applications that are optimized for low bandwidth satellite data. + * + * @return List of Application Name with data optimized network property. + * {@link #PROPERTY_SATELLITE_DATA_OPTIMIZED} + */ + @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" + + "android.Manifest.permission.SATELLITE_COMMUNICATION)") + List<String> getSatelliteDataOptimizedApps(); } |