add Decrypt Data button
Allow to decrypt /data even if decryption was skipped during the initial
loading of recovery
Change-Id: If2251757a276dd069578e93e5a038b25a825bff6
diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml
index 1a25036..4bed850 100755
--- a/gui/devices/1024x600/res/ui.xml
+++ b/gui/devices/1024x600/res/ui.xml
@@ -2061,6 +2061,18 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml
index b6da352..1cdd77a 100644
--- a/gui/devices/1024x768/res/ui.xml
+++ b/gui/devices/1024x768/res/ui.xml
@@ -2061,6 +2061,18 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml
index 9904b5a..11fa7dc 100644
--- a/gui/devices/1280x800/res/ui.xml
+++ b/gui/devices/1280x800/res/ui.xml
@@ -2061,6 +2061,18 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
index c0dd0b6..c829e9b 100644
--- a/gui/devices/1920x1200/res/ui.xml
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -2061,6 +2061,18 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml
index debe1b2..ac00dee 100644
--- a/gui/devices/2560x1600/res/ui.xml
+++ b/gui/devices/2560x1600/res/ui.xml
@@ -2061,6 +2061,18 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml
index 64764d8..778d49f 100644
--- a/gui/devices/320x480/res/ui.xml
+++ b/gui/devices/320x480/res/ui.xml
@@ -2117,6 +2117,18 @@
<action function="page">usb_mount</action>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml
index 798e9b9..0c2c03f 100644
--- a/gui/devices/480x800/res/ui.xml
+++ b/gui/devices/480x800/res/ui.xml
@@ -2116,6 +2116,18 @@
<action function="page">usb_mount</action>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml
index 62fb909..b1cf00c 100644
--- a/gui/devices/480x854/res/ui.xml
+++ b/gui/devices/480x854/res/ui.xml
@@ -2115,6 +2115,18 @@
<action function="page">usb_mount</action>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml
index 5e90ae0..481beca 100644
--- a/gui/devices/540x960/res/ui.xml
+++ b/gui/devices/540x960/res/ui.xml
@@ -2116,6 +2116,18 @@
<action function="page">usb_mount</action>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml
index 9be4086..4e6ba9f 100644
--- a/gui/devices/720x1280/res/ui.xml
+++ b/gui/devices/720x1280/res/ui.xml
@@ -2121,6 +2121,18 @@
<action function="page">usb_mount</action>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
index c435cf9..dd86e23 100755
--- a/gui/devices/800x1280/res/ui.xml
+++ b/gui/devices/800x1280/res/ui.xml
@@ -2117,6 +2117,18 @@
<action function="page">usb_mount</action>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>
diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml
index 3241e99..6096c57 100755
--- a/gui/devices/800x480/res/ui.xml
+++ b/gui/devices/800x480/res/ui.xml
@@ -2061,6 +2061,18 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row3_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
<object type="action">
<touch key="home" />
<action function="page">main</action>