Interface display method and electronic device
By performing screen-on blocking when the terminal device wakes up the screen, first obtaining the screen direction, layout loading and interface drawing, the problem of waiting time when the device screen rotates and wakes up is solved, and faster user operation availability is achieved.
Patent Information
- Application Number
- CN202310378057.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-28
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2040-10-28
AI Technical Summary
The existing terminal device rotates after the screen is hibernated. When the screen is awakened again, multiple processes need to be performed, which leads to the user's inoperable waiting time.
By performing screen-on blocking when the user wakes up the screen, first obtains the screen direction and performs layout loading and interface drawing, and then displays on the screen after the interface is drawn, avoiding the layout loading and interface drawing process of the interface before the screen is turned off.
It greatly shortens the inoperable waiting time for users, improves the user experience, and reduces unnecessary processes and time-consuming.
Smart Images

Figure CN116389640B_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202011176906.0, and the original application date is October 28, 2020. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of terminals, and more specifically, to an interface display method and electronic device. Background Art
[0003] Currently, interfaces of most terminal devices (such as mobile phones, tablets, etc.) can be rotated based on the rotation of the screen direction if supported by the application, so as to accommodate users' horizontal or vertical viewing.
[0004] One possible scenario is that the screen of the terminal device rotates after the screen goes into sleep mode. After the screen wakes up, the terminal device usually displays the interface before the screen is rotated, and then switches to the interface after the screen is rotated by playing the screen rotation animation. For example, the mobile phone screen is in portrait mode before it goes into sleep mode. Before the screen is woken up, if the screen of the mobile phone is rotated 90°, that is, rotated to landscape mode, once the screen is woken up, the mobile phone usually loads the layout of the portrait mode first, draws the interface, and then displays it; then calculates the screen direction, and when it is determined that the screen has been rotated to landscape mode, loads the layout of the landscape mode, draws the interface; finally, loads and plays the screen rotation animation. The entire process may take a long time, and users cannot perform screen operations for a long time after the mobile phone screen is woken up. Summary of the invention
[0005] The embodiments of the present application provide a method for interface display and an electronic device, so as to shorten the waiting time during which the user cannot perform any operations when the screen of the electronic device rotates after the screen is turned off and then the screen is woken up again.
[0006] In a first aspect, the present application provides a method for displaying an interface, which can be executed by an electronic device, or can also be executed by a processor configured in the electronic device. The embodiments of the present application are not limited to this.
[0007] Exemplarily, the method includes: in response to a user's screen wake-up operation on the electronic device, performing screen light interception to prevent the screen from lighting up; drawing an interface adapted to the screen direction; canceling the screen light interception and displaying the interface based on the screen direction.
[0008] Based on the above solution, after the screen is turned off, the electronic device can detect the user's screen wake-up operation, and temporarily not turn on the screen for display. Instead, it can first obtain the screen direction, load the layout and draw the interface based on the screen direction to obtain an interface suitable for the current screen direction. After completing the interface drawing, the electronic device can turn on the screen to display the interface. In this way, the user can directly perform operations after the screen is turned on, and the waiting time when the user cannot perform operations is greatly shortened.
[0009] In combination with the first aspect, in some possible implementations, before intercepting the screen being on in response to a user's screen wake-up operation on the electronic device, the method further includes: when the screen direction of the electronic device is a first direction, entering screen sleep.
[0010] One possible scenario is that when the screen direction of the electronic device is a first direction, a screen-off operation of the electronic device by the user is detected; and in response to the screen-off operation of the electronic device by the user, the screen enters screen sleep.
[0011] It should be understood that the user can use different operation methods to turn off the screen. This application does not limit the specific operation method of the user's screen turning off operation.
[0012] Another possible situation is that when the screen direction of the electronic device is the first direction, the electronic device automatically enters screen sleep because the standby time reaches a preset threshold.
[0013] It should be understood that the present application does not limit the triggering conditions for an electronic device to enter screen sleep.
[0014] In combination with the first aspect, in some possible implementations, when the screen direction of the electronic device is turned to a second direction, a screen wake-up operation performed by the user on the electronic device is detected.
[0015] It should be understood that the user can use different operation modes to wake up the screen. The present application does not limit the specific operation mode of the screen wake-up operation.
[0016] Based on the above scheme, when the screen of the electronic device is rotated after being turned off, even if the user's screen wake-up operation is detected, the electronic device can directly display an interface that can adapt to the screen direction after the screen is turned on.
[0017] In contrast, in current technology, if the screen of an electronic device rotates after the screen is turned off, once the user's screen wake-up operation is detected, it is necessary to execute the layout loading and interface drawing of the interface before the screen is turned off, as well as the loading and playing of the screen rotation animation and other processes. However, by adopting the solution provided by the present application, the layout loading and interface drawing of the interface before the screen of the electronic device is turned off, as well as the loading and playing of the screen rotation animation and other processes can be omitted, greatly shortening the waiting time when the user cannot operate.
[0018] In combination with the first aspect, in some possible implementations, before drawing the interface adapted to the screen direction, the method further includes: acquiring the screen direction of the electronic device.
[0019] Optionally, acquiring the screen direction of the electronic device includes: collecting data in real time through a sensor; and calculating the screen direction based on the collected data.
[0020] By collecting data in real time through sensors and calculating the screen direction in real time based on the collected data, the waiting time for subsequent acquisition of the screen direction can be reduced.
[0021] It should be understood that real-time data collection through sensors is only one possible implementation method. With the development of technology, when the response speed of the sensor is improved, for example, when data collection, reporting and screen direction calculation can be completed within 10 milliseconds (ms), the electronic device can also trigger the sensor to collect and report data when the user's screen wake-up operation is detected, and then calculate the screen direction. This can reduce the high power consumption caused by real-time data collection and calculation in the background.
[0022] Optionally, the sensor is a gravity sensor.
[0023] It should be understood that using a gravity sensor to collect data for calculating the screen direction is only one possible implementation method and should not constitute any limitation to the embodiments of the present application. The present application does not exclude the possibility of using other sensors to collect data for calculating the screen direction.
[0024] In combination with the first aspect, in some possible implementations, the screen lighting interception includes: setting the backlight brightness of a backlight panel used to provide light source for the screen to a first brightness value so that the screen is black.
[0025] Optionally, the first brightness value is 0. Alternatively, the first brightness value may also be a smaller value.
[0026] It should be understood that the purpose of setting the backlight brightness of the backlight panel to the first brightness value is to make the backlight panel unable to provide sufficient light source for the screen, so that the screen cannot display the interface normally. For the user, when the backlight brightness of the backlight panel is set to the first brightness value, the screen is black.
[0027] In combination with the first aspect, in some possible implementations, the releasing of the screen light blocking includes: setting the backlight brightness of the backlight panel to a second brightness value so that the screen lights up, and the second brightness value is greater than the first brightness value.
[0028] It should be understood that the purpose of setting the backlight brightness of the backlight panel to the second brightness value is to enable the backlight panel to provide sufficient light source for the screen so that the screen can display the interface normally. For the user, when the backlight brightness of the backlight panel is set to the second brightness value, the screen is lit and the user can view the screen interface normally.
[0029] It should also be understood that implementing screen-on interception and releasing screen-on interception by backlight brightness is only one possible implementation method, and the present application does not exclude the possibility of implementing screen-on interception and releasing screen-on interception by other possible methods.
[0030] In a second aspect, an electronic device is provided, wherein the electronic device is used to execute the method in the first aspect and any possible implementation of the first aspect. The electronic device may include various modules or units for executing the method in the first aspect and any possible implementation of the first aspect. It should be understood that the various modules or units can implement corresponding functions by executing computer programs.
[0031] According to a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the processor is used to execute program instructions in the memory, so that the electronic device implements the method in the first aspect and any possible implementation manner of the first aspect.
[0032] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a computer or a processor, it is used to implement the method in the first aspect and any possible implementation manner of the first aspect.
[0033] In a fifth aspect, a computer program product is provided, wherein the computer program product comprises instructions, and when the instructions are executed, the computer executes the method in the above-mentioned first aspect and any possible implementation manner of the first aspect.
[0034] In a sixth aspect, a system on a chip or a system chip is provided, and the system on a chip or the system chip can be applied to an electronic device, and the system on a chip or the system chip comprises: at least one communication interface, at least one processor, and at least one memory, and the communication interface, the memory and the processor are interconnected through a bus, and the processor executes instructions stored in the memory, so that the electronic device can execute the method in the above-mentioned first aspect and any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a structural schematic diagram of an electronic device applicable to the interface display method provided in the embodiment of the present application;
[0036] Figure 2It is a structural block diagram of software and hardware of an electronic device applicable to the interface display method provided in the embodiment of the present application;
[0037] Figure 3 It is a schematic diagram of the process performed by an electronic device when the screen is turned off and then awakened when the screen is in sleep mode;
[0038] Figures 4 to 6 is a schematic diagram of an interface provided by an embodiment of the present application;
[0039] Figure 7 are the x-axis, y-axis and z-axis directions of the electronic device provided in the embodiment of the present application;
[0040] Figures 8 to 10 It is a schematic flowchart of the method for interface display provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0042] The method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, personal computers (PC), ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), distributed devices, etc. The embodiment of the present application does not impose any limitation on the specific type of electronic devices.
[0043] In addition, the methods described in the embodiments of the present application can support operating environments such as Linux, Android, Harmony operating system (Harmony OS), Mac, iOS, Windows, and IoT operating systems (such as LiteOS). The embodiments of the present application do not impose any limitation on this.
[0044] For example, Figure 1 1 shows a schematic diagram of the structure of the electronic device 100. Figure 1As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0045] It is to be understood that the structure illustrated in the present application does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0046] The processor 110 may include one or more processing units, for example, the processor 110 may include one or more of an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0047] The application processor outputs sound signals through the audio module 170 (such as the speaker 170A, etc.), or displays images or videos through the display screen 194.
[0048] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0049] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0050] The processor 110 can perform different operations to achieve different functions by executing instructions. The instructions can be, for example, instructions pre-stored in the memory before the device leaves the factory, or instructions read from the APP after the user installs a new application (APP) during use, and the embodiments of the present application do not impose any limitation on this.
[0051] The execution of the method for interface display provided in the embodiment of the present application can be controlled by the processor 110 or completed by calling other components, such as calling the processing program of the embodiment of the present application stored in the internal memory, or calling the processing program of the embodiment of the present application stored in the third-party device through the external memory interface, to control the display screen to temporarily not light up the screen display, and light up the screen display after the interface drawing is completed in the correct screen direction. In the case where the screen rotates after the electronic device turns off the screen, unnecessary processes can be reduced, such as the layout loading and interface drawing process of the interface before turning off the screen, and the loading and playing process of the screen rotation animation, so as to shorten the user waiting time and improve the user experience. The processor 110 may include different devices. For example, when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the interface display method provided in the embodiment of the present application, such as part of the algorithm in the interface display method is executed by the CPU, and another part of the algorithm is executed by the GPU to obtain faster processing efficiency.
[0052] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.
[0053] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0054] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0055] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0056] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0057] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0058] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0059] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0060] It is understandable that the interface connection relationship between the modules illustrated in the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0061] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0062] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0063] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0064] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0065] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0066] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0067] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0068] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), fifth generation (5G) communication system, BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a BeiDou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0069] The electronic device 100 can realize the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0070] The display screen 194, which may also be referred to as a screen, may be used to display images, videos, and the like. The display screen 194 may include a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini LED (Mini LED), a micro LED (Micro LED), a micro-OLED (Micro-OLED), a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include one or more display screens 194.
[0071] It should be understood that the display screen 194 may also include more components, such as a backlight panel, a drive circuit, etc. The backlight panel may be used to provide a light source, and the display panel emits light based on the light source provided by the backlight panel. The drive circuit may be used to control whether the liquid crystal of the liquid crystal layer is light-transmissive or light-impermeable.
[0072] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0073] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0074] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include one or more cameras 193.
[0075] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0076] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0077] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0078] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0079] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0080] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0081] The acceleration sensor 180E can detect the magnitude of acceleration in various directions (generally three axes) of the electronic device 100. When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected.
[0082] The acceleration sensor 180E can also be used to identify the posture of the electronic device, and is applied to applications such as horizontal and vertical screen switching and pedometers. The gravity sensor used to calculate the screen direction of the electronic device described below is a type of acceleration sensor 180E. The numerical unit of the gravity sensor is generally gravitational acceleration g = 9.8 meters per second squared (m / s 2 ) to make a plan.
[0083] The touch sensor 180K may also be referred to as a "touch panel". The touch sensor 180K may be provided on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch screen". In a specific implementation, the touch sensor 180K may be used to detect a touch operation applied thereto or thereabout. The touch sensor may transmit the detected touch operation to the application processor to determine the type of touch event. The touch sensor 180K may also provide visual output related to the touch operation through the display screen 194.
[0084] In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194. For example, the touch sensor 180K may be disposed on a power button (or power button), and the user may simultaneously wake up the screen and perform fingerprint recognition by pressing the power button.
[0085] The key 190 includes a power key (or switch key, power key), a volume key, etc. The key 190 can be a mechanical key or a touch key. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100. For example, in an embodiment of the present application, the user can realize the screen sleep and screen wake-up functions by pressing or touching the power key 190.
[0086] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0087] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0088] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support one or more SIM card interfaces. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0089] It is to be understood that the structure illustrated in the present application does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0090] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. This application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 100. Among them, this application does not limit the type of operating system of the electronic device. For example, Android system, Hongmeng OS, etc.
[0091] Figure 2 It is a structural block diagram of software and hardware of an electronic device suitable for the method provided in the embodiment of the present application.
[0092] like Figure 2 As shown, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
[0093] The application layer can include a series of application packages. Figure 2 As shown, the application layer may include lock screen applications, desktop applications, etc. Desktop applications may further include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, game, shopping, travel, instant messaging (such as short messages, WeChat, etc.), smart home, device control, etc.
[0094] Among them, smart home applications can be used to control or manage home appliances with networking functions. For example, home appliances can include electric lights, televisions, and air conditioners. For another example, home appliances can also include anti-theft door locks, speakers, sweeping robots, sockets, body fat scales, desk lamps, air purifiers, refrigerators, washing machines, water heaters, microwave ovens, rice cookers, curtains, fans, televisions, set-top boxes, doors and windows, etc.
[0095] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2As shown, the application framework layer may include input management service (IMS), display policy service, power management service (PMS), display management service (DMS), activity management service, resource management service, content provision service, view system, phone management service, notification management service, window management service, process management service, drawing service, etc. The embodiments of the present application do not impose any restrictions on this.
[0096] The window management service can be used to manage window programs. The window management service can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0097] Content provisioning services can be used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0098] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0099] The call management service is used to provide communication functions of the electronic device 100, such as the management of call status (including answering, hanging up, etc.).
[0100] The resource management service provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0101] The notification management service enables applications to display notification information in the status bar. It can be used to convey notification-type messages, and can stay for a short time and then disappear automatically without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0102] The drawing service can be used to draw the interface. For example, the drawing service can convert the application layout and resources into a format that can be recognized by the display service of the kernel layer. The drawing service can send the drawn interface to the display service of the kernel layer, thereby realizing the display of the drawn interface.
[0103] The Android runtime can include core libraries and virtual machines. The Android runtime is responsible for scheduling and management of the Android system.
[0104] The core library can include two parts: one part is the function that needs to be called by the Java language, and the other part is the core library of the Android system.
[0105] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0106] The system library may include multiple functional modules, such as status monitoring services, surface managers, media libraries, 3D graphics processing libraries (eg, OpenGL ES), 2D graphics engines (eg, SGL), etc.
[0107] The status monitoring service is used to determine the specific orientation of the mobile phone, the physical state of the flexible screen, etc. based on the monitoring data reported by the kernel layer. The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D (3D) layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.
[0108] The kernel layer is a layer between hardware and software. The kernel layer at least includes power management services, sensor services (also called sensor drivers), display services (also called display drivers), camera drivers, audio drivers, etc. The present application embodiment does not impose any restrictions on this.
[0109] Still Figure 2 As shown, the system library and kernel layer below the application framework layer can be called the bottom system. The bottom system includes a bottom display system for providing display services, for example, the bottom display system includes a display driver in the kernel layer and a surface manager in the system library.
[0110] Below the underlying system is the hardware, which provides the basis for software operation. Figure 2 As shown, the hardware of the electronic device may include, but is not limited to, a power button, a sensor, a display screen, a fingerprint, a camera, etc.
[0111] For the convenience of explanation in the following embodiments, the application framework layer may be referred to as the framework layer, and the application layer may be referred to as the application layer.
[0112] Since most current electronic devices support horizontal or vertical viewing to meet different user needs, in most cases, when the screen of an electronic device is turned when the screen is dormant and then the screen is woken up, for example, the screen is turned off in vertical mode and woken up after turning to horizontal mode, the user may need to wait for a long time before being able to perform screen operations.
[0113] For ease of understanding, Figure 3 The figure shows the process that the electronic device may perform when the screen is turned off and then awakened when the screen is dormant. Figure 3 As shown, the electronic device may respectively go through the layout loading and drawing process before the screen is turned off, the screen direction calculation process, the layout loading and drawing process after the screen is turned, and the loading and playing process of the screen turning animation.
[0114] Figure 3 The above process is described from the perspective of the interaction between the various layers of the software of the electronic device and the interaction with the hardware. Figure 3 Steps 301 to 308 are shown. Among them, step 303 is the layout loading and interface drawing process of the electronic device before the screen is turned off, steps 304 to 305 are the screen direction calculation process, step 306 is the layout loading and drawing process after the screen is turned on, and steps 307 to 308 are the loading and playing process of the screen turning animation. The following is a detailed description Figure 3 Each step in .
[0115] In step 301, in response to a user pressing a power button, the electronic device reports a key event to the kernel layer.
[0116] It should be understood that pressing the power button is one possible way for the user to wake up the screen, and the user can also wake up the screen through other operations.
[0117] Here, waking up the screen means making the screen that was originally in a dormant state light up again, and the user can then perform screen operations based on the awakened screen.
[0118] In step 302, the kernel layer reports the key event to the framework layer.
[0119] In step 303, the framework layer loads the layout of the interface before the screen is turned off and draws the interface based on the key events reported by the kernel layer.
[0120] Here, turning off the screen can also be called screen extinguishing or screen hibernation.
[0121] It should be understood that an electronic device may be running an application in the foreground before the screen is turned off, such as using the settings function, playing videos, using WeChat, etc. The interface shows the status of an application being opened, such as Figure 4 As shown in the figure, the interface shows an example of the setting function being turned on; the electronic device may not have opened the application before the screen is turned off, and the interface shows the desktop icon, such as Figure 5 As shown, the interface displays an example of desktop icons when the screen is displayed in portrait mode.
[0122] The framework layer can interact with the application layer to determine whether the interface before the screen is turned off is the running interface of a certain application or the interface of the desktop icon, and then load the layout and draw the interface according to the interface after the layout is loaded. The interface drawn this time is recorded as interface 1. For example, Figure 6 The interface shown in a) is an example of an interface displayed in a vertical orientation.
[0123] In step 304, the framework layer obtains the data collected by the sensor from the core layer.
[0124] Exemplarily, the framework layer may send instructions to the sensor service in the kernel layer to instruct the sensor service to control the sensor to collect data.
[0125] As mentioned above, the electronic device may include an acceleration sensor, which can be used to identify the posture of the electronic device.
[0126] In a possible implementation, the gravity sensor may report the detected data to the sensor service in the kernel layer in real time. The sensor service in the kernel layer may determine the screen direction of the electronic device based on the data reported by the gravity sensor.
[0127] The data used to calculate the screen direction may be, for example, the gravitational acceleration collected by a gravity sensor, and may specifically include the components of the gravitational acceleration in the x-axis, y-axis, and z-axis of the electronic device. The components of the gravitational acceleration in the x-axis, y-axis, and z-axis of the electronic device may be referred to as the acceleration of the electronic device in the x-axis, y-axis, and z-axis directions, respectively.
[0128] Figure 7 The x-axis, y-axis, and z-axis directions of the electronic device are shown. Figure 7 a), b), c), and d) respectively show the directions of the x-axis, y-axis, and z-axis when the screen of the electronic device is facing the user and displayed in different directions. Taking the center of the electronic device as the coordinate center, Figure 7 a) shows the positive direction of the vertical screen, that is, the normal hand-holding direction, the x-axis can be the horizontal left direction of the electronic device, the y-axis direction can be the vertical upward direction of the electronic device, and the z-axis direction can be the upward direction of the screen of the electronic device. Figure 7b) shows the direction of the horizontal screen to the left, that is, the direction obtained by rotating 90° counterclockwise from the normal hand-holding direction; Figure 7 c) in the figure shows the reverse direction of the vertical screen, that is, the electronic device is held upside down; Figure 7 d) in FIG. 5 shows the direction of the horizontal screen to the right, that is, the direction rotated 90° clockwise from the normal hand-holding direction. It can be understood that as the electronic device is flipped or rotated, the relative directions of the x-axis, y-axis and z-axis to the electronic device remain unchanged, but the x-axis value, y-axis value and z-axis value detected by the gravity sensor may change.
[0129] In step 305, the framework layer calculates the screen direction of the electronic device according to the data reported by the kernel layer.
[0130] The framework layer can calculate the vector based on the acceleration in the x-axis direction, the y-axis direction, and the z-axis direction reported by the sensor service in the kernel layer. Thereafter, the angle α between the x-axis direction and the vector r can be further calculated. For example, the angle between the x-axis direction and the vector r can be calculated by an inverse sine function, as shown in the following formula:
[0131]
[0132] Based on the calculated included angle α, the screen direction of the electronic device can be determined. The corresponding relationship between the range of the included angle α and the screen direction of the electronic device can be seen in Table 1.
[0133] Table 1
[0134]
[0135]
[0136] Since normal screen rotation by ordinary users will trigger jitter, causing sensor data to fluctuate, the sensor can calculate based on the data reported multiple times within a certain angle range to determine the screen direction.
[0137] Specifically, the framework layer can calculate the angle α based on the data reported by the sensor service each time (specifically, it may include the acceleration of the electronic device in the x-axis, y-axis and z-axis directions). If the angle α calculated multiple times based on the data reported by the sensor service multiple times is within a certain range in Table 1, it can be determined that the direction corresponding to the range is the screen direction of the electronic device.
[0138] For example, the framework layer performs multiple calculations based on the data reported by the sensor service, and the obtained angles are all between 45 and 135 degrees, thereby determining that the screen direction of the electronic device is left-side landscape.
[0139] It should be understood that the above is only for ease of understanding, and the angle between the x-axis direction and the vector r is used as an example to describe the specific implementation method of the kernel layer determining the screen direction, but this should not constitute any limitation to this application. Based on the same principle, the kernel layer can also determine the screen direction based on the angle between the y-axis direction and the vector r, but the corresponding angle may be adjusted accordingly.
[0140] In step 306, when it is determined that the electronic device has rotated its screen, the framework layer loads the layout and draws the interface again.
[0141] The framework layer can determine that the electronic device has rotated its screen according to the screen direction of the electronic device determined in step 305 and the screen direction before the screen is turned off. Thereafter, the framework layer can load the layout and draw the interface again according to the calculated screen direction.
[0142] The layout loading of the framework layer can be loaded according to the calculated screen direction. For example, the framework layer can complete the layout loading by interacting with the lock screen application, and then draw the interface after the layout loading is completed through the drawing service. The interface drawn this time is recorded as interface 2. For example, Figure 6 Interface 2 shown in b) is an example of an interface displayed horizontally on the left side.
[0143] In step 307, the framework layer loads the animation.
[0144] The framework layer can load animation based on interface 1 before the screen is turned off and interface 2 after the screen is turned on. The animation is used to realize the transition from interface 1 to interface 2.
[0145] In step 308, the framework layer plays the animation.
[0146] The framework layer sends the loaded animation to the display service in the kernel layer, and the display service then controls the display screen to play the animation. In a possible implementation, the framework layer can convert the animation into a series of instruction sets, send the instructions to the display service in chronological order, and the display service operates the display interface such as translation, rotation, and scaling according to the instructions.
[0147] Based on the above steps, the electronic device can switch the screen from interface 1 to interface 2 after the screen is turned on, and then the focus can be switched to the new interface, that is, interface 2.
[0148] However, the layout loading and interface drawing process of the electronic device interface before the screen is turned off may take about 100 milliseconds (ms). The sampling of the electronic device's sensor takes about 66.7ms, and the calculation of the screen direction takes about 130-200ms. After determining that the screen has rotated, the electronic device takes about 100ms to load the layout of the interface after the screen is rotated and the interface drawing process. In the process of loading and playing the screen rotation animation by the electronic device, the screen rotation animation loading takes about 40ms and the animation playing takes about 300ms.
[0149] It can be seen that in response to the user's operation of waking up the screen, the electronic device needs to go through two layout loading and interface drawing processes, multiple sensor sampling and screen direction calculations, and screen rotation animation loading and playback processes. The whole process takes about 606.7-676.7ms. During this period of time, the user cannot perform screen operations. In other words, the user needs to wait for a long time before they can perform screen operations, which is a poor user experience.
[0150] Based on this, the present application provides a method for interface display. After detecting the user's screen-on operation, the layout loading and interface display of the interface before the screen is turned off are not immediately performed, but the layout loading and interface display after the screen is turned off are directly drawn according to the data reported by the sensor. Therefore, the layout loading and interface drawing process of the interface before the screen is turned off, as well as the screen turning animation loading and playing process can be omitted, greatly reducing the user's waiting time.
[0151] The interface display method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0152] It should be understood that the interface display method provided in the embodiment of the present application is not limited to the case where the screen orientation of the electronic device changes, but is also applicable when the screen orientation of the electronic device does not change. For the convenience of understanding and explanation, the following description takes the scene where the screen of the electronic device changes from the first orientation before the screen is turned off to the second orientation when awakened as an example. However, this should not constitute any limitation to the present application.
[0153] Figure 8 A flowchart of a method 800 for displaying an interface provided in an embodiment of the present application. Fig. 9 The method of interface display provided by the embodiment of the present application is further illustrated from the perspective of interaction between modules of each layer of the electronic device. Figure 8 and Fig. 9 The various steps in method 800 are described in detail.
[0154] like Figure 8 As shown, the method 800 may include steps 801 to 810. Each step in the method 800 is described in detail below. Fig. 9 Marks ① to It shows the interaction information between modules in each layer.
[0155] In step 801, when the screen direction of the electronic device is a first direction, the screen enters a sleep state.
[0156] Electronic devices can enter screen sleep mode based on different trigger conditions.
[0157] One possible situation is that the user performs a screen-off operation to trigger the electronic device to enter screen sleep. In this case, step 801 may specifically include: when the screen direction of the electronic device is the first direction, the electronic device detects the user's screen-off operation on the electronic device; and in response to the screen-off operation, enters screen sleep.
[0158] The user can turn off the screen through different operations to put the screen into a dormant state. For example, the user can turn off the screen by pressing the power button; for another example, the user can turn off the screen by clicking the "lock screen" application on the desktop, etc. When the electronic device detects the user's screen-off operation on the electronic device, the screen enters a dormant state in response to the screen-off operation.
[0159] Another possible situation is that the user has not performed any operation on the electronic device for a long time, or in other words, the electronic device has not detected any operation by the user for a long time, and the electronic device is in a standby state. When the standby time of the electronic device reaches a preset threshold, the screen can automatically enter sleep mode. The value of the preset threshold can be user-defined, and the user can complete the setting of the preset threshold through the setting function. The value of the preset threshold can be, for example, 15 seconds, 30 seconds, one minute, and so on. This embodiment of the present application is not limited to this.
[0160] It can be understood that before the electronic device enters screen sleep, the interface displayed on the screen is adapted to the screen orientation. For example, before the screen of the electronic device enters sleep, the screen displays an interface adapted to the first orientation. The first orientation can be, for example, the orientation of the screen shown in FIG. Figure 6 The vertical screen is shown in a) in the figure.
[0161] In step 802, the kernel layer determines the screen direction based on the data reported in real time by the sensor.
[0162] In this embodiment, although the screen enters the sleep state, the sensor service in the kernel layer can control the sensor (such as the gravity sensor mentioned above) to collect and report data in real time. Fig. 9 As shown in ①, the sensor reports the collected data to the sensor service. As mentioned above, the data reported by the gravity sensor includes the gravitational acceleration of the electronic device in the x-axis, y-axis and z-axis directions respectively.
[0163] The sensor service in the kernel layer can calculate the screen direction in real time based on the data reported by the sensor.
[0164] The specific method for calculating the screen direction by the sensor service can be, for example, referred to in the above description in step 304. The difference is that in this embodiment, the kernel layer can calculate the screen direction according to the data reported by the sensor.
[0165] Optionally, the kernel layer can save the calculated screen direction in local memory instead of actively reporting it to the framework layer, so as to avoid the framework layer being awakened and causing unnecessary power consumption. The kernel layer can report the most recently calculated screen direction or directions to the framework layer after receiving a request from the framework layer, so that the framework layer can accurately obtain the correct screen direction.
[0166] Here, the correct screen direction may specifically refer to the current real screen direction. For example, in this embodiment, the sensor service calculates the screen direction in real time, and the screen direction calculated each time is the current screen direction, that is, the correct screen direction.
[0167] It should be understood that the method for determining the screen direction is not limited to the method provided in this application, and the kernel layer can also determine the screen direction based on other existing methods. This application does not limit the specific method for determining the screen direction.
[0168] It should also be understood that the figure is only an example, and step 802 shows the process of the sensor reporting the collected data to the kernel layer and the kernel layer calculating the screen direction. But in fact, step 802 can be performed continuously, rather than just before step 803. And step 802 can be repeated multiple times, not just once. The examples in the figure should not constitute any limitation on the embodiments of the present application. In step 803, when the screen direction of the electronic device is turned to the second direction, the user's screen wake-up operation on the electronic device is detected; and in response to the user's screen wake-up operation, the kernel layer sends a screen light request to the framework layer.
[0169] As mentioned above, the user can wake up the screen through a variety of different operations. Based on the user's operation on different hardware, each hardware in the electronic device can respond to the user's screen wake-up operation and report the user's operation to the sensor service in the kernel layer. When the kernel layer determines that the user's operation is used to wake up the screen, it can further send a screen wake-up request to the window management service in the framework layer to request the window management service to prepare for the screen wake-up.
[0170] For example, as mentioned above, the user can wake up the screen by pressing the power button. Fig. 9When the power key (also called the power button or the power key) is pressed, in response to the user's operation, the key event is reported to the power management service of the kernel layer. Fig. 9 As shown in ②, the power button reports the event to the power management service. Based on the button event, the power management service can determine that the user wants to wake up the screen, so it can further report to the window management service of the framework layer to send a screen light request. Fig. 9 As shown in ③, the power management service sends a screen light request to the window management service.
[0171] For example, users can wake up the screen by fingerprint recognition, opening a protective cover, etc. Based on different user operations, the relevant hardware can report the user's operation to the kernel layer after detecting the user's operation, and then the kernel layer sends a screen-on request to the framework layer.
[0172] In step 804, the framework layer performs bright screen interception.
[0173] Normally, after receiving a request to light up the screen, the window management service in the framework layer can perform the following operations: first, the window management service can update the power status of the devices related to the screen display, for example, updating the power status from "off" to "on"; thereafter, the window service management can power on the screen (such as LCD, etc.), and screen power-on can specifically refer to powering on the devices related to the screen display; the window service can further calculate the backlight brightness based on the interface display of the electronic device before the screen is turned off; then, the window management service can send the backlight brightness to the display service of the kernel layer, and then send the backlight brightness to the display screen through the display service, and the display screen can adjust the backlight brightness according to the backlight brightness from the display service. It should be understood that the backlight brightness can be used to provide a light source for the display panel to achieve a bright screen display.
[0174] In this embodiment, the window management service can temporarily intercept the screen after receiving the screen light request. Screen light interception specifically means that the window management service does not respond to the screen light request after receiving the screen light request, so that the screen light is delayed. Because in this embodiment, the framework layer does not load the layout of the interface and draw the interface before the screen is turned off based on the user's operation to wake up the screen. If the screen light interception is not performed, there may be no content displayed after the screen is turned on, and a flashing screen may appear.
[0175] Exemplarily, the window management service may temporarily not perform the calculation of the backlight brightness, or temporarily not send the calculated actual required backlight brightness to the display service.
[0176] In one implementation, the window management service may notify the display service that the backlight brightness is a first brightness value, such as Fig. 9As shown in ④ in . The first brightness value can be, for example, 0, or a smaller value. When the backlight panel is set to the first brightness value, the backlight panel basically does not emit light. The backlight panel described here as basically not emitting light may specifically mean that the brightness value of the backlight panel is 0, and no light source is provided, or, close to 0, the light is very weak, and it is also impossible to provide sufficient light source for the screen so that the screen can display the interface normally. In other words, when the backlight panel is set to the first brightness value, the backlight panel cannot provide the screen with a light source for normal display, the screen cannot display the interface normally, and the user cannot see the interface. For the user, when the backlight brightness of the backlight panel is set to the first brightness value, the screen is black. Thereby, screen light interception is achieved, so that the screen cannot be immediately lit based on the user's wake-up operation.
[0177] When the backlight brightness is at the first brightness value, the display service may send an instruction to the display screen to set the backlight brightness to the first brightness value, so that the display screen controls the backlight brightness to the first brightness value, that is, the backlight panel cannot provide sufficient light source to the screen so that the screen displays the interface normally. In another implementation, the window management service may not notify the display service of the backlight brightness, so that the adjustment of the backlight brightness is delayed. Since the backlight panel does not provide light source to the screen in the off state, the screen cannot display the picture. If the backlight brightness instruction is not received, the backlight panel can continue to keep the screen in the dormant state, thereby realizing screen light interception, so that the screen cannot be immediately lit based on the user's wake-up operation.
[0178] It should be understood that the embodiment of the present application does not limit the specific value of the first brightness value. As long as the backlight brightness is set so that the backlight panel does not emit light temporarily, it should fall within the protection scope of the present application.
[0179] It should also be understood that setting the backlight brightness to the first brightness value so that the backlight panel does not emit light is a possible implementation method of bright screen interception, but if there are other ways to implement bright screen interception, they can also be applied to the method provided in the embodiment of the present application, and the embodiment of the present application is not limited to this.
[0180] In step 805, the framework layer obtains the screen direction from the kernel layer.
[0181] As described in step 802, the sensor service can calculate the screen direction of the electronic device in real time. For example, the window management service in the framework layer can send a request to obtain the screen direction to the sensor service in the kernel layer based on the screen light request in step 803, such as Fig. 9 As shown in ⑤.
[0182] The sensor service can report the screen direction calculated in real time to the resource management service in the framework layer, such as Fig. 9In one possible implementation, different screen directions may be indicated by different identifiers. For example, corresponding to the four different screen directions listed in Table 1, the identifiers shown in Table 2 may be used to correspond to each of them.
[0183] Table 2
[0184] Logo direction 0 Vertical screen positive 1 Left horizontal screen 2 Reverse vertical screen 3 Right horizontal screen
[0185] The sensor service and the resource management service may pre-agree on the correspondence between the identifier and the direction as shown in Table 2. After the sensor service determines the screen direction according to the calculation result, it may report the identifier corresponding to the determined screen direction to the resource management service according to the correspondence. The resource management service may determine the screen direction according to the correspondence and the received identifier.
[0186] It should be understood that the correspondence between the identifier and the direction shown in Table 2 is only an example and should not constitute any limitation to the present application. The present application does not limit the specific manner in which the sensor service reports the screen direction.
[0187] It can be understood that the screen direction obtained by the resource management service is the screen direction determined based on the most recent calculation, or it can be the screen direction determined based on the most recent multiple calculations. The purpose of determining the screen direction based on the most recent multiple calculations is to avoid the possibility of incorrect calculations caused by possible shaking of the electronic device during the screen rotation process, which may lead to the possibility of incorrect determination of the screen direction.
[0188] For the convenience of explanation, the current screen direction obtained by the resource management service is recorded as the correct screen direction in this article. The electronic device may rotate after the screen is turned off, causing the screen direction to change; or it may not rotate and the screen direction remains unchanged. Therefore, the correct screen direction may be the same as or different from the screen direction before the screen is turned off. This embodiment of the application is not limited to this.
[0189] In step 806, the framework layer performs layout loading.
[0190] The resource management service in the framework layer can obtain resources for layout loading from the application layer according to the correct screen direction. Exemplarily, the framework layer can send the screen direction obtained in step 806 to the application layer, and the application layer can determine what kind of resources need to be loaded according to the screen direction, and then send the resources to the resource management service. The resource management service can perform layout loading based on the resources obtained from the application layer.
[0191] In a possible design, the application layer can pre-store resources corresponding to different screen directions. For example, resources for landscape display are placed in the landscape directory, and resources for portrait display are placed in the portrait directory. The application layer can send corresponding resources to the framework layer according to the screen direction indicated by the framework layer.
[0192] In addition, since the screen sizes of different models of electronic products are different, the application layer can further pre-store resources suitable for different models of electronic devices. Resources suitable for different models of electronic devices can also be saved in directories of different models. After determining the screen direction, the application layer can further load resources according to the model of the electronic device. If the electronic device currently used by the user is not within the range of pre-stored electronic device models, resources can also be loaded according to the default settings.
[0193] It is understandable that some electronic devices are provided with a lock screen interface, while some electronic devices are not provided with a lock screen interface. Based on whether a lock screen interface is provided, the resources loaded by the framework layer and the subsequent drawn interface are different.
[0194] In the case where the electronic device is provided with a lock screen interface, the interface displayed by the electronic device after the screen is turned on may be the lock screen interface. Therefore, the resource management service needs to load resources for the layout of the lock screen interface. For example, the framework layer can interact with the lock screen application to obtain resources for the layout of the lock screen interface, so as to load the layout based on the obtained resources, such as Fig. 9 As shown in ⑦ in the figure. The resources used for layout loading may include, for example, pictures (such as lock screen wallpapers), texts and other resources.
[0195] If the electronic device does not have a lock screen interface, the interface displayed by the electronic device after the screen is turned on is consistent with the content of the interface displayed before the screen is turned off. However, since the screen direction may have changed, the lock screen application can load the content of the interface displayed before the screen is turned off according to the correct screen direction.
[0196] If an electronic device is running an application in the foreground before the screen is turned off, the electronic device can obtain resources for layout loading from the application. The resources for layout loading may include, for example, icons, texts, backgrounds, and other resources in the application.
[0197] If the electronic device does not run an application in the foreground before the screen is turned off, the interface displayed before the screen is turned off is a desktop icon. The electronic device can obtain resources for layout loading from each desktop application. The resources for layout loading may include, for example, icons of each desktop application, desktop background and other resources.
[0198] In step 807, the framework layer performs interface drawing to obtain the interface to be displayed.
[0199] The drawing service of the framework layer can draw the interface based on the layout obtained by layout loading to obtain the interface to be displayed.
[0200] It can be understood that the interface to be displayed is an interface suitable for the correct screen orientation, or in other words, an interface that can adapt to the screen orientation. For example, in the present embodiment, the interface is an interface that adapts to the second orientation. In other words, when the user places the screen of the electronic device in the second orientation, or views the screen at a viewing angle adapted to the second orientation, the interface to be displayed can meet normal viewing requirements. For example, if the second orientation is the vertical screen orientation, the interface is also displayed in the vertical screen orientation, such as Figure 6 As shown in a); for example, if the second direction is the left horizontal screen, the interface is also displayed in the direction of the left horizontal screen, such as Figure 6 As shown in b).
[0201] In step 808, the framework layer sends the interface to be displayed to the kernel layer.
[0202] After drawing the interface to be displayed, the drawing service in the framework layer can send the interface to be displayed to the display service in the kernel layer, such as Fig. 9 As shown in ⑨, the display service displays the interface to be displayed through the screen.
[0203] In step 809, the framework layer releases the screen-on interception.
[0204] On the other hand, after the drawing service of the framework layer completes the interface drawing, it can send a notification of the completion of the interface drawing to the window management service, such as Fig. 9 As shown in ⑩. Based on the completion of the interface drawing, the window management service can send the calculated backlight brightness (for example, recorded as the second brightness value) to the display service of the kernel layer, such as Fig. 9 In The window management service may calculate the backlight brightness according to the application opened on the interface before the screen is turned off, so that the backlight brightness is suitable for the interface to be displayed. For example, the window management service may set the backlight brightness according to the backlight brightness before the screen is turned off.
[0205] Here, the second brightness value may be greater than the first brightness value. The second brightness value may cause the backlight panel to emit light, thereby providing sufficient light source for the screen, so that the screen can display the interface normally, and the user can see the screen interface. For the user, when the backlight brightness of the backlight panel is set to the second brightness value, the screen is lit, and the user can view the screen interface normally.
[0206] One possible design is that the second brightness value is greater than zero.
[0207] After the window management service sends the backlight brightness to the display service, the display service can further send a backlight brightness instruction to the screen to control the screen to adjust the brightness of the backlight panel, such as Fig. 9 In The backlight panel emits light based on the new backlight brightness value, thereby providing a light source for the display panel, thereby removing the bright screen interception.
[0208] It should be understood that the operation of calculating the backlight brightness by the window management service can be performed before step 809, for example, it can be performed after step 803, it can also be performed after step 808, and it can even be performed after the screen is turned off. This embodiment of the present application is not limited to this.
[0209] It should also be understood that step 809 can be executed after step 808. In this way, the display service can obtain the interface to be displayed before adjusting the backlight brightness, and then directly present the interface to be displayed after the screen is turned on.
[0210] Of course, step 809 may also be performed before step 808 or synchronously with step 808. In this case, the display service may adjust the backlight brightness after acquiring the interface to be displayed, thereby avoiding the screen flashing due to no content being displayed after the screen is lit.
[0211] In step 810, the screen lights up and displays the interface to be displayed.
[0212] The screen can adjust the brightness of the backlight panel according to the backlight brightness, and the backlight panel emits light to provide light for the display panel. The screen is thus lit up and in a bright screen state, and the interface to be displayed is displayed in the bright screen state. In this way, the user can watch the screen normally.
[0213] Based on the above scheme, after the screen is turned off, the electronic device can, based on the user's screen wake-up operation, temporarily not turn on the screen for display, but first obtain the screen direction, load the layout and draw the interface based on the screen direction to obtain an interface suitable for the current screen direction. After completing the interface drawing, the electronic device can turn on the screen to display the interface. Therefore, the electronic device can also directly display an interface that can adapt to the screen direction after turning on the screen, and the user can directly perform operations after turning on the screen.
[0214] Especially when the screen rotates after the electronic device is turned off, if the user's screen wake-up operation is detected, the layout loading and interface drawing process of the interface before the screen is turned off, as well as the loading and playing process of the screen rotation animation, can be omitted, and the corresponding time consumption can also be saved.
[0215] In addition, since the sensor reports data in real time, the sensor service can calculate the screen direction in real time. When the electronic device detects the user's wake-up screen operation, it can directly obtain the screen direction without spending extra time to calculate the screen direction, so the time-consuming calculation of the screen direction is also saved. As a result, the waiting time is greatly reduced and the user experience is greatly improved.
[0216] Even if the screen of an electronic device does not rotate after it is turned off, thanks to the real-time collection and reporting of sensors and the real-time calculation of the screen direction by sensor services, the electronic device can quickly obtain the screen direction and then load the layout and draw the interface according to the correct screen direction. Therefore, the electronic device can still light up the screen in a very short time without causing a large delay.
[0217] In another implementation, the electronic device may also collect data and calculate the screen direction in non-real time. For example, with the development of sensor technology, when the sensor has a faster response speed to the data collection and reporting instructions, the electronic device may also use a sensor with a faster response speed to collect and report data. The specific process can be found in the following combined Fig.10 Description.
[0218] Fig.10 FIG. 1 is another schematic flow chart of the method 1000 for displaying an interface provided in an embodiment of the present application. Fig.10 As shown, the method 1000 may include steps 1001 to 1009. Each step of the method 1000 is described in detail below.
[0219] In step 1001, when the screen direction of the electronic device is a first direction, the screen enters a sleep state.
[0220] In step 1002, when the screen direction of the electronic device is the second direction, a screen wake-up operation of the electronic device by a user is detected; in response to the screen wake-up operation of the user, the kernel layer sends a screen light request to the framework layer.
[0221] In step 1003, the framework layer performs screen bright interception.
[0222] It should be understood that the specific process of step 1001 to step 1003 can refer to the relevant description of step 801, step 803 and step 804 in the above method 800, and for the sake of brevity, it will not be repeated here.
[0223] In step 1004, the framework layer determines the screen direction based on the data reported by the sensor.
[0224] In one implementation, the window management service in the framework layer may send a request to obtain data to the sensor service in the kernel layer, so as to obtain data from the sensor through the sensor service. Based on the request of the window management service, the sensor service obtains data from the sensor and reports it to the window management service. The window management service may calculate the screen direction by itself according to the data reported by the sensor.
[0225] The specific method for calculating the screen direction by the window management service may be the same as the specific method for calculating the screen direction by the sensor service described above, and this embodiment of the present application does not limit this.
[0226] In addition, the specific process of the window service management in the above example to obtain the collected data from the sensor is only an example, and the embodiments of the present application are not limited to this.
[0227] In this embodiment, due to the use of sensors with faster response speeds, it is expected that data collection, reporting, and calculation of the screen direction can be completed within 10 ms. Therefore, step 802 in method 800 does not need to be executed all the time. The sensor collects and reports data in real time, and the sensor service calculates the screen direction in the background all the time, thereby reducing power consumption.
[0228] In step 1005, the framework layer performs layout loading.
[0229] In step 1006, the framework layer draws the interface to obtain the interface to be displayed.
[0230] In step 1007, the framework layer sends the interface to be displayed to the kernel layer.
[0231] In step 1008, the framework layer releases the screen-on interception.
[0232] In step 1009, the screen lights up and displays the interface to be displayed.
[0233] It should be understood that the specific process of the above steps 1005 to 1009 can refer to the relevant description of steps 806 to 810 in the above method 800, and for the sake of brevity, it will not be repeated here.
[0234] Based on the above scheme, after the screen is turned off, the electronic device can, based on the user's screen wake-up operation, temporarily not turn on the screen for display, but first obtain the screen direction, load the layout and draw the interface based on the screen direction to obtain an interface suitable for the current screen direction. After completing the interface drawing, the electronic device can turn on the screen to display the interface. Therefore, the electronic device can also directly display an interface that can adapt to the screen direction after turning on the screen, and the user can directly perform operations after turning on the screen.
[0235] Especially when the screen rotates after the electronic device is turned off, if the user's screen wake-up operation is detected, the electronic device may not execute the layout loading and interface drawing process of the interface before the screen is turned off, as well as the loading and playing process of the screen rotation animation, and the corresponding time is also saved.
[0236] In addition, since the sensor can collect and report data in a relatively short time, the sensor does not need to collect data in real time in the background, and the sensor service does not need to calculate the screen direction in real time in the background, which can greatly save power consumption. And due to the fast response of the sensor, the framework layer can obtain the screen direction in a very short time and will not cause a large delay in lighting the screen. As a result, users can perform operations after the screen is turned on, which greatly reduces waiting time and greatly improves user experience.
[0237] Even if the screen of an electronic device does not rotate after it is turned off, thanks to the fast response of the sensor, the electronic device can quickly obtain the screen direction, and then load the layout and draw the interface according to the correct screen direction. Therefore, the electronic device can still light up the screen in a very short time without causing a large delay.
[0238] It should be understood that in the above embodiments, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. For example, step 805 and step 804 in method 800 can be executed at the same time, and step 1003 and step 1004 in method 1000 can also be executed at the same time.
[0239] It should be understood that each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0240] The present application also provides an electronic device, which may include: a memory and a processor. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory so that the electronic device executes Figure 8 or Fig.10 A method according to any one of the embodiments shown.
[0241] The present application also provides a computer program product, the computer program product comprising: a computer program (also referred to as code, or instruction), when the computer program is executed, the electronic device executes Figure 8 or Fig.10 A method according to any one of the embodiments shown.
[0242] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the electronic device executes Figure 8 or Fig.10 A method according to any one of the embodiments shown.
[0243] It should be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0244] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0245] The terms "unit", "module" and the like used in this specification may be used to represent a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.
[0246] It will be appreciated by those skilled in the art that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in combination with computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0247] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0249] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0250] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0251] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for interface display, characterized in that: include: When the screen direction of the electronic device is the first direction, entering screen sleep; When the screen direction of the electronic device is turned to a second direction, detecting a screen wake-up operation of the electronic device by a user; In response to a screen wake-up operation of the electronic device by a user, performing screen light interception to prevent the screen from being lit, wherein the screen light interception includes setting the backlight brightness of a backlight panel used to provide a light source for the screen to a first brightness value to make the screen black; Draw an interface adapted to the screen orientation; Release the screen lighting interception for the screen, and display the interface based on the screen direction, wherein the release of the screen lighting interception for the screen includes setting the backlight brightness of the backlight panel to a second brightness value so that the screen is lit, and the second brightness value is greater than the first brightness value.
2. The method according to claim 1, characterized in that When the screen direction of the electronic device is a first direction, entering screen dormancy includes: When the screen direction of the electronic device is a first direction, detecting a screen-off operation of the electronic device by the user; In response to the user turning off the screen of the electronic device, the screen enters sleep mode.
3. The method according to claim 1 or 2, characterized in that Before drawing the interface adapted to the screen direction, the method further includes: Obtain the screen orientation of the electronic device.
4. The method according to claim 3, characterized in that The obtaining of the screen direction of the electronic device includes: Collect data in real time through sensors; The screen direction is calculated according to the collected data.
5. The method according to claim 4, characterized in that The sensor is a gravity sensor.
6. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to call a computer program in the memory so that the electronic device executes the method as claimed in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electronic device executes the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Terminal wakeup method and terminal
CN105739986A
Screen turn-on control method and mobile terminal
CN107071129A
Unlocking method and related product
CN108038359A
Screen brightening method and relevant equipment
CN108762814A
Screen awakening method and electronic equipment
CN110865858A