Loading packages/VpnDialogs/res/layout/manage.xml +2 −2 Original line number Diff line number Diff line Loading @@ -32,12 +32,12 @@ <TextView android:id="@+id/duration" style="@style/value"/> </TableRow> <TableRow> <TableRow android:id="@+id/data_transmitted_row" android:visibility="gone"> <TextView android:text="@string/data_transmitted" style="@style/label"/> <TextView android:id="@+id/data_transmitted" style="@style/value"/> </TableRow> <TableRow> <TableRow android:id="@+id/data_received_row" android:visibility="gone"> <TextView android:text="@string/data_received" style="@style/label"/> <TextView android:id="@+id/data_received" style="@style/value"/> </TableRow> Loading packages/VpnDialogs/res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,6 @@ <!-- Label for the network usage of data received over VPN. [CHAR LIMIT=20] --> <string name="data_received">Received:</string> <!-- Dummy string for a blank value. [CHAR LIMIT=40] --> <string name="blank_value">--</string> <!-- Formatted string for the network usage over VPN. [CHAR LIMIT=40] --> <string name="data_value_format"> <xliff:g id="number">%1$s</xliff:g> bytes / Loading packages/VpnDialogs/res/values/styles.xml +0 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,5 @@ <item name="android:gravity">center_vertical|left</item> <item name="android:textSize">18sp</item> <item name="android:textStyle">bold</item> <item name="android:text">@string/blank_value</item> </style> </resources> packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java +11 −2 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ public class ManageDialog extends AlertActivity implements private TextView mDuration; private TextView mDataTransmitted; private TextView mDataReceived; private boolean mDataRowsHidden; private Handler mHandler; Loading @@ -76,6 +77,7 @@ public class ManageDialog extends AlertActivity implements mDuration = (TextView) view.findViewById(R.id.duration); mDataTransmitted = (TextView) view.findViewById(R.id.data_transmitted); mDataReceived = (TextView) view.findViewById(R.id.data_received); mDataRowsHidden = true; if (mConfig.user.equals(VpnConfig.LEGACY_VPN)) { mAlertParams.mIconId = android.R.drawable.ic_dialog_info; Loading Loading @@ -140,8 +142,15 @@ public class ManageDialog extends AlertActivity implements seconds / 3600, seconds / 60 % 60, seconds % 60)); } String[] numbers = getStatistics(); String[] numbers = getNumbers(); if (numbers != null) { // First unhide the related data rows. if (mDataRowsHidden) { findViewById(R.id.data_transmitted_row).setVisibility(View.VISIBLE); findViewById(R.id.data_received_row).setVisibility(View.VISIBLE); mDataRowsHidden = false; } // [1] and [2] are received data in bytes and packets. mDataReceived.setText(getString(R.string.data_value_format, numbers[1], numbers[2])); Loading @@ -155,7 +164,7 @@ public class ManageDialog extends AlertActivity implements return true; } private String[] getStatistics() { private String[] getNumbers() { DataInputStream in = null; try { // See dev_seq_printf_stats() in net/core/dev.c. Loading Loading
packages/VpnDialogs/res/layout/manage.xml +2 −2 Original line number Diff line number Diff line Loading @@ -32,12 +32,12 @@ <TextView android:id="@+id/duration" style="@style/value"/> </TableRow> <TableRow> <TableRow android:id="@+id/data_transmitted_row" android:visibility="gone"> <TextView android:text="@string/data_transmitted" style="@style/label"/> <TextView android:id="@+id/data_transmitted" style="@style/value"/> </TableRow> <TableRow> <TableRow android:id="@+id/data_received_row" android:visibility="gone"> <TextView android:text="@string/data_received" style="@style/label"/> <TextView android:id="@+id/data_received" style="@style/value"/> </TableRow> Loading
packages/VpnDialogs/res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,6 @@ <!-- Label for the network usage of data received over VPN. [CHAR LIMIT=20] --> <string name="data_received">Received:</string> <!-- Dummy string for a blank value. [CHAR LIMIT=40] --> <string name="blank_value">--</string> <!-- Formatted string for the network usage over VPN. [CHAR LIMIT=40] --> <string name="data_value_format"> <xliff:g id="number">%1$s</xliff:g> bytes / Loading
packages/VpnDialogs/res/values/styles.xml +0 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,5 @@ <item name="android:gravity">center_vertical|left</item> <item name="android:textSize">18sp</item> <item name="android:textStyle">bold</item> <item name="android:text">@string/blank_value</item> </style> </resources>
packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java +11 −2 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ public class ManageDialog extends AlertActivity implements private TextView mDuration; private TextView mDataTransmitted; private TextView mDataReceived; private boolean mDataRowsHidden; private Handler mHandler; Loading @@ -76,6 +77,7 @@ public class ManageDialog extends AlertActivity implements mDuration = (TextView) view.findViewById(R.id.duration); mDataTransmitted = (TextView) view.findViewById(R.id.data_transmitted); mDataReceived = (TextView) view.findViewById(R.id.data_received); mDataRowsHidden = true; if (mConfig.user.equals(VpnConfig.LEGACY_VPN)) { mAlertParams.mIconId = android.R.drawable.ic_dialog_info; Loading Loading @@ -140,8 +142,15 @@ public class ManageDialog extends AlertActivity implements seconds / 3600, seconds / 60 % 60, seconds % 60)); } String[] numbers = getStatistics(); String[] numbers = getNumbers(); if (numbers != null) { // First unhide the related data rows. if (mDataRowsHidden) { findViewById(R.id.data_transmitted_row).setVisibility(View.VISIBLE); findViewById(R.id.data_received_row).setVisibility(View.VISIBLE); mDataRowsHidden = false; } // [1] and [2] are received data in bytes and packets. mDataReceived.setText(getString(R.string.data_value_format, numbers[1], numbers[2])); Loading @@ -155,7 +164,7 @@ public class ManageDialog extends AlertActivity implements return true; } private String[] getStatistics() { private String[] getNumbers() { DataInputStream in = null; try { // See dev_seq_printf_stats() in net/core/dev.c. Loading