Patent ID: 11874903
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A user interface switching method, comprising:
triggering a trusted user interface (TUI) display request of a client application (CA) according to a first operation on a CA interface of the CA by a user, wherein the CA runs on a device on which a rich execution environment and a trusted execution environment are deployed, and wherein the CA interface is a user interface that is in the rich execution environment;
switching a display environment of the CA from the rich execution environment to the trusted execution environment;
displaying a trusted application (TA) interface of the CA in the trusted execution environment, wherein the TA interface is used for sensitive information input; and
wherein the device comprises a display-related hardware device, the display-related hardware device is configured to display the CA interface and the TA interface, and switching the display environment of the CA from the rich execution environment to the trusted execution environment comprises:
controlling, according to the TUI display request of the CA by using a first driver that is of the display-related hardware device and that is in the rich execution environment, the display-related hardware device to exit a current non-secure mode, wherein the non-secure mode is a running mode that corresponds to the display-related hardware device and that is in the rich execution environment;
after the display-related hardware device exits the non-secure mode, generating, by the first driver in the rich execution environment, first switching information, wherein the first switching information indicates that the display-related hardware device has exited the non-secure mode; and
controlling, according to the first switching information by using a second driver that is of the display-related hardware device and that is in the trusted execution environment, the display-related hardware device to enter a secure mode, wherein the secure mode is a running mode that corresponds to the display-related hardware device and that is in the trusted execution environment.