Implement "take a screenshot" feature
* Like in android - press power+volume down, screenshots are saved
in /sdcard/Pictures/Screenshots (if /sdcard is mounted) or /tmp
Change-Id: Iaefa15b11a1d5fdfac57d77388db1621f378a8d4
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml
old mode 100755
new mode 100644
index 4795ce0..5c9c63b
--- a/gui/devices/1024x600/res/ui.xml
+++ b/gui/devices/1024x600/res/ui.xml
@@ -277,6 +277,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
@@ -4159,6 +4164,11 @@
<action function="overlay">lock</action>
</object>
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
+
<object type="template" name="keyboardtemplate" />
<object type="action">
diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml
index d041c50..f3e0a8e 100644
--- a/gui/devices/1024x768/res/ui.xml
+++ b/gui/devices/1024x768/res/ui.xml
@@ -277,6 +277,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
@@ -4159,6 +4164,11 @@
<action function="overlay">lock</action>
</object>
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
+
<object type="template" name="keyboardtemplate" />
<object type="action">
diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml
index f95ae09..5801f20 100644
--- a/gui/devices/1080x1920/res/ui.xml
+++ b/gui/devices/1080x1920/res/ui.xml
@@ -266,6 +266,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/1200x1920/res/ui.xml b/gui/devices/1200x1920/res/ui.xml
index 0630e10..d0c8b4e 100644
--- a/gui/devices/1200x1920/res/ui.xml
+++ b/gui/devices/1200x1920/res/ui.xml
@@ -269,6 +269,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml
index fdd2059..b76060a 100644
--- a/gui/devices/1280x800/res/ui.xml
+++ b/gui/devices/1280x800/res/ui.xml
@@ -277,6 +277,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
@@ -4159,6 +4164,11 @@
<action function="overlay">lock</action>
</object>
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
+
<object type="template" name="keyboardtemplate" />
<object type="action">
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
index 2622a88..0841c96 100644
--- a/gui/devices/1920x1200/res/ui.xml
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -277,6 +277,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
@@ -4159,6 +4164,11 @@
<action function="overlay">lock</action>
</object>
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
+
<object type="template" name="keyboardtemplate" />
<object type="action">
diff --git a/gui/devices/240x240/res/ui.xml b/gui/devices/240x240/res/ui.xml
index ac98dba..da73a99 100644
--- a/gui/devices/240x240/res/ui.xml
+++ b/gui/devices/240x240/res/ui.xml
@@ -253,6 +253,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml
index 06880b2..28a9b81 100644
--- a/gui/devices/2560x1600/res/ui.xml
+++ b/gui/devices/2560x1600/res/ui.xml
@@ -277,6 +277,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
@@ -4159,6 +4164,11 @@
<action function="overlay">lock</action>
</object>
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
+
<object type="template" name="keyboardtemplate" />
<object type="action">
diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml
index fff8533..82273ce 100644
--- a/gui/devices/320x480/res/ui.xml
+++ b/gui/devices/320x480/res/ui.xml
@@ -259,6 +259,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml
index 6baa702..53d630f 100644
--- a/gui/devices/480x800/res/ui.xml
+++ b/gui/devices/480x800/res/ui.xml
@@ -259,6 +259,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml
index 4f5a7c9..ce79ebf 100644
--- a/gui/devices/480x854/res/ui.xml
+++ b/gui/devices/480x854/res/ui.xml
@@ -258,6 +258,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml
index 11c9490..5e2807f 100644
--- a/gui/devices/540x960/res/ui.xml
+++ b/gui/devices/540x960/res/ui.xml
@@ -259,6 +259,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml
index 1575485..4db6e22 100644
--- a/gui/devices/720x1280/res/ui.xml
+++ b/gui/devices/720x1280/res/ui.xml
@@ -266,6 +266,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
old mode 100755
new mode 100644
index abd62de..718074e
--- a/gui/devices/800x1280/res/ui.xml
+++ b/gui/devices/800x1280/res/ui.xml
@@ -260,6 +260,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml
old mode 100755
new mode 100644
index 6a2c08f..9c56ca3
--- a/gui/devices/800x480/res/ui.xml
+++ b/gui/devices/800x480/res/ui.xml
@@ -279,6 +279,11 @@
<touch key="power" />
<action function="overlay">lock</action>
</object>
+
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
</template>
<template name="progress_bar">
@@ -4167,6 +4172,11 @@
<action function="overlay">lock</action>
</object>
+ <object type="action">
+ <touch key="power+voldown" />
+ <action function="screenshot" />
+ </object>
+
<object type="template" name="keyboardtemplate" />
<object type="action">