Skip to content

Commit d20f60c

Browse files
Wink SavilleAndroid (Google) Code Review
authored andcommitted
Merge "Support of LTE Only mode" into honeycomb-LTE
2 parents 9a87deb + d5f8d84 commit d20f60c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,26 @@ protected void pollStateDone() {
217217
" mNewDataConnectionState = " + mNewDataConnectionState);
218218
}
219219

220+
// TODO: Add proper support for LTE Only, we should be looking at
221+
// the preferred network mode, to know when newSS state should
222+
// be coming from mLteSs state. This was needed to pass a VZW
223+
// LTE Only test.
224+
//
225+
// If CDMA service is OOS, double check if the device is running with LTE only
226+
// mode. If that is the case, derive the service state from LTE side.
227+
// To set in LTE only mode, sqlite3 /data/data/com.android.providers.settings/
228+
// databases/settings.db "update secure set value='11' where name='preferred_network_mode'"
229+
if (newSS.getState() == ServiceState.STATE_OUT_OF_SERVICE) {
230+
int networkMode = android.provider.Settings.Secure.getInt(phone.getContext()
231+
.getContentResolver(),
232+
android.provider.Settings.Secure.PREFERRED_NETWORK_MODE,
233+
RILConstants.PREFERRED_NETWORK_MODE);
234+
if (networkMode == RILConstants.NETWORK_MODE_LTE_ONLY) {
235+
if (DBG) log("pollState: LTE Only mode");
236+
newSS.setState(mLteSS.getState());
237+
}
238+
}
239+
220240
if (DBG) log("pollStateDone: oldSS=[" + ss + "] newSS=[" + newSS + "]");
221241

222242
boolean hasRegistered = ss.getState() != ServiceState.STATE_IN_SERVICE

0 commit comments

Comments
 (0)