Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71e1026b authored by Nathan Harold's avatar Nathan Harold Committed by Android (Google) Code Review
Browse files

Merge "Enhancement+Cleanup of RadioInfo Test Menu"

parents d6a49e23 cea413a9
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -51,13 +51,13 @@
                />
 
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_ping_ipaddr" style="@style/info_label" />
            <TextView android:id="@+id/pingIpAddr" style="@style/info_value" />
            <TextView android:text="@string/radio_info_ping_hostname_v4" style="@style/info_label" />
            <TextView android:id="@+id/pingHostnameV4" style="@style/info_value" />
        </LinearLayout>

        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_ping_hostname" style="@style/info_label" />
            <TextView android:id="@+id/pingHostname" style="@style/info_value" />
            <TextView android:text="@string/radio_info_ping_hostname_v6" style="@style/info_label" />
            <TextView android:id="@+id/pingHostnameV6" style="@style/info_value" />
        </LinearLayout>

        <LinearLayout style="@style/entry_layout">
@@ -71,6 +71,14 @@
            <TextView android:id="@+id/dbm" style="@style/info_value" />
        </LinearLayout>

        <!-- CellInfoListRate -->
        <Button android:id="@+id/cell_info_list_rate"
                android:textSize="14sp"
                android:layout_marginTop="8dip"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                />

        <!-- Location -->
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_signal_location_label" style="@style/info_label" />
@@ -88,6 +96,8 @@
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_cellinfo_label"
                      style="@style/info_label" />
        </LinearLayout>
        <LinearLayout style="@style/entry_layout">
            <TextView android:id="@+id/cellinfo" style="@style/info_value" />
        </LinearLayout>

@@ -140,7 +150,6 @@
            <TextView android:id="@+id/call" style="@style/info_value" />
        </LinearLayout>


        <!-- Radio Resets -->
        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_radio_resets_label" style="@style/info_label" />
@@ -210,14 +219,6 @@
                android:layout_height="wrap_content"
                />

        <!-- CellInfoListRate -->
        <Button android:id="@+id/cell_info_list_rate"
                android:textSize="14sp"
                android:layout_marginTop="8dip"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                />

       <!-- IMS registration required -->
        <Button android:id="@+id/ims_reg_required"
                android:textSize="14sp"
+0 −5
Original line number Diff line number Diff line
@@ -110,11 +110,6 @@
                android:text="@string/ping_test_label"
                />

        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_ping_ipaddr" style="@style/info_label" />
            <TextView android:id="@+id/pingIpAddr" style="@style/info_value" />
        </LinearLayout>

        <LinearLayout style="@style/entry_layout">
            <TextView android:text="@string/radio_info_ping_hostname" style="@style/info_label" />
            <TextView android:id="@+id/pingHostname" style="@style/info_value" />
+4 −4
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@
    <string name="radio_info_data_attempts_label">Data attempts:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_gprs_service_label">GPRS service:</string>
    <string name="radio_info_gprs_service_label">Data Technology:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_roaming_label">Roaming:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
@@ -421,7 +421,7 @@
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_ppp_received_label">PPP received:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_gsm_service_label">GSM service:</string>
    <string name="radio_info_gsm_service_label">Voice Technology:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_signal_strength_label">Signal strength:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
@@ -441,9 +441,9 @@
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_set_perferred_label">Set preferred network type:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_ping_ipaddr">Ping IpAddr:</string>
    <string name="radio_info_ping_hostname_v4">Ping Hostname(www.google.com) IPv4:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_ping_hostname">Ping Hostname(www.google.com):</string>
    <string name="radio_info_ping_hostname_v6">Ping Hostname(www.google.com) IPv6:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
    <string name="radio_info_http_client_test">HTTP Client test:</string>
    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
+328 −123

File changed.

Preview size limit exceeded, changes collapsed.

+1 −33
Original line number Diff line number Diff line
@@ -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