Add statusbar test harness app
This commit is contained in:
@@ -116,3 +116,40 @@ Release builds require local signing configuration:
|
||||
```bash
|
||||
./gradlew assembleRelease
|
||||
```
|
||||
|
||||
## Test Harness
|
||||
|
||||
The repository also includes a small companion app for compatibility testing.
|
||||
It is not required for normal use of the module. It creates repeatable
|
||||
statusbar scenarios such as opaque, transparent, fullscreen, privacy-indicator,
|
||||
and notification states:
|
||||
|
||||
```bash
|
||||
./gradlew :test-harness:assembleDebug
|
||||
adb install -r test-harness/build/outputs/apk/debug/test-harness-debug.apk
|
||||
adb shell am start -n se.ajpanton.statusbartweak.harness/.MainActivity
|
||||
```
|
||||
|
||||
Automation can launch scenarios directly:
|
||||
|
||||
```bash
|
||||
adb shell am start -n se.ajpanton.statusbartweak.harness/.ScenarioActivity --es scenario fullscreen_landscape
|
||||
adb shell am start -n se.ajpanton.statusbartweak.harness/.MainActivity --es command post_normal
|
||||
```
|
||||
|
||||
Useful scenario values include `opaque_light`, `opaque_dark`, `transparent`,
|
||||
`fullscreen_portrait`, `fullscreen_landscape`, `camera`, `microphone`, and
|
||||
`camera_microphone`.
|
||||
|
||||
Useful command values include `post_normal`, `post_ongoing`, `post_grouped`,
|
||||
`update`, `start_chronometer`, `start_churn`, `stop_churn`, `start_media`,
|
||||
`start_foreground`, `stop_service`, and `clear`.
|
||||
|
||||
Battery charging state is controlled by Android system commands rather than by
|
||||
the harness APK:
|
||||
|
||||
```bash
|
||||
adb shell cmd battery set status 2
|
||||
adb shell cmd battery set level 80
|
||||
adb shell cmd battery reset
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user