[Feature][MD310][task-view-882][LCD] Added the scan to connect display and changed the version number to two-line display

Change-Id: I4e84518feb678c31b6e2774caf4a710cd4d03101
diff --git a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c
index 1c6a1b9..f3de7c8 100755
--- a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c
+++ b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi.c
@@ -526,6 +526,7 @@
 
 		if (strstr(nv_task_tab, "version_logo_task")) {
 			mmi_RegisterTipFirmwareVersionTaskInfoItem();
+			mmi_RegisterTipTextConnectTaskInfoItem();
 			mmi_RegisterLogoTaskInfoItem();
 		}
 	}
diff --git a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_common.h b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_common.h
index ba77b9e..7150999 100755
--- a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_common.h
+++ b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_common.h
@@ -207,6 +207,7 @@
 	MMI_TASK_USB_MODE,
 	MMI_TASK_RJ45,
 	MMI_TASK_VERSION,
+	MMI_TASK_TEXT_CONNECT,
 	MMI_TASK_LOGO,
 	MMI_TASK_MAX
 } E_zMmi_Task;
@@ -364,6 +365,10 @@
 
 typedef struct {
 	int exist;
+} T_zMMITEXTCONNECTInfo;
+
+typedef struct {
+	int exist;
 } T_zMMILOGOInfo;
 
 /*
@@ -1029,6 +1034,7 @@
 SINT32 mmi_getLcdCurConInfo(UINT32 taskInfo);//±¾´ÎÁ¬½Óʱ¼ä£¬±¾´ÎÁ÷Á¿
 SINT32 mmi_getLcdTimeInfo(UINT32 taskInfo);//time
 SINT32 mmi_getLcdVersionInfo(UINT32 taskInfo);
+SINT32 mmi_getLcdTextConnectInfo(UINT32 taskInfo);
 SINT32 mmi_getLcdLogoInfo(UINT32 taskInfo);
 
 /**********************************************************************************
@@ -1261,6 +1267,7 @@
 SINT32  mmi_RegisterTipNetConnectTaskInfoItem();
 SINT32 	mmi_RegisterTipWifiStationConnectTaskInfoItem();
 SINT32 mmi_RegisterTipFirmwareVersionTaskInfoItem();
+SINT32 mmi_RegisterTipTextConnectTaskInfoItem();
 SINT32 mmi_RegisterLogoTaskInfoItem();
 
 void	mmi_net_init();
diff --git a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.c b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.c
index 6bbcb3a..a59a5f6 100755
--- a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.c
+++ b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.c
@@ -68,8 +68,12 @@
 
 	{LCD_SHOW_POWER_OFF_CHARGER, {0, 0, 128, 128}, LCD_SHOW_PICTURE},
 
-	{LCD_SHOW_FIRMWARE_VERSION, {0, 17, 160, 35}, LCD_SHOW_TEXT},
-	{LCD_SHOW_HARDWARE_VERSION, {0, 45, 160, 63}, LCD_SHOW_TEXT},
+	{LCD_SHOW_FIRMWARE_VERSION, {0, 2, 160, 20}, LCD_SHOW_TEXT},
+	{LCD_SHOW_FIRMWARE_VERSION_VALUE, {0, 21, 160, 39}, LCD_SHOW_TEXT},
+	{LCD_SHOW_HARDWARE_VERSION, {0, 40, 160, 58}, LCD_SHOW_TEXT},
+	{LCD_SHOW_HARDWARE_VERSION_VALUE, {0, 59, 160, 77}, LCD_SHOW_TEXT},
+	{LCD_SHOW_TEXT_SCAN_TO, {100, 17, 155, 35}, LCD_SHOW_TEXT},
+	{LCD_SHOW_TEXT_CONNECT, {100, 45, 155, 63}, LCD_SHOW_TEXT},
 	{LCD_SHOW_LOGO, {120, 0, 160, 80}, LCD_SHOW_PICTURE},
 };
 
@@ -111,12 +115,16 @@
 	{LCD_SHOW_TRAFFIC_WARING, NULL, NULL, NULL, DT_CENTER, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
 
 	//=================================PAGE3=======================================================
-	{LCD_SHOW_WIFI_CODE, NULL, NULL, NULL, DT_CENTER, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
+	{LCD_SHOW_WIFI_CODE, NULL, NULL, NULL, DT_CENTER, 0, TRUE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
 
 	{LCD_SHOW_POWER_OFF_CHARGER, NULL, NULL, NULL, DT_CENTER | DT_VCENTER | DT_SINGLELINE, 0, TRUE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
 
 	{LCD_SHOW_FIRMWARE_VERSION, NULL, NULL, NULL, DT_LEFT, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
+	{LCD_SHOW_FIRMWARE_VERSION_VALUE, NULL, NULL, NULL, DT_LEFT, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
 	{LCD_SHOW_HARDWARE_VERSION, NULL, NULL, NULL, DT_LEFT, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
+	{LCD_SHOW_HARDWARE_VERSION_VALUE, NULL, NULL, NULL, DT_LEFT, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
+	{LCD_SHOW_TEXT_SCAN_TO, NULL, NULL, NULL, DT_LEFT, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
+	{LCD_SHOW_TEXT_CONNECT, NULL, NULL, NULL, DT_LEFT, 0, FALSE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
 	{LCD_SHOW_LOGO, NULL, NULL, NULL, DT_CENTER, 0, TRUE, TRUE, LCD_SHOW_INVLAID, 0xffffffff, 0},
 
 };
@@ -407,8 +415,11 @@
 #define STRING_SSID2 			"SSID2:"
 #define STRING_WIFIKEY		 	"KEY:"
 
-#define STRING_FIRMWARE 		"Firmware Version :"
-#define STRING_VERSION 			"Version :"
+#define STRING_FIRMWARE 		"Firmware Version:"
+#define STRING_VERSION 			"Version:"
+
+#define STRING_SCAN_TO          "Scan to"
+#define STRING_CONNECT          "Connect"
 
 //extern PLOGFONT mmi_middle_fourteen_font;
 extern PLOGFONT mmi_smallest_font;
@@ -771,9 +782,11 @@
 		mmi_showLcdItem(g_LcdShowInfoTab[LCD_SHOW_POWER_OFF_CHARGER], hdc);
 	} else {
 		for (i = 0; i < sizeof(g_LcdShowInfoTab) / sizeof(T_LcdShowInfoItem); ++ i) {
+#if 0
 			if (!mmi_isItemNeedShow(g_LcdShowInfoTab[i].item)) {
 				continue;
 			}
+#endif
 			if (g_LcdShowInfoTab[i].needShowFL && g_LcdShowInfoTab[i].needShow && g_LcdShowInfoTab[i].type != LCD_SHOW_INVLAID) {
 				mmi_showLcdItem(g_LcdShowInfoTab[i], hdc);
 			}
@@ -1837,6 +1850,50 @@
 	HardwareVersionItem->font = mmi_middle_twelve_font;
 }
 
+static VOID mmi_setVersionValueTipInfo(T_LcdShowInfoItem *FirmwareVersionItem, T_LcdShowInfoItem *HardwareVersionItem, CHAR* FirmwareVersion, CHAR *HardwareVersion)
+{
+	FirmwareVersionItem->type = LCD_SHOW_TEXT;
+	FirmwareVersionItem->needShow = TRUE;
+
+	mmi_strcatStringWithPre(FirmwareVersionItem->text, FirmwareVersion, NULL, MMI_LCD_SHOW_STRING_LEN);
+	if (FirmwareVersionItem->text != NULL)
+	{
+		FirmwareVersionItem->textLen = strlen(FirmwareVersionItem->text);
+	}
+	FirmwareVersionItem->font = mmi_middle_twelve_font;
+
+	HardwareVersionItem->type = LCD_SHOW_TEXT;
+	HardwareVersionItem->needShow = TRUE;
+	if (HardwareVersionItem->text != NULL)
+	{
+		mmi_strcatStringWithPre(HardwareVersionItem->text, HardwareVersion, NULL, MMI_LCD_SHOW_STRING_LEN);
+		HardwareVersionItem->textLen = strlen(HardwareVersionItem->text);
+	}
+	HardwareVersionItem->font = mmi_middle_twelve_font;
+}
+
+static VOID mmi_setTextConnectTipInfo(T_LcdShowInfoItem *TextScanToItem, T_LcdShowInfoItem *TextConnectItem)
+{
+	TextScanToItem->type = LCD_SHOW_TEXT;
+	TextScanToItem->needShow = TRUE;
+
+	mmi_strcatStringWithPre(TextScanToItem->text, (CHAR*)tp_i18n_get_text(STRING_SCAN_TO), NULL, MMI_LCD_SHOW_STRING_LEN);
+	if (TextScanToItem->text != NULL)
+	{
+		TextScanToItem->textLen = strlen(TextScanToItem->text);
+	}
+	TextScanToItem->font = mmi_middle_twelve_font;
+
+	TextConnectItem->type = LCD_SHOW_TEXT;
+	TextConnectItem->needShow = TRUE;
+	if (TextConnectItem->text != NULL)
+	{
+		mmi_strcatStringWithPre(TextConnectItem->text, (CHAR*)tp_i18n_get_text(STRING_CONNECT), NULL, MMI_LCD_SHOW_STRING_LEN);
+		TextConnectItem->textLen = strlen(TextConnectItem->text);
+	}
+	TextConnectItem->font = mmi_middle_twelve_font;
+}
+
 static VOID mmi_setSSIDKeyTip2Info(T_LcdShowInfoItem *ssidItem, T_LcdShowInfoItem *wifikeyItem, CHAR* ssid, CHAR *wifikey)
 {
 	ssidItem->type = LCD_SHOW_TEXT;
@@ -1935,7 +1992,14 @@
 SINT32 mmi_getLcdVersionInfo(UINT32 taskInfo)
 {
 	T_zMMIVERSIONInfo *VersionInfo = (T_zMMIVERSIONInfo *)taskInfo;
-	mmi_setVersionTipInfo(&(g_LcdShowInfoTab[LCD_SHOW_FIRMWARE_VERSION]), &(g_LcdShowInfoTab[LCD_SHOW_HARDWARE_VERSION]), VersionInfo->firmware_version, VersionInfo->hardware_version);
+	mmi_setVersionTipInfo(&(g_LcdShowInfoTab[LCD_SHOW_FIRMWARE_VERSION]), &(g_LcdShowInfoTab[LCD_SHOW_HARDWARE_VERSION]), NULL, NULL);
+	mmi_setVersionValueTipInfo(&(g_LcdShowInfoTab[LCD_SHOW_FIRMWARE_VERSION_VALUE]), &(g_LcdShowInfoTab[LCD_SHOW_HARDWARE_VERSION_VALUE]), VersionInfo->firmware_version, VersionInfo->hardware_version);
+	return MMI_SUCCESS;
+}
+
+SINT32 mmi_getLcdTextConnectInfo(UINT32 taskInfo)
+{
+	mmi_setTextConnectTipInfo(&(g_LcdShowInfoTab[LCD_SHOW_TEXT_SCAN_TO]), &(g_LcdShowInfoTab[LCD_SHOW_TEXT_CONNECT]));
 
 	return MMI_SUCCESS;
 }
diff --git a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.h b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.h
index 21a1fb1..9056668 100755
--- a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.h
+++ b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd.h
@@ -78,7 +78,11 @@
 	LCD_SHOW_POWER_OFF_CHARGER	,
 
 	LCD_SHOW_FIRMWARE_VERSION,
+	LCD_SHOW_FIRMWARE_VERSION_VALUE,
 	LCD_SHOW_HARDWARE_VERSION,
+	LCD_SHOW_HARDWARE_VERSION_VALUE,
+	LCD_SHOW_TEXT_SCAN_TO,
+	LCD_SHOW_TEXT_CONNECT,
 	LCD_SHOW_LOGO,
 
 	LCD_SHOW_MAX,
diff --git a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd_page.c b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd_page.c
index 9622558..d3c9a4b 100755
--- a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd_page.c
+++ b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_lcd_page.c
@@ -88,6 +88,8 @@
 {
 	if (g_show_pagethird) {
 		g_LcdShowInfoTab[LCD_SHOW_WIFI_CODE].needShowFL = visible;
+		g_LcdShowInfoTab[LCD_SHOW_TEXT_SCAN_TO].needShowFL = visible;
+		g_LcdShowInfoTab[LCD_SHOW_TEXT_CONNECT].needShowFL = visible;
 	}
 }
 
@@ -99,7 +101,9 @@
 	mmi_set_ssid2_page_visibility(visible);
 #endif
 	g_LcdShowInfoTab[LCD_SHOW_FIRMWARE_VERSION].needShowFL = visible;
+	g_LcdShowInfoTab[LCD_SHOW_FIRMWARE_VERSION_VALUE].needShowFL = visible;
 	g_LcdShowInfoTab[LCD_SHOW_HARDWARE_VERSION].needShowFL = visible;
+	g_LcdShowInfoTab[LCD_SHOW_HARDWARE_VERSION_VALUE].needShowFL = visible;
 }
 
 static VOID mmi_set_five_page_visibility(BOOL visible)
@@ -246,6 +250,7 @@
 		mmi_set_wificode_show_flag(TRUE);
 		mmi_set_lcd_page_index(MMI_SHOW_PAGE_THIRD);
 		mmi_set_update_flag(MMI_TASK_WIFICODE);           //¶þάÂë
+		mmi_set_update_flag(MMI_TASK_TEXT_CONNECT);       // scan to connect
 	} else if (page_index == MMI_SHOW_PAGE_FOUR) {
 		mmi_set_lcd_page_index(MMI_SHOW_PAGE_FOUR);
 		mmi_set_update_flag(MMI_TASK_VERSION);            //°æ±¾ºÅ
diff --git a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_tip.c b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_tip.c
index edc1df5..79959ef 100755
--- a/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_tip.c
+++ b/lynq/MD310/ap/app/zte_comm/zte_mmi/mmi_tip.c
@@ -174,6 +174,29 @@
 	return MMI_SUCCESS;
 }
 
+SINT32 mmi_get_text_connect_info(UINT32 textinfo)
+{
+	if (textinfo != 0)
+	{
+		T_zMMITEXTCONNECTInfo * pTEXTInfo = (T_zMMITEXTCONNECTInfo *)textinfo;
+		pTEXTInfo->exist = 1;
+	}
+	return MMI_SUCCESS;
+}
+
+SINT32 mmi_RegisterTipTextConnectTaskInfoItem()
+{
+	T_zMMITaskInfoItem textConnectInfoItem = {0};
+	textConnectInfoItem.task = MMI_TASK_TEXT_CONNECT;
+	textConnectInfoItem.taskinfo = (VOID *)malloc(sizeof(T_zMMITEXTCONNECTInfo));
+	textConnectInfoItem.get_taskinfo_fun = mmi_get_text_connect_info;
+#ifndef DISABLE_LCD
+	textConnectInfoItem.get_lcdinfo_fun = mmi_getLcdTextConnectInfo;
+#endif
+	mmi_register_taskinfo_item(&textConnectInfoItem);
+	return MMI_SUCCESS;
+}
+
 SINT32 mmi_get_logoinfo(UINT32 logoinfo)
 {
 	if (logoinfo != 0)