Display control method and device

CN119365839APending Publication Date: 2025-01-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380044543.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-06-07
Filing Date
2023-04-19
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Existing foldable electronic devices have an impact on content display in the unfolded and folded states, and the automatic rotation functions of the inner and outer screens interact with each other, making it difficult to control independently and unable to meet users' needs for horizontal and vertical screen displays.

Method used

By introducing independent automatic rotation control marks for the inner and outer screens in electronic equipment, the display directions of the inner and outer screens are controlled respectively, ensuring independent control of the display content under different usage postures, and avoiding the mutual influence of the automatic rotation functions of the inner and outer screens.

Benefits of technology

It achieves independent control of the orientation of the inner and outer screens, meets users' needs for horizontal and vertical screen display, reduces the phenomenon of forced rotation of the display direction caused by application switching, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119365839A_ABST
    Figure CN119365839A_ABST
Patent Text Reader

Abstract

The invention provides a display control method and device, is applied to electronic equipment, and comprises the following steps: in response to a first type of operation of a user, if the electronic equipment is in a folded first use posture, displaying first application content in a first display direction through a first display screen, and if the electronic equipment is in an unfolded first use posture, displaying second application content in a second display direction through a second display screen; displaying the first application content in a first display direction through a second display screen; in response to a second type of operation of the user, if the electronic equipment is switched from the first use posture of the folded state to a second use posture of the folded state, the first control identifier is a first value, the first application content is displayed in a second display direction through the first display screen, and the second display direction is different from the first display direction; the first use posture is different from the second use posture; if the electronic equipment is switched from the first use posture of the unfolded state to the second use posture of the unfolded state, the second control identifier is a second value, and the first application content continues to be displayed in the first display direction through the second display screen.
Need to check novelty before this filing date? Find Prior Art

Description

Display control method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 7, 2022, with application number 202210635122.2 and invention name “Display Control Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of display technology, and in particular to a display control method and device. Background Art

[0003] As foldable screen technology matures, more and more foldable electronic devices are available. When unfolded, a foldable electronic device can function as a tablet, displaying content on its inner screen. When folded, it can function as a mobile phone, displaying content on its outer screen.

[0004] The display states of the inner screen and the outer screen include horizontal and vertical states. Content is displayed in the horizontal or vertical state, but the content display does not meet user needs. It can be seen that the content display of foldable electronic devices needs to be improved.

[0005] Summary of the Invention

[0006] This application provides a display control method and device, the purpose of which is to improve the content display of a foldable electronic device. To achieve the above purpose, this application provides the following technical solutions:

[0007] In a first aspect, the present application provides a display control method, which is applied to an electronic device, wherein the electronic device includes a first display screen and a second display screen, and the method includes: in response to a first type of user operation, if the electronic device is in a first usage posture in a folded state, displaying first application content in a first display direction through the first display screen; if the electronic device is in a first usage posture in an unfolded state, displaying the first application content in the first display direction through the second display screen; in response to a second type of user operation, if the electronic device switches from the first usage posture in the folded state to the second usage posture in the folded state, the first control identifier of the electronic device is a first value, and the first application content is displayed in the second display direction through the first display screen, the second display direction is different from the first display direction, and the first usage posture is different from the second usage posture; if the electronic device switches from the first usage posture in the unfolded state to the second usage posture in the unfolded state, the second control identifier of the electronic device is a second value, and the first application content continues to be displayed in the first display direction through the second display screen.

[0008] It can be seen from the above technical solution that the electronic device can be used in different usage postures of the folded state or the unfolded state, displaying content on the first display screen in the folded state and displaying content on the second display screen in the unfolded state. If the electronic device switches from the first usage posture of the folded state to the second usage posture of the folded state, the first control identifier is the first value, the first display screen switches from the first display direction to the second display direction, and displays the first application content in the second display direction; if the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is the second value, and the second display screen can continue to display the first application content in the first display direction, thereby realizing control of the first display screen and the second display screen based on the first control identifier and the second control identifier. In addition, the first control identifier corresponds to the first display screen, and the second control identifier corresponds to the second display screen. The first control identifier and the second control identifier are independent of each other and do not affect each other. Therefore, the first display screen can be independently controlled based on the first control identifier, and the second display screen can be independently controlled based on the second control identifier, thereby preventing the display of the first display screen from affecting the display of the second display screen.

[0009] For example, the first usage posture and the second usage posture are respectively one of a portrait usage posture, a left landscape usage posture, and a right landscape usage posture, the portrait usage posture corresponds to a portrait display, the left landscape usage posture corresponds to a left landscape display, and the right landscape usage posture corresponds to a right landscape display. If the electronic device is in a folded state and switches from a portrait usage posture to a left landscape usage posture, the first control identifier is a first value, and the first value indicates that the automatic rotation function of the first display screen is turned on, then the electronic device can switch from portrait display to left landscape display of the first application content; if the electronic device is in an unfolded state and switches from a portrait usage posture to a left landscape usage posture, the second control identifier is a second value, and the second value indicates that the automatic rotation function of the second display screen is turned off, then the usage posture of the electronic device changes but the second display screen still displays the first application content in portrait, so that the display of the first display screen and the second display screen can be independently controlled according to whether the automatic rotation function is turned on, thereby avoiding mutual influence between the first display screen and the second display screen.

[0010] In one possible implementation, the method also includes: if the electronic device switches from a first usage posture in an unfolded state to a second usage posture in an unfolded state, the second control identifier is a first value, and the first application content is displayed through the second display screen in a second display direction, and the first application content is the content of the first application running in the foreground of the electronic device; in response to a third type of operation by the user, the second control identifier is adjusted from the first value to the second value; in response to the second type of operation by the user, the electronic device switches from the second usage posture in the unfolded state to the third usage posture in the unfolded state, and the first application content is displayed through the second display screen in the second display direction, and the second usage posture is different from the third usage posture; in response to a fourth type of operation by the user, the application running in the foreground of the electronic device switches from the first application to the second application, and the first application and the second application are horizontal and vertical screen display applications; the second application content is displayed through the second display screen in the second display direction, and the second application content is the content of the second application.

[0011] In this embodiment, if the second control identifier is the first value, it means that the electronic device has turned on the automatic rotation function of the second display screen, and when the usage posture of the electronic device changes in the unfolded state, the display direction of the second display screen may also change. When the second control identifier is maintained at the second value, the application running in the foreground of the electronic device is switched from the first application to the second application of the same type as the first application. The electronic device can display the content of the second application in the display direction when displaying the content of the first application, so that when the second control identifier is the second value, the first application and the second application of the same type can adopt the same display direction, thereby reducing the probability of forced rotation of the display direction of the second display screen due to application switching after the display direction is fixed. For example, when the second control identifier is the first value, the second display screen is displayed in left landscape mode, and the electronic device switches from the gallery application to the settings application. When the settings application is started, the electronic device can display the content of the settings application in the left landscape mode.

[0012] In one possible implementation, the method also includes: in response to a fourth type of operation by the user, the application running in the foreground of the electronic device switches from the second application to the first application; and the content of the first application is displayed in the second display direction through the second display screen, so that when the second control identifier is maintained at the second value, after the electronic device runs the first application again, the content of the first application is still displayed in the previous display direction (i.e., the second display direction).

[0013] In one possible implementation, after displaying the first application content in the second display direction on the second display screen or displaying the second application content in the second display direction on the second display screen, the method further includes: in response to the user's lock screen operation, the second display screen is in a black screen state; when the second display screen switches from the black screen state to the off screen display state, the unlock interface is displayed in the second display direction on the second display screen; in response to the user's unlock operation, the second display screen switches from displaying the unlock interface to displaying the application content, and the second display screen displays the application content in the second display direction. Because the second control identifier is maintained at the second value, the display direction of the electronic device is fixed in the second display direction. At this time, whether displaying the unlock interface or displaying the application content, the electronic device can display in the second display direction. Therefore, after the display direction is fixed, when the application is entered again, the display direction remains unchanged, and no forced rotation of the display direction occurs.

[0014] In one possible implementation, the first application content is the content of the first application running in the foreground of the electronic device, and the first application is a horizontal or vertical screen display type application; the method also includes: in response to the user's fourth type of operation, the application running in the foreground of the electronic device is switched from the first application to the fourth application, and the fourth application is a vertical screen display type application; if the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is the first value, and the fourth application content is displayed through the second display screen in the second display direction or the first display direction, the fourth application content is the content of the fourth application, the usage direction of the first usage posture is one of vertical screen and inverted vertical screen, the usage direction of the second usage posture is opposite to the usage direction of the first usage posture, and the second display direction is opposite to the first display direction. For vertical screen display type applications, after the electronic device switches from the vertical screen usage posture to the inverted vertical screen usage posture, the display direction of the second display screen can change or remain unchanged.

[0015] In one possible implementation, the method further includes: in response to a first type of user operation, if the electronic device is in a special usage posture of the unfolded state, the second control identifier is a first value, and the first application content is displayed in a portrait display orientation via the second display screen; in response to a third type of user operation, the second control identifier is adjusted from the first value to a second value; while the electronic device maintains the special usage posture of the unfolded state, the first application content is displayed in a portrait display orientation via the second display screen. In this embodiment, the special usage posture can be a lying posture. If the electronic device is in the lying posture, the second control identifier is the first value before the first application is launched, and the second display screen can display the first application content in a portrait display orientation; after the first application is launched, the second control identifier is adjusted to the second value, and the first application content can maintain the portrait display unchanged.

[0016] In one possible implementation, the method further includes: if after displaying the first application content, the electronic device is in a special usage posture of the unfolded state and the second control identifier is the first value, maintaining the display direction of the second display screen unchanged. For example, the second display screen displays the first application content in the second display direction, and then the electronic device is in a special usage posture of the unfolded state, even if the second control identifier is the first value, the second display screen still displays the first application content in the second display direction. If switching from the first application to the second application, if the electronic device maintains the special usage posture, the second display screen can display the content of the second application in the second display direction, thereby maintaining the display direction of the second display screen unchanged in the special usage posture.

[0017] In one possible implementation, the method also includes: determining the current usage form of the electronic device through an angle recognition module in the electronic device; determining the current usage posture of the electronic device through a direction recognition module in the electronic device; if the current usage form of the electronic device is a folded form, controlling the display of the first display screen according to the current usage posture of the electronic device and a first control identifier through a first display screen direction control module in the electronic device; if the current usage form of the electronic device is an unfolded form, controlling the display of the second display screen according to the current usage posture of the electronic device and a second control identifier through a second display screen direction control module in the electronic device, thereby realizing control of the first display screen through the first display screen direction control module and control of the second display screen through the second display screen direction control module.

[0018] In one possible implementation, the method also includes: determining the type of the first application running in the foreground of the electronic device; the first display screen direction control module and the second display screen direction control module combine the type of the first application when controlling the display to control the display of the first display screen or the second display screen according to the type of the first application.

[0019] In one possible implementation, if the current usage state of the electronic device is the unfolded state, controlling the display of the second display screen according to the current usage posture of the electronic device and the second control identifier by the second display screen direction control module in the electronic device includes: if the first application is a horizontal screen display application, controlling the second display screen to display in the left horizontal screen when the current usage posture of the electronic device is the left horizontal screen usage posture, and controlling the second display screen to display in the right horizontal screen when the current usage posture of the electronic device is the right horizontal screen usage posture; if the first application is a horizontal or vertical screen display application, the current usage posture of the electronic device is a special usage posture, if it is determined that the second control identifier is the first value before the first application is started, controlling the second display screen to display in the vertical screen; if it is determined that the second control identifier is the first value after the first application is started, controlling the second display screen to display in the display direction before the first application is started; if the first application is a horizontal or vertical screen display application, the current usage posture of the electronic device is not a special usage posture, if it is determined that the second control identifier is the first value, controlling the second display screen to display in the display direction matching the usage posture; if the first application is a horizontal or vertical screen display application, if it is determined that the second control identifier is the second value, controlling the second display screen to display in the original effective direction, which is the display direction last adopted by the second display screen before the second control identifier is adjusted to the second value.

[0020] In one possible implementation, if the current usage posture of the electronic device is the unfolded state, the display of the second display screen is controlled according to the current usage posture of the electronic device and the second control identifier by the second display screen direction control module in the electronic device, including: if the first application is a vertical screen display application, the second control identifier is the first value, and when the current usage posture of the electronic device is the vertical screen usage posture, the second display screen is controlled to be displayed vertically; when the current usage posture of the electronic device is the inverted vertical screen usage posture, the second display screen is controlled to be displayed vertically or inverted vertically.

[0021] In one possible implementation, determining the current usage form of the electronic device through an angle recognition module in the electronic device includes: obtaining the folding angle of the electronic device through the angle recognition module; if the folding angle of the electronic device is greater than a preset angle, determining that the electronic device is in an unfolded state; if the folding angle of the electronic device is less than or equal to the preset angle, determining that the electronic device is in a folded state.

[0022] In one possible implementation, determining the current usage posture of the electronic device through a direction recognition module in the electronic device includes: the direction recognition module obtains the pitch angle of the electronic device based on the current frame acceleration value; the direction recognition module obtains the deflection angle of the electronic device based on the pitch angle of the electronic device; the direction recognition module determines the usage direction of the electronic device based on the deflection angle of the electronic device, and the usage direction of the electronic device represents the usage posture of the electronic device.

[0023] In one possible implementation, the direction recognition module obtains the pitch angle of the electronic device based on the current frame acceleration value, including: if the direction recognition module determines that the modulus of the current frame acceleration value does not exceed a preset modulus threshold, the amplitude difference between the current frame acceleration value and the previous frame acceleration value does not exceed a preset amplitude difference threshold, and the y-axis amplitude of the current frame acceleration value is not a preset value, the pitch angle of the electronic device is obtained according to the current frame acceleration value; the direction recognition module obtains the deflection angle of the electronic device when the pitch angle is less than the preset pitch angle; the direction recognition module determines the use direction of the electronic device based on the deflection angle of the electronic device, including: the direction recognition module corrects the deflection angle of the electronic device, wherein the correction of the deflection angle includes, if it is determined that the deflection angle of the electronic device is negative, correcting the deflection angle of the electronic device to a positive number; if it is determined that the deflection angle of the electronic device is positive, maintaining the deflection angle unchanged; the direction recognition module obtains the use direction of the electronic device based on the corrected deflection angle.

[0024] In one possible implementation, if the direction identification module determines that the modulus of the current frame acceleration value exceeds a preset modulus threshold, or the amplitude difference between the current frame acceleration value and the previous frame acceleration value exceeds a preset amplitude difference threshold, or the y-axis amplitude of the current frame acceleration value is a preset value, the direction identification module determines that the current frame acceleration value is invalid; and / or, when the pitch angle is greater than or equal to the preset pitch angle, the direction identification module determines that the usage posture of the electronic device is a special usage posture; and / or, after determining the usage direction of the electronic device, the direction identification module replaces the previous frame acceleration value with the current frame acceleration value.

[0025] In a second aspect, the present application provides an electronic device, which includes: a first display screen, a second display screen, one or more processors, and a memory; a program is stored on the memory, and when the program is executed by one or more processors, the electronic device executes the above-mentioned display control method.

[0026] In a third aspect, the present application provides a readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned display control method when executed by a processor.

[0027] In a fourth aspect, the present application provides a display control device, which is applied to an electronic device, wherein the electronic device includes a first display screen and a second display screen, and the device includes: a first control module, which is used to respond to a first type of user operation, if the electronic device is in a first usage posture in a folded state, display the first application content in a first display direction through the first display screen; if the electronic device is in a first usage posture in an unfolded state, display the first application content in the first display direction through the second display screen; a first display screen direction control module, which is used to respond to a second type of user operation, if the electronic device switches from the first usage posture in the folded state to the second usage posture in the folded state, the first control identifier of the electronic device is a first value, and the first application content is displayed in the second display direction through the first display screen, the second display direction is different from the first display direction, and the first usage posture is different from the second usage posture; a second display screen direction control module, which is used to respond to a second type of user operation, if the electronic device switches from the first usage posture in the unfolded state to the second usage posture in the unfolded state, the second control identifier of the electronic device is a second value, and the first application content continues to be displayed in the first display direction through the second display screen.

[0028] It can be seen from the above technical solution that the electronic device can be used in different usage postures of the folded state or the unfolded state, displaying content on the first display screen in the folded state and displaying content on the second display screen in the unfolded state. If the electronic device switches from the first usage posture of the folded state to the second usage posture of the folded state, the first control identifier is the first value, the first display screen switches from the first display direction to the second display direction, and displays the first application content in the second display direction; if the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is the second value, and the second display screen can continue to display the first application content in the first display direction, thereby realizing control of the first display screen and the second display screen based on the first control identifier and the second control identifier. In addition, the first control identifier corresponds to the first display screen, and the second control identifier corresponds to the second display screen. The first control identifier and the second control identifier are independent of each other and do not affect each other. Therefore, the first display screen can be independently controlled based on the first control identifier, and the second display screen can be independently controlled based on the second control identifier, thereby preventing the display of the first display screen from affecting the display of the second display screen.

[0029] For example, the first usage posture and the second usage posture are respectively one of a portrait usage posture, a left landscape usage posture, and a right landscape usage posture, the portrait usage posture corresponds to a portrait display, the left landscape usage posture corresponds to a left landscape display, and the right landscape usage posture corresponds to a right landscape display. If the electronic device is in a folded state and switches from a portrait usage posture to a left landscape usage posture, the first control identifier is a first value, and the first value indicates that the automatic rotation function of the first display screen is turned on, then the electronic device can switch from portrait display to left landscape display of the first application content; if the electronic device is in an unfolded state and switches from a portrait usage posture to a left landscape usage posture, the second control identifier is a second value, and the second value indicates that the automatic rotation function of the second display screen is turned off, then the usage posture of the electronic device changes but the second display screen still displays the first application content in portrait, so that the display of the first display screen and the second display screen can be independently controlled according to whether the automatic rotation function is turned on, thereby avoiding mutual influence between the first display screen and the second display screen.

[0030] In one possible implementation, a second display screen direction control module is used to, if the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is the first value, and the first application content is displayed through the second display screen in the second display direction, and the first application content is the content of the first application running in the foreground of the electronic device; the device also includes: an adjustment module and a switching module; the adjustment module is used to adjust the second control identifier from the first value to the second value in response to a third type of operation of the user; the second display screen direction control module is used to, in response to the second type of operation of the user, switch the electronic device from the second usage posture of the unfolded state to the third usage posture of the unfolded state, and display the first application content in the second display direction through the second display screen, and the second usage posture is different from the third usage posture; the switching module is used to, in response to a fourth type of operation of the user, switch the application running in the foreground of the electronic device from the first application to the second application, and the first application and the second application are horizontal and vertical screen display type applications; the second display screen direction control module is used to display the second application content in the second display direction through the second display screen, and the second application content is the content of the second application.

[0031] In this embodiment, if the second control identifier is the first value, it means that the electronic device has turned on the automatic rotation function of the second display screen, and when the usage posture of the electronic device changes in the unfolded state, the display direction of the second display screen may also change. When the second control identifier is maintained at the second value, the application running in the foreground of the electronic device is switched from the first application to the second application of the same type as the first application. The electronic device can display the content of the second application in the display direction when displaying the content of the first application, so that when the second control identifier is the second value, the first application and the second application of the same type can adopt the same display direction, thereby reducing the probability of forced rotation of the display direction of the second display screen due to application switching after the display direction is fixed. For example, when the second control identifier is the first value, the second display screen is displayed in left landscape mode, and the electronic device switches from the gallery application to the settings application. When the settings application is started, the electronic device can display the content of the settings application in the left landscape mode.

[0032] In one possible implementation, the switching module is used to switch the application running in the foreground of the electronic device from the second application to the first application in response to the user's fourth type of operation; the second display screen direction control module is used to display the content of the first application in the second display direction through the second display screen, so that when the second control identifier is maintained at the second value, after the electronic device runs the first application again, the content of the first application is still displayed in the previous display direction (i.e., the second display direction).

[0033] In one possible implementation, the device further includes: a lock screen module for, in response to a user's lock screen operation, placing the second display screen in a black screen state; an unlock module for switching the second display screen from a black screen state to an off-screen display state, and displaying an unlock interface in a second display orientation via the second display screen; and a second display screen direction control module for, in response to a user's unlock operation, switching the second display screen from displaying the unlock interface to displaying application content, and displaying the application content in a second display orientation. Because the second control identifier is maintained at the second value, the display orientation of the electronic device is fixed in the second display orientation. At this time, whether displaying the unlock interface or displaying application content, the electronic device can display in the second display orientation. Therefore, after the display orientation is fixed, the display orientation remains unchanged when the application is entered again, and no forced rotation of the display orientation occurs.

[0034] In one possible implementation, the first application content is the content of the first application running in the foreground of the electronic device, and the first application is a horizontal or vertical screen display type application; the device also includes: a switching module, which is used to switch the application running in the foreground of the electronic device from the first application to the fourth application in response to the user's fourth type of operation, and the fourth application is a vertical screen display type application; a second display screen direction control module, which is used to display the fourth application content in the second display screen in the second display direction or the first display direction when the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is the first value, and the fourth application content is the content of the fourth application, the usage direction of the first usage posture is one of vertical screen and inverted vertical screen, the usage direction of the second usage posture is opposite to the usage direction of the first usage posture, and the second display direction is opposite to the first display direction. For vertical screen display type applications, after the electronic device switches from the vertical screen usage posture to the inverted vertical screen usage posture, the display direction of the second display screen can change or remain unchanged.

[0035] In one possible implementation, the second display screen orientation control module is configured to, in response to a first type of user operation, display the first application content in a portrait orientation on the second display screen by setting the second control identifier to a first value if the electronic device is in a special usage posture of the unfolded state; the device further includes: an adjustment module configured to, in response to a third type of user operation, adjust the second control identifier from the first value to the second value; and the second display screen orientation control module is configured to display the first application content in a portrait orientation on the second display screen when the electronic device maintains the special usage posture of the unfolded state. In this embodiment, the special usage posture may be a lying posture. If the electronic device is in a lying posture, the second control identifier is the first value before the first application is launched, and the second display screen may display the first application content in a portrait orientation; after the first application is launched, the second control identifier is adjusted to the second value, and the first application content may remain displayed in a portrait orientation.

[0036] In one possible implementation, the second display screen direction control module is configured to maintain the display direction of the second display screen unchanged if, after displaying the first application content, the electronic device is in a special usage posture of the unfolded state and the second control identifier is the first value. For example, the second display screen displays the first application content in the second display direction, and then the electronic device is in a special usage posture of the unfolded state, even if the second control identifier is the first value, the second display screen still displays the first application content in the second display direction. If switching from the first application to the second application, the second display screen can display the content of the second application in the second display direction if the electronic device maintains the special usage posture, thereby maintaining the display direction of the second display screen unchanged in the special usage posture.

[0037] In one possible implementation, the device also includes: an angle recognition module and a direction recognition module, the angle recognition module is used to determine the current usage form of the electronic device; the direction recognition module is used to determine the current usage posture of the electronic device; a first display screen direction control module is used to control the display of the first display screen according to the current usage posture of the electronic device and the first control identifier if the current usage form of the electronic device is a folded state; a second display screen direction control module is used to control the display of the second display screen according to the current usage posture of the electronic device and the second control identifier if the current usage form of the electronic device is an unfolded state, thereby realizing control of the first display screen by the first display screen direction control module and control of the second display screen by the second display screen direction control module.

[0038] In one possible implementation, the device also includes: a determination module for determining the type of the first application running in the foreground of the electronic device; a first display screen direction control module and a second display screen direction control module combining the type of the first application when controlling the display to control the display of the first display screen or the second display screen according to the type of the first application.

[0039] In one possible implementation, the second display screen direction control module is configured to control the display of the second display screen according to the current usage posture of the electronic device and the second control identifier if the current usage posture of the electronic device is the unfolded state, including: if the first application is a horizontal screen display application, controlling the second display screen to display in the left horizontal screen when the current usage posture of the electronic device is the left horizontal screen, and controlling the second display screen to display in the right horizontal screen when the current usage posture of the electronic device is the right horizontal screen; if the first application is a horizontal or vertical screen display application, the current usage posture of the electronic device is a special usage posture, if it is determined that the second control identifier is the first value before the first application is started, controlling the second display screen to display in the vertical screen; if it is determined that the second control identifier is the first value after the first application is started, controlling the second display screen to display in the display direction before the first application is started; if the first application is a horizontal or vertical screen display application, the current usage posture of the electronic device is not a special usage posture, if it is determined that the second control identifier is the first value, controlling the second display screen to display in the display direction matching the usage posture; if the first application is a horizontal or vertical screen display application, if it is determined that the second control identifier is the second value, controlling the second display screen to display in the original effective direction, which is the display direction last adopted by the second display screen before the second control identifier is adjusted to the second value.

[0040] In one possible implementation, the second display screen direction control module is used to control the display of the second display screen if the current usage posture of the electronic device is the unfolded state, according to the current usage posture of the electronic device and the second control identifier, including: if the first application is a vertical screen display application, the second control identifier is the first value, and when the current usage posture of the electronic device is the vertical screen usage posture, the second display screen is controlled to be displayed vertically; when the current usage posture of the electronic device is the inverted vertical screen usage posture, the second display screen is controlled to be displayed vertically or inverted vertically.

[0041] In one possible implementation, the angle recognition module is used to obtain the folding angle of the electronic device; if the folding angle of the electronic device is greater than a preset angle, it is determined that the electronic device is in the unfolded state; if the folding angle of the electronic device is less than or equal to the preset angle, it is determined that the electronic device is in the folded state.

[0042] In one possible implementation, the direction recognition module is used to obtain the pitch angle of the electronic device based on the current frame acceleration value; obtain the deflection angle of the electronic device based on the pitch angle of the electronic device; and determine the usage direction of the electronic device based on the deflection angle of the electronic device, where the usage direction of the electronic device represents the usage posture of the electronic device.

[0043] In one possible implementation, the direction identification module is used to obtain the pitch angle of the electronic device according to the current frame acceleration value if it is determined that the modulus of the current frame acceleration value does not exceed a preset modulus threshold, the amplitude difference between the current frame acceleration value and the previous frame acceleration value does not exceed a preset amplitude difference threshold, and the y-axis amplitude of the current frame acceleration value is not a preset value; obtain the deflection angle of the electronic device when the pitch angle is less than the preset pitch angle, and correct the deflection angle of the electronic device, wherein the correction of the deflection angle includes correcting the deflection angle of the electronic device to a positive number if the deflection angle of the electronic device is determined to be a negative number; maintaining the deflection angle unchanged if the deflection angle of the electronic device is determined to be a positive number; and obtaining the usage direction of the electronic device according to the corrected deflection angle.

[0044] In one possible implementation, the direction identification module is configured to determine that the current frame acceleration value is invalid if it is determined that the modulus of the current frame acceleration value exceeds a preset modulus threshold, or the amplitude difference between the current frame acceleration value and the previous frame acceleration value exceeds a preset amplitude difference threshold, or the y-axis amplitude of the current frame acceleration value is a preset value; and / or the direction identification module is configured to determine that the usage posture of the electronic device is a special usage posture when the pitch angle is greater than or equal to a preset pitch angle; and / or the direction identification module is configured to replace the previous frame acceleration value with the current frame acceleration value after determining the usage direction of the electronic device.

[0045] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] FIG1 is a schematic diagram of a foldable electronic device provided by the present application in a usage state;

[0047] FIG2 is a schematic diagram of display content provided by the present application;

[0048] FIG3 is a schematic diagram of the control center menu provided by this application;

[0049] FIG4 is a schematic diagram of display content provided by this application;

[0050] FIG5 is another schematic diagram of display content provided by this application;

[0051] FIG6 is another schematic diagram of display content provided by the present application;

[0052] FIG7 is another schematic diagram of display content provided by the present application;

[0053] FIG8 is another schematic diagram of display content provided by the present application;

[0054] FIG9 is another schematic diagram of display content provided by the present application;

[0055] FIG10 is another schematic diagram of display content provided by the present application;

[0056] FIG11 is another schematic diagram of display content provided by the present application;

[0057] FIG12 is another schematic diagram of display content provided by the present application;

[0058] FIG13 is another schematic diagram of display content provided by the present application;

[0059] FIG14 is another schematic diagram of display content provided by the present application;

[0060] FIG15 is a schematic structural diagram of an electronic device provided by this application;

[0061] FIG16 is a schematic diagram of the software and hardware architecture of the electronic device provided by this application;

[0062] FIG17 is a schematic diagram of the working process of the display control method provided by the present application;

[0063] FIG18 is a schematic diagram of the working process of identifying the usage direction provided by the present application;

[0064] FIG19 is a schematic diagram of the working process of the external screen direction control module provided by the present application;

[0065] Figure 20 is a schematic diagram of the working process of the inner screen direction control module provided in this application. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.

[0067] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0068] The "multiple" involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first" and "second" are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or order.

[0069] To make the description of the following embodiments clear and concise, a brief introduction to the relevant concepts or technologies is first given:

[0070] The unfolded state means that the angle between the first body and the second body of the electronic device is 180 degrees or close to 180 degrees.

[0071] The folded state means that the angle between the first body and the second body of the electronic device can be 0 degrees or close to 0 degrees.

[0072] The first vertical screen use, which may also be referred to as upward vertical screen use or vertical screen use, refers to the vertical screen state when the top of the electronic device is facing upward when the user uses the electronic device. For example, in the world coordinate system, the top of the electronic device facing upward means that the top of the electronic device is facing the positive direction of the Z axis of the world coordinate system or has a certain angle with the positive direction of the Z axis of the world coordinate system. The angle range may be (0, 45 degrees]. In the vertical screen state, the electronic device may be perpendicular to the horizontal plane formed by the XY axes of the world coordinate system or have a certain angle with the horizontal plane. The top of the electronic device generally refers to the end of the electronic device with a camera.

[0073] The second vertical screen use, which may also be referred to as downward vertical screen use or inverted vertical screen use, refers to the vertical screen state when the top of the electronic device is facing downward when the user uses the electronic device. For example, in the world coordinate system, the top of the electronic device facing downward means that the top of the electronic device is facing the negative direction of the Z axis of the world coordinate system or has a certain angle with the negative direction of the Z axis of the world coordinate system. The angle range can be (-45 degrees, 0].

[0074] First landscape mode, also known as left-landscape mode, refers to a landscape mode in which the top of the electronic device faces left. For example, in a world coordinate system, left-landscape mode means that the top of the electronic device faces in the negative direction of the world coordinate system's X-axis. In landscape mode, the electronic device can be parallel to the horizontal plane formed by the world coordinate system's X and Y axes, or at a certain angle to the vertical plane formed by the Y and Z axes.

[0075] The second horizontal screen use, also known as right horizontal screen use, refers to the horizontal screen state in which the top of the electronic device faces right when the user uses the electronic device. For example, in the world coordinate system, the top of the electronic device facing right means that the top of the electronic device faces the positive direction of the X-axis of the world coordinate system.

[0076] The first vertical screen display, the second vertical screen display, the first horizontal screen display, and the second horizontal screen display are four display modes (also called display directions) for electronic devices to display content. These four display modes can be based on one display mode, and the content displayed in other display modes is rotated to a certain extent with reference to this display mode. For example, with the first vertical screen display as the main one, when the electronic device displays content in the first vertical screen, the rotation angle of the content is 0, then the second vertical screen display means that the content is rotated 180 degrees relative to the first vertical screen display, the first horizontal screen display means that the content is rotated 90 degrees counterclockwise relative to the first vertical screen display, and the second horizontal screen display means that the content is rotated 90 degrees clockwise relative to the first vertical screen display. The first vertical screen display can be called an upward vertical screen display or a vertical screen display, the second vertical screen display can be called a downward vertical screen display or an inverted vertical screen display, the first horizontal screen display can be called a left horizontal screen display, and the second horizontal screen display can be called a right horizontal screen display.

[0077] Figure 1 shows a schematic diagram of a foldable electronic device, comprising an inner screen 10, an outer screen 20, a volume button 30, a power button 40, a first camera 50, a second camera 60, a first body 70, and a second body 80. The inner screen 10 can also be referred to as a second display screen, and the outer screen 20 can also be referred to as a first display screen; the inner and outer screens constitute two display screens. The inner screen 10 is larger than the outer screen 20. The inner screen 10 is disposed on the first surface of the first body 70 and the first surface of the second body 80, while the outer screen 20 is disposed on the second surface of the first body 70. The first and second surfaces of the first body 70 are opposing surfaces of the first body 70. A housing is disposed on the second surface of the second body 80. Similarly, the first and second surfaces of the second body 80 are opposing surfaces of the second body 80. The volume button 30 and the power button 40 are disposed on the sides of the second body 80. The first camera 50 is disposed on the first body 70, and the second camera 60 is disposed on the second body 80.

[0078] For ease of description, the foldable electronic device is referred to as an electronic device. The electronic device can have two usage states, wherein the usage states of the electronic device include an unfolded state and a folded state. (1) in FIG1 shows that the electronic device is in the unfolded state. In the unfolded state, the electronic device can be used as a tablet, the electronic device can display content through the inner screen 10, and the first camera 50 can be used as a front camera.

[0079] (2) in FIG1 shows that the electronic device is in a folded state. In the folded state, the electronic device can be used as a mobile phone, the electronic device can display content through the external screen 20, and the second camera 60 can be used as a front camera. In the folded state, the first surface of the first body 70 and the first surface of the second body 80 are in contact with each other, and the part of the inner screen located on the first surface of the first body 70 and the part of the inner screen located on the first surface of the second body 80 are also in contact with each other. That is, in the folded state, the inner screen 10 is not visible to the user.

[0080] Whether the electronic device is used as a tablet or a mobile phone, it can be used in either landscape or portrait mode. When the electronic device is used, the display screen can display content in either landscape or portrait mode. For example, when the electronic device is used in portrait mode, the display screen can display content in portrait mode; when the electronic device is used in landscape mode, the display screen can display content in landscape mode; and of course, when the electronic device is used in portrait mode, the display screen can display content in landscape mode. The landscape mode includes a first landscape mode and a second landscape mode, and the portrait mode includes a first portrait mode and a second portrait mode.

[0081] FIG2 shows a schematic diagram of the display content of a display screen, and the electronic device can control the display content according to the automatic rotation function of the control center. One way to control the display content is that if the automatic rotation function is turned off, the electronic device rotates but the displayed content does not rotate; if the automatic rotation function is turned on, the electronic device rotates and the displayed content can also rotate. That is to say, when the automatic rotation function is turned on, the displayed content can rotate when the electronic device rotates. Generally speaking, the automatic rotation function can also be called a direction lock function, a direction rotation function, etc. The electronic device can be regarded as rotating when it is used from a horizontal screen to a vertical screen, or the electronic device can be regarded as rotating when it is used from a vertical screen to a horizontal screen.

[0082] The display content is explained in conjunction with FIG2 , wherein (1) in FIG2 shows an interface diagram of the control center of the electronic device. The automatic rotation control control (also referred to as the automatic rotation control button or the rotation direction control button) in the control center corresponds to the automatic rotation function. If the automatic rotation control control is turned on, the automatic rotation function is turned on; if the automatic rotation control control is turned off, the automatic rotation function is turned off. In FIG2 (1), the electronic device is in the unfolded state and is used as the first vertical screen of a tablet. In FIG2 (1), the automatic rotation control control is already turned on, so the electronic device has turned on the automatic rotation function.

[0083] The user folds the electronic device inward, and the electronic device switches from the unfolded state to the folded state. The electronic device is used as a mobile phone, as shown in (2) in Figure 2, and the electronic device is used as the first vertical screen of the mobile phone. The user clicks on the photo application in the electronic device to view the photos in the photo application, as shown in (2) in Figure 2 to (3) in Figure 2, and the electronic device can display the photos. The photos are displayed in the first vertical screen display mode. The length of the image in the first vertical screen display mode can be greater than the width of the image. The user can rotate the electronic device, as shown in (4) in Figure 2, and the user rotates the electronic device 90 degrees to the left, and the mobile phone switches from the first vertical screen to the left horizontal screen. Because the automatic rotation function is turned on when the electronic device is used as a tablet, when the electronic device is used as a mobile phone, the automatic rotation function is turned on by default. The automatic rotation function is enabled. In this way, after the electronic device is rotated 90 degrees to the left, the photo displayed by the electronic device changes. The photo can be rotated 90 degrees counterclockwise, as shown in (4) in Figure 2, and the photo is displayed in the left horizontal screen mode. Among them, the left horizontal screen display is when the image is displayed in the vertical screen, the image is rotated 90 degrees counterclockwise. The length of the image in the left horizontal screen display mode can be less than the width of the image.

[0084] When displaying a photo, the user can view the control center menu by sliding down, as shown in (5) in Figure 2. The user clicks the automatic rotation control in the control center to switch the automatic rotation control from on to off, and the corresponding automatic rotation function is turned off, as shown in (6) in Figure 2. The automatic rotation function is turned off.

[0085] The user can fold the electronic device outward, and the electronic device switches from the folded state to the unfolded state, and the electronic device is used as a tablet first, as shown in (7) in Figure 2. The user can click on the photo application in the electronic device to view the photos in the photo application, such as entering (8) in Figure 2 from (7) in Figure 2, and the electronic device can display the photos, and the photos are displayed in the first vertical screen display mode. The user can rotate the electronic device, as shown in (9) in Figure 2, and the user rotates the electronic device 90 degrees to the left. Because the automatic rotation function is turned off when the electronic device is used as a mobile phone, when the electronic device is used as a tablet, the tablet has the automatic rotation function turned off by default, and the automatic rotation function is disabled. After the electronic device is rotated 90 degrees to the left, the photos displayed on the electronic device do not rotate, as shown in (9) in Figure 2, and the photos are still displayed in the first vertical screen display mode.

[0086] Combined with Figure 2, it can be seen that after the electronic device is switched from the unfolded state to the folded state, the automatic rotation function of the electronic device in the unfolded state can continue to act on the electronic device in the folded state, so that the automatic rotation function of the electronic device in the unfolded state can affect the use of the electronic device in the folded state; similarly, after the electronic device is switched from the folded state to the unfolded state, the automatic rotation function of the electronic device in the folded state can affect the use of the electronic device in the unfolded state. For example, if the automatic rotation function is turned on in the unfolded state, then after the electronic device is switched to the folded state, the automatic rotation function of the electronic device in the folded state is turned on by default; if the automatic rotation function is turned off in the unfolded state, after the electronic device is switched to the folded state, the automatic rotation function of the electronic device in the folded state can be turned off by default, so that the automatic rotation of the inner and outer screens of the electronic device cannot be independently controlled, and thus the horizontal and vertical display switching of the inner and outer screens of the electronic device cannot meet user needs.

[0087] To address the above issues, the present application provides a display control method that can achieve separate control of the rotation direction of the inner and outer screens, and independently control the automatic rotation of the inner and outer screens, meeting the user's demand for switching the display between the horizontal and vertical screens of the inner and outer screens, thereby reducing the mutual influence of the automatic rotation functions of the electronic device when used as a mobile phone and a tablet. Independent control means that the automatic rotation of the inner screen will not affect the automatic rotation of the outer screen, and the automatic rotation of the outer screen will not affect the automatic rotation of the inner screen.

[0088] In this embodiment, the inner screen automatic rotation function and the outer screen automatic rotation function are two independent functions. The corresponding inner screen automatic rotation control control and the outer screen automatic rotation control control are two variables. The electronic device detects these two variables as follows:

[0089] One detection method is to set an automatic rotation control control in the electronic device and determine the current usage state of the electronic device based on the folding angle. If the electronic device is in the unfolded state, the automatic rotation control control is the inner screen automatic rotation control control; if the electronic device is in the folded state, the automatic rotation control control is the outer screen automatic rotation control. The folding angle is the angle between the first body of the electronic device and the second body of the electronic device.

[0090] Another detection method is to set two automatic rotation control controls in the electronic device. As shown in Figure 3, the control center menu includes an external screen automatic rotation control control and an internal screen automatic rotation control control. The external screen automatic rotation control control corresponds to the external screen automatic rotation function. When the electronic device is used as a mobile phone, the external screen automatic rotation control control can control the horizontal and vertical screen display switching of the external screen of the electronic device; the internal screen automatic rotation control control corresponds to the internal screen automatic rotation function. When the electronic device is used as a tablet, the internal screen automatic rotation control control can control the horizontal and vertical screen display switching of the internal screen of the electronic device. When the electronic device is configured as shown in Figure 3, the electronic device can detect whether the external screen automatic rotation control control is turned on, and detect whether the internal screen automatic rotation control control is turned on. For example, when the electronic device is in the unfolded state, detect whether the internal screen automatic rotation control control is turned on.

[0091] FIG4 shows an example of displayed content. FIG4 is directed to a scenario where the automatic rotation function of the electronic device is turned on when the electronic device is in the unfolded state, but the automatic rotation function is turned off when the electronic device is in the folded state. In the scenario shown in FIG4, the electronic device is configured with an automatic rotation control control. The electronic device can determine whether the automatic rotation control control is for the inner screen or the outer screen according to the usage form of the electronic device. As shown in FIG4 (1), the automatic rotation control control is enabled when the electronic device is in the unfolded state, and the automatic rotation function is turned on. The user can fold the electronic device inward, and the electronic device switches from the unfolded state (1) in FIG4 to the folded state (2) in FIG4 for use. When the electronic device was in the folded state last time, the automatic rotation function of the electronic device was turned off. Therefore, after the electronic device switches from the unfolded state to the folded state, the automatic rotation function of the electronic device in the folded state is still turned off. Then, when the user slides down to view the control center menu, the electronic device can display the control center menu according to FIG4 (3). In FIG4 (3), the automatic rotation control control is turned off, and the automatic rotation function is turned off. The user slides up the control center menu, and the electronic device switches from displaying the control center menu to displaying the desktop, such as switching from FIG4 (3) to FIG4 (4). The user can click on the photo application in the electronic device to view the photos in the photo application, such as entering (5) in Figure 4 from (4) in Figure 4, and the electronic device can display the photos, and the photos are displayed in the first vertical screen display mode. The user can rotate the electronic device, as shown in (6) in Figure 4, and the user rotates the electronic device 90 degrees to the left. Because the automatic rotation function is turned off when the electronic device is used as a mobile phone, the photos displayed on the electronic device do not rotate after the electronic device is rotated 90 degrees to the left, as shown in (6) in Figure 4, and the photos are still displayed in the first vertical screen display mode.

[0092] Based on the example in Figure 4, it can be seen that when the electronic device is in the unfolded state, the electronic device has the automatic rotation function turned on. After switching from the unfolded state to the folded state, because the electronic device had turned off the automatic rotation function when it was in the folded state last time, under the premise that the inner and outer screens are automatically controlled separately, although the electronic device has the automatic rotation function turned on, the automatic rotation function is valid for the unfolded state and invalid for the folded state. The automatic rotation function is still turned off in the folded state, so that the automatic rotation function in the unfolded state does not affect the automatic rotation function in the folded state. In this way, when the electronic device is in the folded state, the electronic device can control the display of content in the same way as when the automatic rotation function is turned off. The automatic rotation function is generally turned off when the user turns off the automatic rotation function when the electronic device is in the folded state, indicating that the user prohibits horizontal and vertical screen display when folding and using the electronic device. Then, the electronic device continues to turn off the automatic rotation function in the folded state, and meets the user's requirements for horizontal and vertical screen display while being able to control the display of the inner and outer screens separately.

[0093] FIG5 shows another example of display content. In FIG5, the electronic device is configured with two automatic rotation control controls. For example, when the electronic device is in the folded state of FIG5 (1), the user slides down to display the control center menu of the electronic device. One form of the control center menu is shown in FIG5 (2), wherein the outer screen automatic rotation is the outer screen automatic rotation control control, and the inner screen automatic rotation is the inner screen automatic rotation control. The electronic device turns on the outer screen automatic rotation function and turns off the inner screen automatic rotation function. After the power station device turns on the outer screen automatic rotation function, the user views the photo as shown in FIG5 (3) to FIG5 (5). When the electronic device is used in the first vertical screen, the photo is displayed in the first vertical screen display mode. The user rotates the electronic device 90 degrees to the left, and the photo is also rotated and displayed in the first horizontal screen display mode. As can be seen from the example in FIG5, turning off the inner screen automatic rotation function does not affect the content displayed on the outer screen. The electronic device can control the outer screen according to the outer screen automatic rotation function to meet the user's requirements for the horizontal and vertical screen display of the outer screen.

[0094] Figures 6 and 7 show examples of content displayed when the electronic device is in the unfolded state. In Figure 6, the electronic device is provided with an automatic rotation control, and the electronic device determines whether the automatic rotation control is for the inner screen or the outer screen according to the usage form. (1) in Figure 6 and (3) in Figure 6 show that the electronic device has the automatic rotation function turned on in the folded state, and the electronic device has the automatic rotation function turned off in the unfolded state. Then, when the electronic device is rotated in the folded state, the displayed content can also be rotated, and when the electronic device is rotated in the unfolded state, the displayed content does not rotate. As shown in (4) to (6) in Figure 6, when the electronic device is used in the first vertical screen in the unfolded state, the photo can be displayed in the first vertical screen, and when the electronic device is rotated to the first left horizontal screen for use, the photo does not rotate.

[0095] In FIG7 , the electronic device is provided with two automatic rotation controls, namely, the outer screen automatic rotation and the inner screen automatic rotation. (2) in FIG7 shows that the electronic device has turned on the inner screen automatic rotation function and turned off the outer screen automatic rotation function. Then, when the electronic device sends the rotation in the expanded state, the content displayed can also be rotated. As shown in (3) to (5) in FIG7 , when the electronic device is used in the first vertical screen in the expanded state, the photo can be displayed in the first vertical screen. When the electronic device is rotated to the first left horizontal screen for use, the photo is also rotated and displayed in the first left horizontal screen.

[0096] As can be seen from the examples in Figures 6 and 7, the automatic rotation function of the outer screen does not affect the content displayed on the inner screen. The electronic device can control the inner screen according to the automatic rotation function of the inner screen to meet the user's requirements for the horizontal and vertical display of the inner screen.

[0097] In addition, when the electronic device implements the display control method, it can control the content display of the application according to the type of application, wherein the types of application include: first type application, second type application and third type application. The first type application may be a forced landscape application, which can be displayed in left landscape and / or right landscape, such as when the electronic device is in left landscape mode, the forced landscape application can be displayed in left landscape mode, and when the electronic device is in right landscape mode, the forced landscape application can be displayed in right landscape mode. The second type application may be a forced portrait application, which can be displayed in portrait mode and / or inverted portrait mode, such as when the electronic device is in portrait mode, the forced portrait application can be displayed in portrait mode, and when the electronic device is in portrait mode, the forced portrait application can be displayed in portrait mode or inverted portrait mode.

[0098] The third type of application can be an application whose direction can be automatically rotated according to the device state (also called the usage posture of the electronic device). In one example, before the electronic device enables the third type of application, the electronic device turns on the automatic rotation function, then the display of the third type of application can also change after the electronic device is rotated. For example, when the electronic device is used in portrait mode, the third type of application can be displayed in portrait mode, and when the electronic device is used in left landscape mode, the third type of application can be displayed in left landscape mode. However, if the electronic device turns off the automatic rotation function after turning on the third type of application, the electronic device can continue to display the third type of application in the display mode before turning it off. For example, if the electronic device is used in left landscape mode and the third type of application is displayed in left landscape mode, and the electronic device turns off the automatic rotation function, then the electronic device can continue to display the third type of application in left landscape mode. If the electronic device turns off the third type of application or switches the third type of application to the background, when the electronic device runs the third type of application in the foreground, the electronic device can display the changed third type of application in the default display mode.

[0099] For example, when an electronic device is used as a mobile phone, it includes first-type applications, second-type applications, and third-type applications. The first-type applications may be game applications, the second-type applications may be applications such as the desktop and WeChat, and the third-type applications may be applications such as settings and a gallery. When an electronic device is used as a tablet, it includes first-type applications and third-type applications. The first-type applications may be game applications, and the third-type applications may be applications other than game applications, such as the desktop, a gallery, and WeChat.

[0100] The following is an explanation using different types of applications as examples, where FIG8 shows an example of a display of a game application when the electronic device is used as a mobile phone. FIG8 (1) shows that when the electronic device displays the desktop, the user swipes down to view the control center menu, and the automatic rotation control in the control center menu is turned off, indicating that the electronic device has turned off the automatic rotation function. The user swipes up the control center menu, and the electronic device switches from displaying the control center menu in FIG8 (1) to displaying the desktop in FIG8 (2). The user then clicks on the game icon on the desktop, and the electronic device starts the game application. Because the electronic device is used in portrait mode, after starting the game application, the electronic device can display the game content in the left horizontal screen as shown in FIG8 (3).

[0101] If the user rotates the electronic device 90 degrees to the left, the electronic device switches from portrait screen use to left landscape screen use, and the corresponding electronic device can display the game content in the left landscape screen as shown in (4) in Figure 8; if the user rotates the electronic device 90 degrees to the right when the electronic device is in portrait screen use, the electronic device switches from portrait screen use to right landscape screen use, and the corresponding electronic device can display the game content in the right landscape screen as shown in (5) in Figure 8.

[0102] Figure 9 shows an example of the desktop display when the electronic device is used as a mobile phone. (1) in Figure 9 shows that when the electronic device displays the desktop, the user slides down to view the control center menu. The automatic rotation control in the control center menu is turned on, indicating that the electronic device has turned on the automatic rotation function. The user slides the control center menu upward, and the electronic device switches from displaying the control center menu in Figure 9 (1) to displaying the desktop in Figure 9 (2). Because the electronic device is used in portrait mode, the electronic device can display the desktop in portrait mode. The user rotates the electronic device 90 degrees to the left, and the electronic device switches from portrait mode to left horizontal mode. Because the desktop is a forced portrait application, after the electronic device switches to left horizontal mode, the electronic device still displays the desktop in portrait mode, as shown in (3) in Figure 9.

[0103] Figure 10 shows an example of displaying photos when the electronic device is used as a mobile phone. (1) in Figure 10 shows that when the electronic device displays the desktop, the user slides down to view the control center menu. The automatic rotation control in the control center menu is turned on, indicating that the electronic device has turned on the automatic rotation function. The user slides the control center menu upward, and the electronic device switches from displaying the control center menu in Figure 10 (1) to displaying the desktop in Figure 10 (2). The user then clicks the gallery icon on the desktop, and the electronic device starts the gallery application. Because the electronic device is used in portrait mode, after turning on the gallery application, the electronic device can display photos in portrait mode as shown in Figure 10 (3).

[0104] The user rotates the electronic device 90 degrees to the left, and the electronic device switches from portrait mode to left landscape mode. Since the gallery application can change the display mode according to the rotation of the electronic device, after the electronic device switches to left landscape mode, the electronic device displays the photos in the left landscape mode as shown in (4) in Figure 10. The user slides down the control center menu, and the electronic device displays the control center menu. The user clicks the automatic rotation control control, and the automatic rotation control control switches from the on state to the off state, as shown in (5) and (6) in Figure 10, and the electronic device turns off the automatic rotation function. Then the user slides up the control center menu, and the electronic device continues to display the photos, such as continuing to display the photos in the left landscape mode as shown in (7) in Figure 10. The user rotates the electronic device 90 degrees to the right, and the electronic device switches to portrait mode. Since the electronic device turns off the automatic rotation function, the electronic device can display the photos in the left landscape mode as shown in (8) in Figure 10.

[0105] FIG11 shows an example of a display of a game application when the electronic device is used as a tablet. FIG11 (1) shows that when the electronic device displays the desktop, the user slides down to view the control center menu. The automatic rotation control in the control center menu is turned on, indicating that the electronic device has turned on the automatic rotation function. The user slides up the control center menu, and the electronic device switches from displaying the control center menu in FIG11 (1) to displaying the desktop in FIG11 (2). The user then clicks on the game icon on the desktop, and the electronic device starts the game application. When the game application is enabled, the electronic device is used in portrait mode, but the game application is a forced landscape application. After the game application is turned on, the electronic device does not display the game content in portrait mode, but displays the game content in the left landscape mode as shown in FIG11 (3).

[0106] If the user rotates the electronic device 90 degrees to the left, the electronic device switches from portrait mode to left landscape mode, and the corresponding electronic device can display the game content in the left landscape mode as shown in (4) in Figure 11; if the user rotates the electronic device 90 degrees to the right when the electronic device is in portrait mode, the electronic device switches from portrait mode to right landscape mode, and the corresponding electronic device can display the game content in the right landscape mode as shown in (5) in Figure 11.

[0107] Figure 12 shows an example of displaying photos when the electronic device is used as a tablet. (1) in Figure 12 shows that when the electronic device displays the desktop, the user slides down to view the control center menu. The automatic rotation control in the control center menu is turned on, indicating that the electronic device has turned on the automatic rotation function. The user slides the control center menu upward, and the electronic device switches from displaying the control center menu in Figure 12 (1) to displaying the desktop in Figure 12 (2). The user then clicks the gallery icon on the desktop, and the electronic device starts the gallery application. Because the electronic device is used in portrait mode, after turning on the gallery application, the electronic device can display photos in portrait mode as shown in Figure 12 (3).

[0108] The user rotates the electronic device 90 degrees to the left, and the electronic device switches from portrait mode to left landscape mode. Since the gallery application can change the display mode according to the rotation of the electronic device, after the electronic device switches to left landscape mode, the electronic device displays the photos in the left landscape mode as shown in (4) in Figure 12. The user slides down the control center menu, and the electronic device displays the control center menu. The user clicks the automatic rotation control control, and the automatic rotation control control switches from the on state to the off state, as shown in (5) and (6) in Figure 12, and the electronic device turns off the automatic rotation function. Then the user slides up the control center menu, and the electronic device continues to display the photos, such as continuing to display the photos in the left landscape mode as shown in (7) in Figure 12. The user rotates the electronic device 90 degrees to the right, and the electronic device switches to portrait mode. Since the electronic device turns off the automatic rotation function, the electronic device can display the photos in the left landscape mode as shown in (8) in Figure 12.

[0109] As shown in Figure 12 above, after the electronic device turns off the automatic rotation function, if the electronic device is locked and unlocked, the electronic device can display the application content in portrait mode. As shown in Figure 13, (1) in Figure 13 shows that when the electronic device is used with the left horizontal screen of the tablet and the left horizontal screen displays the desktop, the user presses the power button, and the electronic device switches from displaying the desktop to a black screen, that is, the electronic device enters the lock screen state of (2) in Figure 13. When the user unlocks, the electronic device displays the unlock interface of (3) in Figure 13, and the user can unlock with a fingerprint or face. After successful unlocking, the electronic device displays the desktop, and at this time the electronic device displays the desktop in portrait mode in the manner of (4) in Figure 13.

[0110] In FIG13 , the electronic device turns off the automatic rotation function after being in landscape mode. If the electronic device is locked and then unlocked, the electronic device is used in landscape mode but displays content in portrait mode. This display goes against the user's original intention. For this reason, this embodiment can be displayed in the manner shown in FIG14 . (1) in FIG14 shows that when the electronic device is used in the left landscape mode of the tablet and the left landscape mode displays the desktop, the user presses the power button, and the electronic device switches from displaying the desktop to a black screen, that is, the electronic device enters the lock screen state of (2) in FIG14 . When the user unlocks the device, the electronic device displays the unlock interface of (3) in FIG14 , and the user can unlock with a fingerprint or a face. After successful unlocking, since the electronic device displayed the desktop in landscape mode before locking the screen, the electronic device can display the desktop in landscape mode in the manner of (4) in FIG14 .

[0111] In this embodiment, the above-mentioned electronic device can be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, an in-vehicle electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, etc.

[0112] Figure 15 shows a schematic diagram of the hardware structure of an electronic device. The electronic device may include: a processor, an external memory interface, an internal memory, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, antenna 1, antenna 2, a mobile communication module, a wireless communication module, a sensor module, buttons, a motor, an indicator, an audio module, a camera, a display, and a subscriber identification module (SIM) card interface. The audio module may include a speaker, a receiver, a microphone, and a headphone jack, and the sensor module may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0113] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0114] A processor may include one or more processing units. For example, a processor may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The processor is the nerve center and command center of an electronic device. The controller can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.

[0115] The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor through the external memory interface to implement the data storage function. For example, processing rules, automatic rotation control control flag, etc. are saved in the external memory card. The internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory. For example, in the present application, the processor executes the instructions stored in the internal memory to enable the electronic device to execute the display control method provided by the present application.

[0116] The display screen can be used to display images or videos. The display screen includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED (Micro OLED) or a quantum dot light emitting diode (QLED). In some embodiments, the electronic device may include 2 or N display screens, where N is a positive integer greater than 2. As shown in Figure 1, the electronic device may include an inner screen and an outer screen.

[0117] The camera is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard red, green, blue (RGB), YUV, or other formats. In some embodiments, the electronic device may include 2 or N cameras, where N is a positive integer greater than 2.

[0118] An operating system runs on the above components, such as the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. Applications can be installed and run on this operating system.

[0119] The operating system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device. Figure 16 is a block diagram of the software and hardware structure of the electronic device. The software and hardware structure adopts a layered architecture, which divides the software and hardware into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. Taking the Android system as an example, in some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer (Framework), the system layer, the sensor control center (sensor hub) layer and the hardware layer.

[0120] Among them, the application layer may include a series of application packages. Application packages may include APPs such as camera, gallery, calendar, call, map, WLAN, music, video, etc. The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc. The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. For example, the window manager can obtain the status of the automatic rotation control in the control center menu. The status of the automatic rotation control includes on and off.

[0121] The system library may include multiple functional modules. For example: surface manager, media library, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. The system library may also include an inner screen direction control module and an outer screen direction control module. The inner screen direction control module is used to control the real-time display direction of the inner screen, and the outer screen direction control module is used to control the real-time display direction of the outer screen. The real-time display direction may include at least one of vertical screen display, left horizontal screen display, right horizontal screen display, and inverted vertical screen display. The inner screen direction control module may be referred to as a second display screen direction control module, and the outer screen direction control module may be referred to as a first display screen direction control module.

[0122] The sensor hub layer is used to obtain data from the hardware layer. For example, the sensor hub layer can obtain acceleration data (such as acceleration values) from the accelerometer and Hall effect device data from the Hall effect device. The sensor hub layer can include a direction recognition module and an angle recognition module. The angle recognition module is used to obtain Hall effect device data and calculate the folding angle based on the Hall effect device data. The folding angle is the angle between the first and second bodies of the electronic device. The direction recognition module is used to calculate the use direction of the electronic device based on the acceleration value. The use direction is used to indicate the use posture (also called the use posture) of the electronic device, such as portrait or left landscape. The hardware layer includes hardware such as accelerometers and Hall effect devices. The accelerometer can feedback acceleration values ​​to the direction recognition module, and the Hall effect device can feedback Hall effect device data to the angle recognition module.

[0123] In some examples, the direction recognition module and the angle recognition module can respectively feedback information to the inner screen direction control module and the outer screen direction control module. For example, the direction recognition module can feedback the usage direction to the inner screen direction control module and the outer screen direction control module, and the angle recognition module can feedback the folding angle to the inner screen direction control module and the outer screen direction control module. If the folding angle indicates that the electronic device is in the unfolded state, the inner screen direction control module is enabled, and the inner screen direction control module controls the real-time display direction of the inner screen; if the folding angle indicates that the electronic device is in the folded state, the outer screen direction control module is enabled, and the outer screen direction control module controls the real-time display direction of the outer screen.

[0124] In some examples, the angle recognition module can feedback the folding angle to the direction recognition module, and the folding angle is used to control the direction recognition module to feedback the usage direction to one of the inner screen direction control module and the outer screen direction control module. For example, if the folding angle indicates that the electronic device is in the unfolded state, the direction recognition module feedbacks the usage direction to the inner screen direction control module, the inner screen direction control module is enabled, and the inner screen direction control module controls the real-time display direction of the inner screen; if the folding angle indicates that the electronic device is in the folded state, the direction recognition module feedbacks the usage direction to the outer screen direction control module, the outer screen direction control module is enabled, and the outer screen direction control module controls the real-time display direction of the outer screen. During the control process of the outer screen direction control module and the inner screen direction control module, the application framework layer can feedback the status of the automatic rotation control control, such as feedback of the automatic rotation control control flag. If flag == false, it means that the electronic device has turned off the automatic rotation control control; if flag == true, it means that the electronic device has turned on the automatic rotation control control.

[0125] The electronic device calls the angle recognition module, the direction recognition module, the external screen direction control module, and the internal screen direction control module to implement the display control method. The working process of the display control method is shown in Figure 17. The display control method may include the following steps:

[0126] 1) The angle recognition module can obtain Hall device data from the Hall device. The angle recognition module can obtain the folding angle of the electronic device based on the Hall device data. The folding angle of the electronic device is used to determine whether the electronic device is in the unfolded state or the folded state.

[0127] 2) The direction recognition module may obtain an acceleration value from the accelerometer, and the direction recognition module may determine the usage direction of the electronic device based on the acceleration value.

[0128] 3) The electronic device determines whether the folding angle is greater than 35 degrees. If it is greater than 35 degrees, the inner screen direction control module is enabled. If it is less than or equal to 35 degrees, the outer screen direction control module is enabled. 35 degrees is used to determine whether the electronic device is in the unfolded state or the folded state. If the folding angle is greater than 35 degrees, the electronic device is determined to be in the unfolded state; if it is less than or equal to 35 degrees, the electronic device is determined to be in the folded state. 35 degrees is only an example of a preset angle and is not limited here.

[0129] 4) The inner screen orientation control module obtains the inner screen rotation control flag and the orientation of the electronic device, and controls the inner screen display according to the inner screen rotation control flag and the orientation of the electronic device. The inner screen rotation control flag can indicate whether the inner screen automatic rotation function is turned on. If flag == false, it means that the electronic device has turned off the inner screen automatic rotation function; if flag == true, it means that the electronic device has turned on the inner screen automatic rotation function.

[0130] In some examples, the electronic device is configured with an automatic rotation control control. When the electronic device is in the unfolded state, the automatic rotation control control is used as the inner screen automatic rotation control control, and the corresponding flag of the automatic rotation control control is the inner screen rotation control flag. In some examples, the electronic device is configured with two automatic rotation control controls, one for the outer screen automatic rotation control control and the other for the inner screen automatic rotation control control, and the inner screen rotation control flag is the flag of the inner screen automatic rotation control control.

[0131] 5) The external screen orientation control module obtains the external screen rotation control flag and the orientation of the electronic device, and controls the external screen display based on the external screen rotation control flag and the orientation of the electronic device. The external screen rotation control flag can indicate whether the external screen automatic rotation function is enabled. If flag == false, it means that the electronic device has disabled the external screen automatic rotation function; if flag == true, it means that the electronic device has enabled the external screen automatic rotation function.

[0132] In some examples, the electronic device is configured with an automatic rotation control control. When the electronic device is in a folded state, the automatic rotation control control is used as an external screen automatic rotation control control, and the corresponding flag of the automatic rotation control control is an external screen rotation control flag. In some examples, the electronic device is configured with two automatic rotation control controls, one for the external screen automatic rotation control control and the other for the internal screen automatic rotation control control, and the external screen rotation control flag is the flag of the external screen automatic rotation control control. The external screen rotation control flag can be a first control identifier, the internal screen rotation control flag can be a second control identifier, true can be the first value of the first control identifier and the second control identifier, and false can be the second value of the first control identifier and the second control identifier.

[0133] The process of the direction recognition module recognizing the usage direction of the electronic device is shown in FIG18 and may include the following steps:

[0134] 11) The direction recognition module determines whether the modulus of the current frame acceleration value exceeds the range. If the modulus of the current frame acceleration value exceeds the range, an invalid value is output; if the modulus of the current frame acceleration value does not exceed the range, step 12 is executed.

[0135] The direction recognition module outputs an invalid value, indicating that the current frame acceleration value is invalid. The direction recognition module can continue to use the valid current frame acceleration value to identify the direction of use, for example, the valid current frame acceleration value is the acceleration value obtained last time.

[0136] The modulus of the acceleration value can be obtained by sqrt(x 2 +y 2 +z 2 ), sqrt represents square root, x, y and z are the values ​​of the x-axis, y-axis and z-axis directions collected by the accelerometer respectively. In general, the standard gravity acceleration value is 9.80665, so the electronic device can preset the value range of the acceleration value, such as the value range is (9.0, 10.6). The value range can be regarded as the preset modulus threshold of the current frame acceleration value. If the modulus value of the current frame acceleration value is not in the value range, it is determined that the state of the electronic device is unstable, and thus the current frame acceleration value is determined to be invalid, and an invalid value is output, such as the invalid value -2 in some examples.

[0137] 12) The direction recognition module obtains the acceleration value of the previous frame and determines whether the amplitude difference between the acceleration value of the current frame and the acceleration value of the previous frame exceeds the range. If it exceeds the range, an invalid value is output. If it does not exceed the range, step 13) is executed.

[0138] The previous frame acceleration value is the acceleration value of the previous frame before the current frame acceleration value, and the previous frame acceleration value is a valid acceleration value determined by modulus and amplitude difference. An acceleration value includes x-axis amplitude, y-axis amplitude, and z-axis amplitude. The direction recognition module can calculate the amplitude difference between the x-axis amplitude of the current frame acceleration value and the x-axis amplitude of the previous frame acceleration value, the amplitude difference between the y-axis amplitude of the current frame acceleration value and the y-axis amplitude of the previous frame acceleration value, and the amplitude difference between the z-axis amplitude of the current frame acceleration value and the z-axis amplitude of the previous frame acceleration value.

[0139] The direction identification module determines whether the absolute value of the amplitude difference of any of the three axes (x, y, and z) exceeds the range. If the absolute value of the amplitude difference of any axis exceeds the range, an invalid value is output to determine that the current frame acceleration is invalid. For example, if the absolute value of the amplitude difference of any axis is greater than 1.2 (1.2 is an example of a preset amplitude difference threshold), it is determined to be out of range and an invalid value is output. If the absolute value of the amplitude difference of any axis exceeds the range, the direction identification module can determine that the state of the electronic device is unstable.

[0140] Here's a point to note: When the direction recognition module first identifies the direction, the previous frame's acceleration value is empty. The module can initialize the three-axis acceleration values ​​of the previous frame to 0 and update the previous frame's acceleration value after completing a direction recognition. For example, after completing a direction recognition, the current frame's acceleration value is used as the previous frame's acceleration value. The direction recognition module uses the updated previous frame's acceleration value when it obtains a valid acceleration value again.

[0141] 13) The direction identification module determines whether the y-axis amplitude is 0. If the y-axis amplitude is 0, an invalid value is output; if the y-axis amplitude is not 0, step 14 is executed. 0 is an example of a preset value of the y-axis amplitude and is not limited in this embodiment.

[0142] 14) The direction recognition module calculates the pitch angle. The pitch angle calculation formula is a=arcsin(abs(z) / (x 2 +y 2 +z 2 ))*57.3.

[0143] 15) The direction recognition module determines whether the pitch angle is less than 45 degrees. If it is less than 45 degrees, the output is that the use direction is lying flat, that is, the display screen of the electronic device is in a lying position. The direction recognition module can output -1, which means that the use direction is lying flat and the electronic device is in a lying position. If the pitch angle is less than 45 degrees, the direction recognition module determines the current frame acceleration value as the previous frame acceleration value and continues to obtain the acceleration value. If the pitch angle is greater than or equal to 45 degrees, execute step 16). 45 degrees is an example of a preset pitch angle. The lying position is a special use posture of an electronic device. For example, the inner screen of the electronic device is facing upwards and the electronic device is placed flat on the table. At this time, the electronic device is in a special use posture.

[0144] 45 degrees and -1 are examples and are not limited here. a represents the pitch angle, and x, y, and z represent the x-axis amplitude, y-axis amplitude, and z-axis amplitude, respectively.

[0145] 16) The direction recognition module calculates the yaw angle based on the pitch angle. The yaw angle calculation formula is b = arctan(-x / y) * 57.3, where b represents the yaw angle. Because y is the denominator in the yaw angle calculation, if the y-axis amplitude is determined to be 0 in step 13, the current frame acceleration value is determined to be invalid to avoid yaw angle calculation anomalies.

[0146] 17) The direction recognition module corrects the deflection angle. One correction method is: if b<0, then b=b+360 degrees, otherwise b=b; so as to normalize the deflection angle to between 0 and 360 degrees.

[0147] 18) The direction recognition module calculates the use direction based on the corrected deflection angle. In some examples, the use direction is calculated as R = (b + 45°) / 90°, and the use direction is the result of rounding R down. 0 can represent a vertical screen, 1 can represent a left horizontal screen, 2 can represent an inverted vertical screen, and 3 can represent a right horizontal screen. 2 is generally not effective. Ineffectiveness can mean that when the electronic device is switched to an inverted vertical screen, the display direction of the content displayed by the electronic device does not change. For example, if the left horizontal screen was displayed before the inverted vertical screen, the left horizontal screen will still be displayed after the inverted vertical screen.

[0148] 19) The direction recognition module outputs the use direction, determines the current frame acceleration value as the previous frame acceleration value, and continues to obtain acceleration values.

[0149] In this embodiment, the usage orientation of the electronic device is used to represent the usage posture / usage status of the electronic device. For example, if the usage orientation of the electronic device is portrait, it indicates that the electronic device is used in portrait mode; for example, if the usage orientation of the electronic device is left-landscape, it indicates that the electronic device is used in left-landscape mode. The direction recognition module can send the usage orientation to the external screen direction control module and / or the internal screen direction control module, and the external screen direction control module and / or the internal screen direction control module can control the content display based on the usage orientation.

[0150] When controlling content display based on the usage orientation, the external screen orientation control module can combine the application type and the external screen rotation control flag. One processing rule of the external screen orientation control module is as follows:

[0151] For forced portrait applications (also known as portrait display applications), the external screen direction control module controls the portrait and / or reverse portrait display of such applications; for forced landscape applications (also known as landscape display applications), the external screen direction control module controls the left landscape and / or right landscape display of such applications;

[0152] For applications whose orientation can automatically rotate according to the device status (also known as landscape or portrait display applications), the external screen orientation control module can control the display of such applications according to the external screen rotation control flag. For example, if the external screen rotation control flag indicates that the electronic device has turned off the external screen automatic rotation function before such applications are started, the external screen orientation control module controls the vertical screen display of such applications. If the external screen rotation control flag indicates that the electronic device has turned on the external screen automatic rotation function before such applications are started, after such applications are started, the external screen orientation control module can control the display of such applications according to the usage direction of the electronic device, so that the display of such applications can change with the change of the usage direction of the electronic device. If the automatic rotation function is turned off after the application is started, the external screen orientation control module controls the display of such applications in the display mode that was last used before closing.

[0153] FIG19 is a schematic diagram of the working process of the external screen orientation control module. In FIG19 , A represents a forced vertical screen application, such as the desktop and WeChat; B represents a forced horizontal screen application, such as a game; and C represents an application whose orientation can automatically rotate according to the device state, such as Settings and Gallery. The working process of the external screen orientation control module may include the following steps:

[0154] 21) The external screen orientation control module obtains the external screen rotation control flag and the application identifier, where the application identifier is the identifier of the focus application running in the foreground of the electronic device. The focus application is the application occupying the focus window, which can be the window currently operated by the user. The application identifier can be the name of the application. The external screen orientation control module can use the application identifier to determine the application type, such as forced portrait or forced landscape.

[0155] The external screen rotation control flag can indicate whether the external screen automatic rotation function is turned on. If flag == false, it means that the electronic device has turned off the external screen automatic rotation function; if flag == true, it means that the electronic device has turned on the external screen automatic rotation function.

[0156] 22) The external screen direction control module determines the type of application according to the identification of the application.

[0157] 23) If the application is a mandatory vertical screen application, the external screen direction control module can control the application to be displayed in vertical screen or inverted vertical screen according to the processing rules.

[0158] For example, if the electronic device is used in portrait mode, the external screen direction control module controls the application to be displayed in portrait mode; if the electronic device is used in reverse portrait mode, the external screen direction control module controls the application to be displayed in portrait mode or reverse portrait mode. Forced portrait applications may not be affected by the external screen rotation control flag, that is, regardless of whether the electronic device has the external screen automatic rotation function turned on or off, the external screen direction control module can control forced portrait applications to be displayed in portrait mode or reverse portrait mode. For example, if the external screen rotation control flag indicates that the electronic device has turned on the external screen automatic rotation function, and the electronic device is used in left landscape mode or right landscape mode, the external screen direction control module can control such applications to be used in portrait mode.

[0159] As shown in Figure 9, the external screen displays the desktop. Although the electronic device has the external screen automatic rotation function turned on, the desktop is a forced vertical screen application. When the electronic device is used in vertical mode, the desktop is displayed in vertical mode; when the electronic device is used in horizontal mode on the left, the desktop is still displayed in vertical mode.

[0160] 24) If the application is a forced landscape application, the external screen direction control module can control the application to be displayed in the left landscape or the right landscape according to the processing rules.

[0161] For example, if the electronic device is used in left landscape orientation, the external screen direction control module controls the application to be displayed in left landscape orientation; if the electronic device is used in right landscape orientation, the external screen direction control module controls the application to be displayed in right landscape orientation. Forced landscape applications may not be affected by the external screen rotation control flag, that is, regardless of whether the electronic device has the external screen automatic rotation function turned on or off, the external screen direction control module can control forced landscape applications to be displayed in left landscape orientation or right landscape orientation. For example, if the external screen rotation control flag indicates that the electronic device has the external screen automatic rotation function turned on, and the electronic device is used in portrait orientation, the external screen direction control module can control such applications to be used in left landscape orientation.

[0162] As shown in Figure 8, the external screen displays a game application. Although the electronic device has turned on the automatic rotation function of the external screen, the game application is a forced horizontal screen application. When the electronic device is used in portrait mode, the game application is displayed in the left horizontal screen; when the electronic device is used in the left horizontal screen, the game application is displayed in the left horizontal screen; when the electronic device is used in the right horizontal screen, the game application is displayed in the right horizontal screen.

[0163] 25) If the application is an application whose direction can be automatically rotated according to the device status, the external screen rotation control flag indicates that the external screen automatic rotation function is turned off. The external screen direction control module determines that the external screen automatic rotation function is turned off before the application is started, and controls the application to be displayed in portrait mode. If the external screen automatic rotation function is turned off after the application is started, the application is controlled to be displayed in the original effective direction when the usage direction of the electronic device changes.

[0164] The original effective orientation is the display orientation last used by the electronic device before the external screen auto-rotation function is turned off. Before the external screen auto-rotation function is turned off, if the display orientation of the application changes as the electronic device is used, the external screen orientation control module can update the original effective orientation. After the external screen auto-rotation function is turned off, the original effective orientation is no longer updated and remains unchanged until the external screen auto-rotation function is turned back on.

[0165] Taking Figure 10 as an example, the external screen displays a photo. Before the electronic device displays the photo, the external screen auto-rotation function is turned on. Then, when the electronic device switches from portrait mode to left-landscape mode, the photo switches from portrait mode to left-landscape mode, and the original effective orientation is updated from portrait to left-landscape. While the photo is being displayed in left-landscape mode, the electronic device turns off the external screen auto-rotation function. The original effective orientation of the photo is left-landscape. Then, after the electronic device switches from left-landscape mode to portrait mode, the external screen orientation control module controls the photo to be displayed in left-landscape mode.

[0166] 26) If the application is an application whose direction can be automatically rotated according to the device status, the external screen rotation control flag indicates that the external screen automatic rotation function is turned on. The external screen direction control module determines whether the usage direction is -1 (that is, in a lying position). If the usage direction is -1, it determines whether the external screen automatic rotation function is turned on before the application is started. If the external screen automatic rotation function is turned on before the application is started, the application is controlled to be displayed in portrait mode; if the external screen automatic rotation function is turned on after the application is started, the application is controlled to maintain the display direction unchanged. For example, in a lying position, the photo is displayed in the left horizontal screen. After the external screen automatic rotation function is turned on after the gallery application is started, no matter whether the electronic device is used in portrait mode or in the left horizontal screen, the photo maintains the left horizontal screen display unchanged.

[0167] If the usage direction is not -1, the external screen direction control module controls the display of the application according to the usage direction of the electronic device. In addition, after determining that the display direction of the application has changed, the external screen direction control module updates the original effective direction. Taking Figure 10 as an example, the external screen displays a photo, and the electronic device turns on the external screen automatic rotation function before displaying the photo. Then, when the electronic device switches from portrait to left landscape, the photo switches from portrait display to left landscape display, and the original effective direction is updated from portrait to left landscape. It should be noted here that when the usage direction is -1, the external screen direction control module does not update the original effective direction. For the external screen direction control module, the original effective direction is valid for the application that can automatically rotate with the device status currently running in the foreground, and becomes invalid after the application exits. For example, the application that can automatically rotate with the device status currently running in the foreground is a gallery application. When displaying photos in the gallery application, the original effective direction is updated to left landscape. After that, the user turns off the external screen automatic rotation function. Before the electronic device exits the gallery application from the foreground, the photo is displayed in left landscape. However, if the electronic device starts settings or other applications that can automatically rotate according to the device status, these applications are displayed in the default display orientation. The electronic device exits the gallery application from the foreground (such as starting the gallery application again), and the photos are displayed in the default display orientation, such as portrait display.

[0168] The above Figure 19 shows the working process of the external screen direction control module. The external screen direction control module can control the display of the application according to the type of application and whether the external screen automatic rotation function is turned on, so that different types of applications can be displayed according to the processing rules of such applications, so as to set personalized displays for different types of applications, meet the user's display requirements for different types of applications, and improve user experience.

[0169] In this embodiment, the inner screen direction control module can combine the application type and the inner screen rotation control flag when controlling the content display according to the usage direction. A processing rule of the inner screen direction control module is as follows:

[0170] For forced vertical screen applications, the inner screen direction control module controls the vertical screen and / or reverse vertical screen display of such applications; for forced horizontal screen applications, the inner screen direction control module controls the left horizontal screen and / or right horizontal screen display of such applications;

[0171] For applications whose direction can automatically rotate according to the device status, the inner screen direction control module can control the display of such applications according to the inner screen rotation control flag. For example, if the inner screen rotation control flag indicates that the electronic device has turned on the inner screen automatic rotation function, the inner screen direction control module can control the display of such applications according to the use direction of the electronic device, so that the display of such applications can change with the change of the use direction of the electronic device. During the use of such applications, if the inner screen rotation control flag indicates that the electronic device has turned off the inner screen automatic rotation function, that is, switched from turning on the inner screen automatic rotation function to turning off the inner screen automatic rotation function, the inner screen direction control module can control the application to be displayed in the original effective direction.

[0172] The original effective orientation is the display orientation last used by the electronic device before the internal screen auto-rotation function is disabled. For example, if the display orientation last used was portrait, the internal screen orientation control module controls the application to display in portrait mode; if the display orientation last used was landscape mode, the internal screen orientation control module can control the application to display in landscape mode.

[0173] Before the electronic device turns off the internal screen automatic rotation function, if the display orientation of the application changes as the electronic device is used, the internal screen orientation control module can update the original effective orientation. After the electronic device turns off the internal screen automatic rotation function, the original effective orientation is no longer updated and remains unchanged until the electronic device turns on the internal screen automatic rotation function again.

[0174] FIG20 is a schematic diagram of the working process of the inner screen direction control module. In FIG20, B represents a forced landscape application, such as a game; and D represents an application whose direction can automatically rotate according to the device state, such as the desktop, WeChat, settings, and gallery. The working process of the inner screen direction control module may include the following steps:

[0175] 21) The inner screen orientation control module obtains the inner screen rotation control flag and the application identifier, where the application identifier is the identifier of the focus application running in the foreground of the electronic device. The focus application is the application occupying the focus window, which can be the window currently operated by the user. The application identifier can be the name of the application. The inner screen orientation control module can determine the type of application based on the application identifier, such as forced portrait or forced landscape.

[0176] The inner screen rotation control flag can indicate whether the inner screen automatic rotation function is turned on. If flag == false, it means that the electronic device has turned off the inner screen automatic rotation function; if flag == true, it means that the electronic device has turned on the inner screen automatic rotation function.

[0177] 22) The inner screen direction control module determines the type of application according to the identification of the application.

[0178] 23) If the application is a forced landscape application, the inner screen direction control module can control the application to be displayed in the left landscape or the right landscape according to the processing rules.

[0179] For example, if the electronic device is used in left landscape orientation, the inner screen direction control module controls the application to be displayed in left landscape orientation; if the electronic device is used in right landscape orientation, the inner screen direction control module controls the application to be displayed in right landscape orientation. Forced landscape applications may not be affected by the inner screen rotation control flag, that is, regardless of whether the electronic device has the inner screen automatic rotation function turned on or off, the inner screen direction control module can control forced landscape applications to be displayed in left landscape orientation or in right landscape orientation. For example, if the inner screen rotation control flag indicates that the electronic device has the inner screen automatic rotation function turned on, and the electronic device is used in portrait orientation, the inner screen direction control module can control such applications to be used in left landscape orientation.

[0180] As shown in Figure 11, the inner screen displays a game application. Although the electronic device has turned on the automatic rotation function of the inner screen, the game application is a forced horizontal screen application. When the electronic device is used in portrait mode, the game application is displayed in the left horizontal screen; when the electronic device is used in the left horizontal screen, the game application is displayed in the left horizontal screen; when the electronic device is used in the right horizontal screen, the game application is displayed in the right horizontal screen.

[0181] 24) If the application is an application whose direction can be automatically rotated according to the device status, the inner screen rotation control flag indicates that the inner screen automatic rotation function is turned off, and the inner screen direction control module controls the display of the application according to the original effective direction.

[0182] The original effective direction is the display direction that the electronic device last used before the inner screen automatic rotation function was turned off. Taking Figure 14 as an example, the electronic device is used in left landscape mode, and the inner screen displays the desktop in the left landscape mode. If the user turns off the inner screen automatic rotation function, the original effective direction of the desktop is the left landscape mode. After the user locks the electronic device and unlocks it again, the inner screen can continue to display the desktop in the left landscape mode instead of automatically switching to the portrait mode as shown in Figure 13. Therefore, when the electronic device is used as a tablet, for applications whose direction can automatically rotate according to the device status, the display of the application is fixed after the inner screen automatic rotation function is turned off. After entering the interface again, the display direction of the application remains unchanged to avoid forced rotation.

[0183] 25) If the application is an application whose direction can be automatically rotated according to the device status, the internal screen rotation control flag indicates that the internal screen automatic rotation function is turned on. The internal screen direction control module determines whether the usage direction is -1 (that is, in a lying position). If the usage direction is -1, it determines whether the internal screen automatic rotation function is turned on before the application is started. If the internal screen automatic rotation function is turned on before the application is started, the application is controlled to be displayed in portrait mode; if the internal screen automatic rotation function is turned on after the application is started, the application is controlled to maintain the display direction unchanged. For example, in a lying position, the photo is displayed in the left horizontal screen. After the internal screen automatic rotation function is turned on after the gallery application is started, no matter whether the electronic device is used in portrait mode or in the left horizontal screen, the photo maintains the left horizontal screen display unchanged.

[0184] If the usage direction is not -1, the inner screen direction control module controls the display of the application according to the usage direction of the electronic device. In addition, after determining that the display direction of the application has changed, the inner screen direction control module updates the original effective direction. Taking Figure 12 as an example, if the electronic device has turned on the automatic rotation function of the inner screen, when the electronic device switches from portrait screen use to left landscape screen use, the photo switches from portrait screen display to left landscape screen display, and the original effective direction is updated from portrait screen to left landscape screen. Let me explain here that when the usage direction is -1, the inner screen direction control module does not update the original effective direction.

[0185] The above Figure 20 shows the working process of the inner screen direction control module. The inner screen direction control module can control the display of the application according to the type of application and whether the inner screen automatic rotation function is turned on, so that different types of applications can be displayed according to the processing rules of such applications, so as to set personalized displays for different types of applications, meet the user's display requirements for different types of applications, and improve user experience.

[0186] For example, landscape applications are forced to always be displayed in landscape mode. If the electronic device is used in left landscape mode, the landscape applications are forced to be used in left landscape mode. If the electronic device is used in right landscape mode, the landscape applications are forced to be used in right landscape mode. For applications whose orientation can be automatically rotated according to the device status (rotatable applications for short), if the electronic device has the inner screen automatic rotation function turned on, the display orientation of the rotatable applications can change with the usage orientation. If the electronic device has the inner screen automatic rotation function turned off, the display orientation of the rotatable applications will be the original effective orientation.

[0187] In one example, when the inner screen displays a photo, the original effective direction is the left landscape screen. If the electronic device turns off the inner screen automatic rotation function, the electronic device is used in the left landscape screen. When the electronic device enters the desktop or other rotatable applications again, the desktop or other rotatable applications can be displayed in the left landscape screen; if the electronic device is used in portrait mode when entering the desktop or other rotatable applications again, the desktop or other rotatable applications can be displayed in the left landscape screen. That is to say, during the inner screen direction control process, the original effective direction is valid for all applications whose directions can be automatically rotated according to the device status. For example, when displaying photos, the original effective direction is the left landscape screen. After the inner screen automatic rotation function is turned off, if the electronic device turns on applications such as the desktop and WeChat, the desktop and WeChat can be displayed in the original effective direction of the left landscape screen. That is, regardless of whether the electronic device is used in portrait or landscape mode, for all applications whose directions can be automatically rotated according to the device status, the electronic device displays them in the original effective direction before turning them off. In addition, after the electronic device enters the desktop or other rotatable application again, the user can turn on the automatic rotation function of the inner screen. The display direction of the desktop or other rotatable application can change as the electronic device rotates, and the original effective direction can change according to the change in the display direction. However, once the automatic rotation function of the inner screen is turned off, the display direction of the desktop or other rotatable application will be displayed in the original effective direction before being turned off until the user turns on the automatic rotation function of the inner screen again.

[0188] In addition, the present application provides an electronic device, which includes: a first display screen, a second display screen, one or more processors, and a memory; a program is stored on the memory, and when the program is executed by one or more processors, the electronic device executes the above-mentioned display control method.

[0189] The present application also provides a readable storage medium, on which a computer program is stored, wherein the computer program implements the above-mentioned display control method when executed by a processor.

[0190] The present application also provides a display control device, which is applied to an electronic device. The electronic device includes a first display screen and a second display screen. The display control device includes: a first control module, a first display screen direction control module, and a second display screen direction control module.

[0191] The first control module is used to respond to the first type of user operation, if the electronic device is in the first usage posture of the folded state, display the first application content in the first display direction through the first display screen; if the electronic device is in the first usage posture of the unfolded state, display the first application content in the first display direction through the second display screen.

[0192] The first display screen direction control module is used to respond to the user's second type of operation. If the electronic device switches from the first usage posture in the folded state to the second usage posture in the folded state, the first control identifier of the electronic device is the first value, and the first application content is displayed in the second display direction through the first display screen. The second display direction is different from the first display direction, and the first usage posture is different from the second usage posture.

[0193] The second display screen direction control module is used to, if the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier of the electronic device is a second value, and the first application content continues to be displayed in the first display direction through the second display screen.

[0194] It can be seen from the above technical solution that the electronic device can be used in different usage postures of the folded state or the unfolded state, displaying content on the first display screen in the folded state and displaying content on the second display screen in the unfolded state. If the electronic device switches from the first usage posture of the folded state to the second usage posture of the folded state, the first control identifier is the first value, the first display screen switches from the first display direction to the second display direction, and displays the first application content in the second display direction; if the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is the second value, and the second display screen can continue to display the first application content in the first display direction, thereby realizing control of the first display screen and the second display screen based on the first control identifier and the second control identifier. In addition, the first control identifier corresponds to the first display screen, and the second control identifier corresponds to the second display screen. The first control identifier and the second control identifier are independent of each other and do not affect each other. Therefore, the first display screen can be independently controlled based on the first control identifier, and the second display screen can be independently controlled based on the second control identifier, thereby preventing the display of the first display screen from affecting the display of the second display screen.

[0195] For example, the first usage posture and the second usage posture are respectively one of a portrait usage posture, a left landscape usage posture, and a right landscape usage posture, the portrait usage posture corresponds to a portrait display, the left landscape usage posture corresponds to a left landscape display, and the right landscape usage posture corresponds to a right landscape display. If the electronic device is in a folded state and switches from a portrait usage posture to a left landscape usage posture, the first control identifier is a first value, and the first value indicates that the automatic rotation function of the first display screen is turned on, then the electronic device can switch from portrait display to left landscape display of the first application content; if the electronic device is in an unfolded state and switches from a portrait usage posture to a left landscape usage posture, the second control identifier is a second value, and the second value indicates that the automatic rotation function of the second display screen is turned off, then the usage posture of the electronic device changes but the second display screen still displays the first application content in portrait, so that the display of the first display screen and the second display screen can be independently controlled according to whether the automatic rotation function is turned on, thereby avoiding mutual influence between the first display screen and the second display screen.

[0196] In one possible implementation, the second display screen orientation control module is configured to, when the electronic device switches from a first usage posture in the expanded state to a second usage posture in the expanded state, and the second control identifier is a first value, display first application content on the second display screen in the second display orientation. The first application content is the content of the first application running in the foreground of the electronic device. Accordingly, the display control device further includes: an adjustment module and a switching module. The adjustment module is configured to, in response to a third type of user operation, adjust the second control identifier from the first value to the second value. The second display screen orientation control module is configured to, in response to the second type of user operation, display the first application content on the second display screen in the second display orientation when the electronic device switches from the second usage posture in the expanded state to the third usage posture in the expanded state. The second usage posture is different from the third usage posture. The switching module is configured to, in response to a fourth type of user operation, switch the application running in the foreground of the electronic device from the first application to the second application. The first application and the second application are landscape or portrait display applications. The second display screen orientation control module is configured to display the second application content on the second display screen in the second display orientation. The second application content is the content of the second application.

[0197] In this embodiment, if the second control identifier is the first value, it means that the electronic device has turned on the automatic rotation function of the second display screen, and when the usage posture of the electronic device changes in the unfolded state, the display direction of the second display screen may also change. When the second control identifier is maintained at the second value, the application running in the foreground of the electronic device is switched from the first application to the second application of the same type as the first application. The electronic device can display the content of the second application in the display direction when displaying the content of the first application, so that when the second control identifier is the second value, the first application and the second application of the same type can adopt the same display direction, thereby reducing the probability of forced rotation of the display direction of the second display screen due to application switching after the display direction is fixed. For example, when the second control identifier is the first value, the second display screen is displayed in left landscape mode, and the electronic device switches from the gallery application to the settings application. When the settings application is started, the electronic device can display the content of the settings application in the left landscape mode.

[0198] In one possible implementation, the switching module is used to switch the application running in the foreground of the electronic device from the second application to the first application in response to the user's fourth type of operation; the second display screen direction control module is used to display the content of the first application in the second display direction through the second display screen, so that when the second control identifier is maintained at the second value, after the electronic device runs the first application again, the content of the first application is still displayed in the previous display direction (i.e., the second display direction).

[0199] In one possible implementation, the display control device further includes: a lock screen module and an unlock module. The lock screen module is used to respond to the user's lock screen operation, and the second display screen is in a black screen state. The unlock module is used to switch the second display screen from a black screen state to an off-screen display state, and display the unlock interface in the second display direction through the second display screen. The second display screen direction control module is used to respond to the user's unlock operation, and the second display screen switches from displaying the unlock interface to displaying application content, and the second display screen displays the application content in the second display direction. Because the second control identifier is maintained at the second value, the display direction of the electronic device is fixed in the second display direction. At this time, whether it is displaying the unlock interface or displaying application content, the electronic device can display in the second display direction. Therefore, after fixing the display direction, when entering the application again, the display direction remains unchanged, and there is no forced rotation of the display direction.

[0200] In one possible implementation, the first application content is the content of the first application running in the foreground of the electronic device, and the first application is a horizontal or vertical screen display type application; the display control device also includes: a switching module, which is used to switch the application running in the foreground of the electronic device from the first application to the fourth application in response to the user's fourth type of operation, and the fourth application is a vertical screen display type application. A second display screen direction control module is used to display the fourth application content in the second display screen in the second display direction or the first display direction if the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is the first value, and the fourth application content is the content of the fourth application. The usage direction of the first usage posture is one of vertical screen and inverted vertical screen, the usage direction of the second usage posture is opposite to the usage direction of the first usage posture, and the second display direction is opposite to the first display direction. For vertical screen display type applications, after the electronic device switches from the vertical screen usage posture to the inverted vertical screen usage posture, the display direction of the second display screen can change or remain unchanged.

[0201] In one possible implementation, the second display screen orientation control module is configured to respond to a first type of user operation, and if the electronic device is in a special usage posture of the unfolded state, the second control identifier is a first value, and the first application content is displayed in a portrait display orientation via the second display screen; the display control device further includes: an adjustment module, configured to adjust the second control identifier from the first value to the second value in response to a third type of user operation; and the second display screen orientation control module is configured to display the first application content in a portrait display orientation via the second display screen when the electronic device maintains the special usage posture of the unfolded state. In this embodiment, the special usage posture can be a lying posture. If the electronic device is in a lying posture, the second control identifier is the first value before the first application is launched, and the second display screen can display the first application content in a portrait display orientation; after the first application is launched, the second control identifier is adjusted to the second value, and the first application content can maintain the portrait display unchanged.

[0202] In one possible implementation, the second display screen direction control module is configured to maintain the display direction of the second display screen unchanged if, after displaying the first application content, the electronic device is in a special usage posture of the unfolded state and the second control identifier is the first value. For example, the second display screen displays the first application content in the second display direction, and then the electronic device is in a special usage posture of the unfolded state, even if the second control identifier is the first value, the second display screen still displays the first application content in the second display direction. If switching from the first application to the second application, the second display screen can display the content of the second application in the second display direction if the electronic device maintains the special usage posture, thereby maintaining the display direction of the second display screen unchanged in the special usage posture.

[0203] In one possible implementation, the display control device also includes: an angle recognition module and a direction recognition module, the angle recognition module is used to determine the current usage form of the electronic device; the direction recognition module is used to determine the current usage posture of the electronic device; a first display screen direction control module is used to control the display of the first display screen according to the current usage posture of the electronic device and the first control identifier if the current usage form of the electronic device is a folded state; a second display screen direction control module is used to control the display of the second display screen according to the current usage posture of the electronic device and the second control identifier if the current usage form of the electronic device is an unfolded state, thereby realizing control of the first display screen by the first display screen direction control module and control of the second display screen by the second display screen direction control module.

[0204] In one possible implementation, the display control device also includes: a determination module for determining the type of the first application running in the foreground of the electronic device; a first display screen direction control module and a second display screen direction control module combine the type of the first application when controlling the display to control the display of the first display screen or the second display screen according to the type of the first application.

[0205] In one possible implementation, the second display screen direction control module is configured to control the display of the second display screen according to the current usage posture of the electronic device and the second control identifier if the current usage posture of the electronic device is the unfolded state, including: if the first application is a horizontal screen display application, controlling the second display screen to display in the left horizontal screen when the current usage posture of the electronic device is the left horizontal screen, and controlling the second display screen to display in the right horizontal screen when the current usage posture of the electronic device is the right horizontal screen; if the first application is a horizontal or vertical screen display application, the current usage posture of the electronic device is a special usage posture, if it is determined that the second control identifier is the first value before the first application is started, controlling the second display screen to display in the vertical screen; if it is determined that the second control identifier is the first value after the first application is started, controlling the second display screen to display in the display direction before the first application is started; if the first application is a horizontal or vertical screen display application, the current usage posture of the electronic device is not a special usage posture, if it is determined that the second control identifier is the first value, controlling the second display screen to display in the display direction matching the usage posture; if the first application is a horizontal or vertical screen display application, if it is determined that the second control identifier is the second value, controlling the second display screen to display in the original effective direction, which is the display direction last adopted by the second display screen before the second control identifier is adjusted to the second value.

[0206] In one possible implementation, the second display screen direction control module is used to control the display of the second display screen if the current usage posture of the electronic device is the unfolded state, according to the current usage posture of the electronic device and the second control identifier, including: if the first application is a vertical screen display application, the second control identifier is the first value, and when the current usage posture of the electronic device is the vertical screen usage posture, the second display screen is controlled to be displayed vertically; when the current usage posture of the electronic device is the inverted vertical screen usage posture, the second display screen is controlled to be displayed vertically or inverted vertically.

[0207] In one possible implementation, the angle recognition module is used to obtain the folding angle of the electronic device; if the folding angle of the electronic device is greater than a preset angle, it is determined that the electronic device is in the unfolded state; if the folding angle of the electronic device is less than or equal to the preset angle, it is determined that the electronic device is in the folded state.

[0208] In one possible implementation, the direction recognition module is used to obtain the pitch angle of the electronic device based on the current frame acceleration value; obtain the deflection angle of the electronic device based on the pitch angle of the electronic device; and determine the usage direction of the electronic device based on the deflection angle of the electronic device, where the usage direction of the electronic device represents the usage posture of the electronic device.

[0209] In one possible implementation, the direction identification module is used to obtain the pitch angle of the electronic device according to the current frame acceleration value if it is determined that the modulus of the current frame acceleration value does not exceed a preset modulus threshold, the amplitude difference between the current frame acceleration value and the previous frame acceleration value does not exceed a preset amplitude difference threshold, and the y-axis amplitude of the current frame acceleration value is not a preset value; obtain the deflection angle of the electronic device when the pitch angle is less than the preset pitch angle, and correct the deflection angle of the electronic device, wherein the correction of the deflection angle includes correcting the deflection angle of the electronic device to a positive number if the deflection angle of the electronic device is determined to be a negative number; maintaining the deflection angle unchanged if the deflection angle of the electronic device is determined to be a positive number; and obtaining the usage direction of the electronic device according to the corrected deflection angle.

[0210] In one possible implementation, the direction identification module is configured to determine that the current frame acceleration value is invalid if it is determined that the modulus of the current frame acceleration value exceeds a preset modulus threshold, or the amplitude difference between the current frame acceleration value and the previous frame acceleration value exceeds a preset amplitude difference threshold, or the y-axis amplitude of the current frame acceleration value is a preset value; and / or the direction identification module is configured to determine that the usage posture of the electronic device is a special usage posture when the pitch angle is greater than or equal to a preset pitch angle; and / or the direction identification module is configured to replace the previous frame acceleration value with the current frame acceleration value after determining the usage direction of the electronic device.

[0211] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

Claims

1. A display control method, characterized in that: Applied to an electronic device, the electronic device includes a first display screen and a second display screen, and the method includes: In response to a first type of user operation, if the electronic device is in a first usage posture in a folded state, displaying first application content through the first display screen in a first display direction; if the electronic device is in a first usage posture in an unfolded state, displaying the first application content through the second display screen in the first display direction; In response to a second type of user operation, if the electronic device switches from the first usage posture in the folded state to the second usage posture in the folded state, the first control identifier of the electronic device is a first value, and the first application content is displayed in a second display direction through the first display screen, the second display direction is different from the first display direction, and the first usage posture is different from the second usage posture; If the electronic device switches from the first usage posture in the unfolded state to the second usage posture in the unfolded state, the second control identifier of the electronic device is a second value, and the first application content continues to be displayed in the first display direction through the second display screen.

2. The method according to claim 1, characterized in that The method further comprises: If the electronic device switches from the first usage posture of the unfolded state to the second usage posture of the unfolded state, the second control identifier is a first value, and the first application content is displayed in the second display direction through the second display screen, where the first application content is the content of the first application running in the foreground of the electronic device; In response to a third type of user operation, the second control indicator is adjusted from the first value to the second value; In response to a second type of user operation, the electronic device switches from a second usage posture in the unfolded state to a third usage posture in the unfolded state, and displays the first application content in the second display direction through the second display screen, where the second usage posture is different from the third usage posture; In response to a fourth type of user operation, the application running in the foreground of the electronic device is switched from the first application to a second application, where the first application and the second application are horizontal and vertical screen display type applications; Second application content is displayed in the second display direction through the second display screen, where the second application content is content of the second application.

3. The method according to claim 2, characterized in that The method further comprises: In response to a fourth type of operation by the user, the application running in the foreground of the electronic device is switched from the second application to the first application; The first application content is displayed in the second display direction through the second display screen.

4. The method according to claim 2 or 3, characterized in that After displaying the first application content in the second display direction on the second display screen or displaying the second application content in the second display direction on the second display screen, the method further includes: In response to a screen lock operation by the user, the second display screen is in a black screen state; When the second display screen switches from a black screen state to an off-screen display state, displaying an unlocking interface through the second display screen in the second display direction; In response to the user's unlocking operation, the second display screen switches from displaying the unlocking interface to displaying application content, and the second display screen displays the application content in the second display direction.

5. The method according to any one of claims 1 to 4, characterized in that The first application content is the content of the first application running in the foreground of the electronic device, and the first application is a horizontal or vertical screen display application; The method further includes: in response to a fourth type of user operation, switching the application running in the foreground of the electronic device from the first application to a fourth application, wherein the fourth application is a portrait display type application; If the electronic device switches from the first usage posture in the unfolded state to the second usage posture in the unfolded state, the second control identifier is the first value, and the fourth application content is displayed through the second display screen in the second display direction or the first display direction, the fourth application content is the content of the fourth application, the usage direction of the first usage posture is one of vertical screen and inverted vertical screen, the usage direction of the second usage posture is opposite to the usage direction of the first usage posture, and the second display direction is opposite to the first display direction.

6. The method according to any one of claims 1 to 5, characterized in that The method further includes: in response to a first type of user operation, if the electronic device is in a special usage posture of the unfolded state, the second control identifier is the first value, and the first application content is displayed in a vertical display orientation on the second display screen; In response to a third type of user operation, the second control indicator is adjusted from the first value to the second value; When the electronic device maintains the special usage posture in the unfolded state, the first application content is displayed in the vertical display direction through the second display screen.

7. The method according to any one of claims 1 to 5, characterized in that The method further includes: if, after displaying the first application content, the electronic device is in a special usage posture of an unfolded state and the second control identifier is the first value, maintaining the display direction of the second display screen unchanged.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Determining the current usage mode of the electronic device by using an angle recognition module in the electronic device; Determining the current usage posture of the electronic device by a direction recognition module in the electronic device; If the current usage state of the electronic device is the folded state, controlling the display of the first display screen according to the current usage posture of the electronic device and the first control identifier by a first display screen direction control module in the electronic device; If the current usage state of the electronic device is the unfolded state, the second display screen direction control module in the electronic device controls the display of the second display screen according to the current usage posture of the electronic device and the second control identifier.

9. The method according to claim 8, characterized in that The method further includes: determining the type of a first application running in the foreground of the electronic device; and combining the type of the first application with the first display direction control module and the second display direction control module when controlling the display.

10. The method according to claim 9, characterized in that If the current usage state of the electronic device is the unfolded state, controlling the display of the second display screen according to the current usage posture of the electronic device and the second control identifier by a second display screen direction control module in the electronic device includes: If the first application is a landscape display application, when the current usage posture of the electronic device is the left landscape usage posture, the second display screen is controlled to display the left landscape screen; when the current usage posture of the electronic device is the right landscape usage posture, the second display screen is controlled to display the right landscape screen; If the first application is a horizontal or vertical screen display application, the current usage posture of the electronic device is a special usage posture, if it is determined that the second control identifier is the first value before the first application is started, the second display screen is controlled to be displayed in portrait mode; if it is determined that the second control identifier is the first value after the first application is started, the second display screen is controlled to be displayed in portrait mode; The screen is displayed in the display direction before the first application is started; If the first application is a landscape or portrait display application, and the current usage posture of the electronic device is not the special usage posture, if it is determined that the second control identifier is the first value, controlling the second display screen to display in a display direction matching the usage posture; If the first application is a horizontal or vertical screen display application, if it is determined that the second control identifier is the second value, the second display screen is controlled to display in the original effective direction, and the original effective direction is the display direction last used by the second display screen before the second control identifier is adjusted to the second value.

11. The method according to claim 9 or 10, characterized in that If the current usage state of the electronic device is the unfolded state, controlling the display of the second display screen according to the current usage posture of the electronic device and the second control identifier by a second display screen direction control module in the electronic device includes: If the first application is a portrait display application, the second control identifier is the first value, and when the current usage posture of the electronic device is a portrait usage posture, the second display screen is controlled to be displayed in portrait mode; when the current usage posture of the electronic device is an inverted portrait usage posture, the second display screen is controlled to be displayed in portrait mode or inverted portrait mode.

12. The method according to any one of claims 8 to 11, characterized in that Determining the current usage mode of the electronic device by using the angle recognition module in the electronic device includes: Obtaining a folding angle of the electronic device through the angle recognition module; If the folding angle of the electronic device is greater than a preset angle, determining that the electronic device is in the unfolded state; If the folding angle of the electronic device is less than or equal to the preset angle, it is determined that the electronic device is in the folded state.

13. The method according to any one of claims 8 to 12, characterized in that Determining the current usage posture of the electronic device by a direction recognition module in the electronic device includes: The direction recognition module obtains the pitch angle of the electronic device according to the current frame acceleration value; The direction recognition module obtains the yaw angle of the electronic device according to the pitch angle of the electronic device; The direction recognition module determines the use direction of the electronic device according to the deflection angle of the electronic device, where the use direction of the electronic device represents the use posture of the electronic device.

14. The method according to claim 13, characterized in that The direction recognition module obtaining the pitch angle of the electronic device according to the current frame acceleration value includes: if the direction recognition module determines that the modulus of the current frame acceleration value does not exceed a preset modulus threshold, the amplitude difference between the current frame acceleration value and the previous frame acceleration value does not exceed a preset amplitude difference threshold, and the y-axis amplitude of the current frame acceleration value is not a preset value, obtaining the pitch angle of the electronic device according to the current frame acceleration value; The direction recognition module obtains the deflection angle of the electronic device when the pitch angle is less than a preset pitch angle, and the direction recognition module determines the usage direction of the electronic device based on the deflection angle of the electronic device, including: the direction recognition module correcting the deflection angle of the electronic device, wherein the correction of the deflection angle includes, if the deflection angle of the electronic device is determined to be negative, correcting the deflection angle of the electronic device to a positive number; if the deflection angle of the electronic device is determined to be positive, maintaining the deflection angle unchanged; The direction recognition module obtains the usage direction of the electronic device according to the corrected deflection angle.

15. The method according to claim 14, characterized in that The direction identification module determines that the current frame acceleration value is invalid if it is determined that the modulus of the current frame acceleration value exceeds a preset modulus threshold, or the amplitude difference between the current frame acceleration value and the previous frame acceleration value exceeds a preset amplitude difference threshold, or the y-axis amplitude of the current frame acceleration value is a preset value; and / or The direction recognition module determines that the usage posture of the electronic device is a special usage posture when the pitch angle is greater than or equal to the preset pitch angle; and / or After determining the usage direction of the electronic device, the direction recognition module replaces the previous frame acceleration value with the current frame acceleration value.

16. An electronic device, characterized in that: The electronic device includes: a first display screen, a second display screen, one or more processors, and a memory; The storage stores a program, and when the program is executed by the one or more processors, the electronic device executes the display control method according to any one of claims 1 to 15.

17. A readable storage medium, characterized in that The readable storage medium stores a computer program, wherein the computer program implements the display control method according to any one of claims 1 to 15 when executed by a processor.

18. A display control method, characterized in that: Applied to an electronic device, the electronic device includes a first display screen and a second display screen, and the method includes: In response to a first type of user operation, if the electronic device is in a first usage posture in a folded state, displaying first application content through the first display screen in a first display direction; if the electronic device is in a first usage posture in an unfolded state, displaying the first application content through the second display screen in the first display direction; In response to a second type of user operation, if the electronic device switches from the first usage posture in the folded state to the second usage posture in the folded state, and the first control identifier of the electronic device is a first value, the first application content is displayed in a second display direction through the first display screen, the second display direction is different from the first display direction, the first usage posture is different from the second usage posture, the first control identifier is used to indicate whether the electronic device can change the display direction of the first application content displayed on the first display screen, and when the first control identifier is the first value, the electronic device can change the display direction of the first application content displayed on the first display screen; If the electronic device switches from the first usage posture in the unfolded state to the second usage posture in the unfolded state, and the second control identifier of the electronic device is a second value, the first application content continues to be displayed in the first display direction through the second display screen. The second control identifier is used to indicate whether the electronic device can change the display direction of the first application content displayed on the second display screen. When the second control identifier is the second value, the electronic device maintains the display direction of the first application content displayed on the second display screen.

19. The method according to claim 18, characterized in that The method further comprises: If the electronic device switches from the first usage posture in the unfolded state to the second usage posture in the unfolded state, and the second control identifier is a first value, the first application content is displayed in the second display direction through the second display screen, and the first application content is content of the first application running in the foreground of the electronic device. When the second control identifier is the first value, the electronic device is capable of changing the display direction of the first application content displayed on the second display screen; In response to a third type of user operation, the second control indicator is adjusted from the first value to the second value; In response to the user's second type of operation, the electronic device switches from the second usage posture of the unfolded state to the second usage posture of the unfolded state. a third usage posture in the expanded state, displaying the first application content via the second display screen in the second display direction, the second usage posture being different from the third usage posture; In response to a fourth type of user operation, the application running in the foreground of the electronic device is switched from the first application to a second application, where the first application and the second application are horizontal and vertical screen display type applications; Second application content is displayed in the second display direction through the second display screen, where the second application content is content of the second application.

20. The method according to claim 19, characterized in that The method further comprises: In response to a fourth type of operation by the user, the application running in the foreground of the electronic device is switched from the second application to the first application; The first application content is displayed in the second display direction through the second display screen.

21. The method according to claim 19, wherein After displaying the first application content in the second display direction on the second display screen or displaying the second application content in the second display direction on the second display screen, the method further includes: In response to a screen lock operation by the user, the second display screen is in a black screen state; When the second display screen switches from a black screen state to an off-screen display state, displaying an unlocking interface through the second display screen in the second display direction; In response to the user's unlocking operation, the second display screen switches from displaying the unlocking interface to displaying application content, and the second display screen displays the application content in the second display direction.

22. The method according to any one of claims 18 to 21, characterized in that The first application content is the content of the first application running in the foreground of the electronic device, and the first application is a horizontal or vertical screen display application; The method further includes: in response to a fourth type of user operation, switching the application running in the foreground of the electronic device from the first application to a fourth application, wherein the fourth application is a portrait display type application; If the electronic device switches from the first usage posture in the unfolded state to the second usage posture in the unfolded state, and the second control identifier is the first value, the fourth application content is displayed through the second display screen in the second display direction or the first display direction, the fourth application content is the content of the fourth application, the usage direction of the first usage posture is one of vertical screen and inverted vertical screen, the usage direction of the second usage posture is opposite to the usage direction of the first usage posture, and the second display direction is opposite to the first display direction.

23. The method according to any one of claims 18 to 21, characterized in that The method further includes: in response to a first type of user operation, if the electronic device is in a special usage posture of the unfolded state and the second control identifier is the first value, displaying the first application content in a portrait display orientation on the second display screen; In response to a third type of user operation, the second control indicator is adjusted from the first value to the second value; When the electronic device maintains the special usage posture in the unfolded state, the first application content is displayed in the vertical display direction through the second display screen.

24. The method according to any one of claims 18 to 21, characterized in that The method further includes: if, after displaying the first application content, the electronic device is in a special usage posture of an unfolded state and the second control identifier is the first value, maintaining the display direction of the second display screen unchanged.

25. The method according to any one of claims 18 to 21, characterized in that The method further comprises: Determining the current usage mode of the electronic device by using an angle recognition module in the electronic device; Determining the current usage posture of the electronic device by a direction recognition module in the electronic device; If the current usage state of the electronic device is the folded state, controlling the display of the first display screen according to the current usage posture of the electronic device and the first control identifier by a first display screen direction control module in the electronic device; If the current usage state of the electronic device is the unfolded state, the second display screen direction control module in the electronic device controls the display of the second display screen according to the current usage posture of the electronic device and the second control identifier.

26. The method according to claim 25, characterized in that The method further includes: determining the type of a first application running in the foreground of the electronic device; and combining the type of the first application with the first display direction control module and the second display direction control module when controlling the display.

27. The method according to claim 26, characterized in that If the current usage state of the electronic device is the unfolded state, controlling the display of the second display screen according to the current usage posture of the electronic device and the second control identifier by a second display screen direction control module in the electronic device includes: If the first application is a landscape display application, when the current usage posture of the electronic device is the left landscape usage posture, the second display screen is controlled to display the left landscape screen; when the current usage posture of the electronic device is the right landscape usage posture, the second display screen is controlled to display the right landscape screen; If the first application is a landscape or portrait display application, and the current usage posture of the electronic device is a special usage posture, if it is determined that the second control identifier is the first value before the first application is launched, the second display screen is controlled to be displayed in portrait mode; if it is determined that the second control identifier is the first value after the first application is launched, the second display screen is controlled to be displayed in the display orientation before the first application is launched; If the first application is a landscape or portrait display application, and the current usage posture of the electronic device is not the special usage posture, if it is determined that the second control identifier is the first value, controlling the second display screen to display in a display direction matching the usage posture; If the first application is a horizontal or vertical screen display application, if it is determined that the second control identifier is the second value, the second display screen is controlled to display in the original effective direction, and the original effective direction is the display direction last used by the second display screen before the second control identifier is adjusted to the second value.

28. The method according to claim 26 or 27, characterized in that If the current usage state of the electronic device is the unfolded state, controlling the display of the second display screen according to the current usage posture of the electronic device and the second control identifier by a second display screen direction control module in the electronic device includes: If the first application is a portrait display application, the second control identifier is the first value, and when the current usage posture of the electronic device is a portrait usage posture, the second display screen is controlled to be displayed in portrait mode; when the current usage posture of the electronic device is an inverted portrait usage posture, the second display screen is controlled to be displayed in portrait mode or inverted portrait mode.

29. The method according to claim 25, characterized in that Determining the current usage mode of the electronic device by using the angle recognition module in the electronic device includes: Obtaining a folding angle of the electronic device through the angle recognition module; If the folding angle of the electronic device is greater than a preset angle, determining that the electronic device is in the unfolded state; If the folding angle of the electronic device is less than or equal to the preset angle, it is determined that the electronic device is in the folded state.

30. The method according to claim 25, wherein Determining the current usage posture of the electronic device by a direction recognition module in the electronic device includes: The direction recognition module obtains the pitch angle of the electronic device according to the current frame acceleration value; The direction recognition module obtains the yaw angle of the electronic device according to the pitch angle of the electronic device; The direction recognition module determines the use direction of the electronic device according to the deflection angle of the electronic device, where the use direction of the electronic device represents the use posture of the electronic device.

31. The method according to claim 30, wherein The direction recognition module obtaining the pitch angle of the electronic device according to the current frame acceleration value includes: if the direction recognition module determines that the modulus of the current frame acceleration value does not exceed a preset modulus threshold, the amplitude difference between the current frame acceleration value and the previous frame acceleration value does not exceed a preset amplitude difference threshold, and the y-axis amplitude of the current frame acceleration value is not a preset value, obtaining the pitch angle of the electronic device according to the current frame acceleration value; The direction recognition module obtains the deflection angle of the electronic device when the pitch angle is less than a preset pitch angle, and the direction recognition module determines the usage direction of the electronic device based on the deflection angle of the electronic device, including: the direction recognition module correcting the deflection angle of the electronic device, wherein the correction of the deflection angle includes, if the deflection angle of the electronic device is determined to be negative, correcting the deflection angle of the electronic device to a positive number; if the deflection angle of the electronic device is determined to be positive, maintaining the deflection angle unchanged; The direction recognition module obtains the usage direction of the electronic device according to the corrected deflection angle.

32. The method according to claim 31, characterized in that The direction identification module determines that the current frame acceleration value is invalid if it is determined that the modulus of the current frame acceleration value exceeds a preset modulus threshold, or the amplitude difference between the current frame acceleration value and the previous frame acceleration value exceeds a preset amplitude difference threshold, or the y-axis amplitude of the current frame acceleration value is a preset value; and / or The direction recognition module determines that the usage posture of the electronic device is a special usage posture when the pitch angle is greater than or equal to the preset pitch angle; and / or After determining the usage direction of the electronic device, the direction recognition module replaces the previous frame acceleration value with the current frame acceleration value.