Skip to content

Commit d5f8d84

Browse files
Ramesh SudiniWink Saville
authored andcommitted
Support of LTE Only mode
In CDMA-LTE hybrid mode, the service state is derived based on CDMA state. However, CDMA radio is off while in LTE only mode so thre will be no signal bar or data type icon displayed on the status UI. This patch handles LTE only mode scenario. The service state is derived from LTE if CDMA is OOS and LTE only mode is used. Bug: 5070240 Change-Id: Ie55daaf9eea1b16ca73312ebab208810b145d2bc
1 parent 41394a3 commit d5f8d84

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)