blob: 47752c5b2d945efd30685d1e15ff9199ba1ef52b [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
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
17package com.android.internal.telephony;
18
19import android.content.Intent;
Robert Greenwalt37e65eb2010-08-30 10:56:47 -070020import android.net.LinkProperties;
Robert Greenwaltf9cb86a2014-04-08 17:34:00 -070021import android.net.NetworkCapabilities;
Nathan Haroldc564b1d2019-12-26 17:10:15 -080022import android.telephony.BarringInfo;
Jordan Liu8218ddd2018-11-28 11:22:39 -080023import android.telephony.CallQuality;
Meng Wangd75f97d2019-12-06 18:27:38 -080024import android.telephony.CellIdentity;
Wink Saville070e0612014-04-15 22:04:10 -070025import android.telephony.CellInfo;
chen xu6ac5fc12019-01-24 14:14:13 -080026import android.telephony.ims.ImsReasonInfo;
Malcolm Chen5ee5c142018-08-08 20:27:45 -070027import android.telephony.PhoneCapability;
Nathan Harold4d340f12019-12-05 17:27:56 -080028import android.telephony.PhysicalChannelConfig;
29import android.telephony.PreciseDataConnectionState;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030import android.telephony.ServiceState;
Wink Savillee9b06d72009-05-18 21:47:50 -070031import android.telephony.SignalStrength;
sqianbf165bc2018-12-07 17:09:39 -080032import android.telephony.emergency.EmergencyNumber;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080033import com.android.internal.telephony.IPhoneStateListener;
Wink Savilled09c4ca2014-11-22 10:08:16 -080034import com.android.internal.telephony.IOnSubscriptionsChangedListener;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035
36interface ITelephonyRegistry {
Philip P. Moltmann33692f72019-10-03 11:56:11 -070037 void addOnSubscriptionsChangedListener(String pkg, String featureId,
Wink Savilled09c4ca2014-11-22 10:08:16 -080038 IOnSubscriptionsChangedListener callback);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070039 void addOnOpportunisticSubscriptionsChangedListener(String pkg, String featureId,
Malcolm Chen27829e22018-09-04 22:12:31 -070040 IOnSubscriptionsChangedListener callback);
Wink Saville071743f2015-01-12 17:11:04 -080041 void removeOnSubscriptionsChangedListener(String pkg,
Wink Savilled09c4ca2014-11-22 10:08:16 -080042 IOnSubscriptionsChangedListener callback);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070043 /**
44 * @deprecated Use {@link #listenWithFeature(String, String, IPhoneStateListener, int,
45 * boolean) instead
46 */
Andrei Oneafa152f92019-02-27 15:58:05 +000047 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048 void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070049 void listenWithFeature(String pkg, String featureId, IPhoneStateListener callback, int events,
Wink Savillefb40dd42014-06-12 17:02:31 -070050 boolean notifyNow);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070051 void listenForSubscriber(in int subId, String pkg, String featureId,
52 IPhoneStateListener callback, int events, boolean notifyNow);
Andrei Oneafa152f92019-02-27 15:58:05 +000053 @UnsupportedAppUsage
Chen Xu288b71c2019-09-15 18:28:21 -070054 void notifyCallStateForAllSubs(int state, String incomingNumber);
55 void notifyCallState(in int phoneId, in int subId, int state, String incomingNumber);
Wink Saville63f03dd2014-10-23 10:44:45 -070056 void notifyServiceStateForPhoneId(in int phoneId, in int subId, in ServiceState state);
Shishir Agrawalf7e59c12016-04-13 09:55:55 -070057 void notifySignalStrengthForPhoneId(in int phoneId, in int subId,
58 in SignalStrength signalStrength);
Wink Saville63f03dd2014-10-23 10:44:45 -070059 void notifyMessageWaitingChangedForPhoneId(in int phoneId, in int subId, in boolean mwi);
Artur Satayev70507ed2019-07-29 13:18:27 +010060 @UnsupportedAppUsage(maxTargetSdk = 28)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080061 void notifyCallForwardingChanged(boolean cfi);
Wink Saville63f03dd2014-10-23 10:44:45 -070062 void notifyCallForwardingChangedForSubscriber(in int subId, boolean cfi);
Artur Satayev70507ed2019-07-29 13:18:27 +010063 @UnsupportedAppUsage(maxTargetSdk = 28)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064 void notifyDataActivity(int state);
Wink Saville63f03dd2014-10-23 10:44:45 -070065 void notifyDataActivityForSubscriber(in int subId, int state);
Nathan Harold4d340f12019-12-05 17:27:56 -080066 void notifyDataConnectionForSubscriber(
Meng Wangdd43acc2019-12-10 11:27:22 -080067 int phoneId, int subId, int apnType, in PreciseDataConnectionState preciseState);
Nathan Harold4d340f12019-12-05 17:27:56 -080068 @UnsupportedAppUsage
69 void notifyDataConnectionFailed(String apnType);
Meng Wangd75f97d2019-12-06 18:27:38 -080070 // Uses CellIdentity which is Parcelable here; will convert to CellLocation in client.
71 void notifyCellLocation(in CellIdentity cellLocation);
72 void notifyCellLocationForSubscriber(in int subId, in CellIdentity cellLocation);
Andrei Oneafa152f92019-02-27 15:58:05 +000073 @UnsupportedAppUsage
Wink Savilleb208a242012-07-25 14:08:09 -070074 void notifyCellInfo(in List<CellInfo> cellInfo);
chen xud5deeb12019-04-29 13:57:42 -070075 void notifyPreciseCallState(int phoneId, int subId, int ringingCallState,
76 int foregroundCallState, int backgroundCallState);
77 void notifyDisconnectCause(int phoneId, int subId, int disconnectCause,
78 int preciseDisconnectCause);
Meng Wangdd43acc2019-12-10 11:27:22 -080079 void notifyPreciseDataConnectionFailed(int phoneId, int subId, int apnType, String apn,
chen xu896e3d42018-12-11 18:09:41 -080080 int failCause);
Wink Saville63f03dd2014-10-23 10:44:45 -070081 void notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo);
Brad Ebingerefed9822018-10-26 10:25:57 -070082 void notifySrvccStateChanged(in int subId, in int lteState);
fionaxu12312f62016-11-14 13:32:14 -080083 void notifySimActivationStateChangedForPhoneId(in int phoneId, in int subId,
84 int activationState, int activationType);
chen xud5deeb12019-04-29 13:57:42 -070085 void notifyOemHookRawEventForSubscriber(in int phoneId, in int subId, in byte[] rawData);
Wink Savillea374c3d2014-11-11 11:48:04 -080086 void notifySubscriptionInfoChanged();
Malcolm Chen27829e22018-09-04 22:12:31 -070087 void notifyOpportunisticSubscriptionInfoChanged();
Andrew Flynn1f452642015-04-14 22:16:04 -040088 void notifyCarrierNetworkChange(in boolean active);
zxuan35a47022018-01-04 11:24:04 -080089 void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state);
Malcolm Chen5ee5c142018-08-08 20:27:45 -070090 void notifyPhoneCapabilityChanged(in PhoneCapability capability);
Malcolm Chen026451d2019-02-14 19:50:19 -080091 void notifyActiveDataSubIdChanged(int activeDataSubId);
chen xud5deeb12019-04-29 13:57:42 -070092 void notifyRadioPowerStateChanged(in int phoneId, in int subId, in int state);
93 void notifyEmergencyNumberList(in int phoneId, in int subId);
Shuo Qian134334b2019-09-12 17:00:31 -070094 void notifyOutgoingEmergencyCall(in int phoneId, in int subId,
95 in EmergencyNumber emergencyNumber);
96 void notifyOutgoingEmergencySms(in int phoneId, in int subId,
97 in EmergencyNumber emergencyNumber);
chen xud5deeb12019-04-29 13:57:42 -070098 void notifyCallQualityChanged(in CallQuality callQuality, int phoneId, int subId,
99 int callNetworkType);
chen xu6ac5fc12019-01-24 14:14:13 -0800100 void notifyImsDisconnectCause(int subId, in ImsReasonInfo imsReasonInfo);
Nathan Harold5e6e9832019-12-17 13:06:54 -0800101 void notifyRegistrationFailed(int slotIndex, int subId, in CellIdentity cellIdentity,
102 String chosenPlmn, int domain, int causeCode, int additionalCauseCode);
Nathan Haroldc564b1d2019-12-26 17:10:15 -0800103 void notifyBarringInfoChanged(int slotIndex, int subId, in BarringInfo barringInfo);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800104}