| CPC G06F 1/3265 (2013.01) [G06F 1/3231 (2013.01); G06F 3/0488 (2013.01); G06V 40/18 (2022.01)] | 20 Claims |

|
1. An electronic device, comprising:
one or more processors, a memory, and a fingerprint sensor; and
one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device is enabled to perform the following steps:
when the electronic device is in a screen-off state, receiving a first user operation;
changing from the screen-off state to a screen-on state in response to the received first user operation;
receiving a user input enabling a keep screen on while looking feature, where the keep screen on while looking feature enables a user to change the electronic device from a half-screen-off state to a screen-on state, wherein the half-screen-off state is a state in which a screen of the electronic device is darkened with a second brightness that is lower than a first brightness of the screen-on state;
when the electronic device is in the screen-on state, no user operation is received within first duration, and an optical proximity sensor of the electronic device meets a preset condition, starting first detection while the keep screen on while looking feature is enabled, wherein the preset condition corresponding to the optical proximity sensor is that the optical proximity sensor is not shielded;
detecting biometric feature information in the first detection;
at a first moment in the first detection, changing, by the electronic device, from the screen-on state to a half-screen-off state; and
detecting first target biometric feature information at a second moment in the first detection, and changing, by the electronic device, from the half-screen-off state to the screen-on state;
wherein the first target biometric feature information is human eye feature information.
|