am 13bac39d: Remove obsolete compat mode UI.
* commit '13bac39d2120a82b8a22b52f0db0727aa04b1f38':
Remove obsolete compat mode UI.
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c37fba2..7808b63 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1548,8 +1548,8 @@
<string name="status_min_number">MIN</string>
<!-- About phone, status item title. The phone PRL Version of the current device.-->
<string name="status_prl_version">PRL Version</string>
- <!-- About phone, status item title. The phone MEID number of the current device.-->
- <string name="status_meid_number">MEID</string>
+ <!-- About phone, status item title. The phone IMEI/MEID number of the current LTE/CDMA device.-->
+ <string name="status_meid_number">IMEI / MEID</string>
<!-- About phone, status item title for the type of data phone network we're connected to, for example 3G or Edge or GPRS -->
<string name="status_network_type">Mobile network type</string>
<!-- About phone, status item title. The status of data access. For example, the value may be "Connected" -->
diff --git a/src/com/android/settings/ApnEditor.java b/src/com/android/settings/ApnEditor.java
index f738823..13b7aa5 100644
--- a/src/com/android/settings/ApnEditor.java
+++ b/src/com/android/settings/ApnEditor.java
@@ -38,6 +38,7 @@
import android.view.MenuItem;
import com.android.internal.telephony.TelephonyProperties;
+import com.android.internal.telephony.RILConstants;
public class ApnEditor extends PreferenceActivity
@@ -431,6 +432,11 @@
values.put(Telephony.Carriers.PROTOCOL, checkNotSet(mProtocol.getValue()));
+ // Hardcode IPv4 roaming for now until the carriers sort out all the
+ // billing arrangements.
+ values.put(Telephony.Carriers.ROAMING_PROTOCOL,
+ RILConstants.SETUP_DATA_PROTOCOL_IP);
+
values.put(Telephony.Carriers.TYPE, checkNotSet(mApnType.getText()));
values.put(Telephony.Carriers.MCC, mcc);
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index 4f8b374..ba07fb5 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -755,41 +755,41 @@
private final void updatePdpList() {
StringBuilder sb = new StringBuilder("========DATA=======\n");
- List<DataConnection> dcs = phone.getCurrentDataConnectionList();
-
- for (DataConnection dc : dcs) {
- sb.append(" State=").append(dc.getStateAsString()).append("\n");
- if (dc.isActive()) {
- long timeElapsed =
- (System.currentTimeMillis() - dc.getConnectionTime())/1000;
- sb.append(" connected at ")
- .append(DateUtils.timeString(dc.getConnectionTime()))
- .append(" and elapsed ")
- .append(DateUtils.formatElapsedTime(timeElapsed));
-
- if (dc instanceof GsmDataConnection) {
- GsmDataConnection pdp = (GsmDataConnection)dc;
- sb.append("\n to ")
- .append(pdp.getApn().toString());
- }
- sb.append("\nLinkProperties: ");
- sb.append(phone.getLinkProperties(phone.getActiveApnTypes()[0]).toString());
- } else if (dc.isInactive()) {
- sb.append(" disconnected with last try at ")
- .append(DateUtils.timeString(dc.getLastFailTime()))
- .append("\n fail because ")
- .append(dc.getLastFailCause().toString());
- } else {
- if (dc instanceof GsmDataConnection) {
- GsmDataConnection pdp = (GsmDataConnection)dc;
- sb.append(" is connecting to ")
- .append(pdp.getApn().toString());
- } else {
- sb.append(" is connecting");
- }
- }
- sb.append("\n===================");
- }
+// List<DataConnection> dcs = phone.getCurrentDataConnectionList();
+//
+// for (DataConnection dc : dcs) {
+// sb.append(" State=").append(dc.getStateAsString()).append("\n");
+// if (dc.isActive()) {
+// long timeElapsed =
+// (System.currentTimeMillis() - dc.getConnectionTime())/1000;
+// sb.append(" connected at ")
+// .append(DateUtils.timeString(dc.getConnectionTime()))
+// .append(" and elapsed ")
+// .append(DateUtils.formatElapsedTime(timeElapsed));
+//
+// if (dc instanceof GsmDataConnection) {
+// GsmDataConnection pdp = (GsmDataConnection)dc;
+// sb.append("\n to ")
+// .append(pdp.getApn().toString());
+// }
+// sb.append("\nLinkProperties: ");
+// sb.append(phone.getLinkProperties(phone.getActiveApnTypes()[0]).toString());
+// } else if (dc.isInactive()) {
+// sb.append(" disconnected with last try at ")
+// .append(DateUtils.timeString(dc.getLastFailTime()))
+// .append("\n fail because ")
+// .append(dc.getLastFailCause().toString());
+// } else {
+// if (dc instanceof GsmDataConnection) {
+// GsmDataConnection pdp = (GsmDataConnection)dc;
+// sb.append(" is connecting to ")
+// .append(pdp.getApn().toString());
+// } else {
+// sb.append(" is connecting");
+// }
+// }
+// sb.append("\n===================");
+// }
disconnects.setText(sb.toString());
}
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java
index db1870e..91f4110 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -26,6 +26,7 @@
import android.net.NetworkUtils;
import android.net.Proxy;
import android.net.ProxyProperties;
+import android.net.RouteInfo;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiConfiguration.IpAssignment;
import android.net.wifi.WifiConfiguration.AuthAlgorithm;
@@ -196,7 +197,7 @@
}
WifiInfo info = mAccessPoint.getInfo();
- if (info != null) {
+ if (info != null && info.getLinkSpeed() != -1) {
addRow(group, R.string.wifi_speed, info.getLinkSpeed() + WifiInfo.LINK_SPEED_UNITS);
}
@@ -206,11 +207,12 @@
mIpSettingsSpinner.setSelection(STATIC_IP);
} else {
mIpSettingsSpinner.setSelection(DHCP);
- //Display IP addresses
- for(InetAddress a : config.linkProperties.getAddresses()) {
- addRow(group, R.string.wifi_ip_address, a.getHostAddress());
- }
}
+ //Display IP addresses
+ for(InetAddress a : config.linkProperties.getAddresses()) {
+ addRow(group, R.string.wifi_ip_address, a.getHostAddress());
+ }
+
if (config.proxySettings == ProxySettings.STATIC) {
mProxySettingsSpinner.setSelection(PROXY_STATIC);
@@ -264,19 +266,25 @@
if (submit == null) return;
boolean enabled = false;
- if ((mSsidView != null && mSsidView.length() == 0) ||
- ((mAccessPoint == null || mAccessPoint.networkId == INVALID_NETWORK_ID) &&
+ boolean passwordInvalid = false;
+
+ /* Check password invalidity for manual network set up alone */
+ if (chosenNetworkSetupMethod() == MANUAL &&
((mAccessPointSecurity == AccessPoint.SECURITY_WEP && mPasswordView.length() == 0) ||
- (mAccessPointSecurity == AccessPoint.SECURITY_PSK && mPasswordView.length() < 8)))) {
- enabled = false;
- } else {
- enabled = true;
+ (mAccessPointSecurity == AccessPoint.SECURITY_PSK && mPasswordView.length() < 8))) {
+ passwordInvalid = true;
}
- if (ipAndProxyFieldsAreValid()) {
- enabled = true;
- } else {
+ if ((mSsidView != null && mSsidView.length() == 0) ||
+ ((mAccessPoint == null || mAccessPoint.networkId == INVALID_NETWORK_ID) &&
+ passwordInvalid)) {
enabled = false;
+ } else {
+ if (ipAndProxyFieldsAreValid()) {
+ enabled = true;
+ } else {
+ enabled = false;
+ }
}
submit.setEnabled(enabled);
}
@@ -434,7 +442,7 @@
} catch (IllegalArgumentException e) {
return R.string.wifi_ip_settings_invalid_gateway;
}
- linkProperties.addGateway(gatewayAddr);
+ linkProperties.addRoute(new RouteInfo(gatewayAddr));
String dns = mDns1View.getText().toString();
InetAddress dnsAddr = null;
@@ -518,7 +526,7 @@
return;
}
mView.findViewById(R.id.eap).setVisibility(View.VISIBLE);
-
+
if (mEapMethodSpinner == null) {
mEapMethodSpinner = (Spinner) mView.findViewById(R.id.method);
mPhase2Spinner = (Spinner) mView.findViewById(R.id.phase2);
@@ -605,10 +613,13 @@
.getNetworkPrefixLength()));
}
- Iterator<InetAddress>gateways = linkProperties.getGateways().iterator();
- if (gateways.hasNext()) {
- mGatewayView.setText(gateways.next().getHostAddress());
+ for (RouteInfo route : linkProperties.getRoutes()) {
+ if (route.isDefaultRoute()) {
+ mGatewayView.setText(route.getGateway().getHostAddress());
+ break;
+ }
}
+
Iterator<InetAddress> dnsIterator = linkProperties.getDnses().iterator();
if (dnsIterator.hasNext()) {
mDns1View.setText(dnsIterator.next().getHostAddress());
@@ -727,16 +738,14 @@
if (parent == mSecuritySpinner) {
mAccessPointSecurity = position;
showSecurityFields();
- enableSubmitIfAppropriate();
} else if (parent == mNetworkSetupSpinner) {
showNetworkSetupFields();
} else if (parent == mProxySettingsSpinner) {
showProxyFields();
- enableSubmitIfAppropriate();
} else {
showIpConfigFields();
- enableSubmitIfAppropriate();
}
+ enableSubmitIfAppropriate();
}
@Override
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 7e07162..ab5e686 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -509,6 +509,7 @@
WifiManager.EXTRA_NETWORK_INFO);
mConnected.set(info.isConnected());
changeNextButtonState(info.isConnected());
+ updateAccessPoints();
updateConnectionState(info.getDetailedState());
} else if (WifiManager.RSSI_CHANGED_ACTION.equals(action)) {
updateConnectionState(null);