The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 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; |
Robert Greenwalt | 37e65eb | 2010-08-30 10:56:47 -0700 | [diff] [blame] | 20 | import android.net.LinkProperties; |
Robert Greenwalt | f9cb86a | 2014-04-08 17:34:00 -0700 | [diff] [blame] | 21 | import android.net.NetworkCapabilities; |
Nathan Harold | c564b1d | 2019-12-26 17:10:15 -0800 | [diff] [blame] | 22 | import android.telephony.BarringInfo; |
Jordan Liu | 8218ddd | 2018-11-28 11:22:39 -0800 | [diff] [blame] | 23 | import android.telephony.CallQuality; |
Meng Wang | d75f97d | 2019-12-06 18:27:38 -0800 | [diff] [blame] | 24 | import android.telephony.CellIdentity; |
Wink Saville | 070e061 | 2014-04-15 22:04:10 -0700 | [diff] [blame] | 25 | import android.telephony.CellInfo; |
Jack Yu | 73036c4 | 2020-02-06 13:33:04 -0800 | [diff] [blame] | 26 | import android.telephony.DisplayInfo; |
chen xu | 6ac5fc1 | 2019-01-24 14:14:13 -0800 | [diff] [blame] | 27 | import android.telephony.ims.ImsReasonInfo; |
Malcolm Chen | 5ee5c14 | 2018-08-08 20:27:45 -0700 | [diff] [blame] | 28 | import android.telephony.PhoneCapability; |
Nathan Harold | 4d340f1 | 2019-12-05 17:27:56 -0800 | [diff] [blame] | 29 | import android.telephony.PhysicalChannelConfig; |
| 30 | import android.telephony.PreciseDataConnectionState; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 31 | import android.telephony.ServiceState; |
Wink Saville | e9b06d7 | 2009-05-18 21:47:50 -0700 | [diff] [blame] | 32 | import android.telephony.SignalStrength; |
sqian | bf165bc | 2018-12-07 17:09:39 -0800 | [diff] [blame] | 33 | import android.telephony.emergency.EmergencyNumber; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | import com.android.internal.telephony.IPhoneStateListener; |
Wink Saville | d09c4ca | 2014-11-22 10:08:16 -0800 | [diff] [blame] | 35 | import com.android.internal.telephony.IOnSubscriptionsChangedListener; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | |
| 37 | interface ITelephonyRegistry { |
Philip P. Moltmann | 33692f7 | 2019-10-03 11:56:11 -0700 | [diff] [blame] | 38 | void addOnSubscriptionsChangedListener(String pkg, String featureId, |
Wink Saville | d09c4ca | 2014-11-22 10:08:16 -0800 | [diff] [blame] | 39 | IOnSubscriptionsChangedListener callback); |
Philip P. Moltmann | 33692f7 | 2019-10-03 11:56:11 -0700 | [diff] [blame] | 40 | void addOnOpportunisticSubscriptionsChangedListener(String pkg, String featureId, |
Malcolm Chen | 27829e2 | 2018-09-04 22:12:31 -0700 | [diff] [blame] | 41 | IOnSubscriptionsChangedListener callback); |
Wink Saville | 071743f | 2015-01-12 17:11:04 -0800 | [diff] [blame] | 42 | void removeOnSubscriptionsChangedListener(String pkg, |
Wink Saville | d09c4ca | 2014-11-22 10:08:16 -0800 | [diff] [blame] | 43 | IOnSubscriptionsChangedListener callback); |
Philip P. Moltmann | 33692f7 | 2019-10-03 11:56:11 -0700 | [diff] [blame] | 44 | /** |
| 45 | * @deprecated Use {@link #listenWithFeature(String, String, IPhoneStateListener, int, |
| 46 | * boolean) instead |
| 47 | */ |
Andrei Onea | fa152f9 | 2019-02-27 15:58:05 +0000 | [diff] [blame] | 48 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 49 | void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow); |
Philip P. Moltmann | 33692f7 | 2019-10-03 11:56:11 -0700 | [diff] [blame] | 50 | void listenWithFeature(String pkg, String featureId, IPhoneStateListener callback, int events, |
Wink Saville | fb40dd4 | 2014-06-12 17:02:31 -0700 | [diff] [blame] | 51 | boolean notifyNow); |
Philip P. Moltmann | 33692f7 | 2019-10-03 11:56:11 -0700 | [diff] [blame] | 52 | void listenForSubscriber(in int subId, String pkg, String featureId, |
| 53 | IPhoneStateListener callback, int events, boolean notifyNow); |
Andrei Onea | fa152f9 | 2019-02-27 15:58:05 +0000 | [diff] [blame] | 54 | @UnsupportedAppUsage |
Chen Xu | 288b71c | 2019-09-15 18:28:21 -0700 | [diff] [blame] | 55 | void notifyCallStateForAllSubs(int state, String incomingNumber); |
| 56 | void notifyCallState(in int phoneId, in int subId, int state, String incomingNumber); |
Wink Saville | 63f03dd | 2014-10-23 10:44:45 -0700 | [diff] [blame] | 57 | void notifyServiceStateForPhoneId(in int phoneId, in int subId, in ServiceState state); |
Shishir Agrawal | f7e59c1 | 2016-04-13 09:55:55 -0700 | [diff] [blame] | 58 | void notifySignalStrengthForPhoneId(in int phoneId, in int subId, |
| 59 | in SignalStrength signalStrength); |
Wink Saville | 63f03dd | 2014-10-23 10:44:45 -0700 | [diff] [blame] | 60 | void notifyMessageWaitingChangedForPhoneId(in int phoneId, in int subId, in boolean mwi); |
Artur Satayev | 70507ed | 2019-07-29 13:18:27 +0100 | [diff] [blame] | 61 | @UnsupportedAppUsage(maxTargetSdk = 28) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | void notifyCallForwardingChanged(boolean cfi); |
Wink Saville | 63f03dd | 2014-10-23 10:44:45 -0700 | [diff] [blame] | 63 | void notifyCallForwardingChangedForSubscriber(in int subId, boolean cfi); |
Artur Satayev | 70507ed | 2019-07-29 13:18:27 +0100 | [diff] [blame] | 64 | @UnsupportedAppUsage(maxTargetSdk = 28) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 65 | void notifyDataActivity(int state); |
Wink Saville | 63f03dd | 2014-10-23 10:44:45 -0700 | [diff] [blame] | 66 | void notifyDataActivityForSubscriber(in int subId, int state); |
Nathan Harold | 4d340f1 | 2019-12-05 17:27:56 -0800 | [diff] [blame] | 67 | void notifyDataConnectionForSubscriber( |
Meng Wang | dd43acc | 2019-12-10 11:27:22 -0800 | [diff] [blame] | 68 | int phoneId, int subId, int apnType, in PreciseDataConnectionState preciseState); |
Nathan Harold | 4d340f1 | 2019-12-05 17:27:56 -0800 | [diff] [blame] | 69 | @UnsupportedAppUsage |
| 70 | void notifyDataConnectionFailed(String apnType); |
Meng Wang | d75f97d | 2019-12-06 18:27:38 -0800 | [diff] [blame] | 71 | // 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 Onea | fa152f9 | 2019-02-27 15:58:05 +0000 | [diff] [blame] | 74 | @UnsupportedAppUsage |
Wink Saville | b208a24 | 2012-07-25 14:08:09 -0700 | [diff] [blame] | 75 | void notifyCellInfo(in List<CellInfo> cellInfo); |
chen xu | d5deeb1 | 2019-04-29 13:57:42 -0700 | [diff] [blame] | 76 | 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 Wang | dd43acc | 2019-12-10 11:27:22 -0800 | [diff] [blame] | 80 | void notifyPreciseDataConnectionFailed(int phoneId, int subId, int apnType, String apn, |
chen xu | 896e3d4 | 2018-12-11 18:09:41 -0800 | [diff] [blame] | 81 | int failCause); |
Wink Saville | 63f03dd | 2014-10-23 10:44:45 -0700 | [diff] [blame] | 82 | void notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo); |
Brad Ebinger | efed982 | 2018-10-26 10:25:57 -0700 | [diff] [blame] | 83 | void notifySrvccStateChanged(in int subId, in int lteState); |
fionaxu | 12312f6 | 2016-11-14 13:32:14 -0800 | [diff] [blame] | 84 | void notifySimActivationStateChangedForPhoneId(in int phoneId, in int subId, |
| 85 | int activationState, int activationType); |
chen xu | d5deeb1 | 2019-04-29 13:57:42 -0700 | [diff] [blame] | 86 | void notifyOemHookRawEventForSubscriber(in int phoneId, in int subId, in byte[] rawData); |
Wink Saville | a374c3d | 2014-11-11 11:48:04 -0800 | [diff] [blame] | 87 | void notifySubscriptionInfoChanged(); |
Malcolm Chen | 27829e2 | 2018-09-04 22:12:31 -0700 | [diff] [blame] | 88 | void notifyOpportunisticSubscriptionInfoChanged(); |
Andrew Flynn | 1f45264 | 2015-04-14 22:16:04 -0400 | [diff] [blame] | 89 | void notifyCarrierNetworkChange(in boolean active); |
zxuan | 35a4702 | 2018-01-04 11:24:04 -0800 | [diff] [blame] | 90 | void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state); |
Jack Yu | 73036c4 | 2020-02-06 13:33:04 -0800 | [diff] [blame] | 91 | void notifyDisplayInfoChanged(int slotIndex, int subId, in DisplayInfo displayInfo); |
Malcolm Chen | 5ee5c14 | 2018-08-08 20:27:45 -0700 | [diff] [blame] | 92 | void notifyPhoneCapabilityChanged(in PhoneCapability capability); |
Malcolm Chen | 026451d | 2019-02-14 19:50:19 -0800 | [diff] [blame] | 93 | void notifyActiveDataSubIdChanged(int activeDataSubId); |
chen xu | d5deeb1 | 2019-04-29 13:57:42 -0700 | [diff] [blame] | 94 | void notifyRadioPowerStateChanged(in int phoneId, in int subId, in int state); |
| 95 | void notifyEmergencyNumberList(in int phoneId, in int subId); |
Shuo Qian | 134334b | 2019-09-12 17:00:31 -0700 | [diff] [blame] | 96 | 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 xu | d5deeb1 | 2019-04-29 13:57:42 -0700 | [diff] [blame] | 100 | void notifyCallQualityChanged(in CallQuality callQuality, int phoneId, int subId, |
| 101 | int callNetworkType); |
chen xu | 6ac5fc1 | 2019-01-24 14:14:13 -0800 | [diff] [blame] | 102 | void notifyImsDisconnectCause(int subId, in ImsReasonInfo imsReasonInfo); |
Nathan Harold | 5e6e983 | 2019-12-17 13:06:54 -0800 | [diff] [blame] | 103 | void notifyRegistrationFailed(int slotIndex, int subId, in CellIdentity cellIdentity, |
| 104 | String chosenPlmn, int domain, int causeCode, int additionalCauseCode); |
Nathan Harold | c564b1d | 2019-12-26 17:10:15 -0800 | [diff] [blame] | 105 | void notifyBarringInfoChanged(int slotIndex, int subId, in BarringInfo barringInfo); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 106 | } |