MdeModulePkg/DisplayEngine: Popup dialogue when password is not supported

when the password is not supported, pop up a dialogue
to let user know the reason.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Dandan Bi 2016-11-15 19:10:59 +08:00 committed by Star Zeng
parent 339c6e905a
commit 88f0c4e29c
4 changed files with 15 additions and 3 deletions

View File

@ -153,6 +153,7 @@ CHAR16 *gConfirmOptYes;
CHAR16 *gConfirmOptNo; CHAR16 *gConfirmOptNo;
CHAR16 *gConfirmMsgConnect; CHAR16 *gConfirmMsgConnect;
CHAR16 *gConfirmMsgEnd; CHAR16 *gConfirmMsgEnd;
CHAR16 *gPasswordUnsupported;
CHAR16 gModalSkipColumn; CHAR16 gModalSkipColumn;
CHAR16 gPromptBlockWidth; CHAR16 gPromptBlockWidth;
CHAR16 gOptionBlockWidth; CHAR16 gOptionBlockWidth;
@ -248,6 +249,7 @@ InitializeDisplayStrings (
gConfirmOptNo = GetToken (STRING_TOKEN (CONFIRM_OPTION_NO), gHiiHandle); gConfirmOptNo = GetToken (STRING_TOKEN (CONFIRM_OPTION_NO), gHiiHandle);
gConfirmMsgConnect = GetToken (STRING_TOKEN (CONFIRM_OPTION_CONNECT), gHiiHandle); gConfirmMsgConnect = GetToken (STRING_TOKEN (CONFIRM_OPTION_CONNECT), gHiiHandle);
gConfirmMsgEnd = GetToken (STRING_TOKEN (CONFIRM_OPTION_END), gHiiHandle); gConfirmMsgEnd = GetToken (STRING_TOKEN (CONFIRM_OPTION_END), gHiiHandle);
gPasswordUnsupported = GetToken (STRING_TOKEN (PASSWORD_NOT_SUPPORTED ), gHiiHandle);
} }
/** /**
@ -301,6 +303,7 @@ FreeDisplayStrings (
FreePool (gConfirmOptNo); FreePool (gConfirmOptNo);
FreePool (gConfirmMsgConnect); FreePool (gConfirmMsgConnect);
FreePool (gConfirmMsgEnd); FreePool (gConfirmMsgEnd);
FreePool (gPasswordUnsupported);
} }
/** /**

View File

@ -1,7 +1,7 @@
/** @file /** @file
FormDiplay protocol to show Form FormDiplay protocol to show Form
Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution. the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at The full text of the license may be found at
@ -58,6 +58,7 @@ extern CHAR16 *gMiniString;
extern CHAR16 *gOptionMismatch; extern CHAR16 *gOptionMismatch;
extern CHAR16 *gFormSuppress; extern CHAR16 *gFormSuppress;
extern CHAR16 *gProtocolNotFound; extern CHAR16 *gProtocolNotFound;
extern CHAR16 *gPasswordUnsupported;
extern CHAR16 gPromptBlockWidth; extern CHAR16 gPromptBlockWidth;
extern CHAR16 gOptionBlockWidth; extern CHAR16 gOptionBlockWidth;

View File

@ -1,6 +1,6 @@
// *++ // *++
// //
// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
// This program and the accompanying materials // This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License // are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at // which accompanies this distribution. The full text of the license may be found at
@ -117,3 +117,6 @@
#language fr-FR "Reconnect is required, exit and reconnect" #language fr-FR "Reconnect is required, exit and reconnect"
#string GET_TIME_FAIL #language en-US " Get date/time fail, display ??." #string GET_TIME_FAIL #language en-US " Get date/time fail, display ??."
#language fr-FR " Get data/time fail, display ??." #language fr-FR " Get data/time fail, display ??."
#string PASSWORD_NOT_SUPPORTED #language en-US "Unsupported! Because no interactieve flag or no ConfigAccess protocol!"
#language fr-FR "Unsupported! Because no interactieve flag or no ConfigAccess protocol!"

View File

@ -814,6 +814,11 @@ PasswordProcess (
// //
// Password can't be set now. // Password can't be set now.
// //
if (Status == EFI_UNSUPPORTED) {
do {
CreateDialog (&Key, gEmptyString, gPasswordUnsupported, gPressEnter, gEmptyString, NULL);
} while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
}
FreePool (StringPtr); FreePool (StringPtr);
return EFI_SUCCESS; return EFI_SUCCESS;
} }