gui: add canceldecrypt page

Use refreshsizes action to update system details when
Cancel button is pressed at decryption prompt

Change-Id: I9e436b1c57664a5269f42dc1cda4f6097f7e3062
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index ef0cb4f..99cd126 100755
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -4637,10 +4637,7 @@
 			<button style="main_button_half_width_low">
 				<placement x="%indent%" y="%row6_y%"/>
 				<text>{@cancel_btn=Cancel}</text>
-				<actions>
-					<action function="set">tw_page_done=1</action>
-					<action function="page">main</action>
-				</actions>
+				<action function="page">canceldecrypt</action>
 			</button>
 
 			<button style="main_button_half_width_low">
@@ -4717,10 +4714,7 @@
 			<button style="main_button_half_width">
 				<placement x="%col2_x_right%" y="%row15a_y%"/>
 				<text>{@cancel_btn=Cancel}</text>
-				<actions>
-					<action function="set">tw_page_done=1</action>
-					<action function="page">main</action>
-				</actions>
+				<action function="page">canceldecrypt</action>
 			</button>
 		</page>
 
@@ -4768,6 +4762,38 @@
 			</action>
 		</page>
 
+		<page name="canceldecrypt">
+			<template name="page"/>
+
+			<text style="text_l">
+				<placement x="%col1_x_header%" y="%row3_header_y%"/>
+				<text>{@cancel_btn=Cancel}</text>
+			</text>
+
+			<text style="text_m">
+				<placement x="%col1_x_header%" y="%row4_header_y%"/>
+				<text>{@refresh_sizes_btn=Refresh Sizes}</text>
+			</text>
+
+			<template name="console"/>
+
+			<template name="progress_bar"/>
+
+			<action>
+				<action function="refreshsizes"/>
+			</action>
+
+			<action>
+				<conditions>
+					<condition var1="tw_operation_state" var2="1"/>
+				</conditions>
+				<actions>
+					<action function="set">tw_page_done=1</action>
+					<action function="page">main</action>
+				</actions>
+			</action>
+		</page>
+
 		<page name="terminalcommand">
 			<template name="page"/>
 
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index 9490a04..4f36e46 100755
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -4760,10 +4760,7 @@
 			<button style="main_button_half_height">
 				<placement x="%indent%" y="%row10_y%"/>
 				<text>{@cancel_btn=Cancel}</text>
-				<actions>
-					<action function="set">tw_page_done=1</action>
-					<action function="page">main</action>
-				</actions>
+				<action function="page">canceldecrypt</action>
 			</button>
 
 			<button style="main_button_half_height">
@@ -4841,10 +4838,7 @@
 			<button style="main_button_half_height">
 				<placement x="%indent%" y="%row21a_y%"/>
 				<text>{@cancel_btn=Cancel}</text>
-				<actions>
-					<action function="set">tw_page_done=1</action>
-					<action function="page">main</action>
-				</actions>
+				<action function="page">canceldecrypt</action>
 			</button>
 
 			<button style="main_button_half_height">
@@ -4898,6 +4892,38 @@
 			</action>
 		</page>
 
+		<page name="canceldecrypt">
+			<template name="page"/>
+
+			<text style="text_l">
+				<placement x="%col1_x_header%" y="%row3_header_y%"/>
+				<text>{@cancel_btn=Cancel}</text>
+			</text>
+
+			<text style="text_m">
+				<placement x="%col1_x_header%" y="%row4_header_y%"/>
+				<text>{@refresh_sizes_btn=Refresh Sizes}</text>
+			</text>
+
+			<template name="console"/>
+
+			<template name="progress_bar"/>
+
+			<action>
+				<action function="refreshsizes"/>
+			</action>
+
+			<action>
+				<conditions>
+					<condition var1="tw_operation_state" var2="1"/>
+				</conditions>
+				<actions>
+					<action function="set">tw_page_done=1</action>
+					<action function="page">main</action>
+				</actions>
+			</action>
+		</page>
+
 		<page name="terminalcommand">
 			<template name="page"/>
 
diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml
index 8252780..251e0f6 100755
--- a/gui/theme/common/watch.xml
+++ b/gui/theme/common/watch.xml
@@ -5458,10 +5458,7 @@
 			<button style="main_button_half_height">
 				<placement x="%col1_x_right%" y="%row4_y%"/>
 				<text>{@cancel_btn=Cancel}</text>
-				<actions>
-					<action function="set">tw_page_done=1</action>
-					<action function="page">main</action>
-				</actions>
+				<action function="page">canceldecrypt</action>
 			</button>
 
 			<template name="keyboardtemplate"/>
@@ -5522,10 +5519,7 @@
 				<placement x="%back_button_x%" y="%navbar_btn_y%" placement="4"/>
 				<image resource="back"/>
 				<condition var1="tw_busy" var2="0"/>
-				<actions>
-					<action function="set">tw_page_done=1</action>
-					<action function="page">main</action>
-				</actions>
+				<action function="page">canceldecrypt</action>
 			</button>
 
 			<button>
@@ -5626,6 +5620,35 @@
 			</action>
 		</page>
 
+		<page name="canceldecrypt">
+			<template name="page"/>
+
+			<template name="statusbar"/>
+
+			<text style="text_m">
+				<placement x="%col1_x_left%" y="%row1_header_y%"/>
+				<text>{@cancel_btn=Cancel} &gt; {@refresh_sizes_btn=Refresh Sizes}</text>
+			</text>
+
+			<template name="console"/>
+
+			<template name="progress_bar"/>
+
+			<action>
+				<action function="refreshsizes"/>
+			</action>
+
+			<action>
+				<conditions>
+					<condition var1="tw_operation_state" var2="1"/>
+				</conditions>
+				<actions>
+					<action function="set">tw_page_done=1</action>
+					<action function="page">main</action>
+				</actions>
+			</action>
+		</page>
+
 		<page name="terminalcommand">
 			<terminal>
 				<condition var1="tw_hide_kb" var2="0"/>