Merge pull request #5029 from nextcloud/beautifyScreenshots

beautify screenshots: no status icon, set time to 12:00, no charging, etc.
This commit is contained in:
Andy Scherzinger authored and GitHub committed 2019-12-18 16:27:28 +01:00
commit 7201dbe4ad
1 file changed
+11
+11
View File
@@ -14,6 +14,7 @@ skip_docs
## public lanes
lane :screenshotsPhone do
beautifyPhone()
build_for_screengrab()
screengrab(
@@ -24,6 +25,7 @@ lane :screenshotsPhone do
end
lane :screenshotsTablet do
beautifyPhone()
build_for_screengrab()
screengrab(
@@ -105,6 +107,15 @@ lane :createDevRelease do |options|
sh("mv ../build/outputs/apk/versionDev/release/*.apk ../release/")
end
desc "Beautify phone for screenshots: set time, remove other icons, no charging"
lane :beautifyPhone do
sh("adb shell settings put global sysui_demo_allowed 1")
sh("adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200")
sh("adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype false")
sh("adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false")
sh("adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100")
end
## private lanes
desc "Build debug and test APK for screenshots"