diff --git a/bootable/bootloader/edk2/QcomModulePkg/Include/Library/MenuKeysDetection.h b/bootable/bootloader/edk2/QcomModulePkg/Include/Library/MenuKeysDetection.h
old mode 100644
new mode 100755
index 48cf21d..3c9a0f5
--- a/bootable/bootloader/edk2/QcomModulePkg/Include/Library/MenuKeysDetection.h
+++ b/bootable/bootloader/edk2/QcomModulePkg/Include/Library/MenuKeysDetection.h
@@ -33,6 +33,10 @@
EFI_STATUS EFIAPI
MenuKeysDetectionInit (IN void *mMsgInfo);
+
+EFI_STATUS EFIAPI
+MenuKeysDetectionInitExt (IN void *mMsgInfo);
+
VOID ExitMenuKeysDetection (VOID);
VOID WaitForExitKeysDetection (VOID);
#endif /* __PLATFORM_MENU_KEYS_DETECTION_H */
diff --git a/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/MenuKeysDetection.c b/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/MenuKeysDetection.c
index ecc9d21..cb66b8b 100755
--- a/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/MenuKeysDetection.c
+++ b/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/MenuKeysDetection.c
@@ -447,5 +447,40 @@ MenuKeysDetectionInit (IN VOID *mMenuInfo)
if (!EFI_ERROR (Status) && CallbackKeyDetection)
StartKeyDetectTimer ();
}
+
+ return Status;
+}
+
+EFI_STATUS EFIAPI
+MenuKeysDetectionInitExt (IN VOID *mMenuInfo)
+{
+ EFI_STATUS Status = EFI_SUCCESS;
+ OPTION_MENU_INFO *MenuInfo = mMenuInfo;
+
+ if (IsEnableDisplayMenuFlagSupported ()) {
+ StartTimer = GetTimerCountms ();
+
+ /* Close the timer and event firstly */
+ if (CallbackKeyDetection) {
+ gBS->SetTimer (CallbackKeyDetection, TimerCancel, 0);
+ gBS->CloseEvent (CallbackKeyDetection);
+ }
+
+ /* Create event for handle key status */
+ Status =
+ gBS->CreateEvent (EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
+ MenuKeysHandler, MenuInfo, &CallbackKeyDetection);
+ DEBUG ((EFI_D_VERBOSE, "Create keys detection event: %r\n", Status));
+
+ if (MenuPagesAction[MenuInfo->Info.MenuType].Up_Action_Func != NULL)
+ MenuPagesAction[MenuInfo->Info.MenuType].Up_Action_Func (MenuInfo);
+
+ if (MenuPagesAction[MenuInfo->Info.MenuType].Enter_Action_Func != NULL)
+ MenuPagesAction[MenuInfo->Info.MenuType].Enter_Action_Func (MenuInfo);
+
+ if (!EFI_ERROR (Status) && CallbackKeyDetection)
+ StartKeyDetectTimer ();
+ }
+
return Status;
}
diff --git a/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/UnlockMenu.c b/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/UnlockMenu.c
old mode 100644
new mode 100755
index 45dbbf5..408141a
--- a/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/UnlockMenu.c
+++ b/bootable/bootloader/edk2/QcomModulePkg/Library/BootLib/UnlockMenu.c
@@ -320,7 +320,8 @@ DisplayUnlockMenu (INTN Type, BOOLEAN Value)
return Status;
}
- MenuKeysDetectionInit (OptionMenuInfo);
+ MenuKeysDetectionInitExt (OptionMenuInfo);
+
DEBUG ((EFI_D_VERBOSE, "Creating unlock keys detect event\n"));
} else {
DEBUG ((EFI_D_INFO, "Display menu is not enabled!\n"));
ANDROID R 没有音量键,如何fastboot flashing unlock
最新推荐文章于 2024-06-03 14:58:55 发布