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.CallQuality; 24 import android.telephony.CellInfo; 25 import android.telephony.ims.ImsReasonInfo; 26 import android.telephony.PhoneCapability; 27 import android.telephony.PhysicalChannelConfig; 28 import android.telephony.ServiceState; 29 import android.telephony.SignalStrength; 30 import android.telephony.emergency.EmergencyNumber; 31 import com.android.internal.telephony.IPhoneStateListener; 32 import com.android.internal.telephony.IOnSubscriptionsChangedListener; 33 34 interface ITelephonyRegistry { 35 void addOnSubscriptionsChangedListener(String pkg, 36 IOnSubscriptionsChangedListener callback); 37 void addOnOpportunisticSubscriptionsChangedListener(String pkg, 38 IOnSubscriptionsChangedListener callback); 39 void removeOnSubscriptionsChangedListener(String pkg, 40 IOnSubscriptionsChangedListener callback); 41 @UnsupportedAppUsage 42 void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow); 43 void listenForSubscriber(in int subId, String pkg, IPhoneStateListener callback, int events, 44 boolean notifyNow); 45 @UnsupportedAppUsage 46 void notifyCallState(int state, String incomingNumber); 47 void notifyCallStateForPhoneId(in int phoneId, in int subId, int state, String incomingNumber); 48 void notifyServiceStateForPhoneId(in int phoneId, in int subId, in ServiceState state); 49 void notifySignalStrengthForPhoneId(in int phoneId, in int subId, 50 in SignalStrength signalStrength); 51 void notifyMessageWaitingChangedForPhoneId(in int phoneId, in int subId, in boolean mwi); 52 void notifyCallForwardingChanged(boolean cfi); 53 void notifyCallForwardingChangedForSubscriber(in int subId, boolean cfi); 54 void notifyDataActivity(int state); 55 void notifyDataActivityForSubscriber(in int subId, int state); 56 void notifyDataConnection(int state, boolean isDataConnectivityPossible, 57 String apn, String apnType, in LinkProperties linkProperties, 58 in NetworkCapabilities networkCapabilities, int networkType, boolean roaming); 59 void notifyDataConnectionForSubscriber(int phoneId, int subId, int state, 60 boolean isDataConnectivityPossible, 61 String apn, String apnType, in LinkProperties linkProperties, 62 in NetworkCapabilities networkCapabilities, int networkType, boolean roaming); 63 @UnsupportedAppUsage 64 void notifyDataConnectionFailed(String apnType); 65 void notifyDataConnectionFailedForSubscriber(int phoneId, int subId, String apnType); 66 void notifyCellLocation(in Bundle cellLocation); 67 void notifyCellLocationForSubscriber(in int subId, in Bundle cellLocation); 68 void notifyOtaspChanged(in int subId, in int otaspMode); 69 @UnsupportedAppUsage 70 void notifyCellInfo(in List<CellInfo> cellInfo); 71 void notifyPhysicalChannelConfiguration(in List<PhysicalChannelConfig> configs); 72 void notifyPhysicalChannelConfigurationForSubscriber(in int subId, 73 in List<PhysicalChannelConfig> configs); 74 void notifyPreciseCallState(int phoneId, int subId, int ringingCallState, 75 int foregroundCallState, int backgroundCallState); 76 void notifyDisconnectCause(int phoneId, int subId, int disconnectCause, 77 int preciseDisconnectCause); 78 void notifyPreciseDataConnectionFailed(int phoneId, int subId, String apnType, String apn, 79 int failCause); 80 void notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo); 81 void notifySrvccStateChanged(in int subId, in int lteState); 82 void notifySimActivationStateChangedForPhoneId(in int phoneId, in int subId, 83 int activationState, int activationType); 84 void notifyOemHookRawEventForSubscriber(in int phoneId, in int subId, in byte[] rawData); 85 void notifySubscriptionInfoChanged(); 86 void notifyOpportunisticSubscriptionInfoChanged(); 87 void notifyCarrierNetworkChange(in boolean active); 88 void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state); 89 void notifyPhoneCapabilityChanged(in PhoneCapability capability); 90 void notifyActiveDataSubIdChanged(int activeDataSubId); 91 void notifyRadioPowerStateChanged(in int phoneId, in int subId, in int state); 92 void notifyEmergencyNumberList(in int phoneId, in int subId); 93 void notifyCallQualityChanged(in CallQuality callQuality, int phoneId, int subId, 94 int callNetworkType); 95 void notifyImsDisconnectCause(int subId, in ImsReasonInfo imsReasonInfo); 96 } 97