Loading src/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java +21 −4 Original line number Original line Diff line number Diff line Loading @@ -159,7 +159,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { states.length + " states=" + states); states.length + " states=" + states); } } int type = 0; int newDataRAT = ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN; int regState = -1; int regState = -1; if (states.length > 0) { if (states.length > 0) { try { try { Loading @@ -167,7 +167,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { // states[3] (if present) is the current radio technology // states[3] (if present) is the current radio technology if (states.length >= 4 && states[3] != null) { if (states.length >= 4 && states[3] != null) { type = Integer.parseInt(states[3]); newDataRAT = Integer.parseInt(states[3]); } } } catch (NumberFormatException ex) { } catch (NumberFormatException ex) { loge("handlePollStateResultMessage: error parsing GprsRegistrationState: " loge("handlePollStateResultMessage: error parsing GprsRegistrationState: " Loading Loading @@ -243,7 +243,24 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { } } } } mNewSS.setRilDataRadioTechnology(type); // If the unsolicited signal strength comes just before data RAT family changes (i.e. // from UNKNOWN to LTE, CDMA to LTE, LTE to CDMA), the signal bar might display // the wrong information until the next unsolicited signal strength information coming // from the modem, which might take a long time to come or even not come at all. // In order to provide the best user experience, we query the latest signal // information so it will show up on the UI on time. int oldDataRAT = mSS.getRilDataRadioTechnology(); if ((oldDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN && newDataRAT != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) || (ServiceState.isCdma(oldDataRAT) && newDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) || (oldDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_LTE && ServiceState.isCdma(newDataRAT))) { mCi.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH)); } mNewSS.setRilDataRadioTechnology(newDataRAT); int dataRegState = regCodeToServiceState(regState); int dataRegState = regCodeToServiceState(regState); mNewSS.setDataRegState(dataRegState); mNewSS.setDataRegState(dataRegState); // voice roaming state in done while handling EVENT_POLL_STATE_REGISTRATION_CDMA // voice roaming state in done while handling EVENT_POLL_STATE_REGISTRATION_CDMA Loading @@ -251,7 +268,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { if (DBG) { if (DBG) { log("handlPollStateResultMessage: CdmaLteSST setDataRegState=" + dataRegState log("handlPollStateResultMessage: CdmaLteSST setDataRegState=" + dataRegState + " regState=" + regState + " regState=" + regState + " dataRadioTechnology=" + type); + " dataRadioTechnology=" + newDataRAT); } } } else { } else { super.handlePollStateResultMessage(what, ar); super.handlePollStateResultMessage(what, ar); Loading src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -212,6 +212,12 @@ public class CdmaServiceStateTracker extends ServiceStateTracker { mAutoTimeZoneObserver); mAutoTimeZoneObserver); setSignalStrengthDefaultValues(); setSignalStrengthDefaultValues(); // Query signal strength from the modem after service tracker is created (i.e. boot up, // switching between GSM and CDMA phone), because the unsolicited signal strength // information might come late or even never come. This will get the accurate signal // strength information displayed on the UI. mCi.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH)); mHbpcdUtils = new HbpcdUtils(phone.getContext()); mHbpcdUtils = new HbpcdUtils(phone.getContext()); // Reset OTASP state in case previously set by another service // Reset OTASP state in case previously set by another service Loading src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -241,6 +241,12 @@ final class GsmServiceStateTracker extends ServiceStateTracker { setSignalStrengthDefaultValues(); setSignalStrengthDefaultValues(); // Query signal strength from the modem after service tracker is created (i.e. boot up, // switching between GSM and CDMA phone), because the unsolicited signal strength // information might come late or even never come. This will get the accurate signal // strength information displayed on the UI. mCi.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH)); // Monitor locale change // Monitor locale change IntentFilter filter = new IntentFilter(); IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_LOCALE_CHANGED); filter.addAction(Intent.ACTION_LOCALE_CHANGED); Loading Loading
src/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java +21 −4 Original line number Original line Diff line number Diff line Loading @@ -159,7 +159,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { states.length + " states=" + states); states.length + " states=" + states); } } int type = 0; int newDataRAT = ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN; int regState = -1; int regState = -1; if (states.length > 0) { if (states.length > 0) { try { try { Loading @@ -167,7 +167,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { // states[3] (if present) is the current radio technology // states[3] (if present) is the current radio technology if (states.length >= 4 && states[3] != null) { if (states.length >= 4 && states[3] != null) { type = Integer.parseInt(states[3]); newDataRAT = Integer.parseInt(states[3]); } } } catch (NumberFormatException ex) { } catch (NumberFormatException ex) { loge("handlePollStateResultMessage: error parsing GprsRegistrationState: " loge("handlePollStateResultMessage: error parsing GprsRegistrationState: " Loading Loading @@ -243,7 +243,24 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { } } } } mNewSS.setRilDataRadioTechnology(type); // If the unsolicited signal strength comes just before data RAT family changes (i.e. // from UNKNOWN to LTE, CDMA to LTE, LTE to CDMA), the signal bar might display // the wrong information until the next unsolicited signal strength information coming // from the modem, which might take a long time to come or even not come at all. // In order to provide the best user experience, we query the latest signal // information so it will show up on the UI on time. int oldDataRAT = mSS.getRilDataRadioTechnology(); if ((oldDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN && newDataRAT != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) || (ServiceState.isCdma(oldDataRAT) && newDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) || (oldDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_LTE && ServiceState.isCdma(newDataRAT))) { mCi.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH)); } mNewSS.setRilDataRadioTechnology(newDataRAT); int dataRegState = regCodeToServiceState(regState); int dataRegState = regCodeToServiceState(regState); mNewSS.setDataRegState(dataRegState); mNewSS.setDataRegState(dataRegState); // voice roaming state in done while handling EVENT_POLL_STATE_REGISTRATION_CDMA // voice roaming state in done while handling EVENT_POLL_STATE_REGISTRATION_CDMA Loading @@ -251,7 +268,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker { if (DBG) { if (DBG) { log("handlPollStateResultMessage: CdmaLteSST setDataRegState=" + dataRegState log("handlPollStateResultMessage: CdmaLteSST setDataRegState=" + dataRegState + " regState=" + regState + " regState=" + regState + " dataRadioTechnology=" + type); + " dataRadioTechnology=" + newDataRAT); } } } else { } else { super.handlePollStateResultMessage(what, ar); super.handlePollStateResultMessage(what, ar); Loading
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -212,6 +212,12 @@ public class CdmaServiceStateTracker extends ServiceStateTracker { mAutoTimeZoneObserver); mAutoTimeZoneObserver); setSignalStrengthDefaultValues(); setSignalStrengthDefaultValues(); // Query signal strength from the modem after service tracker is created (i.e. boot up, // switching between GSM and CDMA phone), because the unsolicited signal strength // information might come late or even never come. This will get the accurate signal // strength information displayed on the UI. mCi.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH)); mHbpcdUtils = new HbpcdUtils(phone.getContext()); mHbpcdUtils = new HbpcdUtils(phone.getContext()); // Reset OTASP state in case previously set by another service // Reset OTASP state in case previously set by another service Loading
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -241,6 +241,12 @@ final class GsmServiceStateTracker extends ServiceStateTracker { setSignalStrengthDefaultValues(); setSignalStrengthDefaultValues(); // Query signal strength from the modem after service tracker is created (i.e. boot up, // switching between GSM and CDMA phone), because the unsolicited signal strength // information might come late or even never come. This will get the accurate signal // strength information displayed on the UI. mCi.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH)); // Monitor locale change // Monitor locale change IntentFilter filter = new IntentFilter(); IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_LOCALE_CHANGED); filter.addAction(Intent.ACTION_LOCALE_CHANGED); Loading