As stated in the documentation of the Demo Mode it should be possible to trigger/configure the demo mode through Broadcasts in an App. https://android.googlesource.com/platform/frameworks/base/+/android-6.0.1_r13/packages/SystemUI/docs/demo_mode.md#Example-script-for-screenshotting-purposes
Unfortunately i just can adjust it through Broadcasts sent via the shell.
To drive the Automation of taking screenshots further, it would be cool to set the Demo Mode inside the UiAutomation Testcase.
Anyone else, experiencing this problem?
/edit: of course i enabled the demo mode in the System UI Tuner settings before. As far as i understand this is not possible through an App shell call