Merge "RadioInfo: Update the network type listing"
This commit is contained in:
@@ -193,9 +193,14 @@ public class RadioInfo extends Activity {
|
|||||||
ar= (AsyncResult) msg.obj;
|
ar= (AsyncResult) msg.obj;
|
||||||
if (ar.exception == null) {
|
if (ar.exception == null) {
|
||||||
int type = ((int[])ar.result)[0];
|
int type = ((int[])ar.result)[0];
|
||||||
|
if (type >= mPreferredNetworkLabels.length) {
|
||||||
|
Log.e(TAG, "[RadioInfo] EVENT_QUERY_PREFERRED_TYPE_DONE: unknown " +
|
||||||
|
"type=" + type);
|
||||||
|
type = mPreferredNetworkLabels.length - 1;
|
||||||
|
}
|
||||||
preferredNetworkType.setSelection(type, true);
|
preferredNetworkType.setSelection(type, true);
|
||||||
} else {
|
} else {
|
||||||
preferredNetworkType.setSelection(8, true);
|
preferredNetworkType.setSelection(mPreferredNetworkLabels.length - 1, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EVENT_SET_PREFERRED_TYPE_DONE:
|
case EVENT_SET_PREFERRED_TYPE_DONE:
|
||||||
@@ -1009,7 +1014,7 @@ public class RadioInfo extends Activity {
|
|||||||
mPreferredNetworkHandler = new AdapterView.OnItemSelectedListener() {
|
mPreferredNetworkHandler = new AdapterView.OnItemSelectedListener() {
|
||||||
public void onItemSelected(AdapterView parent, View v, int pos, long id) {
|
public void onItemSelected(AdapterView parent, View v, int pos, long id) {
|
||||||
Message msg = mHandler.obtainMessage(EVENT_SET_PREFERRED_TYPE_DONE);
|
Message msg = mHandler.obtainMessage(EVENT_SET_PREFERRED_TYPE_DONE);
|
||||||
if (pos>=0 && pos<=7) { //IS THIS NEEDED to extend to the entire range of values
|
if (pos>=0 && pos<=(mPreferredNetworkLabels.length - 2)) {
|
||||||
phone.setPreferredNetworkType(pos, msg);
|
phone.setPreferredNetworkType(pos, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1027,5 +1032,9 @@ public class RadioInfo extends Activity {
|
|||||||
"CDMA only",
|
"CDMA only",
|
||||||
"EvDo only",
|
"EvDo only",
|
||||||
"GSM/CDMA auto (PRL)",
|
"GSM/CDMA auto (PRL)",
|
||||||
|
"LTE/CDMA auto (PRL)",
|
||||||
|
"LTE/GSM auto (PRL)",
|
||||||
|
"LTE/GSM/CDMA auto (PRL)",
|
||||||
|
"LTE only",
|
||||||
"Unknown"};
|
"Unknown"};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user