• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 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;
18 
19 import android.annotation.FlaggedApi;
20 import android.annotation.Nullable;
21 import android.annotation.SystemApi;
22 
23 
24 import com.android.internal.telephony.flags.Flags;
25 
26 
27 /**
28  * A callback class for monitoring satellite communication access state changed events.
29  *
30  * @hide
31  */
32 @SystemApi
33 @FlaggedApi(Flags.FLAG_SATELLITE_SYSTEM_APIS)
34 public interface SatelliteCommunicationAccessStateCallback {
35 
36     /**
37      * Telephony does not guarantee that whenever there is a change in communication allowed state,
38      * this API will be called. Telephony does its best to detect the changes and notify its
39      * listeners accordingly. Satellite communication access is allowed at a location when it is
40      * legally allowed by the local authority and satellite signal coverage is available.
41      *
42      * @param isAllowed {@code true} means satellite is allowed,
43      *                  {@code false} satellite is not allowed.
44      */
onAccessAllowedStateChanged(boolean isAllowed)45     void onAccessAllowedStateChanged(boolean isAllowed);
46 
47     /**
48      * Callback method invoked when the satellite access configuration changes
49      *
50      * @param satelliteAccessConfiguration The satellite access configuration associated with
51      *                                       the current location. When satellite is not allowed at
52      *                                       the current location,
53      *                                       {@code satelliteRegionalConfiguration} will be null.
54      */
onAccessConfigurationChanged( @ullable SatelliteAccessConfiguration satelliteAccessConfiguration)55     default void onAccessConfigurationChanged(
56             @Nullable SatelliteAccessConfiguration satelliteAccessConfiguration) {};
57 }
58