blob: 520ffc9584e2a0e030822b989e537fbf85d8ddcf [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;
Jack Yu73036c42020-02-06 13:33:04 -080026import android.telephony.DisplayInfo;
chen xu6ac5fc12019-01-24 14:14:13 -080027import android.telephony.ims.ImsReasonInfo;
Malcolm Chen5ee5c142018-08-08 20:27:45 -070028import android.telephony.PhoneCapability;
Nathan Harold4d340f12019-12-05 17:27:56 -080029import android.telephony.PhysicalChannelConfig;
30import android.telephony.PreciseDataConnectionState;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031import android.telephony.ServiceState;
Wink Savillee9b06d72009-05-18 21:47:50 -070032import android.telephony.SignalStrength;
sqianbf165bc2018-12-07 17:09:39 -080033import android.telephony.emergency.EmergencyNumber;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080034import com.android.internal.telephony.IPhoneStateListener;
Wink Savilled09c4ca2014-11-22 10:08:16 -080035import com.android.internal.telephony.IOnSubscriptionsChangedListener;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036
37interface ITelephonyRegistry {
Philip P. Moltmann33692f72019-10-03 11:56:11 -070038 void addOnSubscriptionsChangedListener(String pkg, String featureId,
Wink Savilled09c4ca2014-11-22 10:08:16 -080039 IOnSubscriptionsChangedListener callback);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070040 void addOnOpportunisticSubscriptionsChangedListener(String pkg, String featureId,
Malcolm Chen27829e22018-09-04 22:12:31 -070041 IOnSubscriptionsChangedListener callback);
Wink Saville071743f2015-01-12 17:11:04 -080042 void removeOnSubscriptionsChangedListener(String pkg,
Wink Savilled09c4ca2014-11-22 10:08:16 -080043 IOnSubscriptionsChangedListener callback);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070044 /**
45 * @deprecated Use {@link #listenWithFeature(String, String, IPhoneStateListener, int,
46 * boolean) instead
47 */
Andrei Oneafa152f92019-02-27 15:58:05 +000048 @UnsupportedAppUsage
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080049 void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070050 void listenWithFeature(String pkg, String featureId, IPhoneStateListener callback, int events,
Wink Savillefb40dd42014-06-12 17:02:31 -070051 boolean notifyNow);
Philip P. Moltmann33692f72019-10-03 11:56:11 -070052 void listenForSubscriber(in int subId, String pkg, String featureId,
53 IPhoneStateListener callback, int events, boolean notifyNow);
Andrei Oneafa152f92019-02-27 15:58:05 +000054 @UnsupportedAppUsage
Chen Xu288b71c2019-09-15 18:28:21 -070055 void notifyCallStateForAllSubs(int state, String incomingNumber);
56 void notifyCallState(in int phoneId, in int subId, int state, String incomingNumber);
Wink Saville63f03dd2014-10-23 10:44:45 -070057 void notifyServiceStateForPhoneId(in int phoneId, in int subId, in ServiceState state);
Shishir Agrawalf7e59c12016-04-13 09:55:55 -070058 void notifySignalStrengthForPhoneId(in int phoneId, in int subId,
59 in SignalStrength signalStrength);
Wink Saville63f03dd2014-10-23 10:44:45 -070060 void notifyMessageWaitingChangedForPhoneId(in int phoneId, in int subId, in boolean mwi);
Artur Satayev70507ed2019-07-29 13:18:27 +010061 @UnsupportedAppUsage(maxTargetSdk = 28)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080062 void notifyCallForwardingChanged(boolean cfi);
Wink Saville63f03dd2014-10-23 10:44:45 -070063 void notifyCallForwardingChangedForSubscriber(in int subId, boolean cfi);
Artur Satayev70507ed2019-07-29 13:18:27 +010064 @UnsupportedAppUsage(maxTargetSdk = 28)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080065 void notifyDataActivity(int state);
Wink Saville63f03dd2014-10-23 10:44:45 -070066 void notifyDataActivityForSubscriber(in int subId, int state);
Nathan Harold4d340f12019-12-05 17:27:56 -080067 void notifyDataConnectionForSubscriber(
Meng Wangdd43acc2019-12-10 11:27:22 -080068 int phoneId, int subId, int apnType, in PreciseDataConnectionState preciseState);
Nathan Harold4d340f12019-12-05 17:27:56 -080069 @UnsupportedAppUsage
70 void notifyDataConnectionFailed(String apnType);
Meng Wangd75f97d2019-12-06 18:27:38 -080071 // Uses CellIdentity which is Parcelable here; will convert to CellLocation in client.
72 void notifyCellLocation(in CellIdentity cellLocation);
73 void notifyCellLocationForSubscriber(in int subId, in CellIdentity cellLocation);
Andrei Oneafa152f92019-02-27 15:58:05 +000074 @UnsupportedAppUsage
Wink Savilleb208a242012-07-25 14:08:09 -070075 void notifyCellInfo(in List<CellInfo> cellInfo);
chen xud5deeb12019-04-29 13:57:42 -070076 void notifyPreciseCallState(int phoneId, int subId, int ringingCallState,
77 int foregroundCallState, int backgroundCallState);
78 void notifyDisconnectCause(int phoneId, int subId, int disconnectCause,
79 int preciseDisconnectCause);
Meng Wangdd43acc2019-12-10 11:27:22 -080080 void notifyPreciseDataConnectionFailed(int phoneId, int subId, int apnType, String apn,
chen xu896e3d42018-12-11 18:09:41 -080081 int failCause);
Wink Saville63f03dd2014-10-23 10:44:45 -070082 void notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo);
Brad Ebingerefed9822018-10-26 10:25:57 -070083 void notifySrvccStateChanged(in int subId, in int lteState);
fionaxu12312f62016-11-14 13:32:14 -080084 void notifySimActivationStateChangedForPhoneId(in int phoneId, in int subId,
85 int activationState, int activationType);
chen xud5deeb12019-04-29 13:57:42 -070086 void notifyOemHookRawEventForSubscriber(in int phoneId, in int subId, in byte[] rawData);
Wink Savillea374c3d2014-11-11 11:48:04 -080087 void notifySubscriptionInfoChanged();
Malcolm Chen27829e22018-09-04 22:12:31 -070088 void notifyOpportunisticSubscriptionInfoChanged();
Andrew Flynn1f452642015-04-14 22:16:04 -040089 void notifyCarrierNetworkChange(in boolean active);
zxuan35a47022018-01-04 11:24:04 -080090 void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state);
Jack Yu73036c42020-02-06 13:33:04 -080091 void notifyDisplayInfoChanged(int slotIndex, int subId, in DisplayInfo displayInfo);
Malcolm Chen5ee5c142018-08-08 20:27:45 -070092 void notifyPhoneCapabilityChanged(in PhoneCapability capability);
Malcolm Chen026451d2019-02-14 19:50:19 -080093 void notifyActiveDataSubIdChanged(int activeDataSubId);
chen xud5deeb12019-04-29 13:57:42 -070094 void notifyRadioPowerStateChanged(in int phoneId, in int subId, in int state);
95 void notifyEmergencyNumberList(in int phoneId, in int subId);
Shuo Qian134334b2019-09-12 17:00:31 -070096 void notifyOutgoingEmergencyCall(in int phoneId, in int subId,
97 in EmergencyNumber emergencyNumber);
98 void notifyOutgoingEmergencySms(in int phoneId, in int subId,
99 in EmergencyNumber emergencyNumber);
chen xud5deeb12019-04-29 13:57:42 -0700100 void notifyCallQualityChanged(in CallQuality callQuality, int phoneId, int subId,
101 int callNetworkType);
chen xu6ac5fc12019-01-24 14:14:13 -0800102 void notifyImsDisconnectCause(int subId, in ImsReasonInfo imsReasonInfo);
Nathan Harold5e6e9832019-12-17 13:06:54 -0800103 void notifyRegistrationFailed(int slotIndex, int subId, in CellIdentity cellIdentity,
104 String chosenPlmn, int domain, int causeCode, int additionalCauseCode);
Nathan Haroldc564b1d2019-12-26 17:10:15 -0800105 void notifyBarringInfoChanged(int slotIndex, int subId, in BarringInfo barringInfo);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800106}