1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.telephony.satellite.stub;
18 
19 import android.telephony.IBooleanConsumer;
20 import android.telephony.IIntegerConsumer;
21 
22 import android.telephony.satellite.stub.INtnSignalStrengthConsumer;
23 import android.telephony.satellite.stub.ISatelliteCapabilitiesConsumer;
24 import android.telephony.satellite.stub.ISatelliteListener;
25 import android.telephony.satellite.stub.SatelliteDatagram;
26 import android.telephony.satellite.stub.SystemSelectionSpecifier;
27 
28 /**
29  * {@hide}
30  */
31 oneway interface ISatellite {
32     /**
33      * Register the callback interface with satellite service.
34      *
35      * @param listener The callback interface to handle satellite service indications.
36      *
37      * Valid result codes returned:
38      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
39      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
40      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
41      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
42      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
43      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
44      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
45      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
46      */
setSatelliteListener(in ISatelliteListener listener)47     void setSatelliteListener(in ISatelliteListener listener);
48 
49     /**
50      * Request to enable or disable the satellite service listening mode.
51      * Listening mode allows the satellite service to listen for incoming pages.
52      *
53      * @param enable True to enable satellite listening mode and false to disable.
54      * @param timeout How long the satellite modem should wait for the next incoming page before
55      *                disabling listening mode.
56      * @param resultCallback The callback to receive the error code result of the operation.
57      *
58      * Valid result codes returned:
59      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
60      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
61      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
62      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
63      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
64      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
65      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
66      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
67      */
requestSatelliteListeningEnabled(in boolean enable, in int timeout, in IIntegerConsumer resultCallback)68     void requestSatelliteListeningEnabled(in boolean enable, in int timeout,
69             in IIntegerConsumer resultCallback);
70 
71     /**
72      * Allow cellular modem scanning while satellite mode is on.
73      * @param enabled  {@code true} to enable cellular modem while satellite mode is on
74      * and {@code false} to disable
75      * @param errorCallback The callback to receive the error code result of the operation.
76      */
enableCellularModemWhileSatelliteModeIsOn(in boolean enabled, in IIntegerConsumer errorCallback)77     void enableCellularModemWhileSatelliteModeIsOn(in boolean enabled,
78         in IIntegerConsumer errorCallback);
79 
80     /**
81      * Request to enable or disable the satellite modem and demo mode. If the satellite modem
82      * is enabled, this may also disable the cellular modem, and if the satellite modem is disabled,
83      * this may also re-enable the cellular modem.
84      *
85      * @param enableSatellite True to enable the satellite modem and false to disable.
86      * @param enableDemoMode True to enable demo mode and false to disable.
87      * @param isEmergency To specify the satellite is enabled for emergency session and false for
88      * non emergency session. Note: it is possible that a emergency session started get converted
89      * to a non emergency session and vice versa.
90      * @param resultCallback The callback to receive the error code result of the operation.
91      *
92      * Valid result codes returned:
93      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
94      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
95      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
96      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
97      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
98      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
99      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
100      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
101      */
requestSatelliteEnabled(in boolean enableSatellite, in boolean enableDemoMode, in boolean isEmergency, in IIntegerConsumer resultCallback)102     void requestSatelliteEnabled(in boolean enableSatellite, in boolean enableDemoMode,
103             in boolean isEmergency, in IIntegerConsumer resultCallback);
104 
105     /**
106      * Request to get whether the satellite modem is enabled.
107      *
108      * @param resultCallback The callback to receive the error code result of the operation.
109      *                       This must only be sent when the result is not
110      *                       SatelliteResult#SATELLITE_RESULT_SUCCESS.
111      * @param callback If the result is SatelliteResult#SATELLITE_RESULT_SUCCESS, the callback to
112      *                 receive whether the satellite modem is enabled.
113      *
114      * Valid result codes returned:
115      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
116      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
117      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
118      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
119      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
120      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
121      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
122      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
123      */
requestIsSatelliteEnabled(in IIntegerConsumer resultCallback, in IBooleanConsumer callback)124     void requestIsSatelliteEnabled(in IIntegerConsumer resultCallback,
125             in IBooleanConsumer callback);
126 
127     /**
128      * Request to get whether the satellite service is supported on the device.
129      *
130      * @param resultCallback The callback to receive the error code result of the operation.
131      *                       This must only be sent when the result is not
132      *                       SatelliteResult#SATELLITE_RESULT_SUCCESS.
133      * @param callback If the result is SatelliteResult#SATELLITE_RESULT_SUCCESS, the callback to
134      *                 receive whether the satellite service is supported on the device.
135      *
136      * Valid result codes returned:
137      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
138      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
139      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
140      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
141      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
142      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
143      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
144      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
145      */
requestIsSatelliteSupported(in IIntegerConsumer resultCallback, in IBooleanConsumer callback)146     void requestIsSatelliteSupported(in IIntegerConsumer resultCallback,
147             in IBooleanConsumer callback);
148 
149     /**
150      * Request to get the SatelliteCapabilities of the satellite service.
151      *
152      * @param resultCallback The callback to receive the error code result of the operation.
153      *                       This must only be sent when the result is not
154      *                       SatelliteResult#SATELLITE_RESULT_SUCCESS.
155      * @param callback If the result is SatelliteResult#SATELLITE_RESULT_SUCCESS, the callback to
156      *                 receive the SatelliteCapabilities of the satellite service.
157      *
158      * Valid result codes returned:
159      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
160      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
161      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
162      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
163      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
164      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
165      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
166      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
167      */
requestSatelliteCapabilities(in IIntegerConsumer resultCallback, in ISatelliteCapabilitiesConsumer callback)168     void requestSatelliteCapabilities(in IIntegerConsumer resultCallback,
169             in ISatelliteCapabilitiesConsumer callback);
170 
171     /**
172      * User started pointing to the satellite.
173      * The satellite service should report the satellite pointing info via
174      * ISatelliteListener#onSatellitePositionChanged as the user device/satellite moves.
175      *
176      * @param resultCallback The callback to receive the error code result of the operation.
177      *
178      * Valid result codes returned:
179      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
180      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
181      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
182      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
183      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
184      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
185      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
186      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
187      */
startSendingSatellitePointingInfo(in IIntegerConsumer resultCallback)188     void startSendingSatellitePointingInfo(in IIntegerConsumer resultCallback);
189 
190     /**
191      * User stopped pointing to the satellite.
192      * The satellite service should stop reporting satellite pointing info to the framework.
193      *
194      * @param resultCallback The callback to receive the error code result of the operation.
195      *
196      * Valid result codes returned:
197      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
198      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
199      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
200      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
201      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
202      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
203      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
204      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
205      */
stopSendingSatellitePointingInfo(in IIntegerConsumer resultCallback)206     void stopSendingSatellitePointingInfo(in IIntegerConsumer resultCallback);
207 
208     /**
209      * Provision the device with a satellite provider.
210      * This is needed if the provider allows dynamic registration.
211      * Once provisioned, ISatelliteListener#onSatelliteProvisionStateChanged should report true.
212      *
213      * @param token The token to be used as a unique identifier for provisioning with satellite
214      *              gateway.
215      * @param provisionData Data from the provisioning app that can be used by provisioning server
216      * @param resultCallback The callback to receive the error code result of the operation.
217      *
218      * Valid result codes returned:
219      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
220      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
221      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
222      *   SatelliteResult:SATELLITE_RESULT_NETWORK_ERROR
223      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
224      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
225      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
226      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
227      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
228      *   SatelliteResult:SATELLITE_RESULT_REQUEST_ABORTED
229      *   SatelliteResult:SATELLITE_RESULT_NETWORK_TIMEOUT
230      */
provisionSatelliteService(in String token, in byte[] provisionData, in IIntegerConsumer resultCallback)231     void provisionSatelliteService(in String token, in byte[] provisionData,
232             in IIntegerConsumer resultCallback);
233 
234     /**
235      * Deprovision the device with the satellite provider.
236      * This is needed if the provider allows dynamic registration.
237      * Once deprovisioned, ISatelliteListener#onSatelliteProvisionStateChanged should report false.
238      *
239      * @param token The token of the device/subscription to be deprovisioned.
240      * @param resultCallback The callback to receive the error code result of the operation.
241      *
242      * Valid result codes returned:
243      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
244      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
245      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
246      *   SatelliteResult:SATELLITE_RESULT_NETWORK_ERROR
247      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
248      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
249      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
250      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
251      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
252      *   SatelliteResult:SATELLITE_RESULT_REQUEST_ABORTED
253      *   SatelliteResult:SATELLITE_RESULT_NETWORK_TIMEOUT
254      */
deprovisionSatelliteService(in String token, in IIntegerConsumer resultCallback)255     void deprovisionSatelliteService(in String token, in IIntegerConsumer resultCallback);
256 
257     /**
258      * Request to get whether this device is provisioned with a satellite provider.
259      *
260      * @param resultCallback The callback to receive the error code result of the operation.
261      *                       This must only be sent when the result is not
262      *                       SatelliteResult#SATELLITE_RESULT_SUCCESS.
263      * @param callback If the result is SatelliteResult#SATELLITE_RESULT_SUCCESS, the callback to
264      *                 receive whether this device is provisioned with a satellite provider.
265      *
266      * Valid result codes returned:
267      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
268      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
269      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
270      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
271      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
272      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
273      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
274      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
275      */
requestIsSatelliteProvisioned(in IIntegerConsumer resultCallback, in IBooleanConsumer callback)276     void requestIsSatelliteProvisioned(in IIntegerConsumer resultCallback,
277             in IBooleanConsumer callback);
278 
279     /**
280      * Poll the pending datagrams to be received over satellite.
281      * The satellite service should check if there are any pending datagrams to be received over
282      * satellite and report them via ISatelliteListener#onSatelliteDatagramsReceived.
283      *
284      * @param resultCallback The callback to receive the error code result of the operation.
285      *
286      * Valid result codes returned:
287      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
288      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
289      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
290      *   SatelliteResult:SATELLITE_RESULT_NETWORK_ERROR
291      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
292      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
293      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
294      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
295      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
296      *   SatelliteResult:SATELLITE_RESULT_ACCESS_BARRED
297      *   SatelliteResult:SATELLITE_RESULT_NETWORK_TIMEOUT
298      *   SatelliteResult:SATELLITE_RESULT_NOT_REACHABLE
299      *   SatelliteResult:SATELLITE_RESULT_NOT_AUTHORIZED
300      */
pollPendingSatelliteDatagrams(in IIntegerConsumer resultCallback)301     void pollPendingSatelliteDatagrams(in IIntegerConsumer resultCallback);
302 
303     /**
304      * Send datagram over satellite.
305      *
306      * @param datagram Datagram to send in byte format.
307      * @param isEmergency Whether this is an emergency datagram.
308      * @param resultCallback The callback to receive the error code result of the operation.
309      *
310      * Valid result codes returned:
311      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
312      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
313      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
314      *   SatelliteResult:SATELLITE_RESULT_NETWORK_ERROR
315      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
316      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
317      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
318      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
319      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
320      *   SatelliteResult:SATELLITE_RESULT_REQUEST_ABORTED
321      *   SatelliteResult:SATELLITE_RESULT_ACCESS_BARRED
322      *   SatelliteResult:SATELLITE_RESULT_NETWORK_TIMEOUT
323      *   SatelliteResult:SATELLITE_RESULT_NOT_REACHABLE
324      *   SatelliteResult:SATELLITE_RESULT_NOT_AUTHORIZED
325      */
sendSatelliteDatagram(in SatelliteDatagram datagram, in boolean isEmergency, in IIntegerConsumer resultCallback)326     void sendSatelliteDatagram(in SatelliteDatagram datagram, in boolean isEmergency,
327             in IIntegerConsumer resultCallback);
328 
329     /**
330      * Request the current satellite modem state.
331      * The satellite service should report the current satellite modem state via
332      * ISatelliteListener#onSatelliteModemStateChanged.
333      *
334      * @param resultCallback The callback to receive the error code result of the operation.
335      *                       This must only be sent when the result is not
336      *                       SatelliteResult#SATELLITE_RESULT_SUCCESS.
337      * @param callback If the result is SatelliteResult#SATELLITE_RESULT_SUCCESS, the callback to
338      *                 receive the current satellite modem state.
339      *
340      * Valid result codes returned:
341      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
342      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
343      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
344      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
345      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
346      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
347      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
348      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
349      */
requestSatelliteModemState(in IIntegerConsumer resultCallback, in IIntegerConsumer callback)350     void requestSatelliteModemState(in IIntegerConsumer resultCallback,
351             in IIntegerConsumer callback);
352 
353     /**
354      * Request to get the time after which the satellite will be visible. This is an int
355      * representing the duration in seconds after which the satellite will be visible.
356      * This will return 0 if the satellite is currently visible.
357      *
358      * @param resultCallback The callback to receive the error code result of the operation.
359      *                       This must only be sent when the result is not
360           *                       SatelliteResult#SATELLITE_RESULT_SUCCESS.
361      * @param callback If the result is SatelliteResult#SATELLITE_RESULT_SUCCESS, the callback to
362      *                 receive the time after which the satellite will be visible.
363      *
364      * Valid result codes returned:
365      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
366      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
367      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
368      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
369      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
370      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
371      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
372      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
373      */
requestTimeForNextSatelliteVisibility(in IIntegerConsumer resultCallback, in IIntegerConsumer callback)374     void requestTimeForNextSatelliteVisibility(in IIntegerConsumer resultCallback,
375             in IIntegerConsumer callback);
376 
377     /**
378      * Set the non-terrestrial PLMN with lower priority than terrestrial networks.
379      * MCC/MNC broadcast by the non-terrestrial networks may not be included in OPLMNwACT file on
380      * SIM profile. Acquisition of satellite based system is lower priority to terrestrial
381      * networks. UE shall make all attempts to acquire terrestrial service prior to camping on
382      * satellite LTE service.
383      *
384      * @param simSlot Indicates the SIM slot to which this API will be applied. The modem will use
385      *                this information to determine the relevant carrier.
386      * @param carrierPlmnList The list of roaming PLMN used for connecting to satellite networks
387      *                        supported by user subscription.
388      * @param allSatellitePlmnList Modem should use the allSatellitePlmnList to identify satellite
389      *                             PLMNs that are not supported by the carrier and make sure not to
390      *                             attach to them.
391      * @param resultCallback The callback to receive the error code result of the operation.
392      *
393      * Valid result codes returned:
394      *   SatelliteResult:NONE
395      *   SatelliteResult:SATELLITE_RESULT_INVALID_ARGUMENTS
396      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
397      *   SatelliteResult:MODEM_ERR
398      *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
399      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
400      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
401      */
setSatellitePlmn(int simSlot, in List<String> carrierPlmnList, in List<String> allSatellitePlmnList, in IIntegerConsumer resultCallback)402     void setSatellitePlmn(int simSlot, in List<String> carrierPlmnList,
403             in List<String> allSatellitePlmnList, in IIntegerConsumer resultCallback);
404 
405     /**
406      * Enable or disable satellite in the cellular modem associated with a carrier.
407      * Refer setSatellitePlmn for the details of satellite PLMN scanning process.
408      *
409      * @param simSlot Indicates the SIM slot to which this API will be applied. The modem will use
410      *                this information to determine the relevant carrier.
411      * @param serial Serial number of request.
412      * @param enable {@code true} to enable satellite, {@code false} to disable satellite.
413      *
414      * Valid result codes returned:
415      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
416      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
417      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
418      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
419      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
420      */
setSatelliteEnabledForCarrier(int simSlot, boolean satelliteEnabled, in IIntegerConsumer callback)421     void setSatelliteEnabledForCarrier(int simSlot, boolean satelliteEnabled,
422          in IIntegerConsumer callback);
423 
424     /**
425      * Check whether satellite is enabled in the cellular modem associated with a carrier.
426      *
427      * @param simSlot Indicates the SIM slot to which this API will be applied. The modem will use
428      *                this information to determine the relevant carrier.
429      * @param serial Serial number of request.
430      *
431      * Valid result codes returned:
432      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
433      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
434      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
435      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
436      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
437      */
requestIsSatelliteEnabledForCarrier(int simSlot, in IIntegerConsumer resultCallback, in IBooleanConsumer callback)438     void requestIsSatelliteEnabledForCarrier(int simSlot, in IIntegerConsumer resultCallback,
439             in IBooleanConsumer callback);
440 
441     /**
442      * Request to get the signal strength of the satellite connection.
443      *
444      * @param resultCallback The {@link SatelliteError} result of the operation.
445      * @param callback The callback to handle the NTN signal strength changed event.
446      */
requestSignalStrength(in IIntegerConsumer resultCallback, in INtnSignalStrengthConsumer callback)447     void requestSignalStrength(in IIntegerConsumer resultCallback,
448             in INtnSignalStrengthConsumer callback);
449 
450     /**
451      * The satellite service should report the NTN signal strength via
452      * ISatelliteListener#onNtnSignalStrengthChanged when the NTN signal strength changes.
453      *
454      * Note: This API can be invoked multiple times. If the modem is already in the expected
455      * state from a previous request, subsequent invocations may be ignored.
456      *
457      * @param resultCallback The callback to receive the error code result of the operation.
458      *
459      * Valid result codes returned:
460      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
461      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
462      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
463      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
464      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
465      */
startSendingNtnSignalStrength(in IIntegerConsumer resultCallback)466      void startSendingNtnSignalStrength(in IIntegerConsumer resultCallback);
467 
468     /**
469      * The satellite service should stop reporting NTN signal strength to the framework. This will
470      * be called when device is screen off to save power by not letting signal strength updates to
471      * wake up application processor.
472      *
473      * Note: This API can be invoked multiple times. If the modem is already in the expected
474      * state from a previous request, subsequent invocations may be ignored.
475      *
476      * @param resultCallback The callback to receive the error code result of the operation.
477      *
478      * Valid result codes returned:
479      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
480      *   SatelliteResult:SATELLITE_RESULT_SERVICE_ERROR
481      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
482      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
483      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
484      */
stopSendingNtnSignalStrength(in IIntegerConsumer resultCallback)485      void stopSendingNtnSignalStrength(in IIntegerConsumer resultCallback);
486 
487      /**
488       * Abort all outgoing satellite datagrams which vendor service has received from Telephony
489       * framework.
490       *
491       * This API helps modem to be in sync with framework when framework times out on sending
492       * datagrams.
493       *
494       * @param resultCallback The callback to receive the error code result of the operation.
495       *
496       * Valid result codes returned:
497       *   SatelliteResult:SATELLITE_RESULT_SUCCESS
498       *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
499       *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
500       *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
501       *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
502       */
abortSendingSatelliteDatagrams(in IIntegerConsumer resultCallback)503      void abortSendingSatelliteDatagrams(in IIntegerConsumer resultCallback);
504 
505      /**
506       * Request to update the satellite subscription to be used for Non-Terrestrial network.
507       *
508       * @param iccId The ICCID of the subscription
509       * @param resultCallback The callback to receive the error code result of the operation.
510       */
updateSatelliteSubscription(in String iccId, in IIntegerConsumer resultCallback)511      void updateSatelliteSubscription(in String iccId, in IIntegerConsumer resultCallback);
512 
513      /**
514       * Request to update system selection channels
515       *
516       * @param systemSelectionSpecifiers list of system selection specifiers
517       * @param resultCallback The callback to receive the error code result of the operation.
518       */
updateSystemSelectionChannels(in List<SystemSelectionSpecifier> systemSelectionSpecifiers, in IIntegerConsumer resultCallback)519      void updateSystemSelectionChannels(in List<SystemSelectionSpecifier> systemSelectionSpecifiers,
520             in IIntegerConsumer resultCallback);
521 }
522