Commit bac7e341 authored by akwizgran's avatar akwizgran

Add test for Bluetooth connections.

parent 37112a72
......@@ -20,8 +20,9 @@ import static org.briarproject.interferometer.MainViewModel.ConnectionState.DOWN
import static org.briarproject.interferometer.MainViewModel.ConnectionState.UPLOADING;
import static org.briarproject.interferometer.MainViewModel.StartResult.INVALID_ADDRESS;
import static org.briarproject.interferometer.MainViewModel.StartResult.NO_BLUETOOTH;
import static org.briarproject.interferometer.MainViewModel.TestPhase.BASELINE;
import static org.briarproject.interferometer.MainViewModel.TestPhase.BLUETOOTH;
import static org.briarproject.interferometer.MainViewModel.TestPhase.BT_DISABLED;
import static org.briarproject.interferometer.MainViewModel.TestPhase.BT_ENABLED;
import static org.briarproject.interferometer.MainViewModel.TestPhase.CONNECTIONS;
import static org.briarproject.interferometer.MainViewModel.TestPhase.DISCOVERY;
import static org.briarproject.interferometer.MainViewModel.TestPhase.READY;
......@@ -73,15 +74,17 @@ public class MainActivity extends AppCompatActivity {
if (phase == READY) {
testButton.setText(R.string.start_test);
testPhaseTextView.setText(null);
} else if (phase == BASELINE) {
testButton.setText(R.string.stop_test);
testPhaseTextView.setText(R.string.testing_baseline);
} else if (phase == BLUETOOTH) {
testButton.setText(R.string.stop_test);
testPhaseTextView.setText(R.string.testing_bluetooth);
} else if (phase == DISCOVERY) {
} else {
testButton.setText(R.string.stop_test);
testPhaseTextView.setText(R.string.testing_discovery);
if (phase == BT_DISABLED) {
testPhaseTextView.setText(R.string.testing_bt_disabled);
} else if (phase == BT_ENABLED) {
testPhaseTextView.setText(R.string.testing_bt_enabled);
} else if (phase == DISCOVERY) {
testPhaseTextView.setText(R.string.testing_discovery);
} else if (phase == CONNECTIONS) {
testPhaseTextView.setText(R.string.testing_connections);
}
}
}
......
......@@ -9,9 +9,10 @@
<string name="start_test">Start test</string>
<string name="stop_test">Stop test</string>
<string name="testing_baseline">Testing with Bluetooth disabled</string>
<string name="testing_bluetooth">Testing with Bluetooth enabled</string>
<string name="testing_bt_disabled">Testing with Bluetooth disabled</string>
<string name="testing_bt_enabled">Testing with Bluetooth enabled</string>
<string name="testing_discovery">Testing with Bluetooth discovery</string>
<string name="testing_connections">Testing with Bluetooth connections</string>
<string name="download_format">Download: %,d bytes/sec</string>
<string name="upload_format">Upload: %,d bytes/sec</string>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment