Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6109,6 +6109,7 @@ package android.telephony.ims { } public class ImsCallSessionListener { method public void callQualityChanged(android.telephony.CallQuality); method public void callSessionConferenceExtendFailed(android.telephony.ims.ImsReasonInfo); method public void callSessionConferenceExtendReceived(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); method public void callSessionConferenceExtended(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); Loading services/core/java/com/android/server/TelephonyRegistry.java +96 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.os.IBinder; import android.os.Message; import android.os.RemoteException; import android.os.UserHandle; import android.telephony.CallAttributes; import android.telephony.CallQuality; import android.telephony.CellInfo; import android.telephony.CellLocation; import android.telephony.DataFailCause; Loading Loading @@ -173,6 +175,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { private ServiceState[] mServiceState; private int[] mNetworkType; private int[] mVoiceActivationState; private int[] mDataActivationState; Loading Loading @@ -202,6 +206,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { private Map<Integer, List<EmergencyNumber>> mEmergencyNumberList; private CallQuality mCallQuality; private CallAttributes mCallAttributes; private int[] mSrvccState; private int mDefaultSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading Loading @@ -358,6 +366,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mDataConnectionNetworkType = new int[numPhones]; mCallIncomingNumber = new String[numPhones]; mServiceState = new ServiceState[numPhones]; mNetworkType = new int[numPhones]; mVoiceActivationState = new int[numPhones]; mDataActivationState = new int[numPhones]; mUserMobileDataState = new boolean[numPhones]; Loading @@ -377,6 +386,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mDataActivationState[i] = TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN; mCallIncomingNumber[i] = ""; mServiceState[i] = new ServiceState(); mNetworkType[i] = mServiceState[i].getVoiceNetworkType(); mSignalStrength[i] = new SignalStrength(); mUserMobileDataState[i] = false; mMessageWaiting[i] = false; Loading Loading @@ -807,6 +817,13 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { remove(r.binder); } } if ((events & PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED) != 0) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { remove(r.binder); } } } } } else { Loading Loading @@ -957,6 +974,21 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { if (validatePhoneId(phoneId)) { mServiceState[phoneId] = state; boolean notifyCallAttributes = true; if (mNetworkType[phoneId] != mServiceState[phoneId].getVoiceNetworkType()) { mNetworkType[phoneId] = state.getVoiceNetworkType(); mCallAttributes = new CallAttributes(mPreciseCallState, mNetworkType[phoneId], mCallQuality); } else { // No change to network type, so no need to notify call attributes notifyCallAttributes = false; } if (mCallQuality == null) { // No call quality reported yet, so no need to notify call attributes notifyCallAttributes = false; } for (Record r : mRecords) { if (VDBG) { log("notifyServiceStateForSubscriber: r=" + r + " subId=" + subId Loading @@ -975,6 +1007,14 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mRemoveList.add(r.binder); } } if (notifyCallAttributes && r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED)) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { mRemoveList.add(r.binder); } } } } else { log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId); Loading Loading @@ -1484,7 +1524,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } public void notifyPreciseCallState(int ringingCallState, int foregroundCallState, int backgroundCallState) { int backgroundCallState, int phoneId) { if (!checkNotifyPermission("notifyPreciseCallState()")) { return; } Loading @@ -1496,6 +1536,15 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID); boolean notifyCallAttributes = true; if (mCallQuality == null) { log("notifyPreciseCallState: mCallQuality is null, skipping call attributes"); notifyCallAttributes = false; } else { mCallAttributes = new CallAttributes(mPreciseCallState, mNetworkType[phoneId], mCallQuality); } for (Record r : mRecords) { if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_PRECISE_CALL_STATE)) { try { Loading @@ -1504,6 +1553,14 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mRemoveList.add(r.binder); } } if (notifyCallAttributes && r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED)) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { mRemoveList.add(r.binder); } } } handleRemoveListLocked(); } Loading Loading @@ -1722,6 +1779,36 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } @Override public void notifyCallQualityChanged(CallQuality callQuality, int phoneId) { if (!checkNotifyPermission("notifyCallQualityChanged()")) { return; } // merge CallQuality with PreciseCallState and network type mCallQuality = callQuality; mCallAttributes = new CallAttributes(mPreciseCallState, mNetworkType[phoneId], callQuality); synchronized (mRecords) { TelephonyManager tm = (TelephonyManager) mContext.getSystemService( Context.TELEPHONY_SERVICE); for (Record r : mRecords) { if (r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED)) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { mRemoveList.add(r.binder); } } } handleRemoveListLocked(); } } @Override public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { Loading @@ -1739,6 +1826,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { pw.println("mCallState=" + mCallState[i]); pw.println("mCallIncomingNumber=" + mCallIncomingNumber[i]); pw.println("mServiceState=" + mServiceState[i]); pw.println("mNetworkType=" + mNetworkType[i]); pw.println("mVoiceActivationState= " + mVoiceActivationState[i]); pw.println("mDataActivationState= " + mDataActivationState[i]); pw.println("mUserMobileDataState= " + mUserMobileDataState[i]); Loading @@ -1764,6 +1852,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { pw.println("mPreferredDataSubId=" + mPreferredDataSubId); pw.println("mRadioPowerState=" + mRadioPowerState); pw.println("mEmergencyNumberList=" + mEmergencyNumberList); pw.println("mCallQuality=" + mCallQuality); pw.println("mCallAttributes=" + mCallAttributes); pw.decreaseIndent(); Loading Loading @@ -2021,6 +2111,11 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { android.Manifest.permission.READ_PRECISE_PHONE_STATE, null); } if ((events & PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED) != 0) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.READ_PRECISE_PHONE_STATE, null); } return true; } Loading telephony/java/android/telephony/ims/ImsCallSession.java +18 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.ims; import android.os.Message; import android.os.RemoteException; import android.telephony.CallQuality; import android.telephony.ims.aidl.IImsCallSessionListener; import android.util.Log; Loading Loading @@ -450,6 +451,13 @@ public class ImsCallSession { public void callSessionRttAudioIndicatorChanged(ImsStreamMediaProfile profile) { // no-op } /** * Called when the IMS service reports a change to the call quality. */ public void callQualityChanged(CallQuality callQuality) { // no-op } } private final IImsCallSession miSession; Loading Loading @@ -1414,6 +1422,16 @@ public class ImsCallSession { mListener.callSessionRttAudioIndicatorChanged(profile); } } /** * Call quality updated */ @Override public void callQualityChanged(CallQuality callQuality) { if (mListener != null) { mListener.callQualityChanged(callQuality); } } } /** Loading telephony/java/android/telephony/ims/ImsCallSessionListener.java +14 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.ims; import android.annotation.SystemApi; import android.os.RemoteException; import android.telephony.CallQuality; import android.telephony.ims.aidl.IImsCallSessionListener; import android.telephony.ims.stub.ImsCallSessionImplBase; Loading Loading @@ -612,5 +613,18 @@ public class ImsCallSessionListener { throw new RuntimeException(e); } } /** * The call quality has changed. * * @param callQuality The new call quality */ public void callQualityChanged(CallQuality callQuality) { try { mListener.callQualityChanged(callQuality); } catch (RemoteException e) { throw new RuntimeException(e); } } } telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl +11 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.telephony.ims.aidl; import android.telephony.CallQuality; import android.telephony.ims.ImsStreamMediaProfile; import android.telephony.ims.ImsCallProfile; import android.telephony.ims.ImsReasonInfo; Loading Loading @@ -126,22 +127,29 @@ oneway interface IImsCallSessionListener { */ void callSessionRttModifyRequestReceived(in ImsCallProfile callProfile); /* Device issued RTT modify request and inturn received response /** * Device issued RTT modify request and inturn received response * from Remote UE * @param status Will be one of the following values from: * - {@link Connection.RttModifyStatus} */ void callSessionRttModifyResponseReceived(int status); /* /** * While in call, device received RTT message from Remote UE * @param rttMessage Received RTT message */ void callSessionRttMessageReceived(in String rttMessage); /* /** * While in call, there has been a change in RTT audio indicator. * @param profile updated ImsStreamMediaProfile */ void callSessionRttAudioIndicatorChanged(in ImsStreamMediaProfile profile); /** * Notifies of a change to the call quality. * @param callQuality then updated call quality */ void callQualityChanged(in CallQuality callQuality); } Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6109,6 +6109,7 @@ package android.telephony.ims { } public class ImsCallSessionListener { method public void callQualityChanged(android.telephony.CallQuality); method public void callSessionConferenceExtendFailed(android.telephony.ims.ImsReasonInfo); method public void callSessionConferenceExtendReceived(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); method public void callSessionConferenceExtended(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); Loading
services/core/java/com/android/server/TelephonyRegistry.java +96 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ import android.os.IBinder; import android.os.Message; import android.os.RemoteException; import android.os.UserHandle; import android.telephony.CallAttributes; import android.telephony.CallQuality; import android.telephony.CellInfo; import android.telephony.CellLocation; import android.telephony.DataFailCause; Loading Loading @@ -173,6 +175,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { private ServiceState[] mServiceState; private int[] mNetworkType; private int[] mVoiceActivationState; private int[] mDataActivationState; Loading Loading @@ -202,6 +206,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { private Map<Integer, List<EmergencyNumber>> mEmergencyNumberList; private CallQuality mCallQuality; private CallAttributes mCallAttributes; private int[] mSrvccState; private int mDefaultSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading Loading @@ -358,6 +366,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mDataConnectionNetworkType = new int[numPhones]; mCallIncomingNumber = new String[numPhones]; mServiceState = new ServiceState[numPhones]; mNetworkType = new int[numPhones]; mVoiceActivationState = new int[numPhones]; mDataActivationState = new int[numPhones]; mUserMobileDataState = new boolean[numPhones]; Loading @@ -377,6 +386,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mDataActivationState[i] = TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN; mCallIncomingNumber[i] = ""; mServiceState[i] = new ServiceState(); mNetworkType[i] = mServiceState[i].getVoiceNetworkType(); mSignalStrength[i] = new SignalStrength(); mUserMobileDataState[i] = false; mMessageWaiting[i] = false; Loading Loading @@ -807,6 +817,13 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { remove(r.binder); } } if ((events & PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED) != 0) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { remove(r.binder); } } } } } else { Loading Loading @@ -957,6 +974,21 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { if (validatePhoneId(phoneId)) { mServiceState[phoneId] = state; boolean notifyCallAttributes = true; if (mNetworkType[phoneId] != mServiceState[phoneId].getVoiceNetworkType()) { mNetworkType[phoneId] = state.getVoiceNetworkType(); mCallAttributes = new CallAttributes(mPreciseCallState, mNetworkType[phoneId], mCallQuality); } else { // No change to network type, so no need to notify call attributes notifyCallAttributes = false; } if (mCallQuality == null) { // No call quality reported yet, so no need to notify call attributes notifyCallAttributes = false; } for (Record r : mRecords) { if (VDBG) { log("notifyServiceStateForSubscriber: r=" + r + " subId=" + subId Loading @@ -975,6 +1007,14 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mRemoveList.add(r.binder); } } if (notifyCallAttributes && r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED)) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { mRemoveList.add(r.binder); } } } } else { log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId); Loading Loading @@ -1484,7 +1524,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } public void notifyPreciseCallState(int ringingCallState, int foregroundCallState, int backgroundCallState) { int backgroundCallState, int phoneId) { if (!checkNotifyPermission("notifyPreciseCallState()")) { return; } Loading @@ -1496,6 +1536,15 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { backgroundCallState, DisconnectCause.NOT_VALID, PreciseDisconnectCause.NOT_VALID); boolean notifyCallAttributes = true; if (mCallQuality == null) { log("notifyPreciseCallState: mCallQuality is null, skipping call attributes"); notifyCallAttributes = false; } else { mCallAttributes = new CallAttributes(mPreciseCallState, mNetworkType[phoneId], mCallQuality); } for (Record r : mRecords) { if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_PRECISE_CALL_STATE)) { try { Loading @@ -1504,6 +1553,14 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mRemoveList.add(r.binder); } } if (notifyCallAttributes && r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED)) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { mRemoveList.add(r.binder); } } } handleRemoveListLocked(); } Loading Loading @@ -1722,6 +1779,36 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } @Override public void notifyCallQualityChanged(CallQuality callQuality, int phoneId) { if (!checkNotifyPermission("notifyCallQualityChanged()")) { return; } // merge CallQuality with PreciseCallState and network type mCallQuality = callQuality; mCallAttributes = new CallAttributes(mPreciseCallState, mNetworkType[phoneId], callQuality); synchronized (mRecords) { TelephonyManager tm = (TelephonyManager) mContext.getSystemService( Context.TELEPHONY_SERVICE); for (Record r : mRecords) { if (r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED)) { try { r.callback.onCallAttributesChanged(mCallAttributes); } catch (RemoteException ex) { mRemoveList.add(r.binder); } } } handleRemoveListLocked(); } } @Override public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { Loading @@ -1739,6 +1826,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { pw.println("mCallState=" + mCallState[i]); pw.println("mCallIncomingNumber=" + mCallIncomingNumber[i]); pw.println("mServiceState=" + mServiceState[i]); pw.println("mNetworkType=" + mNetworkType[i]); pw.println("mVoiceActivationState= " + mVoiceActivationState[i]); pw.println("mDataActivationState= " + mDataActivationState[i]); pw.println("mUserMobileDataState= " + mUserMobileDataState[i]); Loading @@ -1764,6 +1852,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { pw.println("mPreferredDataSubId=" + mPreferredDataSubId); pw.println("mRadioPowerState=" + mRadioPowerState); pw.println("mEmergencyNumberList=" + mEmergencyNumberList); pw.println("mCallQuality=" + mCallQuality); pw.println("mCallAttributes=" + mCallAttributes); pw.decreaseIndent(); Loading Loading @@ -2021,6 +2111,11 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { android.Manifest.permission.READ_PRECISE_PHONE_STATE, null); } if ((events & PhoneStateListener.LISTEN_CALL_ATTRIBUTES_CHANGED) != 0) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.READ_PRECISE_PHONE_STATE, null); } return true; } Loading
telephony/java/android/telephony/ims/ImsCallSession.java +18 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.ims; import android.os.Message; import android.os.RemoteException; import android.telephony.CallQuality; import android.telephony.ims.aidl.IImsCallSessionListener; import android.util.Log; Loading Loading @@ -450,6 +451,13 @@ public class ImsCallSession { public void callSessionRttAudioIndicatorChanged(ImsStreamMediaProfile profile) { // no-op } /** * Called when the IMS service reports a change to the call quality. */ public void callQualityChanged(CallQuality callQuality) { // no-op } } private final IImsCallSession miSession; Loading Loading @@ -1414,6 +1422,16 @@ public class ImsCallSession { mListener.callSessionRttAudioIndicatorChanged(profile); } } /** * Call quality updated */ @Override public void callQualityChanged(CallQuality callQuality) { if (mListener != null) { mListener.callQualityChanged(callQuality); } } } /** Loading
telephony/java/android/telephony/ims/ImsCallSessionListener.java +14 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.telephony.ims; import android.annotation.SystemApi; import android.os.RemoteException; import android.telephony.CallQuality; import android.telephony.ims.aidl.IImsCallSessionListener; import android.telephony.ims.stub.ImsCallSessionImplBase; Loading Loading @@ -612,5 +613,18 @@ public class ImsCallSessionListener { throw new RuntimeException(e); } } /** * The call quality has changed. * * @param callQuality The new call quality */ public void callQualityChanged(CallQuality callQuality) { try { mListener.callQualityChanged(callQuality); } catch (RemoteException e) { throw new RuntimeException(e); } } }
telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl +11 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.telephony.ims.aidl; import android.telephony.CallQuality; import android.telephony.ims.ImsStreamMediaProfile; import android.telephony.ims.ImsCallProfile; import android.telephony.ims.ImsReasonInfo; Loading Loading @@ -126,22 +127,29 @@ oneway interface IImsCallSessionListener { */ void callSessionRttModifyRequestReceived(in ImsCallProfile callProfile); /* Device issued RTT modify request and inturn received response /** * Device issued RTT modify request and inturn received response * from Remote UE * @param status Will be one of the following values from: * - {@link Connection.RttModifyStatus} */ void callSessionRttModifyResponseReceived(int status); /* /** * While in call, device received RTT message from Remote UE * @param rttMessage Received RTT message */ void callSessionRttMessageReceived(in String rttMessage); /* /** * While in call, there has been a change in RTT audio indicator. * @param profile updated ImsStreamMediaProfile */ void callSessionRttAudioIndicatorChanged(in ImsStreamMediaProfile profile); /** * Notifies of a change to the call quality. * @param callQuality then updated call quality */ void callQualityChanged(in CallQuality callQuality); }