1 /*
2  * Copyright (C) 2007 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 com.android.internal.telephony;
18 
19 import android.content.Intent;
20 import android.net.LinkProperties;
21 import android.net.NetworkCapabilities;
22 import android.os.Bundle;
23 import android.telephony.CellInfo;
24 import android.telephony.DataConnectionRealTimeInfo;
25 import android.telephony.ServiceState;
26 import android.telephony.SignalStrength;
27 import android.telephony.CellInfo;
28 import android.telephony.VoLteServiceState;
29 import com.android.internal.telephony.IPhoneStateListener;
30 import com.android.internal.telephony.IOnSubscriptionsChangedListener;
31 
32 interface ITelephonyRegistry {
addOnSubscriptionsChangedListener(String pkg, IOnSubscriptionsChangedListener callback)33     void addOnSubscriptionsChangedListener(String pkg,
34             IOnSubscriptionsChangedListener callback);
removeOnSubscriptionsChangedListener(String pkg, IOnSubscriptionsChangedListener callback)35     void removeOnSubscriptionsChangedListener(String pkg,
36             IOnSubscriptionsChangedListener callback);
listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow)37     void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow);
listenForSubscriber(in int subId, String pkg, IPhoneStateListener callback, int events, boolean notifyNow)38     void listenForSubscriber(in int subId, String pkg, IPhoneStateListener callback, int events,
39             boolean notifyNow);
notifyCallState(int state, String incomingNumber)40     void notifyCallState(int state, String incomingNumber);
notifyCallStateForSubscriber(in int subId, int state, String incomingNumber)41     void notifyCallStateForSubscriber(in int subId, int state, String incomingNumber);
notifyServiceStateForPhoneId(in int phoneId, in int subId, in ServiceState state)42     void notifyServiceStateForPhoneId(in int phoneId, in int subId, in ServiceState state);
notifySignalStrength(in SignalStrength signalStrength)43     void notifySignalStrength(in SignalStrength signalStrength);
notifySignalStrengthForSubscriber(in int subId, in SignalStrength signalStrength)44     void notifySignalStrengthForSubscriber(in int subId, in SignalStrength signalStrength);
notifyMessageWaitingChangedForPhoneId(in int phoneId, in int subId, in boolean mwi)45     void notifyMessageWaitingChangedForPhoneId(in int phoneId, in int subId, in boolean mwi);
notifyCallForwardingChanged(boolean cfi)46     void notifyCallForwardingChanged(boolean cfi);
notifyCallForwardingChangedForSubscriber(in int subId, boolean cfi)47     void notifyCallForwardingChangedForSubscriber(in int subId, boolean cfi);
notifyDataActivity(int state)48     void notifyDataActivity(int state);
notifyDataActivityForSubscriber(in int subId, int state)49     void notifyDataActivityForSubscriber(in int subId, int state);
notifyDataConnection(int state, boolean isDataConnectivityPossible, String reason, String apn, String apnType, in LinkProperties linkProperties, in NetworkCapabilities networkCapabilities, int networkType, boolean roaming)50     void notifyDataConnection(int state, boolean isDataConnectivityPossible,
51             String reason, String apn, String apnType, in LinkProperties linkProperties,
52             in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
notifyDataConnectionForSubscriber(int subId, int state, boolean isDataConnectivityPossible, String reason, String apn, String apnType, in LinkProperties linkProperties, in NetworkCapabilities networkCapabilities, int networkType, boolean roaming)53     void notifyDataConnectionForSubscriber(int subId, int state, boolean isDataConnectivityPossible,
54             String reason, String apn, String apnType, in LinkProperties linkProperties,
55             in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
notifyDataConnectionFailed(String reason, String apnType)56     void notifyDataConnectionFailed(String reason, String apnType);
notifyDataConnectionFailedForSubscriber(int subId, String reason, String apnType)57     void notifyDataConnectionFailedForSubscriber(int subId, String reason, String apnType);
notifyCellLocation(in Bundle cellLocation)58     void notifyCellLocation(in Bundle cellLocation);
notifyCellLocationForSubscriber(in int subId, in Bundle cellLocation)59     void notifyCellLocationForSubscriber(in int subId, in Bundle cellLocation);
notifyOtaspChanged(in int otaspMode)60     void notifyOtaspChanged(in int otaspMode);
notifyCellInfo(in List<CellInfo> cellInfo)61     void notifyCellInfo(in List<CellInfo> cellInfo);
notifyPreciseCallState(int ringingCallState, int foregroundCallState, int backgroundCallState)62     void notifyPreciseCallState(int ringingCallState, int foregroundCallState,
63             int backgroundCallState);
notifyDisconnectCause(int disconnectCause, int preciseDisconnectCause)64     void notifyDisconnectCause(int disconnectCause, int preciseDisconnectCause);
notifyPreciseDataConnectionFailed(String reason, String apnType, String apn, String failCause)65     void notifyPreciseDataConnectionFailed(String reason, String apnType, String apn,
66             String failCause);
notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo)67     void notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo);
notifyDataConnectionRealTimeInfo(in DataConnectionRealTimeInfo dcRtInfo)68     void notifyDataConnectionRealTimeInfo(in DataConnectionRealTimeInfo dcRtInfo);
notifyVoLteServiceStateChanged(in VoLteServiceState lteState)69     void notifyVoLteServiceStateChanged(in VoLteServiceState lteState);
notifyOemHookRawEventForSubscriber(in int subId, in byte[] rawData)70     void notifyOemHookRawEventForSubscriber(in int subId, in byte[] rawData);
notifySubscriptionInfoChanged()71     void notifySubscriptionInfoChanged();
notifyCarrierNetworkChange(in boolean active)72     void notifyCarrierNetworkChange(in boolean active);
73 }
74