WO2022037400A1 - 一种屏幕窗口重绘方法、电子设备和计算机可读存储介质 - Google Patents

一种屏幕窗口重绘方法、电子设备和计算机可读存储介质 Download PDF

Info

Publication number
WO2022037400A1
WO2022037400A1 PCT/CN2021/110035 CN2021110035W WO2022037400A1 WO 2022037400 A1 WO2022037400 A1 WO 2022037400A1 CN 2021110035 W CN2021110035 W CN 2021110035W WO 2022037400 A1 WO2022037400 A1 WO 2022037400A1
Authority
WO
WIPO (PCT)
Prior art keywords
screen
displayed
size
current device
turned
Prior art date
Application number
PCT/CN2021/110035
Other languages
English (en)
French (fr)
Inventor
胡晚成
李依侬
王敬磊
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to US18/042,232 priority Critical patent/US20230325208A1/en
Priority to EP21857495.2A priority patent/EP4195040A4/en
Publication of WO2022037400A1 publication Critical patent/WO2022037400A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1675Miscellaneous details related to the relative movement between the different enclosures or enclosure parts
    • G06F1/1677Miscellaneous details related to the relative movement between the different enclosures or enclosure parts for detecting open or closed state or particular intermediate positions assumed by movable parts of the enclosure, e.g. detection of display lid position with respect to main body in a laptop, detection of opening of the cover of battery compartment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/03Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes specially adapted for displays having non-planar surfaces, e.g. curved displays
    • G09G3/035Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes specially adapted for displays having non-planar surfaces, e.g. curved displays for flexible display surfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/0206Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings
    • H04M1/0208Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings characterized by the relative motions of the body parts
    • H04M1/0214Foldable telephones, i.e. with body parts pivoting to an open position around an axis parallel to the plane they define in closed position
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/0206Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings
    • H04M1/0241Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings using relative motion of the body parts to change the operational status of the telephone set, e.g. switching on/off, answering incoming call
    • H04M1/0245Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings using relative motion of the body parts to change the operational status of the telephone set, e.g. switching on/off, answering incoming call using open/close detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
    • H04M1/724631User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device by limiting the access to the user interface, e.g. locking a touch-screen or a keypad
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2330/00Aspects of power supply; Aspects of display protection and defect management
    • G09G2330/02Details of power systems and of start or stop of display operation
    • G09G2330/021Power management, e.g. power saving
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2330/00Aspects of power supply; Aspects of display protection and defect management
    • G09G2330/02Details of power systems and of start or stop of display operation
    • G09G2330/021Power management, e.g. power saving
    • G09G2330/022Power management, e.g. power saving in absence of operation, e.g. no data being entered during a predetermined time
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image

Definitions

  • the present application relates to the technical field of mobile terminals, and in particular, to a screen window redrawing method, an electronic device, and a computer-readable storage medium.
  • the process of redrawing the screen window is usually when the screen A scene is off, and after the user changes the screen shape of the current device, the next time the screen is triggered to brighten the screen, the screen B scene needs to be triggered to brighten the screen, because the screen There is a difference between screen A and screen B. At this time, the scene of screen B is triggered to brighten the screen. Due to the difference in hardware screen size, redrawing the window of the display area of screen B will cause the problem of multiplying the screen brightening time.
  • the present application provides a screen window redrawing method, an electronic device and a computer-readable storage medium, which can identify the screen shape change in the off-screen state and complete the window redrawing in advance, thereby shortening the screen-on time and improving the performance of the screen. Screen window redraw efficiency.
  • an embodiment of the present application provides a method for redrawing a screen window, including:
  • the screen to be displayed is determined according to the screen shape information after the screen is turned off;
  • the window of the screen to be displayed is redrawn according to the acquired size of the display area of the screen to be displayed.
  • detecting whether the screen shape of the current device has changed by obtaining the screen shape information before the screen is turned off and the screen shape information after the screen is turned off including:
  • the screen shape information after the screen is off includes the screen angle and the vertical component of gravity
  • the screen to be displayed is determined according to the screen shape information after the screen is turned off, including:
  • the device state of the current device is determined, and the device state includes a folded state, a semi-expanded state or a fully expanded state;
  • the screen orientation of the current device is determined, and the display screen with the screen facing the user is determined as the to-be-displayed screen of the current device.
  • the screen size of the display screen before the screen is off is determined as the screen size of the screen to be displayed
  • the acquired setting mode of the screen to be displayed and the screen size of the screen to be displayed determine the size of the display area of the screen to be displayed, and continue to perform the process of performing the process based on the acquired size of the display area of the screen to be displayed. Describe the step of redrawing the window of the screen to be displayed, and the setting mode is used to indicate the running scene of the current device;
  • the acquired setting mode of the screen to be displayed and the screen size of the screen to be displayed determine the size of the display area of the screen to be displayed, and continue to perform the process of performing the process based on the acquired size of the display area of the screen to be displayed. Describe the steps of redrawing the window of the screen to be displayed.
  • an electronic device comprising:
  • a display screen ; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions for When the instruction is executed by the device, the device is caused to perform the following steps:
  • the screen to be displayed is determined according to the screen shape information after the screen is turned off;
  • the window of the screen to be displayed is redrawn according to the acquired size of the display area of the screen to be displayed.
  • the device when the instruction is executed by the device, the device is caused to specifically perform the following steps:
  • the screen shape information after the screen is off includes the screen angle and the vertical component of gravity
  • the device When the instruction is executed by the device, the device is caused to specifically perform the following steps:
  • the device state of the current device is determined, and the device state includes a folded state, a semi-expanded state or a fully expanded state;
  • the screen orientation of the current device is determined, and the display screen with the screen facing the user is determined as the to-be-displayed screen of the current device.
  • the device when the instruction is executed by the device, the device is caused to specifically perform the following steps:
  • the screen size of the display screen before the screen is off is determined as the screen size of the screen to be displayed
  • the acquired setting mode of the screen to be displayed and the screen size of the screen to be displayed determine the size of the display area of the screen to be displayed, and continue to perform the process of performing the process based on the acquired size of the display area of the screen to be displayed. Describe the step of redrawing the window of the screen to be displayed, and the setting mode is used to indicate the running scene of the current device;
  • the acquired setting mode of the screen to be displayed and the screen size of the screen to be displayed determine the size of the display area of the screen to be displayed, and continue to perform the process of performing the process based on the acquired size of the display area of the screen to be displayed. Describe the steps of redrawing the window of the screen to be displayed.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used for program code executed by a device, and the program code includes the first aspect or any of the first aspect. Instructions for a method in a possible implementation.
  • the screen shape information before the screen off and the screen shape information after the screen off are obtained to detect whether the current device is in the off-screen state.
  • the screen to be displayed is determined according to the screen shape information after the screen is turned off, and the window of the screen to be displayed is redrawn according to the acquired size of the display area of the screen to be displayed.
  • Fig. 1 is a flow chart of screen window redrawing provided by the related art
  • FIG. 2 is a flowchart of a method for redrawing a screen window provided by an embodiment of the present application
  • FIG. 3 is a flowchart of an LCD power-on provided by an embodiment of the present application.
  • 4a-4c are schematic diagrams of effects of screen window redrawing provided by an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • Fig. 1 is a flow chart of a screen window redrawing provided by the related art.
  • the user can change the screen shape of the terminal device according to the requirements. For example, the display screen of the terminal device is flipped or folded, and when the user triggers the screen brightening command next time, the terminal device receives the user's screen brightening command, determines the size of the screen to be displayed according to the screen shape, and determines the size of the screen to be displayed.
  • the window is redrawn according to the size of the window, and the screen is turned on after the last application window that was off the screen is drawn.
  • the screen brightening command may include a fingerprint unlock command and a key unlock command.
  • the screen when the user triggers the screen-on, the screen needs to be drawn after the application window that was off-screen last time is completed, thus causing the problem of increasing the screen-on time. That is to say, the process from when the user triggers the screen-on instruction to lighting the screen takes a long time.
  • a multi-screen scenario is also likely to lead to the problem of increased screen-on time.
  • the terminal device taking a terminal device with a double-sided screen as an example, the terminal device includes two display screens, screen A and screen B. When the screen is off in the scene of screen A, the user flips the terminal device and triggers a screen-on instruction.
  • the screen to be displayed is screen B at this time. Because screen B is inconsistent with the last display screen (screen A), the user triggers the screen brightening at this time. Due to the difference in hardware screen size, the window redrawing will cause the problem of multiplying the bright screen time.
  • the screen shape of the terminal device is changed in the off-screen state, the screen needs to be turned on, and the screen window of the related art is redrawn because the window is not redrawn in advance, which causes the problem of increasing the screen-on time.
  • the window redrawing is complicated, and the screen-on time is doubled, which seriously affects the user's performance.
  • the present application provides a screen window redrawing method, which solves the problem in the related art that the window redrawing is not performed in advance, resulting in an increase in the duration of the bright screen.
  • Window redrawing further causes the problem of multiplying the screen-on time, shortens the screen-on time, and improves the efficiency of screen window redrawing.
  • FIG. 2 is a flowchart of a method for redrawing a screen window provided by an embodiment of the present application. As shown in FIG. 2 , the method includes:
  • Step 102 Detect whether the current device is in an off-screen state, if yes, go to Step 104, if not, the process ends.
  • the current device may be a terminal device, such as a mobile phone terminal, a tablet computer, a laptop computer, an augmented reality (AR for short) AR/virtual reality (VR for short), or a vehicle-mounted terminal, etc. server or cloud.
  • a terminal device such as a mobile phone terminal, a tablet computer, a laptop computer, an augmented reality (AR for short) AR/virtual reality (VR for short), or a vehicle-mounted terminal, etc. server or cloud.
  • AR augmented reality
  • VR virtual reality
  • the current device may include a power-off state, a screen-off state, or a screen-on state, where the screen-off state is used to indicate that the current device is in a background working state.
  • the screen-off state is used to indicate that the current device is in a background working state.
  • the subsequent step 104 can be continued to detect whether the screen shape of the current device has changed.
  • the process ends until it is detected that the current device is in an off-screen state again, and the process is triggered.
  • Step 104 Detect whether the screen shape of the current device has changed by obtaining the screen shape information before the screen is turned off and the screen shape information after the screen is turned off.
  • the screen shape information includes a screen angle and a vertical component of gravity.
  • Screen angle is used to indicate the angle between the display screens.
  • the vertical component of gravity is used to indicate the projected size of the G component of gravity on the Z axis in the space coordinate system.
  • the screen form is used to indicate the screen posture of the current device and the change in the size ratio of the screen, wherein the screen posture may include postures such as inward folding, outward folding, and flipping.
  • the way of determining the vertical component of gravity may include: in the initial state, the direction of gravity G points to the center of the earth, that is, vertically downward, and by establishing a space coordinate system on the screen, the projection size of the G component of gravity on the Z axis is calculated, Among them, the vertical component of gravity may include positive G and negative G.
  • the screen orientation of the current device may also be determined by acquiring the vertical component of gravity. Specifically, in the initial state, the direction of gravity G points to the center of the earth, that is, vertically downward.
  • the screen orientation of the current device is determined.
  • the process of establishing a space coordinate system on the screen may include establishing an X-axis, a Y-axis and a Z-axis at a position relative to the upper left corner of the screen, wherein the Z-axis is vertically upward.
  • the gravity G component, the projection and the Z-axis size is negative G, it can be determined that the screen of the current device is facing the user; when the gravity G component, the projection and the Z-axis size are G, so that the screen of the current device can be determined. Down.
  • the screen orientation of the current device is determined by obtaining the vertical component of gravity
  • display screen the way to determine whether the screen orientation of the current device is facing the user is to capture the face through the front camera, and combine the angle of the human eye to determine whether the screen orientation of the current device is facing the user.
  • the method of eye angle judgment is not described in detail in this application, and the above-mentioned judgment process can be implemented by using the existing related technologies.
  • the method before performing step 104, the method further includes: registering a detection component, for example, registering the corresponding events of HAL and sensor through the SensorManager tool, so as to set a detection component that can detect the change of the included angle of the screen.
  • a detection component for example, registering the corresponding events of HAL and sensor through the SensorManager tool, so as to set a detection component that can detect the change of the included angle of the screen.
  • the sensor algorithm can be used to detect whether the screen shape of the current device has changed according to the obtained shape information.
  • the function: SensorManager.registerListener() can be used to register the detection component, The detection component is used to detect the screen angle and the vertical component of gravity.
  • the screen angle information can be calculated by the SensorHub detection component.
  • OnSensorChanged() monitors the screen shape of the current device in real time, accepts the screen angle and gravity vertical component reported by the detection component when the screen angle changes, and judges according to the reported screen angle and gravity vertical component. Whether the screen shape of the current device has changed.
  • OnSensorChanged() monitors the screen shape of the current device in real time, accepts the screen angle and gravity vertical component reported by the detection component when the screen angle changes, and judges according to the reported screen angle and gravity vertical component. Whether the screen shape of the current device has changed.
  • step 104 may specifically include:
  • Step 1041 Detect whether the screen shape information before the screen is turned off and the screen shape information after the screen is turned off are the same, if so, go to step 1042; if not, the process ends.
  • step 1041 to detect whether the screen shape information before the screen is turned off and the screen shape information after the screen is turned off are the same. The screen shape of the device has changed and the window redrawing conditions are met, and the next steps can be continued.
  • Step 1042 it is determined that the screen shape of the current device has changed, and step 106 is continued.
  • the screen shape information before the screen is turned off includes a screen angle of 0°, and the vertical component of gravity is negative G, that is, the screen of the current device faces upward, and the screen after the screen is turned off.
  • the screen shape information includes a screen angle of 180°, and the vertical component of gravity is negative G, that is, the screen of the current device is facing upward.
  • the screen shape of the current device before the screen is turned off is a folded state (folded inward, folded outward), and the screen posture of the current device after the screen is turned off is a fully expanded state.
  • the screen pose and screen size ratio change. For example, taking the current device including screen A and screen B as an example, when the current device is changed from a folded state to a fully unfolded state, the angle between screen A and screen B can be between 0° and 180° change between. At this time, since the included angle of the screen has changed, it can be determined that the screen shape of the current device has changed, wherein the screen shape change can be embodied as a change in the screen attitude and a change in the size ratio of the screen.
  • the screen shape information before the screen is turned off includes a screen angle of 0°
  • the vertical component of gravity is G, that is, the screen of the current device faces downward
  • the screen shape information after the screen is turned off includes the screen.
  • the angle is 180°
  • the vertical component of gravity is negative G, that is, the screen of the current device is facing upward.
  • the screen shape information including the screen angle and the vertical component of gravity is only for illustration.
  • the screen shape information may also include other parameters, which are not limited in this application.
  • Step 106 Determine the screen to be displayed according to the screen shape information after the screen is turned off.
  • the screen shape after the screen is turned off includes a screen angle and a vertical component of gravity.
  • step 106 may specifically include:
  • Step 1061 Determine the device state of the current device according to the included angle of the screen, and the device state includes a folded state, a half-expanded state, or a fully expanded state.
  • 0° ⁇ screen angle range ⁇ 180° wherein, the screen angle is determined according to the smallest particle detected by the detection component.
  • the detection accuracy is 2 degrees, it can be considered that less than 3 degrees is a folded state, That is to say, when 0° ⁇ screen angle ⁇ 3°, it is determined that the device state of the current device includes the folded state; when 3° ⁇ screen angle ⁇ 177°, it is determined that the device state of the current device includes the half-expanded state ; When 177° ⁇ screen angle ⁇ 180°, it is determined that the device state of the current device includes the fully expanded state.
  • the folded state may include an outwardly folded state and an inwardly folded state.
  • Step 1062 Determine the screen orientation of the current device according to the device state and the vertical component of gravity, and determine the display screen with the screen facing the user as the screen to be displayed on the current device.
  • the vertical component of gravity can be obtained to determine the screen orientation of the current device through the foregoing embodiment.
  • taking the current device including screen A and screen B as an example when the current device is in a fully expanded state, for example, when the screen angle between screen A and screen B is 180°, the The vertical component of gravity determines that the orientation of screen A of the current device is upward and the orientation of screen B is downward, and the display screen facing the user at this time is screen A, so screen A is determined as the screen to be displayed on the current device.
  • screen A is an inner screen and screen B is an outer screen
  • the current device is in an outwardly folded state, that is, screen A and screen
  • the screen angle between B is 0°
  • the device state at this time is the outwardly folded state, that is, it is determined by the vertical component of gravity that the display screen facing the user is the inner screen, that is, screen A, so screen A is determined.
  • screen A is an inner screen and screen B is an outer screen
  • the current device is in an inwardly folded state, that is, screen A and screen
  • the screen angle between B is 0°
  • the device state at this time is the inwardly folded state, that is, it is determined by the vertical component of gravity that the display screen facing the user is an external screen, that is, screen B, so screen B is determined.
  • Step 108 Obtain a screen identifier corresponding to the screen to be displayed.
  • the screen identifiers are unique, that is, the screen identifiers corresponding to each screen to be displayed are different.
  • the current device when it is in a folded state, it may include multiple display screens, and the ID values of the physical screens corresponding to each display screen are different.
  • the screen ID corresponding to screen A is 1, and the screen ID corresponding to screen B is 2.
  • Step 110 Determine whether the screen identification is the same as the screen identification of the display screen before the screen is turned off, if yes, go to step 112; if not, go to step 114.
  • the screen identification is the same as the screen identification of the display screen before the screen is turned off, it means that the screen to be displayed is the same as the display screen before the screen is turned off. If it is determined that the screen identification is different from the screen identification of the display screen before the screen is turned off, it means that the screen to be displayed is different from the display screen before the screen is turned off.
  • the display screen before the screen is turned off includes screen A and screen B, wherein the screen ID corresponding to screen A is 1, the screen ID corresponding to screen B is 2, and when the acquired screen ID of the screen to be displayed is 2, it indicates that the screen ID of the screen to be displayed is 2.
  • the screen ID of the display screen is not the same as the screen ID of the display screen before the screen is turned off.
  • Step 112 determine the screen size of the display screen before the screen is turned off as the screen size of the screen to be displayed, and continue to perform 116 .
  • the screen identification is the same as the screen identification of the display screen before the screen is turned off, it indicates that the screen to be displayed is the same as the display screen before the screen is turned off. Therefore, the screen size of the display screen before the screen is turned off is determined as the screen to be displayed. The screen size of the display screen. By determining the screen size of the screen to be displayed, the subsequent steps determine the size of the display area of the screen to be displayed.
  • the screen size is used to indicate the size of the display screen itself.
  • the display area size is used to indicate the size limited by user settings or device conditions. That is to say, the screen size of the screen to be displayed ⁇ the size of the display area of the screen to be displayed. For example, taking the display screen of a mobile phone as an example, usually the screen size of the mobile phone is larger than the size of the display area.
  • Step 114 determine the screen size of the screen to be displayed, and continue to execute 116
  • the screen identifiers corresponding to each display screen are different, so the screen size of each to-be-displayed screen can be queried through the screen identifiers.
  • Step 116 according to the acquired setting mode of the screen to be displayed and the screen size of the screen to be displayed, determine the size of the display area of the screen to be displayed, and continue to step 118 .
  • the screen size of the screen to be displayed can be understood as the physical screen size
  • the display area size of the screen to be displayed can be understood as the specific display area size
  • the display area size is within the range of the physical screen size
  • the setting mode is used to indicate the running scene of the current device.
  • the setting mode of the screen to be displayed may include a one-handed mode, a self-portrait collaboration mode, an interactive mode, a game mode, and the like.
  • the size of the display area of the screen to be displayed is determined to be 2/3 of the screen size of the screen to be displayed.
  • Step 118 Redraw the window of the screen to be displayed according to the acquired size of the display area of the screen to be displayed.
  • an optional solution can be set by the function: KeyguardDraw/WindowDraw, the function can redraw the window of the screen to be displayed according to the size of the display area of the screen to be displayed, and display the redraw on the area to be displayed painted content.
  • step 118 before performing step 118, it also includes: starting the liquid crystal display (Liquid Crystal Display, LCD for short) power-on process by mobilizing SetPowerModeOn(true), and locking the screen to be displayed, and continuing to perform step 118.
  • liquid crystal display Liquid Crystal Display, LCD for short
  • FIG. 3 is a schematic diagram of the LCD power-on process.
  • the started LCD power-on process includes steps 301 to 303 : set LCD—> LCD power-on starts—> LCD power-on is completed.
  • the LCD power-on process and the window redrawing process in step 118 are separately processed by two branches, that is, multi-threaded parallel processing. By processing the LCD power-on process and the window redrawing process in step 118 in parallel, the redrawing processing efficiency can be improved and the window redrawing time can be saved.
  • step 118 the method further includes: starting the LCD power-off process by mobilizing SetPowerModeOn(false).
  • step 110 a function: ScreenOff needs to be set.
  • This function is used to directly call the power-off process without setting the backlight after the window is redrawn, and wait for the next screen-on. That is to say, after step 110 is executed, no backlight is set on the to-be-displayed screen, so that the to-be-displayed screen visible to the user is completely black, so that the redrawn content can be displayed on the to-be-displayed area when the screen is turned on next time, thereby solving the problem.
  • the problem of increasing the screen-on time due to not redrawing in advance has solved the problem that the screen-on-screen time has been doubled due to the window redrawing due to the difference in hardware screen size, thereby shortening the screen-on time and improving the performance of the screen.
  • the screen window redrawing efficiency greatly improves the user experience of the current folding screen and flipping screen devices.
  • the method further includes: displaying the redrawn content on the screen to be displayed. For example, displaying the same picture on different sized display screens.
  • the screen window redrawing method of the embodiment of the present application can realize Recognizing the screen shape change in the screen state, and completing the window redrawing in advance, it solves the problem of increasing the bright screen time due to the failure of the window redrawing in the related technology. Drawing further leads to the problem of multiplying the screen-on time, shortens the screen-on time, and improves the efficiency of screen window redrawing.
  • the screen of the current device is detected by the acquired screen shape information before the screen is off and the screen shape information after the screen is off.
  • the screen to be displayed is determined according to the screen shape information after the screen is off, and the window of the screen to be displayed is redrawn according to the acquired size of the display area of the screen to be displayed, so as to realize the screen when the screen is off. Recognize the screen shape changes in the screen state, and complete the window redrawing in advance, thereby shortening the screen brightening time and improving the efficiency of screen window redrawing.
  • the screen window redrawing process of the present application can be verified through the following process:
  • Step 1 By installing a verifiable application program in the current device, and running the application program on the top visible interface, the current device screen-off operation is performed through the screen-off command.
  • Step 2 The user records the time by changing the screen shape of the current device, waits for a period of time, then records the time, lights up the screen with the fingerprint, and captures the log.
  • the screen changes are recorded through the log to detect whether a redraw is triggered, and by waiting for a period of time, the purpose is to separate the time to check for interference.
  • Step 3 Confirm and verify the life cycle status and time of the application according to the log, and determine whether to trigger the redrawing of the window when the screen is off.
  • FIG. 5 is a schematic block diagram of an electronic device 110 provided by an embodiment of the present application. It should be understood that the electronic device 110 can execute various steps in the screen window redrawing method in FIG. 2 , and in order to avoid repetition, details are not described here. As shown in FIG. 5 , the electronic device 110 includes: a detection unit 401 and a processing unit 402 .
  • the detection module 401 is used to detect whether the current device is in a screen-off state; if it is detected that the current device is in a screen-off state, the current device is detected by the acquired screen shape information before screen-off and screen shape information after screen-off. Whether the screen shape of the device has changed.
  • the processing unit 402 is configured to determine the screen to be displayed according to the screen shape information after the screen is turned off, if it is detected that the screen shape has changed; Window redraw.
  • the detection module 401 is further configured to detect whether the screen shape information before the screen is turned off and the screen shape information after the screen is turned off are the same; if it is detected that the screen shape information before the screen is turned off is the same as the The screen shape information after the screen is off is different, and it is determined that the screen shape of the current device has changed.
  • the screen shape information after the screen is off includes the screen angle and the vertical component of gravity; the processing unit 402 is further configured to determine the device state of the current device according to the screen angle, and the device state includes Folded state, semi-expanded state or fully expanded state; according to the device state and the vertical component of gravity, determine the screen orientation of the current device, and determine the display screen facing the user as the current device to be displayed Screen.
  • the processing compound 402 is further configured to obtain the screen identifier corresponding to the screen to be displayed; determine whether the screen identifier is the same as the screen identifier of the display screen before the screen is turned off; if it is determined that the screen identifier is the same as the screen identifier
  • the screen identifiers of the display screens before the screen are turned off are the same, and the screen size of the display screen before the screen is turned off is determined as the screen size of the to-be-displayed screen; according to the acquired setting mode of the to-be-displayed screen and the screen size of the to-be-displayed screen, determine obtain the size of the display area of the screen to be displayed, and continue to perform the step of redrawing the window of the screen to be displayed according to the acquired size of the display area of the screen to be displayed, and the setting mode is used to indicate the current device If it is judged that the screen identification is different from the screen identification of the display screen before the screen is off, the screen size of the to-be
  • the screen of the current device is detected by the acquired screen shape information before the screen is off and the screen shape information after the screen is off.
  • the screen to be displayed is determined according to the screen shape information after the screen is off, and the window of the screen to be displayed is redrawn according to the acquired size of the display area of the screen to be displayed, so as to realize the screen when the screen is off. Recognize the screen shape changes in the screen state, and complete the window redrawing in advance, thereby shortening the screen brightening time and improving the efficiency of screen window redrawing.
  • the electronic device 110 here is embodied in the form of functional units.
  • the term "unit” here can be implemented in the form of software and/or hardware, which is not specifically limited.
  • a “unit” may be a software program, a hardware circuit, or a combination of the two that realizes the above-mentioned functions.
  • the hardware circuits may include application specific integrated circuits (ASICs), electronic circuits, processors for executing one or more software or firmware programs (eg, shared processors, proprietary processors, or group processors) etc.) and memory, merge logic and/or other suitable components to support the described functions.
  • ASICs application specific integrated circuits
  • processors for executing one or more software or firmware programs (eg, shared processors, proprietary processors, or group processors) etc.) and memory, merge logic and/or other suitable components to support the described functions.
  • the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of 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. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
  • the embodiment of the present application further provides an electronic device, and the electronic device may be a current device or a circuit device built in the current device.
  • the device can be used to perform the functions/steps in the above method embodiments.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the electronic device 900 includes a processor 910 and a transceiver 920 .
  • the electronic device 900 may further include a memory 930 .
  • the processor 910, the transceiver 920 and the memory 930 can communicate with each other through an internal connection path to transmit control and/or data signals. Invoke and run the computer program.
  • the electronic device 900 may further include an antenna 940 for sending out the wireless signal output by the transceiver 920 .
  • the above-mentioned processor 910 and the memory 930 can be combined into a processing device, and more commonly, they are independent components, and the processor 910 is used to execute the program codes stored in the memory 930 to realize the above-mentioned functions.
  • the memory 930 may also be integrated in the processor 910 , or be independent of the processor 910 .
  • the processor 910 may correspond to the processing unit 402 in the electronic device 110 in FIG. 5 .
  • the electronic device 900 may further include one or more of an input unit 960, a display unit 970, an audio circuit 980, a camera 990, a sensor 901, etc., the audio The circuit may also include a speaker 982, a microphone 984, and the like.
  • the display unit 970 may include a display screen.
  • the above electronic device 900 may further include a power supply 950 for providing power to various devices or circuits in the current device.
  • the electronic device 900 shown in FIG. 6 can implement each process of the method embodiment shown in FIG. 2 .
  • the operations and/or functions of each unit in the electronic device 900 are respectively to implement the corresponding processes in the foregoing method embodiments.
  • the processor 910 in the electronic device 900 shown in FIG. 6 may be a system on a chip (SOC), and the processor 910 may include a central processing unit (CPU), and may further Including other types of processors, the CPU can be called the main CPU, and the neural network processor NPU 30 is mounted on the main CPU (Host CPU) as a co-processor, and tasks are assigned by the Host CPU.
  • the processor cooperates to implement the previous method flow, and each part of the processor can selectively execute a part of the software driver.
  • each part of the processors or processing units inside the processor 910 can cooperate to implement the previous method process, and the corresponding software programs of each part of the processors or processing units can be stored in the memory 930 .
  • the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on the computer, the computer is made to execute the method for redrawing the screen window shown in FIG. 2 above. each step.
  • the involved processor 910 may include, for example, a central processing unit (CPU), a microprocessor, a microcontroller or a digital signal processor, and may also include a GPU, an NPU, and an ISP.
  • CPU central processing unit
  • microprocessor a microcontroller or a digital signal processor
  • GPU graphics processing unit
  • NPU an NPU
  • ISP an ISP
  • Necessary hardware accelerators or logic processing hardware circuits may also be included, such as application-specific integrated circuits (ASICs), or one or more integrated circuits for controlling the execution of programs in the technical solution of the present application, and the like.
  • the processor may have the functionality to operate one or more software programs, which may be stored in the memory.
  • the memory may be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of storage devices that can store information and instructions
  • the dynamic storage device can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or may also be capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, etc.
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or”, which describes the association relationship of the associated objects means that there can be three kinds of relationships, for example, A and/or B, which can indicate the existence of A alone, the existence of A and B at the same time, and the existence of B alone. where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • “At least one of the following” and similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

本申请实施例提供的一种屏幕窗口重绘方法、电子设备和计算机可读存储介质的技术方案中,检测当前设备是否处于灭屏状态,若检测出当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测当前设备的屏幕形态是否发生改变,若检测出屏幕形态发生改变,根据灭屏后的屏幕形态信息确定出待显示屏幕,根据获取的待显示屏幕的显示区域大小进行待显示屏幕的窗口重绘,以实现在灭屏状态下识别屏幕形态变化,提前完成窗口重绘,从而缩短了亮屏时间,提高了屏幕窗口重绘效率。

Description

一种屏幕窗口重绘方法、电子设备和计算机可读存储介质 技术领域
本申请涉及移动终端技术领域,具体地涉及一种屏幕窗口重绘方法、电子设备和计算机可读存储介质。
背景技术
关于多屏设备或者折叠屏设备越来越受大众用户喜爱,在用户使用设备的过程中存在指纹解锁亮屏场景或者人脸解锁亮屏场景等场景,使得亮屏后直接显示用户使用的应用窗口。然而在相关技术中,对于单屏幕场景,屏幕窗口重绘的流程通常是当触发亮屏场景时,需要将上一次灭屏的应用窗口绘制完成后,才能点亮屏幕,从而造成亮屏时间增加的问题。此外,对于多屏幕场景,屏幕窗口重绘的流程通常是当屏幕A场景灭屏时,且用户改变当前设备的屏幕形态后,在下一次触发亮屏时,需触发屏幕B场景亮屏,由于屏幕A与屏幕B存在差异,此时触发屏幕B场景亮屏,容易造成因硬件屏幕尺寸差异,对屏幕B的显示区域进行窗口重绘会导致亮屏时间成倍增加问题。
发明内容
有鉴于此,本申请提供一种屏幕窗口重绘方法、电子设备和计算机可读存储介质,能够在灭屏状态下识别屏幕形态变化,提前完成窗口重绘,从而缩短了亮屏时间,提高了屏幕窗口重绘效率。
一方面,本申请实施例提供了一种屏幕窗口重绘方法,包括:
检测当前设备是否处于灭屏状态;
若检测出所述当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测所述当前设备的屏幕形态是否发生改变;
若检测出所述屏幕形态发生改变,根据所述灭屏后的屏幕形态信息确定出待显示屏幕;
根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘。
在一种可能的实现方式中,所述通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测所述当前设备的屏幕形态是否发生改变,包括:
检测所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息是否相同;
若检测出所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息不相同,确定出所述当前设备的屏幕形态发生改变。
在一种可能的实现方式中,所述灭屏后的屏幕形态信息包括屏幕夹角和重力垂直分量;
所述若检测出所述屏幕形态发生改变,根据所述灭屏后的屏幕形态信息确定出待显示屏幕,包括:
根据所述屏幕夹角,确定出当前设备的设备状态,所述设备状态包括折叠状态、半展开状态或者完全展开状态;
根据所述设备状态和所述重力垂直分量,确定出所述当前设备的屏幕朝向,并将屏幕朝向用户的显示屏幕确定为所述当前设备的待显示屏幕。
在一种可能的实现方式中,在所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘之前,包括:
获取所述待显示屏幕对应的屏幕标识;判断所述屏幕标识与灭屏前的显示屏幕的屏幕标识是否相同;
若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识相同,将灭屏前的显示屏幕的屏幕大小确定为待显示屏幕的屏幕大小;
根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤,所述设置模式用于指示当前设备的运行场景;
若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识不相同,根据所述屏幕标识,确定出所述待显示屏幕的屏幕大小;
根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤。
第二方面,本申请实施例提供了一种电子设备,设备包括:
显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行以下步骤:
检测当前设备是否处于灭屏状态;
若检测出所述当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测所述当前设备的屏幕形态是否发生改变;
若检测出所述屏幕形态发生改变,根据所述灭屏后的屏幕形态信息确定出待显示屏幕;
根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘。
在一种可能的实现方式中,当所述指令被所述设备执行时,使得所述设备具体执行以下步骤:
检测所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息是否相同;
若检测出所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息不相同,确定出所述当前设备的屏幕形态发生改变。
在一种可能的实现方式中,所述灭屏后的屏幕形态信息包括屏幕夹角和重力垂直分量;
当所述指令被所述设备执行时,使得所述设备具体执行以下步骤:
根据所述屏幕夹角,确定出当前设备的设备状态,所述设备状态包括折叠状态、半展开状态或者完全展开状态;
根据所述设备状态和所述重力垂直分量,确定出所述当前设备的屏幕朝向,并将屏幕朝向用户的显示屏幕确定为所述当前设备的待显示屏幕。
在一种可能的实现方式中,当所述指令被所述设备执行时,使得所述设备具体执行以下步骤:
获取所述待显示屏幕对应的屏幕标识;
判断所述屏幕标识与灭屏前的显示屏幕的屏幕标识是否相同;
若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识相同,将灭屏前的显示屏幕的屏幕大小确定为待显示屏幕的屏幕大小;
根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤,所述设置模式用于指示当前设备的运行场景;
若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识不相同,根据所述屏幕标识,确定出所述待显示屏幕的屏幕大小;
根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤。
第三方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质用于设备执行的程序代码,所述程序代码包括用于执行第一方面或者第一方面的任一可能的实现方式中的方法的指令。
本申请实施例提供的技术方案中,检测当前设备是否处于灭屏状态,若检测出当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测当前设备的屏幕形态是否发生改变,若检测出屏幕形态发生改变,根据灭屏后的屏幕形态信息确定出待显示屏幕,根据获取的待显示屏幕的显示区域大小进行待显示屏幕的窗口重绘,以实现在灭屏状态下识别屏幕形态变化,提前完成窗口重绘,从而缩短了亮屏时间,提高了屏幕窗口重绘效率。
附图说明
图1为相关技术所提供的一种屏幕窗口重绘的流程图;
图2是本申请一实施例所提供的一种屏幕窗口重绘方法的流程图;
图3是本申请一实施例所提供的一种LCD上电的流程图;
图4a-4c是本申请一实施例所提供的一种屏幕窗口重绘的效果示意图;
图5是本申请一实施例提供的一种电子设备的示意性框图;
图6为本申请一实施例提供的一种电子设备的结构示意图。
具体实施方式
为了更好的理解本申请的技术方案,下面结合附图对本申请实施例进行详细描述。
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,甲和/或乙,可以表示:单独存在甲,同时存在甲和乙,单独存在乙这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
图1为相关技术所提供的一种屏幕窗口重绘的流程图,如图1所示,当终端设备由亮屏状态切换至灭屏状态后,用户可根据需求改变该终端设备的屏幕形态,例如,将终端设备的显示屏幕进行翻转或者折叠等,待下次用户触发亮屏指令时,终端设备接收到用户的亮屏指令,根据屏幕形态确定出待显示屏幕的大小,并对待显示屏幕的大小进行窗口重绘,直至将上一次灭屏的应用窗口绘制完成后,再点亮屏幕,其中,亮屏指令可包括指纹解锁指令和按键解锁指令。
然而在相关技术中,当用户触发亮屏时,需要将上一次灭屏的应用窗口绘制完成后,才能点亮屏幕,从而造成增加亮屏时长的问题。也就是说,在用户触发亮屏指令至点亮屏幕的过程耗时较长。此外,在相关技术的屏幕窗口重绘流程中,对于多屏幕场景也容易导致亮屏时长增加的问题。具体地,例如,以某终端设备为双面屏为例,该终端设备包括屏幕A和屏幕B两个显示屏幕,当在屏幕A场景灭屏时,用户翻转该终端设备且触发亮屏指令时,由于用户翻转该当前设备后,已改变了待显示屏幕,例如,此时待显示屏幕为屏幕B。因屏幕B与上一次的显示屏幕(屏幕A)不一致,此时用户触发亮屏,则会因硬件屏幕尺寸差异,窗口重绘会导致亮屏时间成倍增加问题。总的来说,在灭屏状态下改变终端设备的屏幕形态后要求点亮屏幕的场景,相关技术的屏幕窗口重绘,因未提前进行窗口重绘,从而造成增加亮屏时长的问题的同时,由于显示屏幕的布局差异,导致窗口重绘复杂,造成亮屏时间成倍增加,从而严重影响用户体现。
针对上述问题,本申请提供了一种屏幕窗口重绘方法,解决了相关技术中的因未提前进行窗口重绘,造成增加亮屏时长的问题的同时,还解决了因硬件屏幕尺寸差异时进行窗口重绘进一步导致亮屏时间成倍增加问题,缩短了亮屏时间,提高了屏幕窗口重绘效率。
图2为本申请一实施例提供的一种屏幕窗口重绘方法的流程图,如图2所示,该方法包括:
步骤102、检测当前设备是否处于灭屏状态,若是,执行步骤104,若否,则流程结束。
本申请实施例中,当前设备可以是终端设备,如手机终端、平板电脑、笔记本电脑、增强现实(augmented reality,简称AR)AR/虚拟现实(virtual reality,简称VR) 或者车载终端等,还可以是服务器或者云端等。需要说明的是,本申请的终端均为具备改变屏幕形态功能的电子设备,例如,折叠屏手机或者翻转屏手机等。
本申请实施例中,当前设备可包括关机状态、灭屏状态或者亮屏状态,其中,灭屏状态用于指示当前设备处于后台工作状态。当检测到当前设备处于灭屏状态时,表明满足改变屏幕形态的条件,可继续执行后续步骤104,以检测当前设备的屏幕形态是否发生改变,当检测到当前设备未处于灭屏状态时,表明不满足改变屏幕形态的条件,则结束流程,直至重新检测到当前设备处于灭屏状态,触发该流程。
步骤104、通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测当前设备的屏幕形态是否发生改变,若是,执行步骤106,若否,则继续执行步骤102。
本申请实施例中,屏幕形态信息包括屏幕夹角和重力垂直分量。屏幕夹角用于指示显示屏幕之间的夹角。重力垂直分量用于指示重力G分量在空间坐标系中的Z轴的投影大小。屏幕形态用于指示当前设备的屏幕姿态和屏幕的大小比例变化,其中,屏幕姿态可包括向内折叠、向外折叠、翻转等姿态。
其中,关于重力垂直分量的确定方式,可包括:在初始状态下,重力G方向指向地心,即垂直向下,通过在屏幕建立空间坐标系,计算出重力G分量在Z轴的投影大小,其中,重力垂直分量可包括正G和负G。
进一步地,本申请实施例中还可以通过获取重力垂直分量确定出当前设备的屏幕朝向。具体地,在初始状态下,重力G方向指向地心,即垂直向下。通过在屏幕建立空间坐标系,根据计算重力G分量在Z轴的投影大小,确定出当前设备的屏幕朝向。其中,在屏幕建立空间坐标系的过程可包括在相对屏幕左上角的位置建立X轴和Y轴和Z轴,其中,Z轴为垂直向上。当重力G分量,投影再Z轴大小为负G时,从而能够确定出当前设备的屏幕朝向用户;当重力G分量,投影再Z轴大小为G时,从而能够确定出当前设备的屏幕朝向向下。
需要说明的是,当确定出通过获取重力垂直分量确定出当前设备的屏幕朝向之后,还需要判断当前设备的屏幕朝向是否为面向用户的方向,以便后续步骤将屏幕朝向用户的显示屏幕确认为待显示屏幕。其中,判断当前设备的屏幕朝向是否为面向用户的方向的方式,可通过前置摄像头捕捉人脸,结合人眼角度判断当前设备的屏幕朝向是否为面向用户的方向,关于人脸识别技术和人眼角度判断的方式本申请对此不做详细阐述,可采用现有的相关技术实现上述判断过程。
本申请实施例中,在执行步骤104之前,该方法还包括:注册检测组件,例如,通过SensorManager工具注册HAL、sensor相应事件,以设置一个能够检测屏幕夹角变化的检测组件,当检测到当前设备的屏幕形态发生改变时,例如,当当前设备进行向内折叠、向外折叠、翻转等屏幕姿态的改变,并且在用户选择指定屏幕进行亮屏时,当前终端的待显示屏幕与上次灭屏时的显示屏幕相比,待显示屏幕的大小发生了变化,因此该检测组件能够根据获取的形态信息,检测当前设备的屏幕形态发生改变。
本申请实施例中,作为一种可选的方案,可通过sensor算法,根据获取的形态信息检测当前设备的屏幕形态是否发生改变,具体地,可通过函数:SensorManager.registerListener()注册检测组件,该检测组件用于检测屏幕夹角和重力垂直分量,具体地,可通过SensorHub检测组件计算屏幕夹角信息。进一步地,通过函 数:OnSensorChanged()实时监听当前设备的屏幕形态,当屏幕夹角变化时接受检测组件上报的屏幕夹角以及重力垂直分量,并根据上报的屏幕夹角以及重力垂直分量,判断出当前设备的屏幕形态是否发生改变。具体的判断过程可参见下述实施例中两种方案。
本申请实施例中,步骤104可具体包括:
步骤1041、检测灭屏前的屏幕形态信息和灭屏后的屏幕形态信息是否相同,若是,执行步骤1042;若否,流程结束。
本申请实施例中,若检测出灭屏前的屏幕形态信息和灭屏后的屏幕形态信息相同,表明该当前设备的屏幕形态未发生改变,未满足本申请实施例的执行条件,因此流程结束或者继续执行步骤1041,检测灭屏前的屏幕形态信息和灭屏后的屏幕形态信息是否相同,若检测出灭屏前的屏幕形态信息和灭屏后的屏幕形态信息不相同,则表明该当前设备的屏幕形态已发生改变,满足窗口重绘条件,可继续执行后续步骤。
步骤1042、确定出当前设备的屏幕形态发生改变,并继续执行步骤106。本申请实施例中,在一种可选方案中,例如,灭屏前的屏幕形态信息包括屏幕夹角0°,重力垂直分量为负G,即当前设备的屏幕朝向向上,而灭屏后的屏幕形态信息包括屏幕夹角180°,重力垂直分量为负G,即当前设备的屏幕朝向向上,通过执行步骤104,能够确定出当前设备的屏幕形态发生改变,即屏幕夹角发生了改变。在实际应用中,相当于当前设备在灭屏前的屏幕形态为折叠状态(向内折叠、向外折叠),在当前设备在灭屏后的屏幕姿态为完全展开状态。当前设备展开后,屏幕姿态和屏幕的大小比例发生变化。例如,以当前设备包括屏幕A和屏幕B两个显示屏幕为例,将该当前设备由折叠状态变化至完全展开状态时,屏幕A和屏幕B之间的夹角可在0°至180°之间变化。此时,由于屏幕夹角发生了变化,因此可确定出当前设备的屏幕形态已发生改变,其中,屏幕形态变化可具体体现为屏幕姿态发生改变,以及屏幕的大小比例发生改变。
在另一种可选方案中,例如,灭屏前的屏幕形态信息包括屏幕夹角0°,重力垂直分量为G,即当前设备的屏幕朝向向下,而灭屏后的屏幕形态信息包括屏幕夹角180°,重力垂直分量为负G,即当前设备的屏幕朝向向上,通过执行步骤104,能够确定出当前设备的屏幕形态发生改变,即屏幕夹角发生了改变,且重力垂直分量也发生了变化。
需要说明的是,当屏幕夹角和重力垂直分量中任意一个发生了变化,即可表明当前设备的屏幕形态发生变化。本申请实施例中,对于屏幕形态信息包括屏幕夹角和重力垂直分量仅为举例说明,除此之外,屏幕形态信息还可以包括其他参数,本申请对此不做限定。
步骤106、根据灭屏后的屏幕形态信息确定出待显示屏幕。
本申请实施例中,灭屏后的屏幕形态包括屏幕夹角和重力垂直分量。
本申请实施例中,步骤106可具体包括:
步骤1061、根据屏幕夹角,确定出当前设备的设备状态,设备状态包括折叠状态、半展开状态或者完全展开状态。
本申请实施例中,0°≤屏幕夹角范围≤180°,其中,屏幕夹角是根据检测组件 的检测的最小颗粒决定,当检测精度为2度,可认为小于3度都为折叠状态,也就是说,当0°≤屏幕夹角<3°时,确定出当前设备的设备状态包括折叠状态;当3°≤屏幕夹角<177°时,确定出当前设备的设备状态包括半展开状态;当177°≤屏幕夹角≤180°时,确定出当前设备的设备状态包括完全展开状态。
本申请实施例中,折叠状态可包括向外折叠状态和向内折叠状态。
步骤1062、根据设备状态和重力垂直分量,确定出当前设备的屏幕朝向,并将屏幕朝向用户的显示屏幕确定为当前设备的待显示屏幕。本申请实施例中,通过上述实施例能够获取重力垂直分量确定出当前设备的屏幕朝向。在一种可选方案中,例如,以当前设备包括屏幕A和屏幕B为例,当当前设备处于完全展开状态时,例如,屏幕A和屏幕B之间的屏幕夹角为180°时,通过重力垂直分量确定出当前设备的屏幕A的朝向向上和屏幕B的朝向向下时,且此时幕朝向用户的显示屏幕为屏幕A,因此将屏幕A确定为当前设备的待显示屏幕。
在另一种可选方案中,例如,以当前设备包括屏幕A和屏幕B为例,屏幕A为内屏,屏幕B为外屏,当当前设备处于向外折叠状态时,即屏幕A和屏幕B之间的屏幕夹角为0°时,由于此时的设备状态为向外折叠状态,即通过重力垂直分量确定出屏幕朝向用户的显示屏幕为内屏,即屏幕A,因此将屏幕A确定为当前设备的待显示屏幕。
在另一种可选方案中,例如,以当前设备包括屏幕A和屏幕B为例,屏幕A为内屏,屏幕B为外屏,当当前设备处于向内折叠状态时,即屏幕A和屏幕B之间的屏幕夹角为0°时,由于此时的设备状态为向内折叠状态,即通过重力垂直分量确定出屏幕朝向用户的显示屏幕为外屏,即屏幕B,因此将屏幕B确定为当前设备的待显示屏幕。
步骤108、获取待显示屏幕对应的屏幕标识。
本申请实施例中,屏幕标识具有唯一性,也就是说,每个待显示屏幕对应的屏幕标识不同。例如,当当前设备处于折叠状态时,可包括多个显示屏幕,每个显示屏幕所对应的物理屏幕的ID值是不一样的。例如,屏幕A对应的屏幕标识为1,屏幕B对应的屏幕标识为2。
步骤110、判断屏幕标识与灭屏前的显示屏幕的屏幕标识是否相同,若是,执行步骤112;若否,执行步骤114。
本申请实施例中,若判断出屏幕标识与灭屏前的显示屏幕的屏幕标识相同,表明待显示屏幕与灭屏前的显示屏幕相同。若判断出屏幕标识与灭屏前的显示屏幕的屏幕标识不相同,则表明待显示屏幕与灭屏前的显示屏幕不相同。例如,灭屏前的显示屏幕包括屏幕A和屏幕B,其中,屏幕A对应的屏幕标识为1,屏幕B对应的屏幕标识为2,而获取的待显示屏幕的屏幕标识为2时,表明待显示屏幕的屏幕标识与灭屏前的显示屏幕的屏幕标识不相同。
步骤112、将灭屏前的显示屏幕的屏幕大小确定为待显示屏幕的屏幕大小,并继续执行116。
本申请实施例中,若判断出屏幕标识与灭屏前的显示屏幕的屏幕标识相同,表明待显示屏幕与灭屏前的显示屏幕相同,因此将灭屏前的显示屏幕的屏幕大小确定为待 显示屏幕的屏幕大小。通过确定待显示屏幕的屏幕大小,以便后续步骤确定待显示屏幕的显示区域大小。
需要说明的是,屏幕大小用于指示显示屏幕本身的大小。显示区域大小用于指示根据用户设置或者设备条件限定的大小。也就是说,待显示屏幕的屏幕大小≥待显示屏幕的显示区域大小。例如,以手机的显示屏幕为例,通常手机的屏幕大小大于显示区域的大小。
步骤114、根据屏幕标识,确定出待显示屏幕的屏幕大小,并继续执行116
本申请实施例中,每个显示屏幕对应的屏幕标识不同,因此可通过屏幕标识,查询出每个待显示屏幕的屏幕大小。
步骤116、根据获取的待显示屏幕的设置模式以及待显示屏幕的屏幕大小,确定出待显示屏幕的显示区域大小,并继续执行步骤118。
本申请实施例中,待显示屏幕的屏幕大小可理解为物理屏幕大小,待显示屏幕的显示区域大小可理解为具体的显示区域大小,并且显示区域大小位于物理屏幕大小范围内。
本申请实施例中,设置模式用于指示当前设备的运行场景。待显示屏幕的设置模式可包括单手模式、自拍协同模式、互动模式或者游戏模式等。在一种可选方式中,例如,当获取的待显示屏幕的设置模式包括单手模式时,将待显示屏幕的显示区域大小确定为待显示屏幕的屏幕大小的2/3。
需要说明的是,上述的设置方式仅为举例说明,针对不同的设置模式,使用者可根据需求进行待显示屏幕的显示区域大小的设定。
步骤118、根据获取的待显示屏幕的显示区域大小进行待显示屏幕的窗口重绘。
本申请实施例中,一种可选的方案,可通过设置函数:KeyguardDraw/WindowDraw,该函数能够根据待显示屏幕的显示区域大小进行待显示屏幕的窗口重绘,并在待显示区域上显示重绘的内容。
此外,在执行步骤118之前,还包括:通过调动SetPowerModeOn(true)启动液晶显示器(Liquid Crystal Display,简称LCD)上电流程,并对待显示屏幕进行锁屏,并继续执行步骤118。
本申请实施例中,图3为LCD上电流程示意图,如图3所示,启动的LCD上电流程包括步骤301-步骤303:设置LCD—>LCD开始上电—>LCD上电完成。需要说明的是,该LCD上电流程,与步骤118的窗口重绘流程是由两条分支分别处理,即多线程并行处理。通过将LCD上电流程与步骤118的窗口重绘流程并行处理能够提高重绘处理效率并节省了窗口重绘时间。
在执行步骤118之后,还包括:通过调动SetPowerModeOn(false)启动LCD下电流程。
此外,在执行步骤110之后,还需要设置函数:ScreenOff,该函数用于在窗口重绘完成后,不设置背光,直接调用掉电流程,等待下一次亮屏。也就是说,在执行步骤110之后,对待显示屏幕不设置背光,使得用户可见的待显示屏幕全黑,以便等待下一次亮屏时,能够在待显示区域上显示重绘的内容,从而解决了相关技术中的因未提前重绘,从而造成增加亮屏时长的问题,解决了因硬件屏幕尺寸差异时进行窗口重 绘进一步导致亮屏时间成倍增加问题,从而缩短了亮屏时间,提高了屏幕窗口重绘效率,极大的改善当前的折叠屏,翻转屏设备的用户体验。
本申请实施例中,在步骤118之后,还包括:在待显示屏幕上显示重绘的内容。例如,在不同大小的显示屏幕显示同一个图片。
本申请实施例中,通过执行上述的屏幕窗口重绘方法,如图4a-图4c所示,在图4a中,屏幕处于灭屏状态,图4b的过程为执行本申请实施例所提供的屏幕窗口重绘方法的过程,需要说明的是,在执行屏幕窗口重绘方法的过程中,需要设置LCD不设置背光亮度,等待窗口重绘完成后,如图4c所示,显示屏幕处于灭屏状态,以等待下次亮屏后,直接显示重绘好的内容,从而相对于图1所示的相关技术的屏幕窗口重绘而言,本申请实施例的屏幕窗口重绘方法,能够实现在灭屏状态下识别屏幕形态变化,提前完成窗口重绘,解决了相关技术中的因未提前进行窗口重绘,造成增加亮屏时长的问题的同时,还解决了因硬件屏幕尺寸差异时进行窗口重绘进一步导致亮屏时间成倍增加问题,缩短了亮屏时间,提高了屏幕窗口重绘效率。
本申请实施例中,检测当前设备是否处于灭屏状态,若检测出当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测当前设备的屏幕形态是否发生改变,若检测出屏幕形态发生改变,根据灭屏后的屏幕形态信息确定出待显示屏幕,根据获取的待显示屏幕的显示区域大小进行待显示屏幕的窗口重绘,以实现在灭屏状态下识别屏幕形态变化,提前完成窗口重绘,从而缩短了亮屏时间,提高了屏幕窗口重绘效率。
本申请实施例中,进一步地,可通过下列流程对本申请的屏幕窗口重绘流程,进行验证:
第一步:通过在当前设备中安装可验证的应用程序,并将该应用程序运行在最上层可见界面,通过灭屏指令对当前设备进行灭屏操作。
第二步:用户通过改变当前设备的屏幕形态,记录时间,等待一段时间,再记录时间,指纹亮屏,抓取日志。
本步骤中,通过日志记录屏幕变化,以检测是否有触发重绘,通过等待一段时间,目的是为了时间分开排查干扰。
第三步:根据日志确认验证应用的生命周期状态与时间,判断是否触发灭屏下重绘窗口。
本步骤中,通过日志验证,查看应用的生命周期是否有变化,且变化的时间与屏幕折叠状态变化时间是否匹配一致,以判断是否触发灭屏下重绘窗口,其中,应用的生命周期表示应用界面(activity)整个显示过程,即通过应用的显示过程来判断,应用是否发生了重绘。
图5是本申请一实施例提供的一种电子设备110的示意性框图。应理解,电子设备110能够执行图2的屏幕窗口重绘方法中的各个步骤,为了避免重复,此处不再详述。如图5所示,电子设备110包括:检测单元401和处理单元402。
检测模块401用于检测当前设备是否处于灭屏状态;若检测出所述当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测所述当前设备的屏幕形态是否发生改变。
处理单元402用于若检测出所述屏幕形态发生改变,根据所述灭屏后的屏幕形态信息确定出待显示屏幕;根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘。
本申请实施例中,检测模块401还用于检测所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息是否相同;若检测出所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息不相同,确定出所述当前设备的屏幕形态发生改变。
本申请实施例中,所述灭屏后的屏幕形态信息包括屏幕夹角和重力垂直分量;处理单元402还用于根据所述屏幕夹角,确定出当前设备的设备状态,所述设备状态包括折叠状态、半展开状态或者完全展开状态;根据所述设备状态和所述重力垂直分量,确定出所述当前设备的屏幕朝向,并将屏幕朝向用户的显示屏幕确定为所述当前设备的待显示屏幕。
本申请实施例中,处理大院402还用于获取所述待显示屏幕对应的屏幕标识;判断所述屏幕标识与灭屏前的显示屏幕的屏幕标识是否相同;若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识相同,将灭屏前的显示屏幕的屏幕大小确定为待显示屏幕的屏幕大小;根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤,所述设置模式用于指示当前设备的运行场景;若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识不相同,根据所述屏幕标识,确定出所述待显示屏幕的屏幕大小;根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤。
本申请实施例中,检测当前设备是否处于灭屏状态,若检测出当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测当前设备的屏幕形态是否发生改变,若检测出屏幕形态发生改变,根据灭屏后的屏幕形态信息确定出待显示屏幕,根据获取的待显示屏幕的显示区域大小进行待显示屏幕的窗口重绘,以实现在灭屏状态下识别屏幕形态变化,提前完成窗口重绘,从而缩短了亮屏时间,提高了屏幕窗口重绘效率。
应理解,这里的电子设备110以功能单元的形式体现。这里的术语“单元”可以通过软件和/或硬件形式实现,对此不作具体限定。例如,“单元”可以是实现上述功能的软件程序、硬件电路或二者结合。所述硬件电路可能包括应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。
因此,在本申请的实施例中描述的各示例的单元,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例还提供一种电子设备,该电子设备可以是当前设备也可以是内置于 所述当前设备的电路设备。该设备可以用于执行上述方法实施例中的功能/步骤。
图6为本申请一实施例提供的一种电子设备的结构示意图,如图6所示,电子设备900包括处理器910和收发器920。可选地,该电子设备900还可以包括存储器930。其中,处理器910、收发器920和存储器930之间可以通过内部连接通路互相通信,传递控制和/或数据信号,该存储器930用于存储计算机程序,该处理器910用于从该存储器930中调用并运行该计算机程序。
可选地,电子设备900还可以包括天线940,用于将收发器920输出的无线信号发送出去。
上述处理器910可以和存储器930可以合成一个处理装置,更常见的是彼此独立的部件,处理器910用于执行存储器930中存储的程序代码来实现上述功能。具体实现时,该存储器930也可以集成在处理器910中,或者,独立于处理器910。该处理器910可以与图5中电子设备110中的处理单元402对应。
除此之外,为了使得电子设备900的功能更加完善,该电子设备900还可以包括输入单元960、显示单元970、音频电路980、摄像头990和传感器901等中的一个或多个,所述音频电路还可以包括扬声器982、麦克风984等。其中,显示单元970可以包括显示屏。
可选地,上述电子设备900还可以包括电源950,用于给当前设备中的各种器件或电路提供电源。
应理解,图6所示的电子设备900能够实现图2所示方法实施例的各个过程。电子设备900中的各个单元的操作和/或功能,分别为了实现上述方法实施例中的相应流程。具体可参见上述方法实施例中的描述,为避免重复,此处适当省略详细描述。
应理解,图6所示的电子设备900中的处理器910可以是片上系统(system on a chip,SOC),该处理器910中可以包括中央处理器(central processing unit,CPU),还可以进一步包括其他类型的处理器,所述CPU可以叫主CPU,神经网络处理器NPU 30作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。各部分处理器配合工作实现之前的方法流程,并且每部分处理器可以选择性执行一部分软件驱动程序。
总之,处理器910内部的各部分处理器或处理单元可以共同配合实现之前的方法流程,且各部分处理器或处理单元相应的软件程序可存储在存储器930中。
本申请还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行如上述图2所示的屏幕窗口重绘方法中的各个步骤。
以上各实施例中,涉及的处理器910可以例如包括中央处理器(central processing unit,CPU)、微处理器、微控制器或数字信号处理器,还可包括GPU、NPU和ISP,该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储器中。
存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的 其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质等。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。

Claims (9)

  1. 一种屏幕窗口重绘方法,其特征在于,包括:
    检测当前设备是否处于灭屏状态;
    若检测出所述当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测所述当前设备的屏幕形态是否发生改变;
    若检测出所述屏幕形态发生改变,根据所述灭屏后的屏幕形态信息确定出待显示屏幕;
    根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘。
  2. 根据权利要求1所述的方法,其特征在于,所述通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测所述当前设备的屏幕形态是否发生改变,包括:
    检测所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息是否相同;
    若检测出所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息不相同,确定出所述当前设备的屏幕形态发生改变。
  3. 根据权利要求2所述的方法,其特征在于,所述灭屏后的屏幕形态信息包括屏幕夹角和重力垂直分量;
    所述若检测出所述屏幕形态发生改变,根据所述灭屏后的屏幕形态信息确定出待显示屏幕,包括:
    根据所述屏幕夹角,确定出当前设备的设备状态,所述设备状态包括折叠状态、半展开状态或者完全展开状态;
    根据所述设备状态和所述重力垂直分量,确定出所述当前设备的屏幕朝向,并将屏幕朝向用户的显示屏幕确定为所述当前设备的待显示屏幕。
  4. 根据权利要求3所述的方法,其特征在于,在所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘之前,包括:
    获取所述待显示屏幕对应的屏幕标识;
    判断所述屏幕标识与灭屏前的显示屏幕的屏幕标识是否相同;
    若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识相同,将灭屏前的显示屏幕的屏幕大小确定为待显示屏幕的屏幕大小;
    根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤,所述设置模式用于指示当前设备的运行场景;
    若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识不相同,根据所述屏幕标识,确定出所述待显示屏幕的屏幕大小;
    根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤。
  5. 一种电子设备,其特征在于,包括:
    显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令, 当所述指令被所述设备执行时,使得所述设备执行以下步骤:
    检测当前设备是否处于灭屏状态;
    若检测出所述当前设备处于灭屏状态时,通过获取的灭屏前的屏幕形态信息和灭屏后的屏幕形态信息,检测所述当前设备的屏幕形态是否发生改变;
    若检测出所述屏幕形态发生改变,根据所述灭屏后的屏幕形态信息确定出待显示屏幕;
    根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘。
  6. 根据权利要求5所述的设备,其特征在于,当所述指令被所述设备执行时,使得所述设备具体执行以下步骤:
    检测所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息是否相同;
    若检测出所述灭屏前的屏幕形态信息和所述灭屏后的屏幕形态信息不相同,确定出所述当前设备的屏幕形态发生改变。
  7. 根据权利要求6所述的设备,其特征在于,所述灭屏后的屏幕形态信息包括屏幕夹角和重力垂直分量;
    当所述指令被所述设备执行时,使得所述设备具体执行以下步骤:
    根据所述屏幕夹角,确定出当前设备的设备状态,所述设备状态包括折叠状态、半展开状态或者完全展开状态;
    根据所述设备状态和所述重力垂直分量,确定出所述当前设备的屏幕朝向,并将屏幕朝向用户的显示屏幕确定为所述当前设备的待显示屏幕。
  8. 根据权利要求7所述的设备,其特征在于,当所述指令被所述设备执行时,使得所述设备具体执行以下步骤:
    获取所述待显示屏幕对应的屏幕标识;
    判断所述屏幕标识与灭屏前的显示屏幕的屏幕标识是否相同;
    若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识相同,将灭屏前的显示屏幕的屏幕大小确定为待显示屏幕的屏幕大小;
    根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤,所述设置模式用于指示当前设备的运行场景;
    若判断出所述屏幕标识与灭屏前的显示屏幕的屏幕标识不相同,根据所述屏幕标识,确定出所述待显示屏幕的屏幕大小;
    根据获取的待显示屏幕的设置模式以及所述待显示屏幕的屏幕大小,确定出所述待显示屏幕的显示区域大小,并继续执行所述根据获取的所述待显示屏幕的显示区域大小进行所述待显示屏幕的窗口重绘的步骤。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行权利要求1至4中任意一项所述的屏幕窗口重绘方法。
PCT/CN2021/110035 2020-08-18 2021-08-02 一种屏幕窗口重绘方法、电子设备和计算机可读存储介质 WO2022037400A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/042,232 US20230325208A1 (en) 2020-08-18 2021-08-02 Screen Window Redrawing Method, Electronic Device, and Computer-Readable Storage Medium
EP21857495.2A EP4195040A4 (en) 2020-08-18 2021-08-02 SCREEN WINDOW RECOVERY METHOD, ELECTRONIC DEVICE AND COMPUTER-READABLE STORAGE MEDIUM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010833689.1 2020-08-18
CN202010833689.1A CN114077468A (zh) 2020-08-18 2020-08-18 一种屏幕窗口重绘方法、电子设备和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2022037400A1 true WO2022037400A1 (zh) 2022-02-24

Family

ID=80281684

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/110035 WO2022037400A1 (zh) 2020-08-18 2021-08-02 一种屏幕窗口重绘方法、电子设备和计算机可读存储介质

Country Status (4)

Country Link
US (1) US20230325208A1 (zh)
EP (1) EP4195040A4 (zh)
CN (1) CN114077468A (zh)
WO (1) WO2022037400A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118363671A (zh) * 2023-01-19 2024-07-19 荣耀终端有限公司 显示方法、终端设备及计算机可读存储介质
CN117076035B (zh) * 2023-10-13 2023-12-26 麒麟软件有限公司 一种x窗口系统下花屏的优化方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598410A (zh) * 2016-12-07 2017-04-26 掌阅科技股份有限公司 电子书的显示方法、装置和终端设备
CN107168712A (zh) * 2017-05-19 2017-09-15 广东欧珀移动通信有限公司 界面绘制方法、移动终端及计算机可读存储介质
CN109981839A (zh) * 2019-02-02 2019-07-05 华为技术有限公司 一种具有柔性屏幕的电子设备的显示方法及电子设备
CN109979413A (zh) * 2019-03-18 2019-07-05 Oppo广东移动通信有限公司 亮屏控制方法、亮屏控制装置、电子设备及可读存储介质
US20190325847A1 (en) * 2017-01-03 2019-10-24 Samsung Electronics Co., Ltd. Electronic device and displaying method thereof

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101569776B1 (ko) * 2009-01-09 2015-11-19 삼성전자주식회사 접히는 표시부를 가지는 휴대 단말기 및 이의 운용 방법
CN102902501B (zh) * 2012-09-26 2015-06-17 成都飞视美视频技术有限公司 文件多屏扩展显示的方法
CN104461242B (zh) * 2014-12-08 2017-12-01 深圳市嘉乐派科技有限公司 一种基于Android操作系统的多窗口界面实现方法
US10254863B2 (en) * 2014-12-19 2019-04-09 Lg Electronics Inc. Mobile terminal
KR101651033B1 (ko) * 2015-01-08 2016-08-24 엘지전자 주식회사 단말기 및 그 동작 방법
CN105426097B (zh) * 2015-10-30 2020-07-31 深圳市名思展示设计工程有限公司 一种分屏大小实时调整方法及分屏装置
KR102516590B1 (ko) * 2016-01-29 2023-04-03 삼성전자주식회사 전자 장치 및 전자 장치에서 디스플레이의 변형에 따라 기능을 실행하기 위한 방법
KR102480462B1 (ko) * 2016-02-05 2022-12-23 삼성전자주식회사 복수의 디스플레이들을 포함하는 전자 장치 및 그 동작 방법
CN106469058B (zh) * 2016-08-31 2019-01-29 维沃移动通信有限公司 一种屏幕解锁方法及移动终端
CN107765835A (zh) * 2017-11-07 2018-03-06 广东欧珀移动通信有限公司 点亮屏幕的方法、装置及终端
CN108228046A (zh) * 2017-11-29 2018-06-29 努比亚技术有限公司 可弯曲柔性终端显示控制方法、终端及计算机存储介质
CN108418953B (zh) * 2018-02-05 2020-04-24 Oppo广东移动通信有限公司 终端的屏幕控制方法和装置、可读存储介质、终端
CN110351418B (zh) * 2018-04-02 2021-07-13 Oppo广东移动通信有限公司 屏幕控制方法、装置、移动终端及计算机可读介质
EP3699738B1 (en) * 2019-02-19 2024-03-27 Samsung Electronics Co., Ltd. Electronic device and display control method thereof
CN110515519A (zh) * 2019-08-08 2019-11-29 上海掌门科技有限公司 展示阅读内容的方法、设备和计算机存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598410A (zh) * 2016-12-07 2017-04-26 掌阅科技股份有限公司 电子书的显示方法、装置和终端设备
US20190325847A1 (en) * 2017-01-03 2019-10-24 Samsung Electronics Co., Ltd. Electronic device and displaying method thereof
CN107168712A (zh) * 2017-05-19 2017-09-15 广东欧珀移动通信有限公司 界面绘制方法、移动终端及计算机可读存储介质
CN109981839A (zh) * 2019-02-02 2019-07-05 华为技术有限公司 一种具有柔性屏幕的电子设备的显示方法及电子设备
CN109979413A (zh) * 2019-03-18 2019-07-05 Oppo广东移动通信有限公司 亮屏控制方法、亮屏控制装置、电子设备及可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4195040A4 *

Also Published As

Publication number Publication date
CN114077468A (zh) 2022-02-22
EP4195040A4 (en) 2024-01-17
EP4195040A1 (en) 2023-06-14
US20230325208A1 (en) 2023-10-12

Similar Documents

Publication Publication Date Title
US11868671B2 (en) Electronic device and display control method thereof
WO2022037400A1 (zh) 一种屏幕窗口重绘方法、电子设备和计算机可读存储介质
CN112689820B (zh) 用于根据折叠角度控制应用的电子设备及其方法
US20220375384A1 (en) Electronic device comprising display
US11093203B2 (en) Electronic device having two display surfaces and method for running display thereof
US12094393B2 (en) Foldable electronic device and operation method for same
US11735143B2 (en) Electronic device and method of controlling the same
TWI543019B (zh) 自動化裝置顯示器的定向偵測技術
CN114514508A (zh) 提供应用的运行画面的电子装置及其操作方法
CN107168539A (zh) 一种设备唤醒方法、装置及电子设备
CN113557491A (zh) 用于控制和操作可折叠显示器的电子装置和方法
US10409404B2 (en) Method of processing touch events and electronic device adapted thereto
US11651750B2 (en) Foldable electronic device and multi-window operation method using same
CN107885635B (zh) 黑屏检测方法、移动终端及计算机可读存储介质
CN113924611A (zh) 减少电子装置的显示器劣化的方法及使用该方法的可折叠电子装置
US11445058B2 (en) Electronic device and method for controlling display operation thereof
US12002393B2 (en) Control method, electronic apparatus, and computer-readable storage medium
US11442684B2 (en) Electronic device and method of displaying content thereon
WO2023236663A1 (zh) 显示控制方法及装置
CN111684782B (zh) 电子设备及其控制方法
US20190122327A1 (en) Electronic device for displaying image and method for controlling the same
US11842039B2 (en) Electronic device and method for operating screen capturing by electronic device
CN115079854B (zh) 状态切换方法、装置、电子设备和存储介质
US20220214850A1 (en) Electronic device for seamlessly displaying images, and operating method therefor
CN117539561A (zh) 页面显示方法和相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21857495

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021857495

Country of ref document: EP

Effective date: 20230310

NENP Non-entry into the national phase

Ref country code: DE