Enhancement+Cleanup of RadioInfo Test Menu

-Re-format CellInfo to a Table
-Improve performance on several blocking calls
-Add IPv6 ping test
-Re-order layout to improve logical grouping
-Semantic changes/cosmetic improvements to a few strings
-Expand list of selectable network types to include recent RATs

Change-Id: I02d15987e7cb79fe0bbd13e5d1eb734e3531f11f
This commit is contained in:
Nathan Harold
2015-11-23 15:48:10 -08:00
parent 0501728c03
commit cea413a9bb
5 changed files with 348 additions and 179 deletions

View File

@@ -148,8 +148,7 @@ public class WifiStatusTest extends Activity {
mScanList = (TextView) findViewById(R.id.scan_list);
mPingIpAddr = (TextView) findViewById(R.id.pingIpAddr);
mPingHostname = (TextView) findViewById(R.id.pingHostname);
mPingHostname = (TextView) findViewById(R.id.pingHostnameV4);
mHttpClientTest = (TextView) findViewById(R.id.httpClientTest);
pingTestButton = (Button) findViewById(R.id.ping_test);
@@ -317,19 +316,10 @@ public class WifiStatusTest extends Activity {
final Runnable updatePingResults = new Runnable() {
public void run() {
mPingIpAddr.setText(mPingIpAddrResult);
mPingHostname.setText(mPingHostnameResult);
mHttpClientTest.setText(mHttpClientTestResult);
}
};
Thread ipAddrThread = new Thread() {
@Override
public void run() {
pingIpAddr();
handler.post(updatePingResults);
}
};
ipAddrThread.start();
Thread hostnameThread = new Thread() {
@Override
@@ -350,28 +340,6 @@ public class WifiStatusTest extends Activity {
httpClientThread.start();
}
/**
* The ping functions have been borrowed from Radio diagnostic app to
* enable quick access on the wifi status screen
*/
private final void pingIpAddr() {
try {
// TODO: Hardcoded for now, make it UI configurable
String ipAddress = "74.125.47.104";
Process p = Runtime.getRuntime().exec("ping -c 1 -w 100 " + ipAddress);
int status = p.waitFor();
if (status == 0) {
mPingIpAddrResult = "Pass";
} else {
mPingIpAddrResult = "Fail: IP addr not reachable";
}
} catch (IOException e) {
mPingIpAddrResult = "Fail: IOException";
} catch (InterruptedException e) {
mPingIpAddrResult = "Fail: InterruptedException";
}
}
private final void pingHostname() {
try {
// TODO: Hardcoded for now, make it UI configurable