Screen display switching method, electronic device, and storage medium

By locking the screen state within a preset angle range and unlocking it when an angle change is detected, the problem of forced exit of functions in foldable screen electronic devices is solved, thus improving the user experience.

WO2026007521A9PCT designated stage Publication Date: 2026-03-12HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

Existing foldable screen electronic devices cannot function properly in certain situations, such as when taking rear selfies, front-facing photos, collaborative photos, or smart tabletop displays. The screen switching causes the function to be forcibly exited, affecting the user experience.

Method used

By locking the screen state within a preset angle range and unlocking it when a change in angle is detected, the screen display switching in normal mode is restored, preventing the function from being forcibly exited and repeated screen switching.

Benefits of technology

It effectively avoids forced exit of functions due to screen switching, improving the user experience, especially in scenarios such as rear selfie, front camera, collaborative shooting, and smart table setting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025092343_12032026_PF_FP_ABST
    Figure CN2025092343_12032026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of screen display, and discloses a screen display switching method, an electronic device, and a storage medium. The screen display switching method comprises: when running a preset first function, a foldable electronic device can lock a functional mode within a second angle range and a corresponding screen state, so that when the folding angle of the foldable electronic device falls within the second angle range, a screen is in a screen display state which is the same as that within a first angle range. In this way, the occurrence of forced termination of a function, frequent screen switching, etc., of an electronic device caused by mode switching of the electronic device can be effectively avoided, thereby effectively improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Screen display switching method, electronic device, and storage medium

[0001] The present application claims priority from the Chinese patent application No. 202410877474.8 filed on July 1, 2024, and entitled "Screen display switching method, electronic device, and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of screen display, and in particular to a screen display switching method, an electronic device, and a storage medium. BACKGROUND

[0003] With the development of display screen technology, some electronic devices (such as foldable screen electronic devices) are provided with foldable screens, so that the electronic devices can be folded. When the electronic device is unfolded outward to a set angle, the content displayed on the outer screen of the electronic device can be transferred to the inner screen for display. When the electronic device is folded inward to a set angle, the content displayed on the inner screen of the electronic device can be transferred to the outer screen of the electronic device for display. In this way, different use requirements of users can be met.

[0004] In the above-mentioned solution, the electronic device is generally fixedly set to switch the display of the inner screen or the outer screen when unfolded outward or folded inward to a set angle (such as 60°). However, the above-mentioned solution will limit the normal use of the functions of the electronic device in some cases. For example, for the scene of taking a selfie using the rear camera on the outer screen, at this time, the outer screen is in a display state, if the user unfolds the electronic device outward to an angle greater than the set angle (such as 60°), the electronic device will switch to display the inner screen, which will cause the rear selfie to be forcibly exited. In this way, the user experience is affected. SUMMARY

[0005] In order to solve the problem that the functions of the foldable screen electronic device cannot be normally used in some cases, the embodiments of the present application provide a screen display switching method, an electronic device, and a storage medium.

[0006] In a first aspect, the embodiments of the present application provide a screen display switching method, applied to a foldable electronic device. The screen of the foldable electronic device includes a first screen and a second screen respectively located on opposite sides of the foldable electronic device. The foldable electronic device has a preset display mode. The method includes: when the foldable electronic device is at a first folding angle, the foldable electronic device runs a first function in the preset display mode. The first folding angle is in a first angle range. The preset display mode of the foldable electronic device includes a first display mode and a second display mode. The first display mode is used to indicate that when the folding angle of the foldable electronic device is in the first angle range, the screen is in a first display state. The second display mode is used to indicate that when the folding angle of the foldable electronic device is in a second angle range, the screen is in a second display state. When the foldable electronic device changes to a second folding angle, the first function is run in the first display state of the screen. The second folding angle is in the second angle range.

[0007] In the embodiments of the present application, the foldable electronic device can be the electronic device with a folding screen mentioned in the embodiments of the present application. The first function can be the preset function mentioned in the embodiments of the present application. The second angle range can be the first preset angle range mentioned in the embodiments of the present application. When the electronic device is in a state of running the first function, for example, in a rear camera selfie scene corresponding to a rear selfie function, a front camera shooting scene corresponding to a front shooting function, a collaborative shooting scene corresponding to a collaborative shooting function, and a table calendar mode corresponding to a smart table function, locking the screen state of the electronic device in the second angle range can effectively avoid the electronic device from being switched, causing the function of the electronic device to be forcibly exited, repeatedly switched, and the like, thereby effectively improving the user experience.

[0008] In the embodiments of the present application, the first screen can refer to the outer screen mentioned in the embodiments of the present application, and the second screen can refer to the inner screen mentioned in the embodiments of the present application.

[0009] For example, for the first function being a rear selfie function, the screen state of the second angle range is locked as the display state of the outer screen in the closed mode. For the first function being a front shooting function, the screen state of the second angle range is locked as the display state of the inner screen in the stand mode. For the first function being a collaborative shooting function, the screen state of the second angle range is locked as the state that the inner screen and the outer screen are both displayed in the collaborative shooting mode. For the first function being a smart table function, the screen state of the second angle range is locked as the display state of the outer screen in the closed mode.

[0010] In some embodiments, the electronic device can also lock the screen state of the first angle range as a screen state conforming to a regular mode or a specific screen state.

[0011] For example, when the first function is a rear selfie function, the screen state in the first angle range is locked as an outer screen display state in a closed mode. When the first function is a front photographing function, the screen state in the first angle range is locked as an inner screen display state in a stand mode. When the first function is a collaborative photographing function, the screen state in the first angle range is locked as a state in which both the inner screen and the outer screen are displayed in a collaborative photographing mode. When the first function is an intelligent table setting function, the screen state in the first angle range is locked as an outer screen display state in a closed mode.

[0012] In a possible implementation of the first aspect, the preset display mode further includes a third display mode, the third display mode being used to indicate that when the folding angle of the foldable electronic device is in a third angle range, the screen is in a third display state, and the method further includes: when the foldable electronic device switches to the third folding angle, running the first function in the preset display mode.

[0013] In the embodiment of the application, when the folding angle of the foldable electronic device is in the third angle range, the mode is unlocked, and the normal mode (i.e., the closed mode, the stand mode, the table calendar mode, the tent mode, and the like, which are set by default in the electronic device) is restored.

[0014] In a possible implementation of the first aspect, when the first function is a rear selfie function, the first angle range is greater than or equal to a first threshold value and less than or equal to a second threshold value, the first display state is a first screen display, the second angle range is greater than the second threshold value and less than or equal to a third threshold value, and the second display state is a second screen display, where the first screen is an outer screen, and the second screen is an inner screen.

[0015] In the embodiment of the application, when the first function is a rear selfie function, the first angle range corresponding to the folding angle a can be 0°≤a≤60°, that is, the first display mode is a closed mode, and the second angle range can be 60°<a≤150°, that is, the second display mode is a stand mode. The screen display switching method based on the application can effectively avoid the situation that the rear selfie is forcibly exited when the user performs the rear selfie, and improve the user experience.

[0016] In a possible implementation of the first aspect, when the first function is a rear selfie function, when the third angle range is greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is a second screen display; and when the third angle range is equal to the first threshold value, the third display state is a first screen display.

[0017] It can be understood that, corresponding to the first function being a rear selfie function, when the third angle range is greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is inner screen display; wherein the third angle range corresponding to the folding angle a can be 150° < a ≤ 180°, that is, the third display mode is an unfolded mode. Corresponding to the third angle range being equal to the first threshold value, the third display state is outer screen display, wherein the first threshold value can be 0° or an angle value within 10° representing that the electronic device is in a closed state, that is, the third display mode is a closed mode.

[0018] In a possible implementation of the first aspect, corresponding to the first function being a front photographing function, the first angle range is greater than a second threshold value and less than or equal to a fourth threshold value, the first display state is second screen display, and the second angle range is greater than the first threshold value and less than or equal to the second threshold value, the second display state is first screen display, wherein the first screen is an outer screen and the second screen is an inner screen.

[0019] It can be understood that, corresponding to the first function being a front photographing function, the first angle range corresponding to the folding angle a can be 60° ≤ a ≤ 180°, that is, the first display mode is a corresponding stand mode and an unfolded mode, and the second angle range can be 0° ≤ a ≤ 60°, that is, the second display mode is a closed mode. In some embodiments, the first angle range can also be directly locked as the stand mode. That is, when the folding angle of the electronic device is within the first angle range, the inner screen display is performed based on the stand mode. In this way, it can be effectively avoided that the front photographing is forcibly exited when the user performs front small-angle overhead shooting, and the user experience is improved.

[0020] In a possible implementation of the first aspect, corresponding to the first function being a front photographing function, when the third angle range is greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is second screen display; and when the third angle range is equal to the first threshold value, the third display state is first screen display.

[0021] It can be understood that, corresponding to the first function being a front photographing function, when the third angle range is greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is inner screen display; wherein the third angle range corresponding to the folding angle a can be 150° < a ≤ 180°, that is, the third display mode is an unfolded mode. Corresponding to the third angle range being equal to the first threshold value, the third display state is outer screen display, wherein the first threshold value can be 0° or an angle value within 10° representing that the electronic device is in a closed state, that is, the third display mode is a closed mode.

[0022] In a possible implementation of the first aspect, the first function corresponds to a cooperative photographing function, the first angle range is greater than a second threshold value and less than or equal to a fourth threshold value, and the first display state is that both the first screen and the second screen display; the second angle range is greater than a first threshold value and less than or equal to the second threshold value, and the second display state is that the first screen displays.

[0023] It can be understood that for the cooperative photographing scenario, if the electronic device detects that the cooperative photographing function is running, the screen state corresponding to the second angle range is a state in which both the inner screen and the outer screen display in the cooperative photographing mode, where the second angle range can be a folding angle a of 0° < a ≤ 60°. For example, if the user is performing a small-angle overhead shot, and it is detected that the folding angle meets the second angle range (for example, the folding angle is 55°, which meets the conventional closed mode), the state in which both the inner screen and the outer screen display in the cooperative photographing mode is still maintained.

[0024] In this way, the situation that the cooperative photographing of the electronic device is forcibly exited when performing a small-angle overhead shot can be avoided, and user experience is improved.

[0025] In a possible implementation of the first aspect, the first function corresponds to a cooperative photographing function, and when the third angle range is greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is that the second screen displays; and when the third angle range is equal to the first threshold value, the third display state is that the first screen displays.

[0026] It can be understood that when the first function corresponds to the cooperative photographing function, and when the third angle range is greater than the third threshold value and less than or equal to the fourth threshold value, the third display state is that the inner screen displays; where the third angle range corresponding to the folding angle a can be 150° < a ≤ 180°, that is, the third display mode is an unfolded mode. When the third angle range is equal to the first threshold value, the third display state is that the outer screen displays, where the first threshold value can be 0° or an angle value within 10°, which represents that the electronic device is in a closed state, that is, the third display mode is a closed mode.

[0027] In a possible implementation of the first aspect, when the foldable electronic device changes to a fourth folding angle, the fourth folding angle belongs to the second angle range, and it is detected that the cooperative photographing function is exited, the electronic device is in a fourth display state, and the fourth display state is that the second screen displays.

[0028] In some embodiments, when the folding angle is in the second angle range, and it is detected that the cooperative photographing mode is forcibly exited, the state of the inner screen and the outer screen display in the cooperative photographing mode will not be maintained, but will be locked to the corresponding inner screen display state in the stand mode (i.e., the fourth display state), so as to avoid the electronic device still maintaining the state of the inner screen and the outer screen display in the cooperative photographing mode when the cooperative photographing mode is exited, and save the power consumption of the electronic device.

[0029] In a possible implementation of the first aspect, when the foldable electronic device changes to the fourth folding angle, and the fourth folding angle belongs to the second angle range, and the starting key is detected to be triggered for the first time, the first screen and the second screen are in the screen-off state; the starting key is detected to be triggered for the second time, and the electronic device is in the fourth display state, and the fourth display state is that the second screen displays.

[0030] In some embodiments, when the folding angle is in the second angle range, and it is detected that the starting (power) key is triggered to cause the screen to be off, the state of the inner screen and the outer screen display in the cooperative photographing mode will not be maintained, but will be locked to the corresponding inner screen display state in the stand mode, so as to avoid the electronic device still maintaining the state of the inner screen and the outer screen display in the cooperative photographing mode when the starting (power) key is triggered to cause the screen to be on again, and save the power consumption of the electronic device.

[0031] In a possible implementation of the first aspect, when the first function is the intelligent table function, the first angle range is greater than or equal to the first threshold value and less than or equal to the fifth threshold value, the first display state is that the first screen displays, the second angle range is greater than the second threshold value and less than or equal to the third threshold value, and the second display state is that the second screen displays, where the first screen is the outer screen, and the second screen is the inner screen.

[0032] In some embodiments, when the first function is the intelligent table function, the first angle range corresponding to the folding angle a can be 0°≤a≤85°, that is, the first display mode is the table mode, and the second angle range is 85°<a≤150°, that is, the second display mode is the stand mode. In some embodiments, the first angle range can also be directly locked to the closed mode. That is, when the folding angle of the electronic device is in the first angle range, the outer screen is displayed based on the closed mode. In this way, the situation that the electronic device repeatedly switches screens can be avoided.

[0033] In a possible implementation of the first aspect, when the first function is the intelligent table function, when the third angle range is greater than the third threshold value and less than or equal to the fourth threshold value, the third display state is that the second screen displays; and when the third angle range is equal to the first threshold value, the third display state is that the first screen displays.

[0034] It can be understood that, corresponding to the first function being the smart table function, when the third angle range is greater than the third threshold value and less than or equal to the fourth threshold value, the third display state is the inner screen display; wherein the third angle range corresponding to the folding angle a can be 150°<a≤180°, that is, the third display mode is the unfolded mode. Corresponding to the third angle range being equal to the first threshold value, the third display state is the outer screen display, wherein the first threshold value can be 0° or an angle value within 10° representing that the electronic device is in the closed state, that is, the third display mode is the closed mode.

[0035] In a second aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores instructions. When the instructions are executed on an electronic device, the electronic device executes the screen display switching method of any one of the first aspect.

[0036] In a third aspect, an embodiment of the present application provides a storage medium for storing instructions executed by one or more processors of an electronic device, and a processor for executing the screen display switching method of any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0037] FIG. 1A shows a schematic diagram of a mobile phone 100 according to an embodiment of the present application;

[0038] FIG. 1B shows a schematic diagram of the mobile phone 100 in a closed mode according to an embodiment of the present application;

[0039] FIG. 1C shows a schematic diagram of the mobile phone 100 in a stand mode according to an embodiment of the present application;

[0040] FIG. 1D shows a schematic diagram of the mobile phone 100 in an unfolded mode according to an embodiment of the present application;

[0041] FIG. 1E shows a schematic diagram of the mobile phone 100 in a table calendar mode according to an embodiment of the present application;

[0042] FIG. 1F shows a schematic diagram of the mobile phone 100 in a tent mode according to an embodiment of the present application;

[0043] FIG. 2 shows a flowchart of a screen display switching method according to an embodiment of the present application;

[0044] FIG. 3 shows a software block diagram of the mobile phone 100 according to an embodiment of the present application;

[0045] FIG. 4 shows a flowchart of entering a lock mode in a screen display switching method according to an embodiment of the present application;

[0046] FIG. 5 shows a flowchart of canceling a lock mode in a screen display switching method according to an embodiment of the present application;

[0047] FIG. 6 shows a hardware structure diagram of a mobile phone 100 according to an embodiment of the present application. DETAILED DESCRIPTION

[0048] Embodiments of the present application provide a screen display switching method, an electronic device, and a storage medium.

[0049] It should be noted that the method provided by the embodiments of the present application can be applied to any electronic device including a folding screen, including but not limited to a mobile phone, a computer, a tablet, etc. configured with a folding screen. In addition, the folding manner of the electronic device is not limited by the embodiments of the present application. For example, the electronic device can be folded in the left-right direction, or can be folded in the up-down direction.

[0050] The structure of the electronic device will be described below taking the mobile phone 100 with a folding screen as an example.

[0051] FIG. 1A shows a schematic diagram of the mobile phone 100. As shown in FIG. 1A, the mobile phone 100 includes an outer screen 10 and an inner screen 20. The outer screen 10 and the inner screen 20 are arranged on two planes of the mobile phone 100 in opposite directions. The inner screen 20 is a folding screen, which includes a first display area 21 (not shown in the figure) and a second display area 22 that can be folded up and down. The mobile phone 100 can be folded or unfolded along a folding edge L2. The outer screen 10 is provided with a rear camera 11, and the first display area of the inner screen 20 is provided with a front camera (not shown in the figure).

[0052] For ease of understanding, the various function modes of the electronic device will be explained and described below taking the mobile phone 100 as an example.

[0053] Closed mode: a mode in which the folding angle a of the mobile phone 100 is 0°≤a≤60°. In the closed mode, the outer screen 10 of the mobile phone 100 can be in a display state, and the inner screen 20 can be in a screen-off state. It can be understood that the folding angle of the mobile phone 100 can be approximately described as the angle between the first display area 21 and the second display area 22. FIG. 1B shows a schematic diagram of the closed mode of the mobile phone 100. As shown in FIG. 1B, the angle a between the first display area 21 and the second display area 22 of the mobile phone 100 is between 0°≤a≤60°.

[0054] Stand mode: a mode in which the folding angle of the mobile phone 100 is 60°≤a≤150°, and the second display area 22 of the inner screen of the mobile phone 100 is in a non-horizontal state (for example, a state not parallel to the ground, or a state in which the angle with the ground is greater than a preset threshold (for example, 5°) within an error range), in which the inner screen 20 of the mobile phone 100 can be in a display state, and the outer screen 10 can be in a screen-off state. FIG. 1C shows a schematic diagram of the stand mode of the mobile phone 100. As shown in FIG. 1C, the angle a between the first display area 21 and the second display area 22 of the mobile phone 100 is between 60° and 150°.

[0055] Unfolded mode: a mode in which the folding angle of the mobile phone 100 is 150°≤a≤180°, in which the inner screen 20 of the mobile phone 100 can be in a display state, and the outer screen 10 can be in a screen-off state. FIG. 1D shows a schematic diagram of the unfolded mode of the mobile phone 100. As shown in FIG. 1D, the angle a between the first display area 21 and the second display area 22 of the mobile phone 100 is between 150° and 180°.

[0056] Desk calendar mode: a mode in which the folding angle of the mobile phone 100 is 0°≤a≤85°, and the second display area 22 of the inner screen of the mobile phone 100 is in a horizontal state (for example, a state parallel to the ground, or a state in which the angle with the ground is within a preset threshold (for example, 5°) within an error range), in which the outer screen 10 of the mobile phone 100 can be in a display state, for example, the outer screen 10 can display a clock or a calendar, and the inner screen 20 can be in a screen-off state. FIG. 1E shows a schematic diagram of the desk calendar mode of the mobile phone 100. As shown in FIG. 1E, the angle a between the first display area 21 and the second display area 22 of the mobile phone 100 is between 0° and 85°.

[0057] Tent mode: a mode in which the folding angle of the mobile phone 100 is 0°≤a≤85°, and the mobile phone 100 is inverted on a horizontal surface (the folding edge L2 is at the highest point of the mobile phone 100 from the horizontal surface), in which the outer screen 10 of the mobile phone 100 can be in a display state, and the inner screen 20 can be in a screen-off state. FIG. 1F shows a schematic diagram of the tent mode of the mobile phone 100. As shown in FIG. 1F, the angle a between the first display area 21 and the second display area 22 of the mobile phone 100 is between 0° and 85°, and the folding edge L2 is at the highest point of the mobile phone 100 from the horizontal surface.

[0058] It can be understood that the range of the folding angle in each of the above modes is exemplary, and the range of the folding angle can be arbitrarily set according to actual needs. The naming of each mode is exemplary and can also be arbitrarily set according to actual needs, which is not limited in the present application.

[0059] The cooperative photographing mode is a mode in which the cooperative photographing function is in an open state, and in the cooperative photographing mode, the inner screen and the outer screen both display an image stream captured by a camera.

[0060] As described above, in some solutions, the electronic device generally switches the display of the inner screen or the outer screen when the electronic device is fixedly unfolded outward or folded inward to a set angle. However, the above solution will limit the normal use of the function of the electronic device in some cases.

[0061] For example, for a scenario of taking a selfie by using a rear camera of the mobile phone, at this time, the mobile phone is in a closed mode, and the outer screen is in a display state. However, if the user unfolds the mobile phone outward to an angle greater than 60°, for example, 75°, during the process of taking a photo, the mobile phone will be switched to the above-described stand mode, and the inner screen is displayed, which causes the rear selfie to be forcibly exited.

[0062] For example, for a scenario of taking a photo based on a front camera, at this time, the mobile phone is in an unfolded mode, and the inner screen is in a display state. If the user wants to take a photo upward, the user will fold the mobile phone inward. If the user folds the mobile phone inward to an angle less than a certain degree (for example, 60°) at this time, the mobile phone will be switched to a closed mode, that is, the outer screen is displayed, which causes the photo to be forcibly exited.

[0063] For example, for a cooperative photographing scenario, it can be understood that after the cooperative photographing function is opened, any camera is used to take a photo, and the inner screen and the outer screen both display an image stream, that is, at this time, the cooperative photographing mode is entered, and the inner screen and the outer screen are both in a display state. For example, if the user opens the cooperative photographing function and uses a front camera to take a selfie, and wants to take a photo upward at a small angle, the user will fold the mobile phone inward. If the user folds the mobile phone inward to an angle less than a certain degree (for example, 60°) at this time, the mobile phone will be switched to a closed mode, that is, only the outer screen is in a display state, which causes the cooperative photographing to be forcibly exited.

[0064] For example, for a scenario in which the mobile phone is in a table calendar mode, for example, the folding angle is 75°, at this time, the outer screen is in a display state. When the user slightly shakes the mobile phone, the second display area of the inner screen of the mobile phone becomes a non-horizontal state. At this time, the mobile phone will be switched to the above-described stand mode in which the inner screen is displayed, and then switched back to the table calendar mode in which the outer screen is displayed, which causes repeated screen switching to occur. Or when the user needs to put the mobile phone upside down, the user needs to unfold the mobile phone outward and then fold the mobile phone inward, which causes the mobile phone to be switched to the stand mode in which the inner screen is displayed, and then switched to the tent mode in which the outer screen is displayed, which also causes repeated screen switching to occur, and affects the user experience.

[0065] To solve the above problems, the application provides a screen display switching method. When the electronic device is in a state of running a preset function, for example, in the above-mentioned rear camera selfie scene, the corresponding running rear selfie function, the above-mentioned front camera shooting scene, the corresponding running front shooting function, the cooperative shooting scene, the corresponding running cooperative shooting function, the calendar mode, the corresponding running wisdom table setting function, etc., the screen state of the electronic device in the first preset angle range is locked, for example, when the rear selfie function is running, the screen state corresponding to the folding angle of 60°<a≤150° is locked in the closed mode of the outer screen display state. Then when the electronic device is detected to switch to the second preset angle range, the lock of the screen state is released, and the display switching corresponding to the normal mode is restored, that is, based on the folding angle mentioned in the above-mentioned function mode, the mode of the current electronic device is determined, and the screen display state is switched based on the mode of the electronic device. For example, for the rear selfie scene, the second preset angle range is 150°<a≤180°, and when the electronic device is detected to be unfolded to an angle greater than 150°, the lock of the screen state is released, and at this time, the angle in the unfolded mode is switched to the inner screen display.

[0066] In this way, based on the above-mentioned scheme, the mode switching of the electronic device can be effectively avoided, the function of the electronic device is forced to exit, and the repeated screen switching and other situations are effectively improved. User experience.

[0067] The screen display switching method in different scenes is illustrated below.

[0068] For example, for the scene of using the rear camera for selfie, if the electronic device detects that the current electronic device is running the rear selfie function, the screen state corresponding to the first preset angle range is locked in the closed mode of the outer screen display state, wherein the first preset angle range can be the folding angle of 60°<a≤150°. For example, if it is detected that the user unfolds the angle to conform to the first preset angle range (for example, the unfolded angle is 75°, which conforms to the normal support mode), the closed mode of the outer screen display state is still maintained.

[0069] If it is detected that the electronic device switches to the second preset angle range, the lock of the screen state is released, and the display switching corresponding to the normal mode is restored, wherein the second preset angle range can be the angle of 0° or 10° or less representing that the electronic device is in a closed state, or 150°<a≤180°. For example, if it is detected that the electronic device is unfolded to an angle greater than 150 degrees, the lock of the corresponding outer screen display state in the closed mode can be released, and the inner screen display state corresponding to the unfolded mode is switched. If it is detected that the electronic device is closed to 0°, the lock of the corresponding outer screen display state in the closed mode can be released.

[0070] It can be understood that the starting mode of the rear selfie function can be starting the rear shooting of triggering the camera application on the outer screen of the electronic device. Based on the screen display switching method of the present application, the situation that the rear selfie is forcibly exited when the user is taking a rear selfie can be effectively avoided, and the user experience is improved.

[0071] It can be understood that in some embodiments, if the rear shooting function is exited or the power key is triggered to cause the screen to be off, the electronic device will not cancel the locking of the screen state in the first preset angle range, that is, the electronic device will still maintain the display state of the outer screen in the closed mode. Until the electronic device switches to the second preset angle range, the locking of the screen state in the first preset angle range is cancelled.

[0072] For example, for the rear shooting scene, if the front shooting is forcibly exited when the user switches to the second preset angle range, if the locking of the screen state in the first preset angle is cancelled at this time, it will cause the inner screen to be directly switched to the display state based on the normal mode at this time. Similarly, if the power key is triggered to cause the screen to be off when the user switches to the second preset angle range, if the locking of the screen state in the first preset angle is cancelled at this time, it will cause the inner screen to be in the screen-on state when the power key is triggered again to turn on the screen, which is inconsistent with the original screen display state seen by the user, resulting in poor user experience. Therefore, the locking of the screen state in the first preset angle range is not cancelled at this time, that is, the electronic device will still maintain the display state of the inner screen, and the locking of the screen state in the first preset angle range will be cancelled only when the electronic device switches to the second preset angle range, which helps to improve the user experience.

[0073] For example, for the scene of using the front camera for shooting, if the electronic device detects that the electronic device is currently running the front shooting function, the screen state corresponding to the first preset angle range is locked as the inner screen display state in the stand mode, and the first preset angle range can be 0°<a≤60°. For example, if the user is taking a small-angle overhead shot, it is detected that the folding angle meets the first preset angle range (for example, the folding angle is 55°, which meets the normal closed mode), and the inner screen display state in the stand mode is still maintained at this time.

[0074] If it is detected that the electronic device is switched to a second preset angle range, the lock of the screen state is released, and the display switching corresponding to the normal mode is restored, where the second preset angle range can be an angle representing that the electronic device is in a closed state, such as a folding angle a being 0° or within 10°, or 150° < a ≤ 180°. For example, if it is detected that the angle of the unfolded electronic device is greater than 150 degrees, the normal unfolded mode is met, at this time, the lock of the corresponding inner screen display state in the stand mode can be released, and the inner screen display state corresponding to the unfolded mode is switched. If it is detected that the electronic device is closed to 0°, the lock of the corresponding inner screen display state in the stand mode can be released, and the outer screen display state corresponding to the closed mode is switched.

[0075] In this way, the situation that the front camera is forcibly exited when the user performs a front small-angle overhead shooting can be effectively avoided, and the user experience is improved.

[0076] It can be understood that, in some embodiments, if the front camera shooting function is exited or the power key is triggered to cause the screen to be turned off, the electronic device will not cancel the lock of the screen state at the first preset angle. Until the electronic device is switched to the second preset angle range, the lock of the screen state at the first preset angle range is cancelled.

[0077] For example, for a front camera shooting scene, if the front camera shooting is forcibly exited when the user switches to the second preset angle range, if the lock of the screen state at the first preset angle is cancelled at this time, the outer screen will be directly switched to the bright screen state, which is inconsistent with the original screen display state seen by the user, resulting in poor user experience. Therefore, at this time, the lock of the screen state at the first preset angle range is not cancelled, that is, the electronic device will still maintain the display state of the inner screen, and the lock of the screen state at the first preset angle range will be cancelled only when the electronic device is switched to the second preset angle range, which helps to improve the user experience.

[0078] For example, for a cooperative shooting scene, if the electronic device detects that the cooperative shooting function is running, the screen state at the first preset angle range is locked to the state that the inner screen and the outer screen are displayed in the cooperative shooting mode, where the first preset angle range can be a folding angle a being 0° < a ≤ 60°. For example, if the user performs a small-angle overhead shooting, and it is detected that the folding angle meets the first preset angle range (for example, the folding angle is 55°, which meets the normal closed mode), the state that the inner screen and the outer screen are displayed in the cooperative shooting mode is still maintained,

[0079] If it is detected that the electronic device is switched to a second preset angle range, the screen state is unlocked, and the display switching corresponding to the normal mode is restored, where the second preset angle range can be an angle of 0° or within 10° of the folding angle a, or 150° < a ≤ 180°, representing that the electronic device is in a closed state. For example, if it is detected that the angle of the unfolded electronic device is greater than 150 degrees, the normal unfolded mode is met, and at this time, the state of displaying the inner screen and the outer screen in the cooperative shooting mode can be released, and the inner screen display state corresponding to the unfolded mode is switched. If it is detected that the electronic device is closed to 0°, the state of displaying the inner screen and the outer screen in the cooperative shooting mode can be released, and the outer screen display state corresponding to the closed mode is switched.

[0080] In this way, the situation that the cooperative shooting of the electronic device is forcibly exited when shooting at a small angle can be avoided, and the user experience is improved.

[0081] In some embodiments, if it is detected that the cooperative shooting mode is forcibly exited or the power key is triggered to cause the screen to be off, the electronic device can cancel the screen state locking in the cooperative shooting mode and lock the screen state to the inner screen display state corresponding to the stand mode. The cooperative shooting mode being forcibly exited can be achieved by triggering the camera application to exit through user upswipe, or triggering the cooperative shooting function to exit through user clicking the cooperative button.

[0082] For example, when the folding angle is in the first preset angle range, if it is detected that the cooperative shooting mode is forcibly exited, the state of displaying the inner screen and the outer screen in the cooperative shooting mode will not be maintained, but will be locked to the inner screen display state corresponding to the stand mode, so that when the cooperative shooting mode is exited, the electronic device is not still in the state of displaying the inner screen and the outer screen in the cooperative shooting mode, and the power consumption of the electronic device is saved.

[0083] Or when the folding angle is in the first preset angle range, if it is detected that the power key is triggered to cause the screen to be off, the state of displaying the inner screen and the outer screen in the cooperative shooting mode will not be maintained, but will be locked to the inner screen display state corresponding to the stand mode, so that when the power key is triggered again to cause the screen to be on, the electronic device is not still in the state of displaying the inner screen and the outer screen in the cooperative shooting mode, and the power consumption of the electronic device is saved.

[0084] For example, for a scenario in a desk calendar mode, the electronic device detects that the smart desk function is running (i.e., the outer screen displays clock or calendar elements), and locks the screen state corresponding to the first preset angle range to be the outer screen display state in the closed mode, where the first preset angle range can be a folding angle a of 0°≤a≤85°. For example, if it is detected that the user expands the angle to be within the first preset angle range (e.g., the expanded angle is 95°, which is consistent with the conventional stand mode), the outer screen display state in the closed mode is still maintained.

[0085] If it is detected that the electronic device switches to the second preset angle range, the lock on the screen state is released, and the display switching corresponding to the conventional mode is restored, where the second preset angle range can be a folding angle a of 0° or an angle within 10° representing that the electronic device is in a closed state, or 150°<a≤180°. For example, if it is detected that the electronic device is expanded to an angle greater than 150 degrees, the lock on the corresponding outer screen display state in the closed mode can be released, and the inner screen display state corresponding to the expanded mode is switched. If it is detected that the electronic device is closed to 0°, the lock on the corresponding outer screen display state in the closed mode can be released. In this way, the situation of repeated screen switching of the electronic device can be avoided.

[0086] It can be understood that in some embodiments, if the smart desk function is exited or the power key is triggered to cause the screen to be turned off, the electronic device will not cancel the above-mentioned lock on the screen state in the first preset angle. Until the electronic device switches to the second preset angle range, the above-mentioned lock on the screen state in the first preset angle range is canceled.

[0087] For example, for a smart desk scenario, if the user switches to the second preset angle range, the smart desk is forcibly exited. If the lock on the screen state in the first preset angle is canceled at this time, the inner screen will be directly switched. Similarly, if the user switches to the second preset angle range, the power key is triggered to cause the screen to be turned off. If the lock on the screen state in the first preset angle is canceled at this time, when the power key is triggered again to turn on the screen, the inner screen is in the on-screen state, which is inconsistent with the original screen display state seen by the user, resulting in poor user experience. Therefore, the lock on the screen state in the first preset angle is not canceled at this time, i.e., the electronic device will still maintain the above-mentioned display state of the inner screen, and the lock on the screen state in the first preset angle range will be canceled only when the electronic device switches to the second preset angle range, which helps to improve the user experience.

[0088] The screen display switching method of the electronic device mentioned in the present application will be introduced below. FIG. 2 shows a schematic diagram of a screen display switching method. The screen display switching method in FIG. 2 can be executed by a processor of an electronic device. As shown in FIG. 2, the method comprises:

[0089] 201: When the electronic device is at a first folding angle, the foldable electronic device runs a first function in a preset display mode, and the first folding angle is in a first angle range; the preset display mode of the foldable electronic device includes a first display mode and a second display mode, the first display mode is used to indicate that when the folding angle of the foldable electronic device is in the first angle range, the screen is in a first display state; the second display mode is used to indicate that when the folding angle of the foldable electronic device is in a second angle range, the screen is in a second display state.

[0090] It can be understood that the first function can include a rear camera selfie scene corresponding to a rear selfie function, a front camera shooting scene corresponding to a front camera shooting function, a cooperative shooting scene corresponding to a cooperative shooting function, a table calendar mode corresponding to a smart table function, etc. The first function can be set according to actual needs, and the present application is not limited.

[0091] When the first function is a rear selfie function, the first angle range is greater than or equal to a first threshold and less than or equal to a second threshold. The first display state is an outer screen display, and the second angle range is greater than the second threshold and less than or equal to a third threshold, and the second display state is an inner screen display.

[0092] For example, when the first function is a rear selfie function, the first angle range corresponding to the folding angle a can be 0°≤a≤60°, that is, the first display mode is a closed mode, and the second angle range can be 60°<a≤150°, that is, the second display mode is a stand mode.

[0093] Corresponding to the first function being a front camera shooting function, the first angle range is greater than the second threshold and less than or equal to a fourth threshold, the first display state is an inner screen display, the second angle range is greater than the first threshold and less than or equal to the second threshold, and the second display state is an outer screen display.

[0094] For example, corresponding to the first function being a front camera shooting function, the first angle range corresponding to the folding angle a can be 60°≤a≤180°, that is, the first display mode is a corresponding stand mode and an unfolded mode, and the second angle range can be 0°≤a≤60°, that is, the second display mode is a closed mode. In some embodiments, the first angle range can also be directly locked as a stand mode. That is, when the folding angle of the electronic device is in the first angle range, the inner screen is displayed based on the stand mode. Corresponding to the first function being a cooperative shooting function, the first angle range is greater than the second threshold and less than or equal to the fourth threshold, the first display state is that the outer screen and the inner screen are displayed, and the second angle range is greater than the first threshold and less than or equal to the second threshold, and the second display state is that the outer screen is displayed.

[0095] For example, corresponding to the first function being a cooperative photographing function, the first angle range corresponding to the folding angle a can be 60°≤a≤180°, the first display mode being a cooperative photographing mode, and the second angle range being 0°≤a≤60°, that is, the second display mode being a closed mode.

[0096] Corresponding to the first function being a smart table setting function, the first angle range being greater than or equal to a first threshold value and less than or equal to a fifth threshold value, the first display state being external screen display, the second angle range being greater than a second threshold value and less than or equal to a third threshold value, and the second display state being internal screen display.

[0097] For example, corresponding to the first function being a smart table setting function, the first angle range corresponding to the folding angle a can be 0°≤a≤85°, that is, the first display mode being a table calendar mode, and the second angle range being 85°<a≤150°, that is, the second display mode being a stand mode. In some embodiments, the first angle range can also be directly locked as a closed mode. That is, when the folding angle of the electronic device is in the first angle range, the external screen display is performed based on the closed mode.

[0098] 202: When the electronic device changes to a second folding angle, the first function is kept running in the first display state of the screen, and the second folding angle is in a second angle range.

[0099] It can be understood that the second angle range can be the first preset angle range mentioned above, and the electronic device can lock the screen state of the first preset angle range, that is, lock the same screen state as the first preset angle range. That is, when the folding angle of the electronic device is in the second angle range, the electronic device keeps running the first function in the first display state of the screen, instead of running the first function based on the conventional second display state.

[0100] For example, corresponding to the first function being a rear-facing selfie function, the screen state of the second angle range is locked as the external screen display state in the closed mode.

[0101] For example, corresponding to the first function being a front-facing photographing function, the screen state of the second angle range is locked as the internal screen display state in the stand mode.

[0102] For example, corresponding to the first function being a cooperative photographing function, the screen state of the second angle range is locked as the state in which the internal screen and the external screen are both displayed in the cooperative photographing mode.

[0103] For example, corresponding to the first function being a smart table setting function, the screen state of the second angle range is locked as the external screen display state in the closed mode.

[0104] In some embodiments, the electronic device can also lock the screen state of the first angle range to a screen state conforming to a regular mode or a specific screen state.

[0105] For example, corresponding to the first function being a rear selfie function, the screen state of the first angle range is locked to an outer screen display state in the closed mode.

[0106] For example, corresponding to the first function being a front camera function, the screen state of the first angle range is locked to an inner screen display state in the stand mode.

[0107] For example, corresponding to the first function being a collaborative shooting function, the screen state of the first angle range is locked to a state in which both the inner screen and the outer screen display in the collaborative shooting mode.

[0108] For example, corresponding to the first function being a smart posing function, the screen state of the first angle range is locked to an outer screen display state in the closed mode.

[0109] 203: when the foldable electronic device switches to a third folding angle, running the first function in a preset display mode;

[0110] In some embodiments, the preset display mode can further include a third display mode, the third display mode being used to indicate that when the folding angle of the foldable electronic device is in a third angle range, the screen is in a third display state.

[0111] Corresponding to the first function being a rear selfie function, corresponding to the third angle range being greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is an inner screen display; wherein the third angle range corresponding to the folding angle a can be 150° < a ≤ 180°, that is, the third display mode is an unfolded mode. Corresponding to the third angle range being equal to a first threshold value, the third display state is an outer screen display, wherein the first threshold value can be 0° or within 10° or other angle values representing that the electronic device is in a closed state, that is, the third display mode is a closed mode.

[0112] Corresponding to the first function being a front camera function, corresponding to the third angle range being greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is an inner screen display; wherein the third angle range corresponding to the folding angle a can be 150° < a ≤ 180°, that is, the third display mode is an unfolded mode. Corresponding to the third angle range being equal to a first threshold value, the third display state is an outer screen display, wherein the first threshold value can be 0° or within 10° or other angle values representing that the electronic device is in a closed state, that is, the third display mode is a closed mode.

[0113] Corresponding to the first function is the cooperative photographing function, and corresponding to the third angle range being greater than the third threshold value and less than or equal to the fourth threshold value, the third display state is the inner screen display; wherein the third angle range corresponding to the folding angle a can be 150°<a≤180°, that is, the third display mode is the unfolded mode. Corresponding to the third angle range being equal to the first threshold value, the third display state is the outer screen display, wherein the first threshold value can be 0° or an angle value within 10° representing that the electronic device is in the closed state, that is, the third display mode is the closed mode.

[0114] Corresponding to the first function is the cooperative photographing function, and corresponding to the third angle range being greater than the third threshold value and less than or equal to the fourth threshold value, the third display state is the inner screen display; wherein the third angle range corresponding to the folding angle a can be 150°<a≤180°, that is, the third display mode is the unfolded mode. Corresponding to the third angle range being equal to the first threshold value, the third display state is the outer screen display, wherein the first threshold value can be 0° or an angle value within 10° representing that the electronic device is in the closed state, that is, the third display mode is the closed mode.

[0115] It should be noted that the first threshold value, the second threshold value, the third threshold value, the fourth threshold value, the fifth threshold value and the like angle threshold values mentioned in the embodiments of the present application can be determined according to actual needs, and the present application is not limited.

[0116] The structure of the electronic device mentioned in the present application will be described below taking the mobile phone 100 as an example.

[0117] FIG. 3 shows a software structure block diagram of the mobile phone 100 with a folding screen according to an embodiment of the present application. The mobile phone 100 can include an application program layer, an application program framework layer, a system library, and a kernel layer.

[0118] The application program layer can include a series of application program packages, for example, can include camera, intelligent table setting, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and the like application programs.

[0119] In some embodiments, the application running the above-mentioned preset function can be used to send a request for locking the folding device state to the folding screen manager of the application program framework layer at startup, for example, can send a locking request for the screen state of the second angle range to the folding screen manager. In some embodiments, the application can also send a locking request for the screen state of the first angle range and the second angle range to the folding screen manager, so that the screen state of the first angle range and the second angle range is locked to the same state in the same mode.

[0120] The application framework layer provides an application programming interface (API) and a programming framework for applications of the application layer. The application framework layer includes some pre-defined functions.

[0121] The application framework layer can include a fold screen manager (FoldScreenManagerEx.java), a fold screen manager service (FoldScreenManagerService.java), a fold screen lock management class (HnLockHalfFoldManager), a device state management service (DeviceStateManagerServices), a display management service (DisplayManagerService), a window management service (WindowManagerServices), a power management service (PowerManagerServices), a device state providing class (DeviceStateProviderImpl), an override request controller (OverrideRequestController), a fold screen sensor controller (DisplayFoldSensorController). Among them,

[0122] The fold screen manager can be used to send a request to lock the fold device state to the fold screen manager service.

[0123] The fold screen manager service can be used to send the parsed data of the locked fold device state to the fold screen lock management class. For example, in some embodiments, the fold screen management service can parse the request to lock the fold screen state, obtain relevant content, such as obtaining the function mode that needs to be locked and the corresponding screen state, etc.

[0124] The fold screen lock management class can be used to listen to the application foreground activity and listen to the screen on-off state. In some embodiments, the fold screen management class can listen to the application foreground and background activity, that is, listen to whether the application or function is exited, so as to determine whether to cancel the lock state of the screen.

[0125] In some embodiments, the fold screen management class can listen to the screen on-off state, that is, listen to whether the power key is triggered, so as to determine whether to cancel the lock state of the screen.

[0126] The fold screen lock management class can also be used to send a lock state request to the device state management service, and the lock state request can include the locked function mode and the corresponding screen state, etc.

[0127] The device state management service can be configured to, when the screen state of the device needs to be locked in a corresponding mode, cover the assignment of the physical state reported by the sensor with the assignment corresponding to the lock state request, update the lock state, submit the lock state, notify the device state pre-callback, and send a state change request to the display management service. The device state management service can also be configured to, when the lock needs to be canceled, send a request to cancel the current lock state to the cover request controller in the foldable screen lock management class, and can be configured to, after receiving the state change request of the cover request controller, cover the assignment of the current mode corresponding to the physical state with the assignment corresponding to the software state lock mode, update the lock state to the physical state, submit the physical state, and the like, so that the cancellation of the lock takes effect.

[0128] The display management service can be configured to send updated display information to the window management service, and send screen power-on and power-off information to the power management service.

[0129] The window management service can be configured to, after receiving the updated display information, adjust the window size based on the updated display information to adapt to the size of the corresponding screen, and perform content display and the like.

[0130] The power management service can be configured to control the screen on and off state based on the screen power-on and power-off information. For example, when the screen power-on and power-off information is inner screen power-on and outer screen power-off, the power management service can perform the inner screen power-on and outer screen power-off operation.

[0131] The device state providing class can be configured to obtain sensor data. For example, the device state providing class can obtain data detected by a posture sensor and data detected by a hall sensor. The posture manager can be configured to detect the folding angle of the electronic device, and the hall sensor can be configured to detect whether the electronic device is in a closed state. For example, when the hall sensor detects that the folding angle of the electronic device is less than 10°, it reports a value corresponding to the closed state. The device state providing class can be configured to determine the folding angle of the current electronic device based on the data detected by the posture sensor, determine the closed state of the electronic device based on the value reported by the hall sensor, and send the folding angle and the closed state to the device state management service.

[0132] The foldable state sensor controller can be configured to obtain the closed state uploaded by the hall sensor, and send a cancel lock state to the foldable screen lock management class.

[0133] The system library can include a plurality of functional modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a 2D graphics engine (for example: SGL), and the like.

[0134] The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications.

[0135] The media library supports playback and recording of multiple commonly used audio, video formats, and static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0136] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing.

[0137] The kernel layer is a layer between hardware and software. The kernel layer at least includes display drivers, camera drivers, audio drivers, sensor drivers, etc.

[0138] The screen display switching method of the present application will be described in detail below in combination with the structure of the electronic device.

[0139] FIG. 4 shows a flowchart of mode locking in a screen display switching method of the present application. As shown in FIG. 4, the screen display switching method includes:

[0140] 401: The application sends a request (LockFoldDevices) to lock the folding device state to the folding screen manager.

[0141] It can be understood that the application can be a camera application or a smart table application, etc. that runs the above-mentioned preset function. When the application is started, the application can send a locking request for the screen state of the second angle range to the folding screen manager.

[0142] In some embodiments, the application can also send a locking request for the screen state of the first angle range and the second angle range to the folding screen manager, so that the screen state of the first angle range and the second angle range is locked to the same state in the same mode.

[0143] In some embodiments, the application can send a locking request for the screen state to the folding screen manager, so that the current screen state is maintained as the screen display state in the corresponding locked mode when the condition for canceling the locking request is not detected.

[0144] For example, for the rear selfie scene, the front shooting scene, and the collaborative shooting scene mentioned in the embodiments of the present application, when the camera application is started, the camera application can send a locking request for the screen state of the first angle range and the second angle range to the folding screen manager, so that the screen state of the first angle range and the second angle range is locked to the outer screen display state in the closed mode.

[0145] For example, for the scenario of running the intelligent swing table function mentioned in the embodiments of the present application, when the intelligent swing table application is started, the intelligent swing table application can send a lock request of the screen state of the first angle range and the second angle range to the fold screen manager, so that the screen state of the first angle range and the second angle range is locked as the outer screen display state in the closed mode.

[0146] 402: The fold screen manager sends a request (LockFoldDevices) for locking the fold device state to the fold screen manager service.

[0147] 403: The fold screen manager service sends the parsed lock fold device state data (parseRequestDevice StateDate) to the fold screen lock management class.

[0148] In some embodiments, the fold screen management service can parse the request for locking the fold screen state, obtain related content, such as obtaining the function mode that needs to be locked and the corresponding screen state, etc.

[0149] 404: The fold screen lock management class listens to the foreground activity (onForegroundActivitiesChanged).

[0150] In some embodiments, the fold screen management class can listen to the foreground and background activities of the application, that is, listen to whether the application or function is exited, so as to determine whether to cancel the lock state of the screen.

[0151] For example, if it is detected that the cooperative shooting is forcibly exited, at this time, the electronic device can determine that the screen state lock in the cooperative shooting mode needs to be cancelled, and the screen state is locked as the corresponding inner screen display state in the stand mode. Wherein, the cooperative shooting mode is forcibly exited can be achieved by triggering the camera application to exit through user up swipe operation, or triggering the cooperative shooting function to exit through user clicking the cooperative button, etc.

[0152] 405: The fold screen lock management class listens to the screen awake state (onAwakeStateChanged).

[0153] In some embodiments, the fold screen management class can listen to the screen awake state, that is, listen to whether the power key is triggered, so as to determine whether to cancel the lock state of the screen.

[0154] For example, when the cooperative photographing function is running, if it is detected that the power key is triggered to cause the screen to be turned off, the electronic device can determine that the screen state lock in the cooperative photographing mode needs to be cancelled, and the screen state is locked to the corresponding inner screen display state in the stand mode. When the power key is triggered again to cause the screen to be turned on, the electronic device still maintains the display state of the inner screen and the outer screen in the cooperative photographing mode, thereby saving the power consumption of the electronic device.

[0155] 406: The folding screen lock management class sends a state request (RequestState) to the device state management service.

[0156] In some embodiments, the folding screen lock management class sends a lock state request to the device state management service, and the lock state request can include the locked function mode and the corresponding screen state.

[0157] 407: The device state management service covers the assignment of the lock state request corresponding to the assignment of the physical state reported by the sensor (onOverrideRequestStatusChangedLocked).

[0158] It can be understood that when the device state management service receives the lock state request, it can obtain the information corresponding to the lock mode without processing the information of the physical state reported by the sensor, that is, without issuing the physical state, so that the screen state is not switched based on the normal mode.

[0159] In some embodiments, the information corresponding to the lock mode can be the assignment corresponding to the lock mode. For example, different assignments corresponding to the stand mode, the closed mode and the cooperative photographing mode can be set, so that the mode lock can be realized by changing the assignment. For example, the assignment corresponding to the stand mode is 2, the assignment corresponding to the closed mode is 4, and the assignment corresponding to the cooperative photographing mode is 14. When the stand mode needs to be locked, the assignment corresponding to the lock mode is changed to 2, that is, the lock corresponding to the stand mode can be realized. Specifically, the program expression mode corresponding to the assignment 2 of the stand mode can be: public static final int DEVICE_STATE_HALF_OPENED=2; the program expression mode corresponding to the assignment 4 of the closed mode can be: public static final int DEVICE_STATE_CLOSED=4; and the program expression mode corresponding to the assignment 14 of the cooperative photographing mode can be: public static final int DEVICE_COORINATION_REAR_DISPLAY=14.

[0160] In some embodiments, the folding screen management class can assign a value to the mActiveOverride function based on the folding screen lock information, for example, assign a value of 1, so that the device management service will not issue screen information corresponding to the physical state data to the display management service.

[0161] 408: The device state management service updates the lock state (updatePendingStateLocked).

[0162] In some embodiments, the device state management service updates the lock state so that the received screen state information corresponding to the lock mode can be updated. For example, in the collaborative shooting scene, if it is detected that the collaborative shooting is forcibly exited, the electronic device can determine that the screen state lock in the collaborative shooting mode needs to be cancelled, and the screen state lock is updated to the corresponding inner screen display state in the stand mode.

[0163] For example, in the rear-facing selfie scene, when the second angle range needs to be locked in the closed mode, the screen state can be updated to the outer screen display state in the closed mode.

[0164] 409: The device state management service submits the lock state (commitPendingState).

[0165] In some embodiments, after the device state management service updates the lock state, the lock state can be submitted so as to take effect.

[0166] 410: The device state management service notifies the device state pre-callback (notifyDeviceStatePreCallback).

[0167] In some embodiments, the device state management service can notify the display management service to perform the callback of the screen state information.

[0168] 411: The device state management service sends a state change request (onStateChange) to the display management service.

[0169] It can be understood that the state change request can include screen display information corresponding to the current lock mode. For example, in the rear-facing selfie scene, when the second angle range needs to be locked in the closed mode, the screen display information is the outer screen display.

[0170] For example, in the collaborative shooting scene, if it is detected that the collaborative shooting is forcibly exited, the electronic device determines that the screen state lock in the collaborative shooting mode needs to be cancelled, and the screen state lock is updated to the corresponding inner screen display state in the stand mode, and the screen display information is the inner screen display.

[0171] In some embodiments, the device state management service can send a screen state change request to the display management service to cause the display management service to send display update information to the window management service to implement the adjustment of the display window size, and to cause the display management service to send screen on / off information to the power management service to implement the switching of the screen between on and off.

[0172] 412: The display management service sends update display information (updateDefaultDisplayContent) to the window management service.

[0173] In some embodiments, the update display information can include screen display information, such as whether it is an outer screen display or an inner screen display.

[0174] 413: The window management service performs display change (onDisplayChange).

[0175] In some embodiments, after receiving the update display information, the window management service can adjust the window size to adapt to the size of the corresponding screen, perform content display, and the like based on the update display information.

[0176] 414: The display management service sends screen on / off information (onLogicalDisplaySwappe) to the power management service.

[0177] In some embodiments, the screen on / off information can include the on / off situation of the inner screen and the outer screen respectively. For example, when it is required to lock the outer screen display state in the closed mode, the screen on / off information can include outer screen on and inner screen off.

[0178] After receiving the screen on / off information, the power management service can control the on / off state of the screen based on the screen on / off information. For example, when the screen on / off information is inner screen on and outer screen off, the power management service can perform the operation of inner screen on and outer screen off.

[0179] FIG. 5 shows a flowchart of a mode lock canceling process in a screen display switching method according to an embodiment of the present application. As shown in FIG. 5, the screen display switching method includes:

[0180] 501: The device state providing class obtains sensor data (onSensorChange).

[0181] In some embodiments, the device state providing class can obtain data detected by a posture sensor and data detected by a hall sensor, where the posture manager can be used to detect the folding angle of the electronic device, and the hall sensor can be used to detect whether the electronic device is in a closed state, for example, the hall sensor reports a value corresponding to the closed state when detecting that the folding angle of the electronic device is less than 10 degrees.

[0182] 502: The device state providing class sends a physical state (setBaseState) to the device state management service.

[0183] In some embodiments, the physical state can refer to the folding angle of the electronic device, the closed state, etc., the device state providing class can determine the folding angle of the current electronic device based on the data detected by the posture sensor, determine the closed state of the electronic device based on the value reported by the hall sensor, and send the folding angle and the closed state to the device state management service.

[0184] 503: The device state management service sends a request to cancel the current lock state (cancelCurrentLockState) to the overlay request controller.

[0185] The device management service can send a lock cancellation request to the overlay request controller based on determining that the folding angle of the electronic device is in the third angle range described above, for example, greater than 150°, or the electronic device is in a closed state.

[0186] It can be understood that the overlay request controller can be a functional module of the folding screen lock management class.

[0187] 504: The overlay request controller determines to cancel the current lock state (cancelCurrentRequestLocked).

[0188] 505: The overlay request controller sends state change information (onStatusChange) to the device state management service.

[0189] It can be understood that the state change information can include physical state information such as folding angle, closed state, etc., and can include information for canceling the lock state.

[0190] In some embodiments, the overlay request controller can send the state change information to the device state management service, so that the device state management service can perform corresponding screen switching based on the state change information, that is, perform screen switching based on the normal mode.

[0191] 506: The device state management service covers the assignment of the physical state with the assignment corresponding to the lock state request (onOverride RequestStatusChangedLocked).

[0192] In some embodiments, when the device state management service receives the physical state information, it can cover the assignment of the current mode corresponding to the physical state with the assignment corresponding to the software state lock mode.

[0193] 507: The device state management service updates the lock state to the physical state (updatePendingStateLocked).

[0194] In some embodiments, the device state management service can cancel the screen switching information corresponding to the lock state and update it to the screen switching information corresponding to the physical state.

[0195] 508: The device state management service commits the physical state (commitPendingState).

[0196] The device state management service can commit the updated physical state to make the cancellation of the lock effective.

[0197] 509: The device state management service notifies the device state pre-callback (notifyDeviceStatePreCallback).

[0198] In some embodiments, the device state management service can notify the display management service to perform the device state pre-callback, so that the display management service can obtain the current required device state, i.e., the screen switching information.

[0199] 510: The folding state sensor controller obtains the closed state uploaded by the Hall sensor (hall fold).

[0200] It can be understood that when the folding state sensor controller obtains the closed state uploaded by the Hall sensor, it can be determined that the lock state needs to be canceled at this time, and then a cancel lock state request can be sent to the folding screen lock management class.

[0201] 511: The folding screen sensor controller sends the cancel lock state (cancelState) to the folding screen lock management class.

[0202] 512: The folding screen lock management class sends a state request (RequestState) to the device state management service.

[0203] It can be understood that the folding screen lock management class can send a request corresponding to the physical state to the device state management service when receiving the unlock request. So that the device state management service can perform the steps 506 to 509 described above.

[0204] In summary, based on the above scheme, the mode switching of the electronic device can be effectively avoided, and the occurrence of situations such as the function of the electronic device being forced to exit, repeated screen switching, and the like can be effectively improved. User experience.

[0205] The hardware structure of the electronic device mentioned in the present application will be introduced below taking the mobile phone 100 as an example.

[0206] As shown in FIG. 6, the mobile phone 100 can include a processor 110, a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, a key 101, and a display screen 102, etc.

[0207] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0208] The processor 110 can include one or more processing units, for example, can include a central processor, an image processor, a digital signal processor DSP, a microprocessor, an artificial intelligence processor, or a programmable logic device, etc. processing module or processing circuit. Different processing units can be independent devices or can be integrated in one or more processors. A storage unit can be provided in the processor 110 for storing instructions and data. In some embodiments, the storage unit in the processor 110 is a cache memory 180. The processor can be used to execute the screen display switching method mentioned in the present application.

[0209] The display screen 102 is used to display human-computer interaction interfaces, images, videos, etc. The display screen 102 includes the outer screen and the inner screen mentioned in the present application.

[0210] The sensor module 190 can include a proximity light sensor, a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0211] The audio module 150 is configured to convert digital audio information into analog audio signals output or convert analog audio input into digital audio signals. The audio module 150 can also be configured to encode and decode audio signals. In some embodiments, the audio module 150 can be disposed in the processor 110, or some functional modules of the audio module 150 can be disposed in the processor 110. In some embodiments, the audio module 150 can include a speaker, a receiver, a microphone, and a headset jack.

[0212] The camera 170 is configured to capture still images or videos. The camera can include the front-facing camera and the rear-facing camera mentioned in the present application.

[0213] Embodiments disclosed in the present application can be implemented in hardware, software, firmware, or a combination thereof. Embodiments of the present application can be implemented as computer programs or program codes executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0214] Program code can be applied to input instructions to perform the functions described in the present application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of the present application, a processing system includes any system that has a processor, such as for example a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0215] Program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with a processing system. When necessary, program code can also be implemented in assembly language or machine language. In fact, the mechanisms described in the present application are not limited to any specific programming language. In any case, the language can be a compiled or interpreted language.

[0216] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on a transitory or non-transitory machine-readable (e.g., computer-readable) medium, which can be read and executed by one or more processors. For example, the instructions can be downloaded from a network or by way of another computer readable medium. Thus, a machine-readable medium can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including without limitation floppy disks, optical disks, optical disks, compact discs, read-only memory (CD-ROMs), magnetic disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic or optical cards, flash memory, or a tangible, machine-readable storage used in the transmission of information over the Internet with a propagated signal in electronic, electromagnetic, or optical form, such as carrier waves, infrared signals digital signals, etc. Accordingly, a machine-readable medium includes any type of medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0217] In the drawings, some of the structural or methodological features can be shown in particular arrangements and / or orders. However, it should be understood that such particular arrangements and / or orders can not be required. Instead, these features can be arranged in a different manner and / or order than shown in the illustrative figures, in some embodiments. Additionally, the inclusion of a structural or methodological feature in a particular figure is not meant to imply that such feature is required in all embodiments, and in some embodiments, these features can not be included or can be combined with other features.

[0218] It should be noted that each unit / module mentioned in the device embodiments of the present application is a logical unit / module, in physical, one logical unit / module can be one physical unit / module, also can be a part of one physical unit / module, also can be realized in combination of multiple physical unit / modules, the physical realization of these logical units / modules is not the most important, the combination of the functions realized by these logical units / modules is the key to solve the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce the units / modules which are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned device embodiments do not have other units / modules.

[0219] It has to be noted that, in the description of the application, the terms "first", "second", etc. are used only for distinguishing between similar elements, and do not connote any order, sequence or priority. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a", "comprises", or "comprising", does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0220] While the application has been illustrated and described in detail in the drawings and foregoing description, the same is to be considered as illustrative and not restrictive in character, it being understood that only the preferred embodiments have been shown and described and that all changes and modifications that come within the spirit of the application are desired to be protected.

Claims

1. A screen display switching method, applied to a foldable electronic device, characterized in that, The screen of the foldable electronic device includes a first screen and a second screen located on opposite sides of the foldable electronic device, respectively, and the foldable electronic device has a preset display mode; The method includes: When the foldable electronic device is at a first folding angle, the foldable electronic device runs a first function in a preset display mode, the first folding angle is in a first angle range, and the preset display mode of the foldable electronic device includes a first display mode and a second display mode, the first display mode is used to indicate that when the folding angle of the foldable electronic device is in the first angle range, the screen is in a first display state, and the second display mode is used to indicate that when the folding angle of the foldable electronic device is in a second angle range, the screen is in a second display state; When the foldable electronic device changes to a second folding angle, the first function is run in the first display state of the screen, and the second folding angle is in the second angle range.

2. The screen display switching method according to claim 1, characterized by, The preset display mode further includes a third display mode, the third display mode is used to indicate that when the folding angle of the foldable electronic device is in a third angle range, the screen is in a third display state, and the method further includes: When the foldable electronic device switches to a third folding angle, the first function is run in the preset display mode; Wherein, the third folding angle is in the third angle range.

3. The screen display switching method according to claim 2, characterized by, Corresponding to the first function is a rear-facing selfie function, The first angle range is greater than or equal to a first threshold value and less than or equal to a second threshold value, and the first display state is that the first screen displays, The second angle range is greater than the second threshold value and less than or equal to a third threshold value, and the second display state is that the second screen displays, Wherein, the first screen is an outer screen, and the second screen is an inner screen.

4. The screen display switching method according to claim 3, characterized by, Corresponding to the first function is a rear-facing selfie function, Corresponding to the third angle range being greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is that the second screen displays; Corresponding to the third angle range being equal to the first threshold value, the third display state is that the first screen displays.

5. The screen display switching method according to claim 2, characterized by, Corresponding to the first function is a front-facing photographing function, The first angle range is greater than a second threshold value and less than or equal to a fourth threshold value, and the first display state is that the second screen displays, The second angle range is greater than a first threshold value and less than or equal to the second threshold value, and the second display state is that the first screen displays, Wherein, the first screen is an outer screen, and the second screen is an inner screen.

6. The screen display switching method according to claim 5, characterized by, Corresponding to the first function is a front-facing photographing function, Corresponding to the third angle range being greater than a third threshold value and less than or equal to a fourth threshold value, the third display state is that the second screen displays; Corresponding to the third angle range being equal to the first threshold value, the third display state is that the first screen displays.

7. The screen display switching method according to claim 2, characterized by, Corresponding to the first function is a cooperative photographing function, The first angle range is greater than a second threshold value and less than or equal to a fourth threshold value, and the first display state is that the first screen and the second screen both display, The second angle range is greater than a first threshold value and less than or equal to a second threshold value, and the second display state is the first screen display. The first screen is an outer screen, and the second screen is an inner screen.

8. The screen display switching method according to claim 7, characterized by, The first function corresponds to a cooperative photographing function, The third display state is the second screen display when the third angle range is greater than a third threshold value and less than or equal to a fourth threshold value. The third display state is the first screen display when the third angle range is equal to the first threshold value.

9. The screen display switching method of claim 8, wherein The electronic device is in the fourth display state when the foldable electronic device changes to a fourth folding angle, the fourth folding angle belongs to the second angle range, and the cooperative photographing function is detected to be exited, and the fourth display state is the second screen display.

10. The screen display switching method according to claim 8, characterized by, The first screen and the second screen are both in the screen-off state when the foldable electronic device changes to a fourth folding angle, the fourth folding angle belongs to the second angle range, and the starting key is detected to be triggered for the first time. The electronic device is in the fourth display state when the starting key is detected to be triggered for the second time, and the fourth display state is the second screen display.

11. The screen display switching method according to claim 2, characterized by, The first function corresponds to a smart table setting function, The first angle range is greater than or equal to a first threshold value and less than or equal to a fifth threshold value, and the first display state is the first screen display. The second angle range is greater than a second threshold value and less than or equal to a third threshold value, and the second display state is the second screen display. The first screen is an outer screen, and the second screen is an inner screen.

12. The screen display switching method according to claim 11, wherein The first function corresponds to a smart table setting function, The third display state is the second screen display when the third angle range is greater than a third threshold value and less than or equal to a fourth threshold value. The third display state is the first screen display when the third angle range is equal to the first threshold value.

13. A computer-readable storage medium, characterized in that, The computer readable storage medium has instructions stored thereon, which, when executed on an electronic device, cause the electronic device to perform the screen display switching method of any one of claims 1 to 12.

14. An electronic device comprising: A memory for storing instructions executed by one or more processors of an electronic device, and a processor for performing the screen display switching method of any one of claims 1 to 12.