Loading src/java/android/provider/Telephony.java +37 −5 Original line number Diff line number Diff line Loading @@ -2654,14 +2654,46 @@ public final class Telephony { public static final String MTU = "mtu"; /** * Is this APN added/edited/deleted by a user or app? * TelephonyProvider.USER_EDITED_UNTOUCHED (0) indicates untouched by user/app * TelephonyProvider.USER_EDITED_EDITED (1) indicates added/edited by user/app * TelephonyProvider.USER_EDITED_DELETED (2) indicates deleted by user/app * Is this APN added/edited/deleted by a user or carrier? * <p>Type: INTEGER </p> * @hide */ public static final String USER_EDITED = "user_edited"; public static final String EDITED = "user_edited"; /** * Following are possible values for the EDITED field * @hide */ public static final int UNEDITED = 0; /** * @hide */ public static final int USER_EDITED = 1; /** * @hide */ public static final int USER_DELETED = 2; /** * DELETED_BUT_PRESENT is an intermediate value used to indicate that an entry deleted * by the user is still present in the new APN database and therefore must remain tagged * as user deleted rather than completely removed from the database * @hide */ public static final int USER_DELETED_BUT_PRESENT_IN_XML = 3; /** * @hide */ public static final int CARRIER_EDITED = 4; /** * CARRIER_DELETED values are currently not used as there is no usecase. If they are used, * delete() will have to change accordingly. Currently it is hardcoded to USER_DELETED. * @hide */ public static final int CARRIER_DELETED = 5; /** * @hide */ public static final int CARRIER_DELETED_BUT_PRESENT_IN_XML = 6; } /** Loading src/java/com/android/internal/telephony/Connection.java +15 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ public abstract class Connection { public void onAudioQualityChanged(int audioQuality); public void onConferenceParticipantsChanged(List<ConferenceParticipant> participants); public void onCallSubstateChanged(int callSubstate); public void onMultipartyStateChanged(boolean isMultiParty); } /** Loading @@ -72,7 +73,10 @@ public abstract class Connection { public void onAudioQualityChanged(int audioQuality) {} @Override public void onConferenceParticipantsChanged(List<ConferenceParticipant> participants) {} @Override public void onCallSubstateChanged(int callSubstate) {} @Override public void onMultipartyStateChanged(boolean isMultiParty) {} } public static final int AUDIO_QUALITY_STANDARD = 1; Loading Loading @@ -635,6 +639,17 @@ public abstract class Connection { } } /** * Notifies listeners of a change to the multiparty state of the connection.. * * @param isMultiparty The participant(s). */ public void updateMultipartyState(boolean isMultiparty) { for (Listener l : mListeners) { l.onMultipartyStateChanged(isMultiparty); } } /** * Notifies this Connection of a request to disconnect a participant of the conference managed * by the connection. Loading src/java/com/android/internal/telephony/cdma/CDMAPhone.java +15 −12 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.util.Log; import android.telephony.TelephonyManager; import com.android.ims.ImsManager; import com.android.internal.telephony.Call; import com.android.internal.telephony.CallStateException; import com.android.internal.telephony.CallTracker; Loading Loading @@ -407,14 +408,22 @@ public class CDMAPhone extends PhoneBase { dial (String dialString, int videoState) throws CallStateException { ImsPhone imsPhone = mImsPhone; boolean imsUseEnabled = isImsUseEnabled(); boolean imsUseEnabled = isImsUseEnabled() && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE); if (!imsUseEnabled) { Rlog.w(LOG_TAG, "IMS is disabled: forced to CS"); } boolean useImsForEmergency = imsPhone != null && PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall) && ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext) && (imsPhone.getServiceState().getState() != ServiceState.STATE_POWER_OFF); if (DBG) { Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", imsPhone=" + imsPhone Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", useImsForEmergency=" + useImsForEmergency + ", imsPhone=" + imsPhone + ", imsPhone.isVolteEnabled()=" + ((imsPhone != null) ? imsPhone.isVolteEnabled() : "N/A") + ", imsPhone.isVowifiEnabled()=" Loading @@ -425,13 +434,7 @@ public class CDMAPhone extends PhoneBase { ImsPhone.checkWfcWifiOnlyModeBeforeDial(mImsPhone, mContext); if (imsUseEnabled && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE && !PhoneNumberUtils.isEmergencyNumber(dialString)) || (PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall))) ) { if (imsUseEnabled || useImsForEmergency) { try { if (DBG) Rlog.d(LOG_TAG, "Trying IMS PS call"); return imsPhone.dial(dialString, videoState); Loading src/java/com/android/internal/telephony/gsm/GSMPhone.java +15 −12 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.text.TextUtils; import android.telephony.Rlog; import android.util.Log; import com.android.ims.ImsManager; import static com.android.internal.telephony.CommandsInterface.CF_ACTION_DISABLE; import static com.android.internal.telephony.CommandsInterface.CF_ACTION_ENABLE; import static com.android.internal.telephony.CommandsInterface.CF_ACTION_ERASURE; Loading Loading @@ -801,14 +802,22 @@ public class GSMPhone extends PhoneBase { dial (String dialString, UUSInfo uusInfo, int videoState) throws CallStateException { ImsPhone imsPhone = mImsPhone; boolean imsUseEnabled = isImsUseEnabled(); boolean imsUseEnabled = isImsUseEnabled() && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE); if (!imsUseEnabled) { Rlog.w(LOG_TAG, "IMS is disabled: forced to CS"); } boolean useImsForEmergency = imsPhone != null && PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall) && ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext) && (imsPhone.getServiceState().getState() != ServiceState.STATE_POWER_OFF); if (LOCAL_DEBUG) { Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", imsPhone=" + imsPhone Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", useImsForEmergency=" + useImsForEmergency + ", imsPhone=" + imsPhone + ", imsPhone.isVolteEnabled()=" + ((imsPhone != null) ? imsPhone.isVolteEnabled() : "N/A") + ", imsPhone.isVowifiEnabled()=" Loading @@ -819,13 +828,7 @@ public class GSMPhone extends PhoneBase { ImsPhone.checkWfcWifiOnlyModeBeforeDial(mImsPhone, mContext); if (imsUseEnabled && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE && !PhoneNumberUtils.isEmergencyNumber(dialString)) || (PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall))) ) { if (imsUseEnabled || useImsForEmergency) { try { if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Trying IMS PS call"); return imsPhone.dial(dialString, videoState); Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +4 −10 Original line number Diff line number Diff line Loading @@ -887,6 +887,8 @@ public class ImsPhone extends ImsPhoneBase { case ImsReasonInfo.CODE_UT_CB_PASSWORD_MISMATCH: error = CommandException.Error.PASSWORD_INCORRECT; break; case ImsReasonInfo.CODE_UT_SERVICE_UNAVAILABLE: error = CommandException.Error.RADIO_NOT_AVAILABLE; default: break; } Loading Loading @@ -1093,18 +1095,10 @@ public class ImsPhone extends ImsPhoneBase { sendResponse(Message onComplete, Object result, Throwable e) { if (onComplete != null) { CommandException ex = null; ImsException imsEx = null; if (e != null) { if (e instanceof ImsException) { imsEx = (ImsException) e; AsyncResult.forMessage(onComplete, result, imsEx); } else { ex = getCommandException(e); AsyncResult.forMessage(onComplete, result, ex); } } else { AsyncResult.forMessage(onComplete, result, null); } AsyncResult.forMessage(onComplete, result, ex); onComplete.sendToTarget(); } } Loading Loading
src/java/android/provider/Telephony.java +37 −5 Original line number Diff line number Diff line Loading @@ -2654,14 +2654,46 @@ public final class Telephony { public static final String MTU = "mtu"; /** * Is this APN added/edited/deleted by a user or app? * TelephonyProvider.USER_EDITED_UNTOUCHED (0) indicates untouched by user/app * TelephonyProvider.USER_EDITED_EDITED (1) indicates added/edited by user/app * TelephonyProvider.USER_EDITED_DELETED (2) indicates deleted by user/app * Is this APN added/edited/deleted by a user or carrier? * <p>Type: INTEGER </p> * @hide */ public static final String USER_EDITED = "user_edited"; public static final String EDITED = "user_edited"; /** * Following are possible values for the EDITED field * @hide */ public static final int UNEDITED = 0; /** * @hide */ public static final int USER_EDITED = 1; /** * @hide */ public static final int USER_DELETED = 2; /** * DELETED_BUT_PRESENT is an intermediate value used to indicate that an entry deleted * by the user is still present in the new APN database and therefore must remain tagged * as user deleted rather than completely removed from the database * @hide */ public static final int USER_DELETED_BUT_PRESENT_IN_XML = 3; /** * @hide */ public static final int CARRIER_EDITED = 4; /** * CARRIER_DELETED values are currently not used as there is no usecase. If they are used, * delete() will have to change accordingly. Currently it is hardcoded to USER_DELETED. * @hide */ public static final int CARRIER_DELETED = 5; /** * @hide */ public static final int CARRIER_DELETED_BUT_PRESENT_IN_XML = 6; } /** Loading
src/java/com/android/internal/telephony/Connection.java +15 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ public abstract class Connection { public void onAudioQualityChanged(int audioQuality); public void onConferenceParticipantsChanged(List<ConferenceParticipant> participants); public void onCallSubstateChanged(int callSubstate); public void onMultipartyStateChanged(boolean isMultiParty); } /** Loading @@ -72,7 +73,10 @@ public abstract class Connection { public void onAudioQualityChanged(int audioQuality) {} @Override public void onConferenceParticipantsChanged(List<ConferenceParticipant> participants) {} @Override public void onCallSubstateChanged(int callSubstate) {} @Override public void onMultipartyStateChanged(boolean isMultiParty) {} } public static final int AUDIO_QUALITY_STANDARD = 1; Loading Loading @@ -635,6 +639,17 @@ public abstract class Connection { } } /** * Notifies listeners of a change to the multiparty state of the connection.. * * @param isMultiparty The participant(s). */ public void updateMultipartyState(boolean isMultiparty) { for (Listener l : mListeners) { l.onMultipartyStateChanged(isMultiparty); } } /** * Notifies this Connection of a request to disconnect a participant of the conference managed * by the connection. Loading
src/java/com/android/internal/telephony/cdma/CDMAPhone.java +15 −12 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.util.Log; import android.telephony.TelephonyManager; import com.android.ims.ImsManager; import com.android.internal.telephony.Call; import com.android.internal.telephony.CallStateException; import com.android.internal.telephony.CallTracker; Loading Loading @@ -407,14 +408,22 @@ public class CDMAPhone extends PhoneBase { dial (String dialString, int videoState) throws CallStateException { ImsPhone imsPhone = mImsPhone; boolean imsUseEnabled = isImsUseEnabled(); boolean imsUseEnabled = isImsUseEnabled() && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE); if (!imsUseEnabled) { Rlog.w(LOG_TAG, "IMS is disabled: forced to CS"); } boolean useImsForEmergency = imsPhone != null && PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall) && ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext) && (imsPhone.getServiceState().getState() != ServiceState.STATE_POWER_OFF); if (DBG) { Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", imsPhone=" + imsPhone Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", useImsForEmergency=" + useImsForEmergency + ", imsPhone=" + imsPhone + ", imsPhone.isVolteEnabled()=" + ((imsPhone != null) ? imsPhone.isVolteEnabled() : "N/A") + ", imsPhone.isVowifiEnabled()=" Loading @@ -425,13 +434,7 @@ public class CDMAPhone extends PhoneBase { ImsPhone.checkWfcWifiOnlyModeBeforeDial(mImsPhone, mContext); if (imsUseEnabled && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE && !PhoneNumberUtils.isEmergencyNumber(dialString)) || (PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall))) ) { if (imsUseEnabled || useImsForEmergency) { try { if (DBG) Rlog.d(LOG_TAG, "Trying IMS PS call"); return imsPhone.dial(dialString, videoState); Loading
src/java/com/android/internal/telephony/gsm/GSMPhone.java +15 −12 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.text.TextUtils; import android.telephony.Rlog; import android.util.Log; import com.android.ims.ImsManager; import static com.android.internal.telephony.CommandsInterface.CF_ACTION_DISABLE; import static com.android.internal.telephony.CommandsInterface.CF_ACTION_ENABLE; import static com.android.internal.telephony.CommandsInterface.CF_ACTION_ERASURE; Loading Loading @@ -801,14 +802,22 @@ public class GSMPhone extends PhoneBase { dial (String dialString, UUSInfo uusInfo, int videoState) throws CallStateException { ImsPhone imsPhone = mImsPhone; boolean imsUseEnabled = isImsUseEnabled(); boolean imsUseEnabled = isImsUseEnabled() && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && (imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE); if (!imsUseEnabled) { Rlog.w(LOG_TAG, "IMS is disabled: forced to CS"); } boolean useImsForEmergency = imsPhone != null && PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall) && ImsManager.isNonTtyOrTtyOnVolteEnabled(mContext) && (imsPhone.getServiceState().getState() != ServiceState.STATE_POWER_OFF); if (LOCAL_DEBUG) { Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", imsPhone=" + imsPhone Rlog.d(LOG_TAG, "imsUseEnabled=" + imsUseEnabled + ", useImsForEmergency=" + useImsForEmergency + ", imsPhone=" + imsPhone + ", imsPhone.isVolteEnabled()=" + ((imsPhone != null) ? imsPhone.isVolteEnabled() : "N/A") + ", imsPhone.isVowifiEnabled()=" Loading @@ -819,13 +828,7 @@ public class GSMPhone extends PhoneBase { ImsPhone.checkWfcWifiOnlyModeBeforeDial(mImsPhone, mContext); if (imsUseEnabled && imsPhone != null && (imsPhone.isVolteEnabled() || imsPhone.isVowifiEnabled()) && ((imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE && !PhoneNumberUtils.isEmergencyNumber(dialString)) || (PhoneNumberUtils.isEmergencyNumber(dialString) && mContext.getResources().getBoolean( com.android.internal.R.bool.useImsAlwaysForEmergencyCall))) ) { if (imsUseEnabled || useImsForEmergency) { try { if (LOCAL_DEBUG) Rlog.d(LOG_TAG, "Trying IMS PS call"); return imsPhone.dial(dialString, videoState); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +4 −10 Original line number Diff line number Diff line Loading @@ -887,6 +887,8 @@ public class ImsPhone extends ImsPhoneBase { case ImsReasonInfo.CODE_UT_CB_PASSWORD_MISMATCH: error = CommandException.Error.PASSWORD_INCORRECT; break; case ImsReasonInfo.CODE_UT_SERVICE_UNAVAILABLE: error = CommandException.Error.RADIO_NOT_AVAILABLE; default: break; } Loading Loading @@ -1093,18 +1095,10 @@ public class ImsPhone extends ImsPhoneBase { sendResponse(Message onComplete, Object result, Throwable e) { if (onComplete != null) { CommandException ex = null; ImsException imsEx = null; if (e != null) { if (e instanceof ImsException) { imsEx = (ImsException) e; AsyncResult.forMessage(onComplete, result, imsEx); } else { ex = getCommandException(e); AsyncResult.forMessage(onComplete, result, ex); } } else { AsyncResult.forMessage(onComplete, result, null); } AsyncResult.forMessage(onComplete, result, ex); onComplete.sendToTarget(); } } Loading