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.telephony.BarringInfo;
20 import android.telephony.CallAttributes;
21 import android.telephony.CellIdentity;
22 import android.telephony.CellInfo;
23 import android.telephony.DataConnectionRealTimeInfo;
24 import android.telephony.LinkCapacityEstimate;
25 import android.telephony.TelephonyDisplayInfo;
26 import android.telephony.PhoneCapability;
27 import android.telephony.PhysicalChannelConfig;
28 import android.telephony.PreciseCallState;
29 import android.telephony.PreciseDataConnectionState;
30 import android.telephony.ServiceState;
31 import android.telephony.SignalStrength;
32 import android.telephony.emergency.EmergencyNumber;
33 import android.telephony.ims.ImsReasonInfo;
34 
35 /**
36  * {@hide}
37  */
38 oneway interface IPhoneStateListener {
onServiceStateChanged(in ServiceState serviceState)39     void onServiceStateChanged(in ServiceState serviceState);
onSignalStrengthChanged(int asu)40     void onSignalStrengthChanged(int asu);
onMessageWaitingIndicatorChanged(boolean mwi)41     void onMessageWaitingIndicatorChanged(boolean mwi);
onCallForwardingIndicatorChanged(boolean cfi)42     void onCallForwardingIndicatorChanged(boolean cfi);
43 
44     // Uses CellIdentity which is Parcelable here; will convert to CellLocation in client.
onCellLocationChanged(in CellIdentity location)45     void onCellLocationChanged(in CellIdentity location);
onLegacyCallStateChanged(int state, String incomingNumber)46     void onLegacyCallStateChanged(int state, String incomingNumber);
onCallStateChanged(int state)47     void onCallStateChanged(int state);
onDataConnectionStateChanged(int state, int networkType)48     void onDataConnectionStateChanged(int state, int networkType);
onDataActivity(int direction)49     void onDataActivity(int direction);
onSignalStrengthsChanged(in SignalStrength signalStrength)50     void onSignalStrengthsChanged(in SignalStrength signalStrength);
onCellInfoChanged(in List<CellInfo> cellInfo)51     void onCellInfoChanged(in List<CellInfo> cellInfo);
onPreciseCallStateChanged(in PreciseCallState callState)52     void onPreciseCallStateChanged(in PreciseCallState callState);
onPreciseDataConnectionStateChanged(in PreciseDataConnectionState dataConnectionState)53     void onPreciseDataConnectionStateChanged(in PreciseDataConnectionState dataConnectionState);
onDataConnectionRealTimeInfoChanged(in DataConnectionRealTimeInfo dcRtInfo)54     void onDataConnectionRealTimeInfoChanged(in DataConnectionRealTimeInfo dcRtInfo);
onSrvccStateChanged(in int state)55     void onSrvccStateChanged(in int state);
onVoiceActivationStateChanged(int activationState)56     void onVoiceActivationStateChanged(int activationState);
onDataActivationStateChanged(int activationState)57     void onDataActivationStateChanged(int activationState);
onOemHookRawEvent(in byte[] rawData)58     void onOemHookRawEvent(in byte[] rawData);
onCarrierNetworkChange(in boolean active)59     void onCarrierNetworkChange(in boolean active);
onUserMobileDataStateChanged(in boolean enabled)60     void onUserMobileDataStateChanged(in boolean enabled);
onDisplayInfoChanged(in TelephonyDisplayInfo telephonyDisplayInfo)61     void onDisplayInfoChanged(in TelephonyDisplayInfo telephonyDisplayInfo);
onPhoneCapabilityChanged(in PhoneCapability capability)62     void onPhoneCapabilityChanged(in PhoneCapability capability);
onActiveDataSubIdChanged(in int subId)63     void onActiveDataSubIdChanged(in int subId);
onRadioPowerStateChanged(in int state)64     void onRadioPowerStateChanged(in int state);
onCallAttributesChanged(in CallAttributes callAttributes)65     void onCallAttributesChanged(in CallAttributes callAttributes);
onEmergencyNumberListChanged(in Map emergencyNumberList)66     void onEmergencyNumberListChanged(in Map emergencyNumberList);
onOutgoingEmergencyCall(in EmergencyNumber placedEmergencyNumber, int subscriptionId)67     void onOutgoingEmergencyCall(in EmergencyNumber placedEmergencyNumber, int subscriptionId);
onOutgoingEmergencySms(in EmergencyNumber sentEmergencyNumber, int subscriptionId)68     void onOutgoingEmergencySms(in EmergencyNumber sentEmergencyNumber, int subscriptionId);
onCallDisconnectCauseChanged(in int disconnectCause, in int preciseDisconnectCause)69     void onCallDisconnectCauseChanged(in int disconnectCause, in int preciseDisconnectCause);
onImsCallDisconnectCauseChanged(in ImsReasonInfo imsReasonInfo)70     void onImsCallDisconnectCauseChanged(in ImsReasonInfo imsReasonInfo);
onRegistrationFailed(in CellIdentity cellIdentity, String chosenPlmn, int domain, int causeCode, int additionalCauseCode)71     void onRegistrationFailed(in CellIdentity cellIdentity,
72              String chosenPlmn, int domain, int causeCode, int additionalCauseCode);
onBarringInfoChanged(in BarringInfo barringInfo)73     void onBarringInfoChanged(in BarringInfo barringInfo);
onPhysicalChannelConfigChanged(in List<PhysicalChannelConfig> configs)74     void onPhysicalChannelConfigChanged(in List<PhysicalChannelConfig> configs);
onDataEnabledChanged(boolean enabled, int reason)75     void onDataEnabledChanged(boolean enabled, int reason);
onAllowedNetworkTypesChanged(in int reason, in long allowedNetworkType)76     void onAllowedNetworkTypesChanged(in int reason, in long allowedNetworkType);
onLinkCapacityEstimateChanged(in List<LinkCapacityEstimate> linkCapacityEstimateList)77     void onLinkCapacityEstimateChanged(in List<LinkCapacityEstimate> linkCapacityEstimateList);
78 }
79