Add UI for entering pattern for device decryption

Change-Id: Ia2d3268a96423e9ca3846500c57e674c4f8fa60b
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
diff --git a/gui/devices/landscape/res/landscape.xml b/gui/devices/landscape/res/landscape.xml
index 0a907cb..432e9fb 100644
--- a/gui/devices/landscape/res/landscape.xml
+++ b/gui/devices/landscape/res/landscape.xml
@@ -3241,6 +3241,11 @@
 		<page name="decrypt">
 			<object type="template" name="header" />
 
+			<object type="action">
+				<condition var1="tw_crypto_pwtype" var2="2" />
+				<action function="page">decrypt_pattern</action>
+			</object>
+
 			<object type="text">
 				<placement x="%center_x%" y="%row1_text_y%" placement="5" />
 				<text>Please Enter Your Password</text>
@@ -3277,6 +3282,41 @@
 			<object type="template" name="footer" />
 		</page>
 
+		<page name="decrypt_pattern">
+			<object type="template" name="header" />
+
+			<object type="text">
+				<placement x="%center_x%" y="%row1_text_y%" placement="5" />
+				<text>Please Enter Your Pattern</text>
+			</object>
+
+			<object type="text">
+				<condition var1="tw_password_fail" var2="1" />
+				<font resource="font" color="%text_fail_color%" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>Pattern Failed, Please Try Again</text>
+			</object>
+
+			<object type="patternpassword">
+				<placement x="%pattern_x%" y="%pattern_y%" w="%pattern_width%" h="%pattern_width%" />
+				<dot color="%pattern_dot_color%" activecolor="%pattern_dot_color_active%" radius="%pattern_dot_radius%" />
+				<line color="%pattern_line_color%" width="%pattern_line_width%" />
+				<data name="tw_crypto_password"/>
+				<action function="page">trydecrypt</action>
+			</object>
+
+			<object type="button">
+				<placement x="%col4_x%" y="%cancel_button_y%" />
+				<text>Cancel</text>
+				<actions>
+					<action function="set">tw_page_done=1</action>
+					<action function="page">main</action>
+				</actions>
+			</object>
+
+			<object type="template" name="footer" />
+		</page>
+
 		<page name="trydecrypt">
 			<object type="template" name="header" />