Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
interferometer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
akwizgran
interferometer
Commits
bac7e341
Commit
bac7e341
authored
Jan 31, 2020
by
akwizgran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for Bluetooth connections.
parent
37112a72
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
37 deletions
+102
-37
app/src/main/java/org/briarproject/interferometer/MainActivity.java
...in/java/org/briarproject/interferometer/MainActivity.java
+13
-10
app/src/main/java/org/briarproject/interferometer/MainViewModel.java
...n/java/org/briarproject/interferometer/MainViewModel.java
+86
-25
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+3
-2
No files found.
app/src/main/java/org/briarproject/interferometer/MainActivity.java
View file @
bac7e341
...
...
@@ -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
);
}
}
}
...
...
app/src/main/java/org/briarproject/interferometer/MainViewModel.java
View file @
bac7e341
This diff is collapsed.
Click to expand it.
app/src/main/res/values/strings.xml
View file @
bac7e341
...
...
@@ -9,9 +9,10 @@
<string
name=
"start_test"
>
Start test
</string>
<string
name=
"stop_test"
>
Stop test
</string>
<string
name=
"testing_b
aseline
"
>
Testing with Bluetooth disabled
</string>
<string
name=
"testing_b
luetooth
"
>
Testing with Bluetooth enabled
</string>
<string
name=
"testing_b
t_disabled
"
>
Testing with Bluetooth disabled
</string>
<string
name=
"testing_b
t_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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment