Use demo mode when taking screenshots to clear status bar

https://android.googlesource.com/platform/frameworks/base/+/master/packages/SystemUI/docs/demo_mode.md
This commit is contained in:
Torsten Grote
2018-07-25 16:46:23 -03:00
parent be2d695150
commit daf5db470f
3 changed files with 12 additions and 1 deletions

View File

@@ -19,8 +19,10 @@ platform :android do
desc "Takes screenshots for manual and Google Play"
lane :screenshots do
gradle(project_dir: "..", task: "assembleScreenshot assembleAndroidTest")
system './demo-mode-activate.sh'
capture_android_screenshots
system './rename_screenshots.py'
system './demo-mode-deactivate.sh'
system './rename_screenshots.py'
end
end

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
adb shell settings put global sysui_demo_allowed 1
adb shell am broadcast -a com.android.systemui.demo -e command enter
adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false
adb shell am broadcast -a com.android.systemui.demo -e command battery -e level 100
adb shell am broadcast -a com.android.systemui.demo -e command network -e wifi show
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1337

View File

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
adb shell am broadcast -a com.android.systemui.demo -e command exit