[Wi-Fi] Show link speed for WifiDialog2 MODE_VIEW
Now there is no WifiDialog2 MODE_VIEW use case since they are replaced by WifiNetworkDetailsFragment2. Should think about removing MODE_VIEW in the future, however, we should let it work before phase out it. Bug: 146407136 Test: build Change-Id: I7cd470c74cea846046975b8c65fd2604702cc136
This commit is contained in:
@@ -1765,7 +1765,8 @@
|
|||||||
<string name="tx_link_speed"><xliff:g id="Transmit link speed" example="150 Mbps">%1$d</xliff:g> Mbps</string>
|
<string name="tx_link_speed"><xliff:g id="Transmit link speed" example="150 Mbps">%1$d</xliff:g> Mbps</string>
|
||||||
<!-- Receive Link speed on Wifi Status screen [CHAR LIMIT=32] -->
|
<!-- Receive Link speed on Wifi Status screen [CHAR LIMIT=32] -->
|
||||||
<string name="rx_link_speed"><xliff:g id="Receive link speed" example="54 Mbps">%1$d</xliff:g> Mbps</string>
|
<string name="rx_link_speed"><xliff:g id="Receive link speed" example="54 Mbps">%1$d</xliff:g> Mbps</string>
|
||||||
|
<!-- Link speed on Wifi Status screen [CHAR LIMIT=32] -->
|
||||||
|
<string name="link_speed"><xliff:g id="Link speed" example="54 Mbps">%1$d</xliff:g> Mbps</string>
|
||||||
<!-- This string asks the user whether or not to allow an app to enable WiFi. [CHAR LIMIT=NONE] -->
|
<!-- This string asks the user whether or not to allow an app to enable WiFi. [CHAR LIMIT=NONE] -->
|
||||||
<string name="wifi_ask_enable"><xliff:g id="requester" example="FancyApp">%s</xliff:g> wants to turn on Wi-Fi</string>
|
<string name="wifi_ask_enable"><xliff:g id="requester" example="FancyApp">%s</xliff:g> wants to turn on Wi-Fi</string>
|
||||||
<!-- This string asks the user whether or not to allow an app to disable WiFi. [CHAR LIMIT=NONE] -->
|
<!-- This string asks the user whether or not to allow an app to disable WiFi. [CHAR LIMIT=NONE] -->
|
||||||
@@ -1976,6 +1977,8 @@
|
|||||||
<string name="tx_wifi_speed">Transmit link speed</string>
|
<string name="tx_wifi_speed">Transmit link speed</string>
|
||||||
<!-- Label for the receive link speed of the connection. [CHAR LIMIT=32] -->
|
<!-- Label for the receive link speed of the connection. [CHAR LIMIT=32] -->
|
||||||
<string name="rx_wifi_speed">Receive link speed</string>
|
<string name="rx_wifi_speed">Receive link speed</string>
|
||||||
|
<!-- Label for the link speed of the connection. [CHAR LIMIT=32] -->
|
||||||
|
<string name="wifi_speed">Link speed</string>
|
||||||
<!-- Label for the frequency band of the connection -->
|
<!-- Label for the frequency band of the connection -->
|
||||||
<string name="wifi_frequency">Frequency</string>
|
<string name="wifi_frequency">Frequency</string>
|
||||||
<!-- Label for the IP address of the connection -->
|
<!-- Label for the IP address of the connection -->
|
||||||
|
@@ -366,7 +366,7 @@ public class WifiConfigController2 implements TextWatcher,
|
|||||||
} else {
|
} else {
|
||||||
final String signalLevel = getSignalString();
|
final String signalLevel = getSignalString();
|
||||||
|
|
||||||
if (mWifiEntry.getConnectedState() != WifiEntry.CONNECTED_STATE_CONNECTED
|
if (mWifiEntry.getConnectedState() == WifiEntry.CONNECTED_STATE_DISCONNECTED
|
||||||
&& signalLevel != null) {
|
&& signalLevel != null) {
|
||||||
mConfigUi.setSubmitButton(res.getString(R.string.wifi_connect));
|
mConfigUi.setSubmitButton(res.getString(R.string.wifi_connect));
|
||||||
} else {
|
} else {
|
||||||
@@ -388,16 +388,10 @@ public class WifiConfigController2 implements TextWatcher,
|
|||||||
}
|
}
|
||||||
|
|
||||||
final ConnectedInfo info = mWifiEntry.getConnectedInfo();
|
final ConnectedInfo info = mWifiEntry.getConnectedInfo();
|
||||||
// TODO(b/143326832): Replace it with ConnectedInfo#linkSpeedMbps.
|
if (info != null && info.linkSpeedMbps >= 0) {
|
||||||
//if (info != null && info.getTxLinkSpeedMbps() != WifiInfo.LINK_SPEED_UNKNOWN) {
|
addRow(group, R.string.wifi_speed, String.format(
|
||||||
// addRow(group, R.string.tx_wifi_speed, String.format(
|
res.getString(R.string.link_speed), info.linkSpeedMbps));
|
||||||
// res.getString(R.string.tx_link_speed), info.getTxLinkSpeedMbps()));
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
//if (info != null && info.getRxLinkSpeedMbps() != WifiInfo.LINK_SPEED_UNKNOWN) {
|
|
||||||
// addRow(group, R.string.rx_wifi_speed, String.format(
|
|
||||||
// res.getString(R.string.rx_link_speed), info.getRxLinkSpeedMbps()));
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (info != null && info.frequencyMhz != WifiEntry.FREQUENCY_UNKNOWN) {
|
if (info != null && info.frequencyMhz != WifiEntry.FREQUENCY_UNKNOWN) {
|
||||||
final int frequency = info.frequencyMhz;
|
final int frequency = info.frequencyMhz;
|
||||||
|
Reference in New Issue
Block a user