Track backup and restore progress

Track backup and restore progress based on the sizes of the files
as they are being added to the tar backup file. Update the
progress bar based on the sizes of the files.

Change-Id: Idf649efa1db3e91830b4b2add86203a3f30042ff
diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml
index d547719..4795ce0 100755
--- a/gui/devices/1024x600/res/ui.xml
+++ b/gui/devices/1024x600/res/ui.xml
@@ -2304,6 +2304,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col1_x%" y="%row2_text_y%" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2679,6 +2691,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml
index f404b46..d041c50 100644
--- a/gui/devices/1024x768/res/ui.xml
+++ b/gui/devices/1024x768/res/ui.xml
@@ -2304,6 +2304,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col1_x%" y="%row2_text_y%" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2679,6 +2691,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml
index 28130b7..f95ae09 100644
--- a/gui/devices/1080x1920/res/ui.xml
+++ b/gui/devices/1080x1920/res/ui.xml
@@ -2056,6 +2056,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2429,6 +2441,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/1200x1920/res/ui.xml b/gui/devices/1200x1920/res/ui.xml
index d198139..0630e10 100644
--- a/gui/devices/1200x1920/res/ui.xml
+++ b/gui/devices/1200x1920/res/ui.xml
@@ -2059,6 +2059,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2432,6 +2444,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml
index 21fc3b7..fdd2059 100644
--- a/gui/devices/1280x800/res/ui.xml
+++ b/gui/devices/1280x800/res/ui.xml
@@ -2304,6 +2304,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col1_x%" y="%row2_text_y%" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2679,6 +2691,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/1600x2560/res/ui.xml b/gui/devices/1600x2560/res/ui.xml
index b6ca28c..95ef1d1 100644
--- a/gui/devices/1600x2560/res/ui.xml
+++ b/gui/devices/1600x2560/res/ui.xml
@@ -2061,6 +2061,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2434,6 +2446,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -3902,7 +3920,7 @@
 				<resource base="slider" used="slider-used" touch="slider-touch" />
 				<action function="page">filemanageracction</action>
 			</object>
-			
+
 			<object type="text" color="%text_color%">
 				<font resource="font" />
 				<placement x="%center_x%" y="%slider_text_y%" placement="4" />
@@ -3918,7 +3936,7 @@
 				<touch key="home" />
 				<action function="page">main</action>
 			</object>
-				
+
 			<object type="template" name="footer" />
 		</page>
 
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
index 5ee5b46..2622a88 100644
--- a/gui/devices/1920x1200/res/ui.xml
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -2304,6 +2304,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col1_x%" y="%row2_text_y%" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2679,6 +2691,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml
index 25b8619..06880b2 100644
--- a/gui/devices/2560x1600/res/ui.xml
+++ b/gui/devices/2560x1600/res/ui.xml
@@ -2304,6 +2304,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col1_x%" y="%row2_text_y%" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2679,6 +2691,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml
index 369b994..fff8533 100644
--- a/gui/devices/320x480/res/ui.xml
+++ b/gui/devices/320x480/res/ui.xml
@@ -2043,6 +2043,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2416,6 +2428,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml
index 72b44e5..6baa702 100644
--- a/gui/devices/480x800/res/ui.xml
+++ b/gui/devices/480x800/res/ui.xml
@@ -2043,6 +2043,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2416,6 +2428,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml
index 5026f40..4f5a7c9 100644
--- a/gui/devices/480x854/res/ui.xml
+++ b/gui/devices/480x854/res/ui.xml
@@ -2042,6 +2042,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2415,6 +2427,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml
index bd39a18..11c9490 100644
--- a/gui/devices/540x960/res/ui.xml
+++ b/gui/devices/540x960/res/ui.xml
@@ -2043,6 +2043,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2416,6 +2428,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml
index c9e6862..1575485 100644
--- a/gui/devices/720x1280/res/ui.xml
+++ b/gui/devices/720x1280/res/ui.xml
@@ -2056,6 +2056,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2429,6 +2441,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
index b4cbb50..abd62de 100755
--- a/gui/devices/800x1280/res/ui.xml
+++ b/gui/devices/800x1280/res/ui.xml
@@ -2044,6 +2044,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row3_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2417,6 +2429,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml
index 272bf64..6a2c08f 100755
--- a/gui/devices/800x480/res/ui.xml
+++ b/gui/devices/800x480/res/ui.xml
@@ -2312,6 +2312,18 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col1_x%" y="%row2_text_y%" />
+				<text>%tw_file_progress%</text>
+			</object>
+
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />
@@ -2687,6 +2699,12 @@
 				<text>%tw_operation% %tw_partition%</text>
 			</object>
 
+			<object type="text" color="%text_color%">
+				<font resource="font" />
+				<placement x="%center_x%" y="%row2_text_y%" placement="5" />
+				<text>%tw_size_progress%</text>
+			</object>
+
 			<object type="template" name="action_page_console" />
 
 			<object type="template" name="progress_bar" />