Loading src/java/com/android/internal/telephony/Phone.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -1156,8 +1156,7 @@ public interface Phone { * * * @see #setNetworkSelectionModeAutomatic(Message) * @see #setNetworkSelectionModeAutomatic(Message) */ */ void selectNetworkManually(OperatorInfo network, void selectNetworkManually(OperatorInfo network, boolean persistSelection, Message response); Message response); /** /** * Query the radio for the current network selection mode. * Query the radio for the current network selection mode. Loading src/java/com/android/internal/telephony/PhoneBase.java +19 −3 Original line number Original line Diff line number Diff line Loading @@ -1044,7 +1044,8 @@ public abstract class PhoneBase extends Handler implements Phone { } } @Override @Override public void selectNetworkManually(OperatorInfo network, Message response) { public void selectNetworkManually(OperatorInfo network, boolean persistSelection, Message response) { // wrap the response message in our own message along with // wrap the response message in our own message along with // the operator's id. // the operator's id. NetworkSelectMessage nsm = new NetworkSelectMessage(); NetworkSelectMessage nsm = new NetworkSelectMessage(); Loading @@ -1056,7 +1057,11 @@ public abstract class PhoneBase extends Handler implements Phone { Message msg = obtainMessage(EVENT_SET_NETWORK_MANUAL_COMPLETE, nsm); Message msg = obtainMessage(EVENT_SET_NETWORK_MANUAL_COMPLETE, nsm); mCi.setNetworkSelectionModeManual(network.getOperatorNumeric(), msg); mCi.setNetworkSelectionModeManual(network.getOperatorNumeric(), msg); if (persistSelection) { updateSavedNetworkOperator(nsm); updateSavedNetworkOperator(nsm); } else { clearSavedNetworkSelection(); } } } /** /** Loading Loading @@ -1130,6 +1135,17 @@ public abstract class PhoneBase extends Handler implements Phone { return new OperatorInfo(numeric, name, shrt); return new OperatorInfo(numeric, name, shrt); } } /** * Clears the saved network selection. */ private void clearSavedNetworkSelection() { // open the shared preferences and search with our key. PreferenceManager.getDefaultSharedPreferences(getContext()).edit(). remove(NETWORK_SELECTION_KEY + getSubId()). remove(NETWORK_SELECTION_NAME_KEY + getSubId()). remove(NETWORK_SELECTION_SHORT_KEY + getSubId()).commit(); } /** /** * Method to restore the previously saved operator id, or reset to * Method to restore the previously saved operator id, or reset to * automatic selection, all depending upon the value in the shared * automatic selection, all depending upon the value in the shared Loading @@ -1143,7 +1159,7 @@ public abstract class PhoneBase extends Handler implements Phone { if (networkSelection == null || TextUtils.isEmpty(networkSelection.getOperatorNumeric())) { if (networkSelection == null || TextUtils.isEmpty(networkSelection.getOperatorNumeric())) { setNetworkSelectionModeAutomatic(response); setNetworkSelectionModeAutomatic(response); } else { } else { selectNetworkManually(networkSelection, response); selectNetworkManually(networkSelection, true, response); } } } } Loading src/java/com/android/internal/telephony/PhoneProxy.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -945,8 +945,9 @@ public class PhoneProxy extends Handler implements Phone { } } @Override @Override public void selectNetworkManually(OperatorInfo network, Message response) { public void selectNetworkManually(OperatorInfo network, boolean persistSelection, mActivePhone.selectNetworkManually(network, response); Message response) { mActivePhone.selectNetworkManually(network, persistSelection, response); } } @Override @Override Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneBase.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -423,8 +423,7 @@ abstract class ImsPhoneBase extends PhoneBase { } } @Override @Override public void selectNetworkManually( public void selectNetworkManually(OperatorInfo network, boolean persistSelection, OperatorInfo network, Message response) { Message response) { } } Loading src/java/com/android/internal/telephony/sip/SipPhoneBase.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -393,8 +393,7 @@ abstract class SipPhoneBase extends PhoneBase { } } @Override @Override public void selectNetworkManually( public void selectNetworkManually(OperatorInfo network, boolean persistSelection, OperatorInfo network, Message response) { Message response) { } } Loading Loading
src/java/com/android/internal/telephony/Phone.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -1156,8 +1156,7 @@ public interface Phone { * * * @see #setNetworkSelectionModeAutomatic(Message) * @see #setNetworkSelectionModeAutomatic(Message) */ */ void selectNetworkManually(OperatorInfo network, void selectNetworkManually(OperatorInfo network, boolean persistSelection, Message response); Message response); /** /** * Query the radio for the current network selection mode. * Query the radio for the current network selection mode. Loading
src/java/com/android/internal/telephony/PhoneBase.java +19 −3 Original line number Original line Diff line number Diff line Loading @@ -1044,7 +1044,8 @@ public abstract class PhoneBase extends Handler implements Phone { } } @Override @Override public void selectNetworkManually(OperatorInfo network, Message response) { public void selectNetworkManually(OperatorInfo network, boolean persistSelection, Message response) { // wrap the response message in our own message along with // wrap the response message in our own message along with // the operator's id. // the operator's id. NetworkSelectMessage nsm = new NetworkSelectMessage(); NetworkSelectMessage nsm = new NetworkSelectMessage(); Loading @@ -1056,7 +1057,11 @@ public abstract class PhoneBase extends Handler implements Phone { Message msg = obtainMessage(EVENT_SET_NETWORK_MANUAL_COMPLETE, nsm); Message msg = obtainMessage(EVENT_SET_NETWORK_MANUAL_COMPLETE, nsm); mCi.setNetworkSelectionModeManual(network.getOperatorNumeric(), msg); mCi.setNetworkSelectionModeManual(network.getOperatorNumeric(), msg); if (persistSelection) { updateSavedNetworkOperator(nsm); updateSavedNetworkOperator(nsm); } else { clearSavedNetworkSelection(); } } } /** /** Loading Loading @@ -1130,6 +1135,17 @@ public abstract class PhoneBase extends Handler implements Phone { return new OperatorInfo(numeric, name, shrt); return new OperatorInfo(numeric, name, shrt); } } /** * Clears the saved network selection. */ private void clearSavedNetworkSelection() { // open the shared preferences and search with our key. PreferenceManager.getDefaultSharedPreferences(getContext()).edit(). remove(NETWORK_SELECTION_KEY + getSubId()). remove(NETWORK_SELECTION_NAME_KEY + getSubId()). remove(NETWORK_SELECTION_SHORT_KEY + getSubId()).commit(); } /** /** * Method to restore the previously saved operator id, or reset to * Method to restore the previously saved operator id, or reset to * automatic selection, all depending upon the value in the shared * automatic selection, all depending upon the value in the shared Loading @@ -1143,7 +1159,7 @@ public abstract class PhoneBase extends Handler implements Phone { if (networkSelection == null || TextUtils.isEmpty(networkSelection.getOperatorNumeric())) { if (networkSelection == null || TextUtils.isEmpty(networkSelection.getOperatorNumeric())) { setNetworkSelectionModeAutomatic(response); setNetworkSelectionModeAutomatic(response); } else { } else { selectNetworkManually(networkSelection, response); selectNetworkManually(networkSelection, true, response); } } } } Loading
src/java/com/android/internal/telephony/PhoneProxy.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -945,8 +945,9 @@ public class PhoneProxy extends Handler implements Phone { } } @Override @Override public void selectNetworkManually(OperatorInfo network, Message response) { public void selectNetworkManually(OperatorInfo network, boolean persistSelection, mActivePhone.selectNetworkManually(network, response); Message response) { mActivePhone.selectNetworkManually(network, persistSelection, response); } } @Override @Override Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneBase.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -423,8 +423,7 @@ abstract class ImsPhoneBase extends PhoneBase { } } @Override @Override public void selectNetworkManually( public void selectNetworkManually(OperatorInfo network, boolean persistSelection, OperatorInfo network, Message response) { Message response) { } } Loading
src/java/com/android/internal/telephony/sip/SipPhoneBase.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -393,8 +393,7 @@ abstract class SipPhoneBase extends PhoneBase { } } @Override @Override public void selectNetworkManually( public void selectNetworkManually(OperatorInfo network, boolean persistSelection, OperatorInfo network, Message response) { Message response) { } } Loading