Loading src/java/com/android/internal/telephony/Phone.java +6 −0 Original line number Diff line number Diff line Loading @@ -1824,6 +1824,12 @@ public interface Phone { */ boolean isCspPlmnEnabled(); /* Checks if manual network selection is allowed * @return true if manual network selection is allowed * @return false if manual network selection is not allowed */ public boolean isManualNetSelAllowed(); /** * Return an interface to retrieve the ISIM records for IMS, if available. * @return the interface to retrieve the ISIM records, or null if not supported Loading src/java/com/android/internal/telephony/PhoneBase.java +9 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,9 @@ public abstract class PhoneBase extends Handler implements Phone { // Key used to read/write "disable DNS server check" pref (used for testing) public static final String DNS_SERVER_CHECK_DISABLED_KEY = "dns_server_check_disabled_key"; //Telephony System Property used to indicate a multimode target public static final String PROPERTY_MULTIMODE_CDMA = "ro.config.multimode_cdma"; /** * Small container class used to hold information relevant to * the carrier selection process. operatorNumeric can be "" Loading Loading @@ -1767,6 +1770,12 @@ public abstract class PhoneBase extends Handler implements Phone { } } public boolean isManualNetSelAllowed() { // This function should be overridden in GsmPhone. // Not implemented by default. return false; } @Override public boolean isCspPlmnEnabled() { // This function should be overridden by the class GSMPhone. Loading src/java/com/android/internal/telephony/PhoneProxy.java +4 −0 Original line number Diff line number Diff line Loading @@ -1244,6 +1244,10 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.unsetOnEcbModeExitResponse(h); } public boolean isManualNetSelAllowed() { return mActivePhone.isManualNetSelAllowed(); } @Override public boolean isCspPlmnEnabled() { return mActivePhone.isCspPlmnEnabled(); Loading src/java/com/android/internal/telephony/cdma/CDMAPhone.java +34 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import com.android.internal.telephony.Connection; import com.android.internal.telephony.IccPhoneBookInterfaceManager; import com.android.internal.telephony.MccTable; import com.android.internal.telephony.MmiCode; import com.android.internal.telephony.OperatorInfo; import com.android.internal.telephony.PhoneBase; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.PhoneNotifier; Loading Loading @@ -508,6 +509,20 @@ public class CDMAPhone extends PhoneBase { .isAlive()); } @Override public void setNetworkSelectionModeAutomatic(Message response) { Rlog.e(LOG_TAG, "method setNetworkSelectionModeAutomatic is NOT supported in CDMA!"); if (response != null) { Rlog.e(LOG_TAG, "setNetworkSelectionModeAutomatic: not possible in CDMA- Posting exception"); CommandException ce = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(response).exception = ce; response.sendToTarget(); } } @Override public void unregisterForSuppServiceNotification(Handler h) { Rlog.e(LOG_TAG, "method unregisterForSuppServiceNotification is NOT supported in CDMA!"); Loading Loading @@ -664,6 +679,19 @@ public class CDMAPhone extends PhoneBase { return mCT.mForegroundCall; } @Override public void selectNetworkManually(OperatorInfo network, Message response) { Rlog.e(LOG_TAG, "selectNetworkManually: not possible in CDMA"); if (response != null) { CommandException ce = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(response).exception = ce; response.sendToTarget(); } } @Override public void setOnPostDialCharacter(Handler h, int what, Object obj) { mPostDialHandler = new Registrant(h, what, obj); Loading Loading @@ -879,6 +907,12 @@ public class CDMAPhone extends PhoneBase { @Override public void getAvailableNetworks(Message response) { Rlog.e(LOG_TAG, "getAvailableNetworks: not possible in CDMA"); if (response != null) { CommandException ce = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(response).exception = ce; response.sendToTarget(); } } @Override Loading src/java/com/android/internal/telephony/gsm/GSMPhone.java +29 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import com.android.internal.telephony.MmiCode; import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneBase; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.PhoneFactory; import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; Loading Loading @@ -127,7 +128,6 @@ public class GSMPhone extends PhoneBase { protected SimPhoneBookInterfaceManager mSimPhoneBookIntManager; PhoneSubInfo mSubInfo; Registrant mPostDialHandler; /** List of Registrants to receive Supplementary Service Notifications. */ Loading Loading @@ -1941,6 +1941,34 @@ public class GSMPhone extends PhoneBase { return (r != null) ? r.isCspPlmnEnabled() : false; } public boolean isManualNetSelAllowed() { int nwMode = Phone.PREFERRED_NT_MODE; nwMode = PhoneFactory.calculatePreferredNetworkType(mContext, mPhoneId); Rlog.d(LOG_TAG, "isManualNetSelAllowed in mode = " + nwMode); /* * For multimode targets in global mode manual network * selection is disallowed */ if (SystemProperties.getBoolean(PhoneBase.PROPERTY_MULTIMODE_CDMA, false) && ((nwMode == Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA) || (nwMode == Phone.NT_MODE_GLOBAL)) ){ Rlog.d(LOG_TAG, "Manual selection not supported in mode = " + nwMode); return false; } /* * Single mode phone with - GSM network modes/global mode * LTE only for 3GPP * LTE centric + 3GPP Legacy * Note: the actual enabling/disabling manual selection for these * cases will be controlled by csp */ return true; } private void registerForSimRecordEvents() { IccRecords r = mIccRecords.get(); if (r == null) { Loading Loading
src/java/com/android/internal/telephony/Phone.java +6 −0 Original line number Diff line number Diff line Loading @@ -1824,6 +1824,12 @@ public interface Phone { */ boolean isCspPlmnEnabled(); /* Checks if manual network selection is allowed * @return true if manual network selection is allowed * @return false if manual network selection is not allowed */ public boolean isManualNetSelAllowed(); /** * Return an interface to retrieve the ISIM records for IMS, if available. * @return the interface to retrieve the ISIM records, or null if not supported Loading
src/java/com/android/internal/telephony/PhoneBase.java +9 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,9 @@ public abstract class PhoneBase extends Handler implements Phone { // Key used to read/write "disable DNS server check" pref (used for testing) public static final String DNS_SERVER_CHECK_DISABLED_KEY = "dns_server_check_disabled_key"; //Telephony System Property used to indicate a multimode target public static final String PROPERTY_MULTIMODE_CDMA = "ro.config.multimode_cdma"; /** * Small container class used to hold information relevant to * the carrier selection process. operatorNumeric can be "" Loading Loading @@ -1767,6 +1770,12 @@ public abstract class PhoneBase extends Handler implements Phone { } } public boolean isManualNetSelAllowed() { // This function should be overridden in GsmPhone. // Not implemented by default. return false; } @Override public boolean isCspPlmnEnabled() { // This function should be overridden by the class GSMPhone. Loading
src/java/com/android/internal/telephony/PhoneProxy.java +4 −0 Original line number Diff line number Diff line Loading @@ -1244,6 +1244,10 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.unsetOnEcbModeExitResponse(h); } public boolean isManualNetSelAllowed() { return mActivePhone.isManualNetSelAllowed(); } @Override public boolean isCspPlmnEnabled() { return mActivePhone.isCspPlmnEnabled(); Loading
src/java/com/android/internal/telephony/cdma/CDMAPhone.java +34 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import com.android.internal.telephony.Connection; import com.android.internal.telephony.IccPhoneBookInterfaceManager; import com.android.internal.telephony.MccTable; import com.android.internal.telephony.MmiCode; import com.android.internal.telephony.OperatorInfo; import com.android.internal.telephony.PhoneBase; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.PhoneNotifier; Loading Loading @@ -508,6 +509,20 @@ public class CDMAPhone extends PhoneBase { .isAlive()); } @Override public void setNetworkSelectionModeAutomatic(Message response) { Rlog.e(LOG_TAG, "method setNetworkSelectionModeAutomatic is NOT supported in CDMA!"); if (response != null) { Rlog.e(LOG_TAG, "setNetworkSelectionModeAutomatic: not possible in CDMA- Posting exception"); CommandException ce = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(response).exception = ce; response.sendToTarget(); } } @Override public void unregisterForSuppServiceNotification(Handler h) { Rlog.e(LOG_TAG, "method unregisterForSuppServiceNotification is NOT supported in CDMA!"); Loading Loading @@ -664,6 +679,19 @@ public class CDMAPhone extends PhoneBase { return mCT.mForegroundCall; } @Override public void selectNetworkManually(OperatorInfo network, Message response) { Rlog.e(LOG_TAG, "selectNetworkManually: not possible in CDMA"); if (response != null) { CommandException ce = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(response).exception = ce; response.sendToTarget(); } } @Override public void setOnPostDialCharacter(Handler h, int what, Object obj) { mPostDialHandler = new Registrant(h, what, obj); Loading Loading @@ -879,6 +907,12 @@ public class CDMAPhone extends PhoneBase { @Override public void getAvailableNetworks(Message response) { Rlog.e(LOG_TAG, "getAvailableNetworks: not possible in CDMA"); if (response != null) { CommandException ce = new CommandException( CommandException.Error.REQUEST_NOT_SUPPORTED); AsyncResult.forMessage(response).exception = ce; response.sendToTarget(); } } @Override Loading
src/java/com/android/internal/telephony/gsm/GSMPhone.java +29 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import com.android.internal.telephony.MmiCode; import com.android.internal.telephony.Phone; import com.android.internal.telephony.PhoneBase; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.PhoneFactory; import com.android.internal.telephony.PhoneNotifier; import com.android.internal.telephony.PhoneProxy; import com.android.internal.telephony.PhoneSubInfo; Loading Loading @@ -127,7 +128,6 @@ public class GSMPhone extends PhoneBase { protected SimPhoneBookInterfaceManager mSimPhoneBookIntManager; PhoneSubInfo mSubInfo; Registrant mPostDialHandler; /** List of Registrants to receive Supplementary Service Notifications. */ Loading Loading @@ -1941,6 +1941,34 @@ public class GSMPhone extends PhoneBase { return (r != null) ? r.isCspPlmnEnabled() : false; } public boolean isManualNetSelAllowed() { int nwMode = Phone.PREFERRED_NT_MODE; nwMode = PhoneFactory.calculatePreferredNetworkType(mContext, mPhoneId); Rlog.d(LOG_TAG, "isManualNetSelAllowed in mode = " + nwMode); /* * For multimode targets in global mode manual network * selection is disallowed */ if (SystemProperties.getBoolean(PhoneBase.PROPERTY_MULTIMODE_CDMA, false) && ((nwMode == Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA) || (nwMode == Phone.NT_MODE_GLOBAL)) ){ Rlog.d(LOG_TAG, "Manual selection not supported in mode = " + nwMode); return false; } /* * Single mode phone with - GSM network modes/global mode * LTE only for 3GPP * LTE centric + 3GPP Legacy * Note: the actual enabling/disabling manual selection for these * cases will be controlled by csp */ return true; } private void registerForSimRecordEvents() { IccRecords r = mIccRecords.get(); if (r == null) { Loading