Interface display method, program, device and storage medium
By using proximity sensors to detect user behavior in folding screen mobile phones and switching the display interfaces of the main screen and the secondary screen, the problem of the entire screen turning off when talking on folding screen mobile phones is solved, and the user's call experience is improved.
Patent Information
- Application Number
- PCT/CN2024/070966
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-05
- Publication Date
- 2025-07-10
AI Technical Summary
In the prior art, when the foldable screen phone is talking in a folded state, the main screen and the secondary screen will turn off at the same time, resulting in poor user experience.
By switching the display interface between the home screen and the secondary screen of the foldable phone, we ensure that the home screen and the secondary screen will not be black at the same time during the call. A proximity sensor is used to detect whether the user is close to his ears, and the preset interface or call interface is displayed on the secondary screen according to the detection results. The home screen displays the call interface or black screen to enrich the user's call experience.
It realizes flexible display switching between the main screen and the secondary screen during folding screen mobile phone calls, improving the user's call experience and avoiding inconvenience caused by the entire screen being turned off.
Smart Images

Figure CN2024070966_10072025_PF_FP_ABST
Abstract
Description
Interface display method, program, device and storage medium Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an interface display method, program, device and storage medium. Background Art
[0002] With the development of current flexible screen technology, flexible foldable touch screens have been applied to mobile phone products, allowing users to fold or unfold the screen to meet their needs for different screen sizes.
[0003] Take a foldable phone as an example. When folded, the screen is exposed to the outside and is divided into a main screen and a secondary screen (or back screen). The main screen and the secondary screen have opposite display directions. In the prior art, when a user puts a folded foldable phone close to their ear to make a call, the phone's screen will temporarily turn off, meaning that both the main screen and the secondary screen appear black.
[0004] Summary of the Invention
[0005] Multiple aspects of the present application provide an interface display method, program, device and storage medium, the purpose of which is to ensure that the main screen and the secondary screen will not be black at the same time during a call on a foldable screen electronic device, thereby providing users with a richer call experience.
[0006] In a first aspect, an interface display method is provided, which is applied to an electronic device including a display screen, the display screen including a main screen and a secondary screen, the main screen and the secondary screen being two different display areas of the display screen; when the electronic device is in an unfolded configuration, the display direction of the main screen and the display direction of the secondary screen are consistent; when the electronic device is in a folded configuration, the display direction of the main screen and the display direction of the secondary screen are opposite; the method comprises:
[0007] At a first moment, the electronic device receives a first call;
[0008] After answering the first call, displaying a first call interface on the main screen;
[0009] After answering the first call, when or after the first event occurs, displaying the first preset interface on the secondary screen, and not displaying the first call interface on the main screen;
[0010] When or after the second event occurs, the first call interface is displayed on the main screen, and the first preset interface is not displayed on the secondary screen; the occurrence time of the second event is later than the occurrence time of the first event; between the first time and the occurrence time of the second event, the electronic device is in a folded form.
[0011] Optionally, based on the first event, a first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen.
[0012] In one example, based on the occurrence of the first event and the electronic device being in a folded form, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen.
[0013] In another example, based on the occurrence of a first event and the satisfaction of at least one preset condition, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the primary screen. The at least one preset condition may include, but is not limited to: a preset function is enabled, a battery level greater than a preset battery threshold, or a temperature less than a preset temperature threshold. The temperature may refer to battery temperature, a temperature detected by a temperature sensor, or a motherboard temperature of the electronic device.
[0014] In another example, based on the occurrence of a first event, the electronic device being in a folded state, and at least one preset condition being met, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the primary screen. Optionally, based on a second event, the first call interface is displayed on the primary screen, and the first preset interface is not displayed on the secondary screen. Exemplarily, in response to the second event, the first call interface is displayed on the primary screen, and the first preset interface is not displayed on the secondary screen.
[0015] Optionally, based on the first call being answered, the first call interface is displayed on the main screen, and the secondary screen is set to a black screen. Exemplarily, in response to the first call being answered, the first call interface is displayed on the main screen, and the secondary screen is set to a black screen.
[0016] It should be noted that, in this article, the time range described between one moment and another moment includes: these two moments.
[0017] That is, when the electronic device enters a call state, the main screen displays the call interface. Then, based on a first event, the secondary screen begins displaying the first preset interface, and the main screen no longer displays the call interface. Then, based on a second event, the secondary screen no longer displays the first preset interface, and the main screen resumes displaying the call interface. This shows that during a call on a foldable electronic device, the main and secondary screens will not be black at the same time. At the same time, either the secondary screen displays the first preset interface or the main screen displays the call interface. This provides users with a richer call experience.
[0018] Optionally, the first event is an event generated when an object approaches a preset area of the electronic device or an object approaches a preset area of the electronic device. Exemplarily, the first event is an event in which an object moves from outside the preset area of the electronic device to within the preset area of the electronic device. The movement here is relative movement, which can be a moving object, a moving electronic device, or a moving object and an electronic device at the same time, so that the object enters the preset area of the electronic device from outside the preset area of the electronic device. The preset area refers to an area whose distance from a preset position on the electronic device is less than a preset distance threshold.
[0019] In one example, a proximity sensor is provided on an electronic device, and the proximity sensor is used to detect whether an object is approaching or moving away from the electronic device. The preset area refers to an area where the distance from the proximity sensor is less than a preset distance threshold. Among them, the proximity sensor can specifically be a proximity light sensor. Generally, an electronic device with a call function is also provided with a handset, and the proximity light sensor can be set near the handset (for example, the handset is set on the top of the electronic device). Therefore, the preset area can be considered to be the area where the proximity light sensor is located or the area where the handset is located. For example, the first event is that an object enters the area where the proximity light sensor is located, or the first event is that an object enters the area where the handset is located.
[0020] In another example, the preset area may be a detection area of an electronic device, specifically, a detection area of a proximity sensor on the electronic device. The detection area refers to the maximum distance at which the electronic device can effectively detect an object. Taking a proximity light sensor as an example, the size of the detection area may depend on the power of the light source. When the object is not within the detection area, the sensor cannot detect it. Optionally, the second event is an event generated when an object moves away from the preset area of the electronic device or an object moves away from the preset area of the electronic device. The second event may also be referred to as a moving event. Exemplarily, the first event is an event in which an object moves from within the preset area of the electronic device to outside the preset area of the electronic device. The movement here is relative movement, which may be a moving object, a moving electronic device, or a moving object and an electronic device at the same time, so that the object moves from within the preset area of the electronic device to outside the preset area of the electronic device.
[0021] Taking a proximity light sensor as an example, when the intensity of the reflected signal of its own light signal received by the proximity light sensor is greater than or equal to a first preset intensity threshold, the proximity light sensor determines that an object is approaching a preset area of the electronic device. When the intensity of the reflected signal of its own light signal received by the proximity light sensor is less than the first preset intensity threshold, the proximity light sensor determines that an object is moving away from the preset area of the electronic device. For example, the first event is when the earpiece of a mobile phone is close to the user's ear, and the second event is when the earpiece of the mobile phone is away from the user's ear. In other words, when the electronic device enters a call state, the main screen displays the call interface. Then, based on the proximity event, the secondary screen begins to display the first preset interface, and the main screen no longer displays the call interface. Then, based on the distance event, the secondary screen no longer displays the first preset interface, and the main screen resumes displaying the call interface. In this way, when the user holds the electronic device to their ear to make a call, the electronic device does not directly turn off the entire display screen as in the prior art. Instead, the display states of the main and secondary screens are controlled separately, allowing the secondary screen to display the visual image, providing the user with a richer call experience.
[0022] In an implementation provided by the first aspect, when or after the first event occurs, displaying the first preset interface on the secondary screen and not displaying the first call interface on the main screen may include:
[0023] The first preset interface is displayed on the secondary screen, and the main screen is set to a black screen.
[0024] Taking the first event as a proximity event as an example, when the user puts the electronic device close to the ear to make a call, the secondary screen displays the first preset interface to improve the external appearance of the mobile phone, thereby improving the user's calling experience, and the main screen is black to prevent accidental touches.
[0025] In an embodiment provided by the first aspect, when or after the first event occurs, displaying the first preset interface on the secondary screen and not displaying the first call interface on the main screen may include:
[0026] Create the first preset interface, set the first preset interface to a visible state, and set the display mode of the electronic device to a secondary screen display mode.
[0027] The first preset interface has a top-level display attribute. Thus, when the first preset interface is visible, that is, when the first preset interface is displayed on the display screen, the first preset interface is displayed above other interfaces, and other interfaces are located below the first preset interface (which can be understood as: other interfaces on the display screen are blocked by the first preset interface). When the first preset interface is invisible, the first preset interface is hidden, and the top-level interface among other interfaces (i.e., the call interface) can be revealed.
[0028] Taking the first event as a proximity event as an example, after the electronic device enters the call state, when the proximity event is triggered for the first time, it is necessary to create a first preset interface. When the proximity event is triggered subsequently, there is no need to create the first preset interface.
[0029] In an implementation provided by the first aspect, when or after the second event occurs, displaying the first call interface on the main screen and not displaying the first preset interface on the secondary screen may include:
[0030] The first call interface is displayed on the main screen, and the secondary screen is set to a black screen.
[0031] Taking the second event as a distance event as an example, this solution can facilitate users to view the call interface.
[0032] In an implementation provided by the first aspect, when or after the second event occurs, displaying the first call interface on the main screen and not displaying the first preset interface on the secondary screen may include:
[0033] The first preset interface is set to an invisible state, and the display mode of the electronic device is set to a main screen display mode.
[0034] Specifically, based on the occurrence of the second event and the first preset interface being pulled up, the first preset interface is set to an invisible state, and the display mode of the electronic device is set to a main screen display mode.
[0035] Set the first preset interface to an invisible state, so that the top interface among other interfaces (that is, the call interface) can be revealed, and set the display mode of the electronic device to the main screen display mode. In this way, the secondary screen will be black and the main screen will display the top interface (that is, the call interface).
[0036] In one embodiment provided by the first aspect, the above method further includes:
[0037] When or after a third event occurs, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen. The occurrence time of the third event is later than the occurrence time of the second event, and the first event and the third event are the same event;
[0038] When or after the first call is hung up, the first preset interface is not displayed on the secondary screen; the time when the first call is hung up is later than the time when the third event occurs, and between the time when the second event occurs and the time when the first call is hung up, the electronic device is in a folded form.
[0039] It should be noted that, in this application, two events are the same event, which means that the event content of the two events is the same, which can be specifically understood as: the event content of the two events is the same but the event time is different. For example, the first event and the second event are both the proximity events mentioned above.
[0040] Optionally, based on the occurrence of a third event, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen.
[0041] In one example, based on the occurrence of a third event and the electronic device being in a folded form, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen. In another example, based on the occurrence of a first event and the satisfaction of at least one preset condition, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen. In yet another example, based on the occurrence of a first event, the electronic device being in a folded form, and the satisfaction of at least one preset condition, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen. The at least one preset condition can be found above.
[0042] Optionally, based on the first call being hung up, the first preset interface is not displayed on the secondary screen.
[0043] That is to say, during a call on an electronic device, when the electronic device is in the state of "the secondary screen displays the first preset interface and the main screen does not display the call interface" (for example: when making a call close to the ear), the call is hung up, the secondary screen will no longer display the first preset interface.
[0044] In an implementation provided in the first aspect, when or after the third event occurs, displaying the first preset interface on the secondary screen and not displaying the first call interface on the main screen may include:
[0045] The first preset interface is displayed on the secondary screen, and the main screen is set to a black screen.
[0046] Taking the third event as an example, when the user again holds the electronic device close to their ear to make a call, the secondary screen displays the first preset interface to improve the phone's appearance and thereby enhance the user's call experience, and the main screen is set to black to prevent accidental touches. Exemplarily, when or after the third event occurs, the first preset interface is set to visible, and the display mode of the electronic device is set to the secondary screen display mode.
[0047] Since the first preset interface with the top-level display is in a visible state, when the display mode of the electronic device is set to the secondary screen display mode, the main screen is in a black screen state, and the secondary screen will display the first preset interface at the top level of the screen.
[0048] In an implementation manner provided by the first aspect, when or after the first call is hung up, not displaying the first preset interface on the secondary screen may include:
[0049] The secondary screen is set to a black screen.
[0050] Exemplarily, based on the first call being hung up, the secondary screen is set to a black screen, and the main screen can display the interface displayed before the electronic device receives the first call.
[0051] In an implementation manner provided by the first aspect, when or after the first call is hung up, not displaying the first preset interface on the secondary screen may include:
[0052] The first preset interface and the first call interface are destroyed, and the display mode of the electronic device is set to the main screen display mode.
[0053] Optionally, based on the first call being hung up, the first preset interface and the first call interface are destroyed, and the display mode of the electronic device is set to the main screen display mode. Exemplarily, based on the first call being hung up and the first preset interface being pulled up, the first preset interface and the first call interface are destroyed, and the display mode of the electronic device is set to the main screen display mode.
[0054] In this way, after the call ends, the secondary screen is in a black screen state, and the main screen can display the interface displayed before the electronic device receives the first call, which is convenient for users to use.
[0055] In one embodiment provided by the first aspect, the method further includes:
[0056] At a second moment, the electronic device receives a second call;
[0057] After answering the second call, the display screen is turned off when or after the fourth event occurs; between the second moment and the moment when the fourth event occurs, the electronic device is in the unfolded form, and the fourth event is the same as the first event.
[0058] Optionally, based on the occurrence of the fourth event, the display screen is turned off. In an optional example, based on the occurrence of the fourth event and the electronic device being in the unfolded state, the display screen is turned off.
[0059] In other words, when the electronic device is in the unfolded configuration, the conditions for displaying the first preset interface on the secondary screen are not met. Therefore, based on the fourth event, the display screen turns off. For example, when a user puts their ear to a call, since the electronic device is in the unfolded configuration, the secondary screen faces the user, not the user's back. In other words, the first preset interface does not need to be displayed on the secondary screen. Therefore, the entire display screen can be turned off, which not only saves power but also prevents accidental touches.
[0060] In one embodiment provided by the first aspect, the method further includes:
[0061] At a third moment, the electronic device receives a third call;
[0062] After answering the third call, the display screen is turned off when or after the fifth event occurs; when the fifth event occurs, the power level of the electronic device is a second power level; the second power level is less than the first power level; the fifth event is the same as the first event; between the third moment and the moment of occurrence of the fifth event, the electronic device is in a folded form.
[0063] Optionally, based on the fifth event and the second power level being less than a preset power threshold, the display screen is turned off.
[0064] That is to say, when the battery level of the electronic device is low, displaying the first preset interface on the secondary screen consumes a certain amount of power. In order to save power, the display screen is turned off based on the fifth event. Taking the proximity event as an example, when the user puts the phone close to the ear to make a call, the battery level of the electronic device is low, so in order to save power, the entire display screen can be turned off. It should be noted that in actual applications, the battery level is usually expressed as a percentage. Therefore, in this application, the battery level specifically refers to the battery level percentage, and the preset battery level threshold below specifically refers to the preset battery level percentage threshold.
[0065] In an embodiment provided by the first aspect, when or after the first event occurs, the temperature of the electronic device is a first temperature; the method further includes:
[0066] At a fourth moment, the electronic device receives a fourth call;
[0067] After answering the fourth call, the display screen is turned off when or after the sixth event occurs; when the sixth event occurs, the temperature of the electronic device is a second temperature; the second temperature is greater than the first temperature; the sixth event is the same as the first event; between the fourth moment and the moment of occurrence of the sixth event, the electronic device is in a folded form.
[0068] Optionally, based on the occurrence of a sixth event, the display screen is turned off. In an optional embodiment, based on the occurrence of a sixth event and the temperature of the electronic device being greater than a preset temperature threshold, the display screen is turned off.
[0069] That is, when the temperature of the electronic device is too high, for safety, the display screen is turned off based on the sixth event. Taking the proximity event as an example, when the user puts the phone close to the ear to make a call, the temperature of the electronic device is too high, so for safety, the entire display screen can be turned off.
[0070] In an implementation manner provided by the first aspect, before the first moment, the method further includes:
[0071] Display settings interface;
[0072] In response to a user opening operation on the setting interface, opening a preset function;
[0073] When or after the first event occurs, displaying the first preset interface on the secondary screen and not displaying the first call interface on the main screen may include:
[0074] Based on the first event and the preset function has been turned on, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen.
[0075] The above-mentioned preset function can be understood as: when the user holds the electronic device to the ear for a call, the secondary screen of the electronic device displays the first preset interface. For example, the preset function can be called the magic color handbag function.
[0076] Through the setting interface, users can set relevant functions according to their actual needs to meet their setting requirements.
[0077] In one embodiment provided by the first aspect, the method further includes:
[0078] Display settings interface;
[0079] In response to a closing operation triggered on the setting interface, closing the preset function;
[0080] At a fifth moment, the electronic device receives a fifth call;
[0081] After answering the fifth call, when or after the seventh event occurs, based on the seventh event and the preset function has been turned off, the display screen is turned off; the seventh event is the same as the first event, and between the fifth moment and the moment of occurrence of the seventh event, the electronic device is in a folded form.
[0082] That is, when the preset function of the electronic device is in the off state, the display screen is turned off based on the seventh event. Taking the proximity event as an example, when the user puts the phone close to the ear to make a call, since the preset function of the electronic device is in the off state, the entire display screen can be turned off.
[0083] In one embodiment provided by the first aspect, the method further includes:
[0084] At a sixth moment, the electronic device receives a sixth call;
[0085] After the sixth call is answered, displaying a second call interface on the main screen;
[0086] After answering the sixth call, when or after an eighth event occurs, the first preset interface is displayed on the secondary screen, and the second call interface is not displayed on the main screen; the eighth event is the same as the first event; and between the sixth moment and the moment of occurrence of the eighth event, the electronic device is in a folded configuration;
[0087] When the electronic device changes from a folded form to an unfolded form or after the electronic device changes from a folded form to an unfolded form, the first preset interface is not displayed on the secondary screen; the time when the electronic device changes from a folded form to an unfolded form is later than the time when the seventh event occurs.
[0088] Optionally, based on the electronic device changing from a folded state to an unfolded state, the first preset interface is not displayed on the secondary screen.
[0089] That is, after the electronic device enters a call state, with the first preset interface displayed on its secondary screen and the call interface not displayed on the primary screen, when the electronic device is unfolded, the secondary screen no longer displays the first preset interface. For example, when the eighth event is a proximity event, when the electronic device is placed close to the ear for a call, the secondary screen displays the first preset interface and the primary screen does not display the call interface. Thereafter, when the electronic device is unfolded, with the entire display facing the user, the first preset interface no longer needs to be displayed on the secondary screen.
[0090] In an embodiment provided by the first aspect, when the electronic device changes from a folded state to an unfolded state or after the electronic device changes from a folded state to an unfolded state, not displaying the first preset interface on the secondary screen includes:
[0091] The first preset interface is destroyed and the display screen is turned off.
[0092] Optionally, based on the electronic device changing from the folded configuration to the unfolded configuration and the first preset interface being pulled up, the first preset interface is destroyed and the display screen is turned off. In other words, after the electronic device is unfolded, the first preset interface is destroyed and the display screen is turned off, thereby preventing accidental touches.
[0093] In an embodiment provided by the first aspect, after the first event occurs, when the sound collected by the electronic device is a male voice, the first preset interface includes a first interface element; when the sound collected by the electronic device is a female voice, the first preset interface includes a second interface element; the first interface element is different from the second interface element.
[0094] Among them, the interface elements can be: text elements, picture elements, icon elements, video window elements, animation elements, etc.
[0095] In other words, the present embodiment of the application will display different interface elements based on the user's gender to enhance the user experience. For example, if the user is female, the first interface element is an animated element such as flowers and butterflies. If the user is male, the first interface element is an animated element such as a goldfish.
[0096] Optionally, after the first event occurs, when the sound collected by the electronic device is a male voice and the electronic device collects that the first preset interface is touched, the first preset interface includes a first interface element; when the sound collected by the electronic device is a male voice and the electronic device does not collect that the first preset interface is touched, the first preset interface includes a third interface element; when the sound collected by the electronic device is a female voice and the electronic device collects that the first preset interface is touched, the first preset interface includes a second interface element; when the sound collected by the electronic device is a female voice and the electronic device does not collect that the first preset interface is touched, the first preset interface includes a fourth interface element; the first interface element, the second interface element, the third interface element and the fourth interface element are all different.
[0097] In an embodiment provided by the first aspect, between the time when the first event occurs and the time when the second event occurs, the first preset interface includes a third interface element, and the third interface element is displayed at a first position of the first preset interface; the method further includes:
[0098] In response to a touch operation on the first preset interface, the third interface element is displayed at a second position of the first preset interface.
[0099] The second position may be a touch position. That is, the display position of the interface element changes with the user's touch position. Specifically, in response to a touch operation on the first preset interface, an animation of the third interface element moving from the first position to the second position is displayed on the first preset interface.
[0100] In a second aspect, an interface display method is provided, which is applied to an electronic device including a display screen, the display screen including a main screen and a secondary screen, the main screen and the secondary screen being two different display areas of the display screen; when the electronic device is in an unfolded configuration, the display direction of the main screen and the display direction of the secondary screen are consistent; when the electronic device is in a folded configuration, the display direction of the main screen and the display direction of the secondary screen are opposite; the method comprises:
[0101] At a first moment, the electronic device initiates a first call;
[0102] After initiating the first call, displaying a first call interface on the main screen;
[0103] After the first call is initiated, when or after the first event occurs, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen;
[0104] When or after the second event occurs, the first call interface is displayed on the main screen, and the first preset interface is not displayed on the secondary screen; the occurrence time of the second event is later than the occurrence time of the first event; between the first time and the occurrence time of the second event, the electronic device is in a folded form.
[0105] In the embodiment of the present application, the first call interface may be the outgoing call interface or the connected call interface mentioned below.
[0106] It should be noted that the first aspect involves an answering scenario, while the second aspect involves a calling scenario; these two scenarios are similar. The interface display method provided in the second aspect can be obtained by replacing "receiving" with "initiating" and "answering" with "initiating" in the interface display method provided in the first aspect. Therefore, the specific implementation of the interface display method provided in the second aspect can be found in the relevant content of the first aspect and will not be elaborated here.
[0107] In a third aspect, a computer program is provided. When executed by an electronic device including a display screen, the computer program implements the following method:
[0108] After the electronic device answers the first call, when or after the first event occurs, the first preset interface is displayed on the secondary screen. After the first event occurs, the first call interface is not displayed, and the first call interface is the call interface of the first call;
[0109] When or after a second event occurs, the first call interface is displayed on the main screen, and the first preset interface is not displayed on the secondary screen. After the second event occurs, the first call interface is displayed on the main screen; the second event occurs later than the first event; and between the first event and the second event, the electronic device is in a folded state.
[0110] The display screen includes the main screen and the secondary screen, and the main screen and the secondary screen are two different display areas of the display screen; when the electronic device is in the unfolded form, the display direction of the main screen is consistent with the display direction of the secondary screen; when the electronic device is in the folded form, the display direction of the main screen is opposite to the display direction of the secondary screen.
[0111] In an embodiment provided in the third aspect, the method further includes: the first event is an object approaching a preset area of the electronic device, and the second event is an object moving away from the preset area of the electronic device.
[0112] In an embodiment provided by the third aspect, the method further includes:
[0113] When or after a third event occurs, the first preset interface is displayed on the secondary screen. After the third event, the first call interface is not displayed. The occurrence time of the third event is later than the occurrence time of the second event. The first event and the third event are the same event.
[0114] When or after the first call is hung up, the first preset interface is not displayed on the secondary screen; the time when the first call is hung up is later than the time when the third event occurs, and between the time when the third event occurs and the time when the first call is hung up, the electronic device is in a folded form.
[0115] In an embodiment provided by the third aspect, the method further includes:
[0116] Display settings interface;
[0117] In response to a user opening operation on the setting interface, opening a preset function;
[0118] When the first event occurs, the preset function has been turned on.
[0119] In an embodiment provided by the third aspect, the method further includes:
[0120] At a sixth moment, the electronic device receives a sixth call;
[0121] After answering the sixth call, when or after the eighth event occurs, the first preset interface is displayed on the secondary screen; after the eighth event occurs, the second call interface is not displayed, and the second call interface is the call interface of the sixth call; the eighth event and the first event are the same event; between the sixth moment and the time when the eighth event occurs, the electronic device is in a folded form;
[0122] When the electronic device changes from a folded form to an unfolded form or after the electronic device changes from a folded form to an unfolded form, the first preset interface is not displayed on the secondary screen; the time when the electronic device changes from a folded form to an unfolded form is later than the time when the eighth event occurs.
[0123] In an embodiment provided in the third aspect, after the first event occurs, when the sound collected by the electronic device is a male voice, the first preset interface includes a first interface element; when the sound collected by the electronic device is a female voice, the first preset interface includes a second interface element; the first interface element is different from the second interface element.
[0124] In an embodiment provided by the third aspect, between the time when the first event occurs and the time when the second event occurs, the first preset interface includes a third interface element, and the third interface element is displayed at a first position of the first preset interface; the method further includes:
[0125] In response to a touch operation on the first preset interface, the third interface element is displayed at a second position of the first preset interface.
[0126] In an embodiment provided by the third aspect, when or after the first event occurs, displaying the first preset interface on the secondary screen and not displaying the first call interface on the main screen includes:
[0127] Create the first preset interface, set the first preset interface to a visible state, and set the display mode of the electronic device to a secondary screen display mode; the first preset interface has a top-level display attribute.
[0128] In an embodiment provided by the third aspect, when or after the second event occurs, displaying the first call interface on the main screen and not displaying the first preset interface on the secondary screen includes:
[0129] The first preset interface is set to an invisible state, and the display mode of the electronic device is set to a main screen display mode.
[0130] In an implementation manner provided by the third aspect, when or after the third event occurs, displaying the first preset interface on the secondary screen includes:
[0131] The first preset interface is set to a visible state, and the display mode of the electronic device is set to a secondary screen display mode.
[0132] In an implementation manner provided by the third aspect, when or after the first call is hung up, not displaying the first preset interface on the secondary screen includes:
[0133] The first preset interface and the first call interface are destroyed, and the display mode of the electronic device is set to the main screen display mode.
[0134] In an embodiment provided in the third aspect, when the electronic device changes from a folded state to an unfolded state or after the electronic device changes from a folded state to an unfolded state, not displaying the first preset interface on the secondary screen includes:
[0135] Destroy the first preset interface.
[0136] In a fourth aspect, an electronic device is provided. The electronic device includes a memory, a processor, and a display screen, wherein:
[0137] The memory is used to store programs;
[0138] The processor is coupled to the memory and the display screen, and is used to execute the program stored in the memory to implement any of the above-mentioned interface display methods.
[0139] In a fifth aspect, a computer-readable storage medium storing a computer program is provided, and when the computer program is executed by a computer, it can implement any of the above-mentioned interface display methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0140] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0141] FIG1 is a schematic diagram of the internal structure of an electronic device provided by an exemplary embodiment of the present application;
[0142] FIG2 is a schematic diagram of the external structure of an electronic device provided by an exemplary embodiment of the present application;
[0143] FIG3 is a diagram of a layered system architecture provided by an exemplary embodiment of the present application;
[0144] FIG4A is a schematic diagram of a first set of interfaces provided by an exemplary embodiment of the present application;
[0145] FIG4B is a schematic diagram of a first interface provided by an exemplary embodiment of the present application;
[0146] FIG4C is a first internal interaction diagram provided by an exemplary embodiment of the present application;
[0147] FIG4D is a schematic diagram of a setting interface provided by an exemplary embodiment of the present application;
[0148] FIG5A is a schematic diagram of a second set of interfaces provided by an exemplary embodiment of the present application;
[0149] FIG5B is a second internal interaction diagram provided by an exemplary embodiment of the present application;
[0150] FIG6A is a third set of interface diagrams provided by an exemplary embodiment of the present application;
[0151] FIG6B is a third internal interaction diagram provided by an exemplary embodiment of the present application;
[0152] FIG7A is a fourth set of interface diagrams provided by an exemplary embodiment of the present application;
[0153] FIG7B is a fifth set of interface diagrams provided by an exemplary embodiment of the present application;
[0154] FIG7C is a fourth internal interaction diagram provided by an exemplary embodiment of the present application;
[0155] FIG7D is a sixth set of interface diagrams provided by an exemplary embodiment of the present application;
[0156] FIG8 is a fifth internal interaction diagram provided by an exemplary embodiment of the present application;
[0157] FIG9 is a schematic diagram of a second interface provided by an exemplary embodiment of the present application;
[0158] FIG10 is a schematic diagram of a third interface provided by an exemplary embodiment of the present application;
[0159] FIG11 is a sixth internal interaction diagram provided by an exemplary embodiment of the present application;
[0160] FIG12 is a seventh internal interaction diagram provided by an exemplary embodiment of the present application;
[0161] FIG13 is an eighth internal interaction diagram provided by an exemplary embodiment of the present application;
[0162] FIG14 is a ninth internal interaction diagram provided by an exemplary embodiment of the present application;
[0163] FIG15 is a tenth internal interaction diagram provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0164] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0165] In the following, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include one or more of the features.
[0166] The present invention provides a display method. This display method is applied to an electronic device including a foldable screen. The electronic device provided in the present invention can be any device including a foldable screen, such as a mobile phone or a tablet computer. The present invention does not specifically limit the form of the electronic device.
[0167] FIG1 is a schematic diagram of the structure of an electronic device 100. For example, FIG1 is a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0168] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0169] The processor 110 may include one or more processing units. For example, the processor 110 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). The different processing units may be independent devices or integrated into one or more processors.
[0170] The processor 110 can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and execution.
[0171] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0172] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0173] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0174] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0175] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0176] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be 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 MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED).
[0177] In the embodiment of the present application, the display screen 194 may be a folding screen.
[0178] In some embodiments of the present application, the foldable screen may be a flexible foldable screen. The flexible foldable screen includes a folding edge made of a flexible material. Part or all of the flexible foldable screen is made of a flexible material. For example, only the foldable portion (such as the folding edge) of the flexible foldable screen is made of a flexible material, while the other portions are made of a rigid material; or, alternatively, the entire flexible foldable screen is made of a flexible material. The foldable screen can be folded along the folding edge to form at least two screens.
[0179] For example, the folding screen can be folded to form a first screen and a second screen. The physical form of the electronic device 100 may include a folding form, a semi-expanded form (or a bracket form) and an unfolded form. When the electronic device 100 is in the folded form, the display directions of the first screen and the second screen are opposite, and the display direction can be understood as the orientation of the display plane of the screen; when the electronic device 100 is in the unfolded form, the display plane of the first screen and the display plane of the second screen are in the same plane; the form between the unfolded form and the folded form is a semi-expanded form. Among them, in the process of the electronic device 100 switching from the folded form to the unfolded form (or from the unfolded form to the folded form), the bending angle α of the electronic device 100 gradually changes from 360° to 180° (or gradually changes from 180° to 360°). Among them, the bending angle α refers to the angle between the first screen and the second screen, that is, the angle between the display plane of the first screen and the display plane of the second screen.
[0180] Schematic diagrams of the electronic device 100 in different physical forms can be found in FIG2 , which will not be described here for the time being.
[0181] It should be noted that the at least two screens formed after the folding screen is folded can be multiple independent screens, or a complete screen of an integrated structure that is folded into at least two parts. Among them, the at least two screens can also be understood as at least two display areas.
[0182] For example, FIG2 shows a schematic diagram of the appearance of an electronic device 100 provided in an embodiment of the present application.
[0183] Among them, (a) in Figure 2 is a schematic diagram of the electronic device 100 when it is in an unfolded form, (b) in Figure 2 is a schematic diagram of the electronic device 100 when it is in a semi-expanded form, and (c) in Figure 2 is a schematic diagram of the electronic device when it is in a folded form.
[0184] The foldable screen shown in FIG2(a) is a complete display screen 194 including a folding edge made of a flexible material. When the foldable screen is folded along the folding edge, a first screen 194a and a second screen 194b are formed as shown in FIG2(b) or (c).
[0185] When the electronic device 100 is in the unfolded configuration, the angle α between the first screen 194a and the second screen 194b is 180°. When the electronic device 100 is in the folded configuration, the angle α between the first screen 194a and the second screen 194b is 360°, meaning that the display directions of the first screen 194a and the second screen 194b are opposite each other.
[0186] In some examples, one of the first screen 194a and the second screen 194b is a primary screen, and the other is a secondary screen. The primary screen is the screen that primarily displays the image, and the secondary screen is the screen that supplements the image. Optionally, the area of the primary screen is larger than the area of the secondary screen. For example, the first screen 194a is the primary screen, and the second screen 194b is the secondary screen.
[0187] It should be understood that the electronic device 100 shown in FIG2 is merely an example, and the present embodiment does not limit the appearance of the electronic device 100. In this application, the electronic device 100 and the display method are described by taking the example of the electronic device 100 being foldable to form two screens.
[0188] The gyroscope sensor 180B can detect the magnitude of the angular velocity of the electronic device 100 in various directions (for example, the x, y, and z-axis directions in FIG. 2 , where the x-axis is perpendicular to the display plane of the first screen 194 a, and the y-axis and the z-axis are parallel to the display plane of the first screen 194 a), and can be used to determine the motion posture of the electronic device 100. In the embodiment of the present application, an example is taken in which the electronic device 100 is folded along a folding edge to form two screens, namely, a first screen and a second screen. The electronic device 100 may include two gyroscope sensors, and the two gyroscope sensors may be respectively arranged on the first screen and the second screen. The electronic device 100 can determine whether the bending angle of the electronic device 100 has changed, etc. based on the detection signals of the two gyroscope sensors.
[0189] The acceleration sensor can detect the magnitude of the acceleration of the electronic device 100 in various directions (such as the x, y and z axis directions in Figure 2). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor can also be used to identify the posture of the electronic device, and is applied to applications such as horizontal and vertical screen switching, pedometers, etc. In an embodiment of the present application, the electronic device 100 is folded along the folding edge to form two screens, namely the first screen and the second screen. The electronic device 100 may include two acceleration sensors, and the two acceleration sensors may be respectively arranged on the first screen and the second screen. The electronic device 100 can determine whether the bending angle of the electronic device 100 has changed, etc. based on the detection signals of the two acceleration sensors.
[0190] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100. Exemplarily, based on the detected infrared reflected light, a proximity value (which can be understood as: the distance between the electronic device and the user) is determined; when the proximity value is less than the lower limit threshold, a proximity event is sent; when the proximity value is greater than the upper limit threshold, a distance event is sent. The electronic device 100 can use the proximity light sensor 180G to detect when the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen or control the main screen to be black, the secondary screen to display animation, video, wallpaper, etc.
[0191] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0192] The touch sensor 180K, also known as a "touch device," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K detects touch operations applied to or near the touch sensor. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194.
[0193] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0194] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0195] FIG3 is a software structure diagram of the electronic device 100 of an embodiment of the present application. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into three layers, namely, the application layer, the application framework layer, and the kernel layer from top to bottom. It should be noted that the software architecture provided in FIG3 is only an example, and the electronic device 100 may also include more or fewer software layers. In addition, in different operating systems (such as Android systems, IOS systems, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the solution of the present application can also be implemented.
[0196] Among them, the application layer can include a series of applications.
[0197] As shown in Figure 3, the application layer may include applications such as call applications, display applications, and simulation rendering engines. Optionally, the application layer may also include applications such as camera, gallery, calendar, map, navigation, WLAN, Bluetooth, music, video, and short message applications. A call application refers to an application with a call function, which may be a phone application included in an electronic device as described below, or an application with an instant messaging function, which is not specifically limited in this embodiment of the present application. For example, the call function specifically refers to a voice call function.
[0198] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0199] As shown in Figure 3, the application framework layer may include Activity Management Service (Activity Manager Service), Window Management Service (Window Manager Service), Folding Screen Management Service (Flod Screen Manager Service), Sensor Management Service (Sensor Manager Service), Battery Management Service (BatteryManager), Power Management Service (PowerManagerService), System User Interface (System UI), etc.
[0200] The Activity management service is used to manage the Activity running status.
[0201] The window management service is used to manage window programs. The window management service can obtain the display size, lock the screen, take screenshots, etc.
[0202] The folding screen management service is used to manage the display mode of the folding screen (also known as the display mode of the electronic device). In an embodiment of the present application, the folding screen management service is used to determine whether the application that pulls up the interface is a display application, and when it is determined that the application that pulls up the interface is a display application, the display mode of the folding screen is set to the secondary screen display mode.
[0203] In an embodiment of the present application, the display modes of the foldable screen may include: main screen display mode, full screen display mode, secondary screen display mode, and collaborative display mode. In main screen display mode, the electronic device displays the image on the main screen and the secondary screen is black; in full screen display mode, the electronic device's main screen and secondary screen display the image simultaneously, and the display plane of the main screen and the display plane of the secondary screen are located in the same plane; in secondary screen display mode, the electronic device displays the image on the secondary screen and the main screen is black; in collaborative display mode, the electronic device's main screen and secondary screen display the image simultaneously, and the display plane of the main screen and the display plane of the secondary screen are not located in the same plane.
[0204] In an embodiment of the present application, the display mode can be identified by a display mode flag (displaymode). The display mode flag includes different values, such as 1, 2, 3, 4, etc. A display mode flag of 1 indicates that the display mode is the primary screen display mode; a display mode flag of 2 indicates that the display mode is the full screen display mode; a display mode flag of 3 indicates that the display mode is the secondary screen display mode; and a display mode flag of 4 indicates that the display mode is the collaborative display mode.
[0205] In an embodiment of the present application, the sensor management service is used to receive proximity events and distance events uploaded by the underlying sensor driver, and when a proximity event or a distance event is received, the sensor management service notifies the phone application of the event.
[0206] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers and sensor drivers.
[0207] Below, taking the electronic device 100 as a mobile phone, the first screen 194a as the main screen, the second screen 194b as the secondary screen, the first event as an approach event, and the second event as a distance event as an example, an interface display method provided by an embodiment of the present application is described in detail with reference to the accompanying drawings.
[0208] Taking the call scenario as an example, after a user actively makes a call using a mobile phone (i.e., an electronic device initiates a call), as shown in (a) of FIG4A , the main screen 194a displays the outgoing call interface (hereinafter referred to as the outgoing call interface), and the secondary screen 194b is a black screen. When the other party's mobile phone rings, the "dialing" in the outgoing call interface is updated to "the other party is ringing." As shown in (b) of FIG4A , after the other party answers the call, the main screen 194a displays the call interface (specifically, the call connected interface), and the secondary screen 194b is a black screen. As shown in (c) of FIG4A , after the user holds the mobile phone close to his ear to make a call, the main screen 194a is a black screen, and the secondary screen 194b displays the first preset interface. The first preset interface may include: an animation display interface, a video display interface, a wallpaper display interface, etc.
[0209] In addition, if the user actively makes a call using the mobile phone and puts the phone close to the ear before the other party answers the call, the phone will directly go from the display state shown in (a) of Figure 4A (that is, the main screen 194a displays the call interface and the sub-screen 194b is a black screen) to the display state shown in (c) of Figure 4A (that is, the main screen 194a is a black screen and the sub-screen 194b displays the first preset interface).
[0210] Taking the incoming call scenario as an example, after the mobile phone receives an incoming call, the main screen 194a of the mobile phone displays the incoming call interface (as shown in Figure 4B), and the sub-screen 194b may be a black screen (not shown); after the user clicks the answer control 41 on the incoming call interface, the mobile phone enters the display state shown in (b) of Figure 4A (that is, the main screen 194a displays the call interface, and the sub-screen 194b is a black screen); after the user puts the mobile phone close to the ear to make a call, the mobile phone enters the display state shown in (c) of Figure 4A.
[0211] The following will use the internal software module as an example to illustrate the specific implementation of the technical solution of this application. It should be noted that the execution subject of each step in this article is essentially an electronic device. The interaction process shown in Figure 4C includes the following steps:
[0212] 401. When the phone application receives a user operation, the phone application calls a first number.
[0213] Optionally, the phone application calls the first number in response to the user's call operation. At this time, as shown in (a) of FIG4A , the main screen 194 a displays an outgoing call interface, and the sub-screen 194 b is a black screen.
[0214] After step 401, step 402 is executed. Optionally, in an incoming call scenario, step 402 is also executed after the user answers the call. Exemplarily, the electronic device receives the incoming call and displays the incoming call interface. When the call is answered, step 402 is executed. Exemplarily, step 402 is executed in response to the operation of answering the incoming call.
[0215] 402. The phone application registers with the sensor management service to listen for approach events and distance events.
[0216] Optionally, proximity events and distance events are sent by the sensor driver to the sensor management service. The sensor driver determines whether to generate a proximity event or a distance event based on the data collected by the proximity light sensor. The specific determination process can be found in the corresponding content of the above embodiments and will not be repeated here.
[0217] Optionally, a proximity light sensor and an earpiece are provided on the side of the main screen.
[0218] In one example, after the other user answers a call, as shown in Figure 4A (b), the phone's main screen 194a displays the call interface, while the secondary screen 194b remains black. At this point, the user holds the phone's main screen to their ear while making a call. The proximity light sensor on the main screen detects an approaching object, and the sensor driver generates a proximity event, which is then sent to the sensor management service.
[0219] In another example, before the other user answers a call, as shown in Figure 4A (a), main screen 194a displays the outgoing call interface (hereinafter referred to as the outgoing call interface), while secondary screen 194b is black. At this point, the user holds the main screen of the phone to their ear while making a call. The proximity light sensor on the main screen detects an approaching object, and the sensor driver generates a proximity event and sends it to the sensor management service.
[0220] 403. The sensor management service sends a proximity event to the phone application.
[0221] After receiving the proximity event sent by the sensor driver, the sensor management service sends the proximity event to the phone application.
[0222] It should be noted that, here, the phone application does not perform the operation of "controlling the display screen to turn off in response to the proximity event", that is, it achieves the effect of interception.
[0223] 404. The phone application obtains the current display mode from the foldable screen management service.
[0224] Optionally, after receiving the proximity event, the phone application obtains the current display mode from the folding screen management service.
[0225] Optionally, the phone application obtains the current display mode from the foldable screen management service in response to the proximity event.
[0226] The foldable screen management service is used to manage the display modes of the foldable screen. The display modes of the foldable screen can include the main screen display mode (display mode flag is 1), full screen display mode (display mode flag is 2), secondary screen display mode (display mode flag is 3), and collaborative display mode (display mode flag is 4) described above.
[0227] Optionally, the phone application obtains the current display mode flag from the foldable screen management service.
[0228] Exemplarily, the current display mode acquired by the phone application is the main screen display mode, that is, the current display mode flag acquired is 1.
[0229] 405. The phone application obtains the battery power and battery temperature from the battery management service.
[0230] After receiving the proximity event, the phone application obtains the battery level and battery temperature from the battery management service. Exemplarily, the battery level includes a battery percentage.
[0231] Optionally, the phone application obtains the battery level and battery temperature from the battery management service in response to the proximity event.
[0232] Optionally, after receiving the proximity event, the phone app obtains the power from the battery management service and the temperature from the sensor management service. The temperature can be detected by a temperature sensor within the electronic device. The temperature sensor can be located near the motherboard or near the battery.
[0233] 406. The phone application determines whether the display mode is non-full screen display mode, whether the preset function is turned on, whether the battery level is greater than a preset battery threshold (eg, 20%), and whether the battery temperature is less than a preset temperature threshold.
[0234] Non-full-screen display modes include: main screen display mode, secondary screen display mode, and collaborative display mode. A preset function (e.g., the "Colorful Handbag" function) refers to a function that sets the display mode to the secondary screen display mode and displays a first preset interface on the secondary screen when the phone is in folded form and is placed close to the ear for a call. This function can be enabled (i.e., turned on) by the user. As shown in FIG4D , the phone can display a "Colorful Handbag" function setting interface 201. The "Colorful Handbag" function setting interface 201 includes a switch control 2011. The phone can enable the "Colorful Handbag" function in response to a user triggering an "on" operation on the switch control 2011. In actual applications, the phone can also disable the "Colorful Handbag" function in response to a user triggering a "off" operation on the switch control 2011. Optionally, the phone can display the "Colorful Handbag" function setting interface 201 in response to a user triggering an "open" operation on the "Colorful Handbag" application card on the phone's main interface; or the phone can display the "Colorful Handbag" function setting interface 201 in response to a user triggering a "selection" operation on the "Colorful Handbag" option in the "Settings" application interface on the phone.
[0235] That is, when the display mode is one of primary, secondary, or collaborative display modes, a preset function is enabled, the battery level is greater than 20%, and the battery temperature is less than a preset temperature threshold, the phone application executes step 408. Otherwise, the phone application executes step 407. Specifically, when the display mode is full-screen, indicating that the phone is currently in the expanded state, the screen can be turned off. When a preset function is not enabled, indicating that the user does not wish to use it, the screen can be turned off. When the battery level is low, the screen can be turned off to save power.
[0236] Exemplarily, the current display mode is the main screen display mode, the preset function is turned on, the current battery charge is greater than 20%, and the battery temperature is less than the preset temperature threshold. In this case, the judgment result of step 406 is "yes", and step 408 is subsequently executed. Exemplarily, the current display mode is the main screen display mode, the preset function is turned on, the current battery charge is less than 20%, and the battery temperature is less than the preset temperature threshold. In this case, the judgment result of step 406 is "no", and step 407 is subsequently executed.
[0237] The preset power threshold of 20% is only used as an example, and its specific value can be set according to actual needs, and the embodiment of the present application does not make any specific limitation on this.
[0238] 407. The phone application notifies the power management service to turn off the screen.
[0239] 408. The phone application notification display application pulls up the first preset interface.
[0240] Exemplarily, the first preset interface is the game engine Unity interface. Various animation effects can be displayed through the Unity interface to enhance the user experience.
[0241] Optionally, the display application pulls up the first preset interface (specifically, after the first preset interface is successfully created) and notifies the phone application to set the preset flag bit (isRunning) to 1. A preset flag bit of 1 indicates that the first preset interface is being displayed, and a preset flag bit of 0 indicates that the first preset interface is not being displayed. In this application, "being displayed" can be understood as the first preset interface being pulled up, and "not being displayed" can be understood as the first preset interface not being pulled up.
[0242] 409. Demonstrate the method for creating the application execution interface.
[0243] Exemplarily, the interface creation method may include an OnCreate() method. After the presentation application receives the notification from the phone application, the OnCreate() method is called to create the Unity interface.
[0244] The following interactions are involved in demonstrating how to create an application execution interface:
[0245] 10. Display the application notification Activity management service to create the first preset interface.
[0246] The presentation application sends a notification to the Activity management service to create a first preset interface. Optionally, the presentation application includes a first tag in the notification, where the first tag is used to indicate that the size of the interface and window is set to the secondary screen size. The specific form of the first tag can be set according to actual needs and is not specifically limited in this embodiment of the application.
[0247] To simplify the internal interaction process, the presentation application can optionally notify the Activity management service to create a first preset interface with a top-level display attribute, where the top-level display attribute means that the first preset interface is placed on top of other interfaces.
[0248] 11. The Activity management service creates the first preset interface.
[0249] Among them, the size of the first preset interface is the size of the secondary screen.
[0250] 12. The Activity Management Service notifies the Window Management Service to create the first window.
[0251] After the Activity management service creates the first preset interface, it notifies the window management service to create a first window, and carries the first mark in the notification.
[0252] 13. The window management service adds a second window.
[0253] After receiving the notification from the Activity management service, the window management service adds a second window.
[0254] Exemplarily, the second window may be a window serving as a mask.
[0255] The mask window is full-screen in size and covers the display screen (specifically, the top layer of the display screen). In other words, the mask window is used to block all windows on the folding screen, and the entire screen appears black before the mask window is deleted.
[0256] 14. The window management service creates the first window.
[0257] The window management service creates a first window and sets the size of the first window to the secondary screen size according to the first mark.
[0258] It should be noted that the above step 13 is performed before step 14, so as to avoid screen flickering.
[0259] 15. The display application starts the virtual rendering engine.
[0260] Exemplarily, the rendering engine may be a Unity rendering engine.
[0261] 16. The virtual rendering engine initializes the interface.
[0262] After the virtual rendering engine is started, the interface initialization begins, including configuring the interface width, height, resolution, etc. Among them, the interface width, height, and resolution information can be provided by the display application. For example, the interface width and height can be the width and height of the secondary screen.
[0263] Among them, the virtual rendering engine will subsequently draw related animations according to the interface width, height and resolution configured when the interface is initialized.
[0264] Optionally, the execution order of step 10 and step 15 can be set according to actual needs, and the embodiment of the present application does not specifically limit this. Exemplarily, step 10 can be executed before step 15, or step 10 can be executed after step 15, or step 10 and step 15 can be executed simultaneously.
[0265] In an optional solution, the presentation application is a multi-process, and steps 10 and 15 are executed by different sub-processes of the presentation application.
[0266] It should be added that the process of displaying the application execution interface creation method may also include: displaying the application registering with the folding screen management service to listen for expansion events, displaying the application registering with the battery management service to listen for low power events and high temperature events, displaying the application registering with the sensor driver to listen for ambient light, displaying the application starting voiceprint recognition, displaying the application registering with the input management service to listen for touch events, and other processing.
[0267] 410. Execute the interface drawing method.
[0268] Exemplarily, the interface drawing method may include: OnResume() method. After calling OnCreate() method, the display application calls OnResume() method.
[0269] The following interactions are involved in the process of displaying the application's interface drawing method:
[0270] 17. Display the first preset interface of the application notification Activity management service settings.
[0271] The display application can call the setVisibility() method to notify the Activity management service to set the first preset interface to be visible; the Activity management service then notifies the window management service to set the first window to be visible.
[0272] 18. The window management service draws the first preset interface.
[0273] After receiving the interface drawing notification, the window management service draws the first preset interface created by the activity management service in the first window.
[0274] 19. The window management service sets the first window to be visible.
[0275] The window may correspond to two window states: a visible state and an invisible state. The window management service sets the first window to be visible, that is, sets the window state of the window to the visible state.
[0276] After setting the first window to be visible, the window management service calls the folding screen management service to determine whether the above-mentioned first preset interface is pulled up by the display application, that is, calls the folding screen management service to execute the following step 20.
[0277] 20. The folding screen management service determines whether the first preset interface is launched by the display application.
[0278] When executing step 20, the folding screen management service also needs to obtain the package name and class name corresponding to the first preset interface created by the Activity management service (that is, the package name and class name corresponding to the display application) from the Activity management service; based on the obtained package name and class name, it can be determined whether the first preset interface created by the Activity management service is pulled up by the display application.
[0279] 21. The folding screen management service returns yes to the window management service.
[0280] When the folding screen management service determines that the first preset interface is pulled up by the display application, it will notify the window management service.
[0281] 22. The window management service determines whether the first window is visible.
[0282] The window management service may determine whether the first window is visible after the folding screen management service returns "yes". When the window management service determines that the first window is visible, it notifies the folding screen management service to set the display mode flag to 3 (i.e., the secondary screen display mode).
[0283] 23. The folding screen management service sets the display mode flag to 3.
[0284] After receiving the notification from the window management service, the folding screen management service sets the display mode flag to 3.
[0285] 24. The display application determines whether the virtual rendering engine has drawn the animation.
[0286] The display application determines whether the virtual rendering engine has rendered animation since this startup. If not, the display application executes step 27 below. If not, the display application executes step 25 below.
[0287] For example, after the virtual rendering engine has finished drawing the first frame of animation after this startup, it can send a return value to the presentation application to indicate that the first frame of animation has been drawn. The presentation application then adds a flag based on the return value to indicate that the virtual rendering engine has drawn the animation. In this way, the presentation application can determine whether there is a flag indicating that the virtual rendering engine has drawn the animation. If so, the presentation application determines that the virtual rendering engine has drawn the animation. If not, the presentation application determines that the rendering engine has not drawn the animation.
[0288] Exemplarily, when the display application executes step 410 for the first time after the current outgoing call or incoming call, the judgment result of step 24 is no; when the display application executes step 410 for the nth (n>1) time after the current outgoing call or incoming call, the judgment result of step 24 is yes.
[0289] 25. The display application notifies the virtual rendering engine to display the drawn animation.
[0290] 26. The virtual drawing engine sends the drawn animation to the window management service.
[0291] After receiving the notification of displaying the drawn animation from the display application, the virtual rendering engine sends the drawn animation to the window management service.
[0292] 27. Display application notification virtual rendering engine drawing animation.
[0293] The display application can send the resource ID number (eg, animation ID number) that needs to be drawn to the virtual rendering engine. The process of determining the resource ID number will be described in detail in the embodiment of FIG10 .
[0294] 28. Virtual rendering engine draws animation.
[0295] 29. The virtual rendering engine sends the animation drawn in step 28 to the window management service.
[0296] 30. The window management service adds the received animation to the first preset interface drawn in the first window.
[0297] 31. The window management service determines whether there is a mask window.
[0298] If there is a mask window, the window management service executes the following step 32; if there is no mask window, the window management service does not execute any operation and ends.
[0299] In this embodiment of the present application, the window management service determines whether the mask window added in step 13 exists. Specifically, when adding the mask window, the window management service may add a preset name to the mask window. In this way, the window management service can subsequently determine whether the corresponding mask window exists by searching for a mask window with the preset name. The preset name can be set according to actual needs and is not specifically limited in this embodiment of the present application.
[0300] It should be noted that when the display application executes step 410 for the first time after the outgoing call or the incoming call is received, the judgment result of step 31 is "yes"; when the display application executes step 410 for the nth time after the outgoing call or the incoming call is received, the judgment result of step 31 is "no".
[0301] 32. The window management service determines whether the animation is added and whether the display mode is set.
[0302] The window management service can determine whether the display mode is set through the folding screen management service, that is, whether the current display mode flag is 3 (that is, the secondary screen display mode). Exemplarily, the window management service can obtain the current display mode flag from the folding screen management service. If the current display mode flag is 3, it is determined that the display mode has been set. If the animation has been added and the display mode has been set, the following step 33 is executed; otherwise, the above step 32 is executed repeatedly until it is determined that the animation has been added and the display mode has been set.
[0303] 33. The window management service deletes the mask window.
[0304] After step 33 , as shown in FIG. 4A ( c ), the main screen 194 a is black, and the sub-screen 194 b displays the first preset interface.
[0305] It should be noted that, in combination with step 410, the specific process of executing the interface drawing method may include: displaying the application notification window management service to set the first window to be always on; displaying the application notification window management service to set the initial screen brightness of the first window; displaying the application notification system user interface (system UI) to set the side return key to be unresponsive, setting the return to desktop key to be unresponsive, and setting the three-key navigation to be shielded to prevent accidental touches.
[0306] Furthermore, the execution order of steps 17 and 24 can be set based on actual needs and is not specifically limited in the embodiments of the present application. For example, step 17 can be executed before step 24, or after step 17, or simultaneously. Alternatively, if the presentation application is multi-process, steps 17 and 24 are executed by different sub-processes of the presentation application.
[0307] When a user holds the phone to their ear while making a call, as shown in Figure 5A (a), the phone's main screen 194a is black, and the phone's secondary screen 194b displays the first preset interface. When the user wants to check the time, change the caller, or hang up the call, the user holds the phone away from their ear. After the user holds the phone away from their ear, as shown in Figure 5A (b), the phone's main screen 194a displays the call interface, and the secondary screen 194b is black.
[0308] Another interactive process involved in the interface display method provided in the embodiment of the present application will be described below with reference to FIG5B:
[0309] 500. The sensor management service sends a distance event to the phone application.
[0310] In the above step 402, the phone application registers with the sensor management service to monitor the away event. In this way, when the sensor management service receives the away event sent by the sensor driver, the sensor management service will send the away event to the phone application.
[0311] 501. The phone application determines whether the preset flag bit is 1.
[0312] If the judgment result is yes, the phone application executes step 502 ; if the judgment result is no, the phone application executes step 510 .
[0313] 502. The phone application notifies the display application to stop displaying the first preset interface.
[0314] Optionally, the phone application notifies the presentation application to suspend display of the first preset interface. When the phone application receives a proximity event sent by the sensor management service again, the phone application may notify the presentation application to resume displaying the first preset interface.
[0315] 503. The presentation application notifies the virtual rendering engine to stop rendering.
[0316] Optionally, the presentation application may notify the virtual rendering engine to suspend rendering.
[0317] 504. Display the application notification Activity management service to set the first preset interface to be invisible.
[0318] The display application can call the setVisibility() method to notify the Activity management service to set the first preset interface to be invisible; the Activity management service then notifies the window management service to set the first window to be invisible.
[0319] It should be noted that the execution order of steps 503 and 504 can be set according to actual needs and is not specifically limited in the embodiments of the present application. For example, step 503 can be executed before step 504, or step 503 can be executed after step 504, or step 503 and step 504 can be executed simultaneously. Optionally, the display application is a multi-process, and steps 503 and 504 are performed by different sub-processes of the display application.
[0320] 505. The window management service sets the first window to be invisible. Exemplarily, the window management service sets the window state of the first window to be invisible.
[0321] While the window management service sets the first window to be invisible, it can also call the folding screen management service to determine whether the first preset interface is pulled up by the display application.
[0322] 506. The folding screen management service determines whether the first preset interface is opened by the display application.
[0323] When executing step 506, the folding screen management service also needs to obtain the package name and class name corresponding to the first preset interface created by the Activity management service (that is, the package name and class name corresponding to the display application) from the Activity management service; based on the obtained package name and class name, it can be determined whether the first preset interface created by the Activity management service is pulled up by the display application.
[0324] 507. The folding screen management service returns yes to the window management service.
[0325] When the folding screen management service determines that the first preset interface is pulled up by the display application, it will notify the window management service.
[0326] 508. The window management service determines whether the first window is visible.
[0327] The window management service may determine whether the first window is visible after the folding screen management service returns "yes". When the window management service determines that the first window is invisible, it notifies the folding screen management service to set the display mode flag to 1 (i.e., the main screen display mode).
[0328] 509. The folding screen management service sets the display mode flag to 1.
[0329] After step 509 , as shown in FIG. 5A ( b ), the main screen 194 a displays the call interface, and the sub-screen 194 b is a black screen.
[0330] 510. The phone application notifies the power management service to turn on the screen.
[0331] After receiving the screen-on notification, the power management service executes the screen-on processing.
[0332] After the user holds the phone away from the ear, if it is only to check the time and other information or to change the answering user, the subsequent user or the changed user will hold the phone close to the ear again. After the phone is close to the ear again, as shown in (a) in Figure 5A, the main screen 194a is black and the sub-screen 194b displays the first preset interface. In addition, after the phone is close to the ear again, steps 403 to 410 in Figure 4C will be executed inside the phone. It should be noted here that if the phone application receives the proximity event for the first time after calling a number or answering an incoming call, the display application needs to first execute step 409 in Figure 4C, and then execute step 410 in Figure 4C; if the phone application receives the proximity event for the nth (n>1) time after calling a number or answering an incoming call, the display application will skip step 409 and execute step 410 because the first preset interface has been created. In addition, in this embodiment, step 410 is not the first execution of the display application after the outgoing call or the incoming call is received. Therefore, the judgment result of step 24 "determining whether the animation has been drawn" is yes; the judgment result of step 31 "determining whether there is a mask window" is no.
[0333] When the user holds the mobile phone to his ear and makes a call, as shown in (a) in Figure 6A, the main screen 194a is black and the sub-screen 194b displays the first preset interface; when the user holds the mobile phone to his ear and makes a call, the other party hangs up the call and the mobile phone ends the call; after the mobile phone ends the call, as shown in (c) in Figure 6A, the main screen 194a displays the call list interface (that is, the interface displayed before the mobile phone answers a call or makes an outgoing call), and the sub-screen 194b is black.
[0334] After the user holds the mobile phone away from the ear, as shown in (b) in Figure 6A, the main screen 194a displays the call interface and the sub-screen 194b is a black screen; thereafter, after the user triggers the hang-up operation through the call interface displayed on the main screen 194a or the user on the other end of the call triggers the hang-up operation, the mobile phone ends the call; after the mobile phone ends the call, as shown in (c) in Figure 6A, the main screen 194a displays the call list interface and the sub-screen 194b is a black screen.
[0335] The following will describe the interaction process between the software modules within the mobile phone after the call ends with reference to FIG6B:
[0336] 60. The phone application ends the call.
[0337] Optionally, upon receiving a user action, the phone application ends the call. In one specific example, the phone application ends the call based on the user action. Optionally, the phone application ends the call in response to the user action. The user action may specifically be a hang-up call action triggered on the call interface.
[0338] In another specific example, after the user at the communication end triggers a hang-up operation, the phone application receives a hang-up event; based on the hang-up event, the phone application ends the call.
[0339] It should be noted that before the phone application ends the call, the phone may be in the display state shown in Figure 6A (a) (i.e., primary screen 194a is black, and secondary screen 194b displays the first preset interface), or in the display state shown in Figure 6A (b) (i.e., primary screen 194a displays the call interface, and secondary screen 194b is black). 61. The phone application intercepts the call end event.
[0340] The phone application may generate a call end event after step 60 .
[0341] 61. The phone application determines whether the preset flag bit is 1.
[0342] If the judgment result is yes, execute step 62; otherwise, execute step 70.
[0343] 62. The phone application notification displays the first preset interface of the application destruction.
[0344] Optionally, the phone application may call the DestroyShow() function to notify the presentation application to destroy the first preset interface.
[0345] 63. The display application notifies the virtual rendering engine to destroy the rendering process.
[0346] After receiving the notification, the virtual rendering engine destroys the rendering process. For example, the presentation application can call the kill() function to notify the virtual rendering engine to kill the rendering process.
[0347] 64. The display application notifies the Activity management service to destroy the first preset interface.
[0348] The notification sent by the presentation application to destroy the first preset interface does not carry the second flag, which is used to indicate that the display mode flag is not to be set. After receiving the notification to destroy the first preset interface, the activity management service notifies the window management service to destroy the first window. The notification sent by the activity management service to destroy the first window also does not carry the second flag.
[0349] It should be noted that when the presentation application receives the expansion event, it will carry the second flag in the notification of destroying the first preset interface sent to the Activity management service. The specific process will be described below.
[0350] 65. The window management service destroys the first window.
[0351] 66. The window management service determines whether the notification of destroying the first window carries the second flag.
[0352] Optionally, after the window management service destroys the first window, the above step 66 is executed. If the window management service determines that the notification carries the second flag, no operation is performed, that is, the process ends. If the window management service determines that the notification does not carry the second flag, the folding screen management service is called to determine whether the first preset interface is launched by the display application.
[0353] In this embodiment, since the notification of destroying the first preset interface sent by the display application in step 64 does not carry the second mark, the result of “determining whether the notification carries the second mark” in step 66 is no.
[0354] 67. The folding screen management service determines whether the first preset interface is launched by the display application.
[0355] When the folding screen management service determines whether the first preset interface is pulled up by the display application, it needs to obtain the package name and class name corresponding to the first preset interface created by the Activity management service from the Activity management service. The specific judgment process can be found in the corresponding content of the above embodiment.
[0356] 68. The folding screen management service returns "yes" to the window management service.
[0357] When the folding screen management service determines that the first preset interface is pulled up by the display application, it returns "Yes" to the window management service; after the window management service receives the "Yes" returned by the folding screen management service, it notifies the folding screen management service to set the display mode flag to 1 (that is, the main screen display mode).
[0358] 69. The folding screen management service sets the display mode flag to 1.
[0359] After the above step 69, as shown in (c) of FIG. 6A, the main screen 194a of the mobile phone displays the call list interface, and the secondary screen 194b is a black screen.
[0360] 70. The phone application notifies the power management service to turn on the screen.
[0361] After receiving the screen-on notification, the power management service executes the screen-on processing.
[0362] It should be noted that after intercepting the call end event, the phone app can also execute "notify the Activity Management Service to destroy the call interface." After receiving the notification to destroy the call interface, the Activity Management Service destroys the call interface and notifies the Window Management Service to destroy the call interface window.
[0363] It should be noted that the execution order of step 63 and step 64 can be set according to actual needs, and the embodiments of the present application do not specifically limit this. For example, step 63 can be executed before step 64, or step 63 can be executed later than step 64, or step 63 and step 64 can be executed at the same time. Optionally, the display application is a multi-process, and step 63 and step 64 are responsible for different sub-processes of the display application. When step 63 and step 64 are responsible for different sub-processes of the display application, after the display application destroys the drawing process, even if the corresponding sub-process crashes, it will not affect the operation of destroying the interface of another sub-process. In this way, the crash of the display application due to the destruction of the drawing process can be avoided, and the situation that the destruction of the interface (for example: steps 64, 65, 66, 67, 68, and 69 in Figure 6B below) cannot be executed can be avoided, that is, the situation that the main screen display mode cannot be returned to can be avoided.
[0364] When the phone is in the folded state and in the display state shown in FIG7A(a) (i.e., the main screen 194a displays the call interface and the secondary screen 194b is black), if the phone is unfolded, the phone enters the display state shown in FIG7A(b) (i.e., the call interface is displayed in full screen). For example, after the user holds the phone away from the ear, the phone enters the display state shown in FIG7A(a). Then, the user unfolds the phone, causing the phone to enter the display state shown in FIG7A(b).
[0365] When the phone is in the folded state and in the display state shown in FIG7B (a) (i.e., the main screen 194a is black and the secondary screen displays the first preset interface), if the phone is unfolded, the phone's physical form changes to the unfolded state and enters the display state shown in FIG7B (b) (i.e., the entire screen is black). For example, after a user holds the phone to their ear to make a call, the phone enters the display state shown in FIG7B (a). Then, the user unfolds the phone, causing the phone to enter the display state shown in FIG7B (b).
[0366] The following describes the interaction process between the software modules inside the mobile phone after it is unfolded, with reference to FIG7C :
[0367] 701. The folding screen management service sends an expansion event to the display application.
[0368] In step 409, the display application has registered with the folding screen management service to listen for the expansion event. Therefore, when the mobile phone folding screen is expanded, the folding screen management service will send an expansion event to the display application.
[0369] After step 701, the display application executes steps 702 and 704. Optionally, as shown in FIG7C , after the battery management service sends a low battery event (or high temperature event) to the display application, the display application may also execute steps 702 and 705.
[0370] The demonstration application has registered with the battery management service in step 409 to monitor low-battery and high-temperature events. This allows the battery management service to return a low-battery event to the demonstration application when the battery level drops below a preset percentage threshold (e.g., 20%), and a high-temperature event to the demonstration application when the battery temperature exceeds a preset temperature threshold.
[0371] 702. The presentation application notifies the phone application to set the preset flag bit to 0.
[0372] Optionally, after receiving the notification, the phone application sets the preset flag bit to 0.
[0373] 703. The phone application notifies the power management service to turn off or turn on the screen based on the most recently received event.
[0374] After receiving the notification from the presentation application that the preset flag bit is set to 0, the phone application executes step 703 ; alternatively, after the presentation application sets the preset flag bit to 0, the phone application executes step 703 .
[0375] Exemplarily, if the most recently received event is a proximity event, the power management service is notified to turn off the screen.
[0376] Exemplarily, if the most recently received event is a distance event, the power management service is notified to turn on the screen.
[0377] 704 . When the presentation application receives the expansion event, it notifies the virtual rendering engine to destroy the rendering process and notifies the Activity management service to destroy the first preset interface (carrying the second mark).
[0378] In step 704, the notification of destroying the first preset interface carries the second flag. That is, when the presentation application receives an expand event, it does not need to set the display mode flag. This is because the display mode flag has been set to full-screen display mode before the presentation application receives the expand event.
[0379] After receiving the notification of destroying the first preset interface, the Activity management service sends a notification of destroying the first window to the window management service, and carries the second mark in the notification.
[0380] 705 : When the display application receives a high temperature event or a low battery event, it notifies the destruction of the drawing process and the destruction of the first preset interface (without the second mark).
[0381] In step 705, the notification of destroying the first preset interface does not carry the second flag. In other words, when the display application receives a high temperature event or a low battery event, it needs to set the display mode flag.
[0382] After receiving the notification of destroying the first preset interface, the Activity management service sends a notification of destroying the first window to the window management service, and the notification does not carry the second flag.
[0383] 706. The window management service destroys the first window.
[0384] In the embodiment of the present application, after step 708, the mobile phone further executes steps 66 to 69 in FIG6B . For details, please refer to the corresponding content in the embodiment in conjunction with FIG6B .
[0385] That is to say, if the display application receives an expansion event, there is no need to set the display mode flag after the window management service destroys the first window; if the display application receives a low power event or a high temperature event, the window management service needs to set the display mode flag to 1 (that is, the main screen display mode) after destroying the first window.
[0386] For example, as shown in Figure 7A (a), main screen 194a displays the call interface, secondary screen 194b is black, and the most recent event intercepted by the phone app is a distance event. Then, after the phone's foldable screen is unfolded, the "Notification Screen Turns On" step 703 is executed; then, as shown in Figure 7A (b), the phone displays the call interface in full screen.
[0387] For example, as shown in Figure 7B (a), main screen 194a is black, secondary screen 194b displays the first preset interface, and the most recent event intercepted by the phone application is a proximity event. Then, after the foldable screen of the phone is unfolded, the "Notification Screen Off" in step 703 is executed; thereafter, as shown in Figure 7B (b), the full screen of the phone is black.
[0388] For example, as shown in FIG7D (a), main screen 194a is black, secondary screen 194b displays the first preset interface, and the most recent event intercepted by the phone application is a proximity event. Then, when the phone's battery level falls below a preset threshold or the battery temperature rises above a preset threshold, the "Notify screen off" option in step 703 is executed. Thereafter, as shown in FIG7D (b), both main screen 194a and secondary screen 194b are black.
[0389] For example, as shown in FIG7A(a), main screen 194a displays the call interface, sub-screen 194b is black, and the most recent event intercepted by the phone application is a distance event. Then, when the phone's battery level drops below a preset threshold or the battery temperature rises above a preset threshold, the "Notification Screen On" step 703 is executed; thereafter, as shown in FIG7A(a), main screen 194a displays the call interface, and sub-screen 194b is black.
[0390] In step 409, "Creating the Display Application Execution Interface," the display application initiates the voiceprint recognition algorithm and registers to listen for touch events with the input management service in the application framework layer. Subsequently, after the voiceprint recognition algorithm generates a voiceprint recognition result, it sends it to the display application. Upon receiving a touch event, the input management service sends it to the display application. In this way, the display application can determine the resource ID number based on the voiceprint recognition algorithm's voiceprint recognition result and the touch event monitoring result. The following describes the resource ID determination process with reference to Figure 8:
[0391] 800. The voiceprint recognition algorithm sends the voiceprint recognition result to the display application.
[0392] It should be noted that after the demo app starts the voiceprint recognition algorithm, it registers with the audio management service at the application framework layer to monitor audio data. Subsequently, upon receiving the audio data, the audio management service sends it to the voiceprint recognition algorithm for recognition, generating a voiceprint recognition result. Optionally, the voiceprint recognition result identifies the current user's gender.
[0393] The voiceprint recognition algorithm may be an algorithm applied at the application layer or a chip algorithm, which is not specifically limited in the embodiments of the present application.
[0394] 801. The input management service sends a touch event to the presentation application.
[0395] After receiving the touch event, the input management service sends the touch event to the presentation application.
[0396] In actual applications, step 800 may be performed before step 801 (for example, the user speaks first and then touches the secondary screen), or step 800 may be performed after step 801 (for example, the user touches the secondary screen first and then speaks). Of course, the above steps 800 and 801 may also be performed simultaneously.
[0397] 802. The display application determines a resource ID number based on the voiceprint recognition result and the touch event monitoring result. Optionally, the resource ID number may include an animation ID number.
[0398] In an optional embodiment, when the presentation application receives the voiceprint recognition result, step 802 is executed. In this embodiment, before executing step 802, the presentation application may or may not have received a touch event. In other words, there are two types of touch event monitoring results: one is that the touch event is detected, and the other is that the touch event is not detected.
[0399] For example, the display application determines whether a touch event has been detected based on the monitoring results of the touch event; if no touch event is detected, the application determines whether the current caller is a female based on the voiceprint recognition results within a preset time period; if the current caller is a female, the resource ID number is determined to be A (the resource can be an earring pendant animation, as shown in Figure 9); if the current caller is a male, the resource ID number is determined to be B (the resource can be a dynamic video). If a touch event has been detected, the application determines whether the current caller is a female based on the voiceprint recognition results within a preset time period; if the current caller is a female, the resource ID number is determined to be C (the resource can be a butterfly animation, as shown in Figure 10); if the current caller is a male, the resource ID number is determined to be D (the resource can be a goldfish animation).
[0400] In another optional example, the display application obtains the voiceprint recognition results and the touch event monitoring results within a preset time period (for example, 5 seconds) after calling the first number (or answering an incoming call); the display application determines the resource ID number based on the voiceprint recognition results and the touch event monitoring results within the preset time period (for example, 5 seconds).
[0401] Exemplarily, the display application determines whether a touch event is detected within the preset time period based on the monitoring results of the touch event within the preset time period; if no touch event is detected within the preset time period, the display application determines whether the current call user is a female based on the voiceprint recognition results within the preset time period; if the current call user is a female, the resource ID number is determined to be A (the resource can be an earring pendant animation, as shown in Figure 9); if the current call user is a male, the resource ID number is determined to be B (the resource can be a dynamic video). If a touch event is detected within the preset time period, the display application determines whether the current call user is a female based on the voiceprint recognition results within the preset time period; if the current call user is a female, the resource ID number is determined to be C (the resource can be a butterfly animation, as shown in Figure 10); if the current call user is a male, the resource ID number is determined to be D (the resource can be a goldfish animation).
[0402] It should be noted that if no voiceprint recognition result is received within a preset time period, the resource ID number may be determined as a default resource ID number.
[0403] 803. The presentation application sends the resource ID number to the virtual rendering engine.
[0404] In actual applications, the above step 803 is generally executed after step 27 in Figure 4C. Therefore, as an option, when executing step 27, the display application can send the initialization resource ID to the virtual rendering engine; the virtual rendering engine performs rendering according to the initialization resource ID; after determining the above resource ID, the display application sends the resource ID to the virtual rendering engine, and the virtual rendering engine redraws the screen according to this resource ID and sends the drawn screen to the window management service. The window management service adds the screen to the first preset interface drawn in the first window, thereby completing the switching of the secondary screen display content.
[0405] Optionally, when the resource ID is an animation ID, after the animation ID is determined, the display application may also send a first indication message to the virtual rendering engine based on the touch position corresponding to the touch event monitored in real time, and the first indication message is used to instruct the virtual rendering engine to change the display effect of the animation (for example: the landing position of the butterfly); the user's emotion may also be determined based on the voiceprint recognition result monitored in real time; and the second indication message is determined based on the user's emotion, and the second indication message is used to instruct the virtual rendering engine to change the display effect of the animation (for example: the flapping frequency of the butterfly's wings).
[0406] It should be noted that before executing "starting voiceprint recognition" and "listening for touch events" in step 409, the display application can also determine whether the user's resource configuration information exists; if the user's resource configuration information exists, the resource ID number is determined based on the resource configuration information (at this time, the resource ID number can be sent to the virtual rendering engine through step 27 in Figure 4C); if the user's resource configuration information does not exist, the "starting voiceprint recognition" and "listening for touch events" in the above step 409 are executed.
[0407] Optionally, when the presentation application notifies the Activity management service to destroy the first preset interface, it may also notify the voiceprint recognition algorithm to end the voiceprint recognition.
[0408] In step 409, "Creating the Display Application Execution Interface," the display application registers with the sensor management service to monitor ambient light data. Subsequently, upon receiving the ambient light data, the sensor management service sends it to the display application. This allows the display application to set the screen brightness based on the ambient light data. The following describes the screen brightness setting process with reference to Figure 11:
[0409] As shown in Figure 11, the process includes:
[0410] 1101. The sensor management service sends ambient light data to the presentation application.
[0411] When the sensor management service receives the ambient light data sent by the sensor driver, it sends the ambient light data to the display application. Optionally, the ambient light data is collected by the ambient light sensor and sent to the sensor driver.
[0412] 1102. Determine target brightness based on monitored ambient light data.
[0413] Typically, the ambient light sensor is located on the main screen. When a user holds their phone close to their ear while making a call, the ambient light intensity detected by the sensor is lower than the actual brightness of the phone's current environment. If the screen brightness is set directly based on the detected ambient light intensity, the image displayed on the secondary screen will appear too dark in the actual environment where the phone is located. Therefore, the embodiments of the present application compensate for the screen brightness to address this issue.
[0414] Specifically, the ambient light data includes ambient light intensity; determining the brightness of the first screen based on the monitored ambient light intensity; performing brightness compensation on the first screen brightness to obtain compensated brightness; and determining the target brightness based on the compensated brightness.
[0415] Exemplarily, the ambient light sensor detection value range is [0, N], and the mobile phone screen brightness value range is [0, M]; then, the compensated brightness can be determined according to the following formula.
[0416] Wherein, x is the compensated brightness; b is the compensation amount; and E is the monitored ambient light intensity. The value of b can be set according to actual needs and is not specifically limited in the present embodiment, for example: 50.
[0417] From formula (1), we know that the minimum value of the compensated brightness is b. In practical applications, the maximum value of the compensated brightness can also be set, for example, Z. Here, Z is less than or equal to M, and the specific value can be set according to actual needs.
[0418] Therefore, the target brightness is determined according to the compensated brightness. Specifically, the minimum value is taken from x and Z, and the minimum value is used as the target brightness.
[0419] 1103. Display application notification window management service to set screen brightness.
[0420] The notification for setting the screen brightness carries the target brightness determined in step 1102 above.
[0421] Exemplarily, the window management service obtains the layout parameters (LayoutParams, abbreviated as lp) of the first target window through the function getWindow().getAttributes(); the layout parameters include: screen brightness parameter; the window management service divides the target brightness by 255 to obtain the target brightness parameter value; and then sets the screen brightness parameter to the target brightness parameter value through the function getWindow().setAttributes(lp).
[0422] 1104. The window management service notifies the power management service to set the screen brightness.
[0423] The window management service may carry the brightness attribute value A in a notification and send it to the power management service.
[0424] In the above embodiments, it can be considered that the approach event, distance event, and call end event are intercepted at the phone application to perform subsequent processing. Optionally, the screen off notification, screen on notification, and call end event can also be intercepted at the power management service to perform corresponding processing. The following will be described in detail with reference to Figures 12 to 15:
[0425] FIG12 shows the software modules and the interaction process between the software modules involved in the interface display method provided in an embodiment of the present application. As shown in FIG12 , the process includes the following steps:
[0426] 1200. The telephone application calls the first number based on the user operation.
[0427] Optionally, the phone application calls the first number in response to the user's call operation. At this time, as shown in (a) of FIG4A , the main screen 194 a displays an outgoing call interface, and the sub-screen 194 b is a black screen.
[0428] Step 1201 is executed after step 1200. Optionally, in an incoming call scenario, step 1201 is also executed after the user answers the call. Exemplarily, the incoming call is received, the incoming call interface is displayed, and step 1201 is executed in response to answering the call.
[0429] 1201. The phone application registers with the sensor management service to listen for approach events and distance events.
[0430] For example, when the other end user answers the call, as shown in Figure 4A(b), the phone's main screen 194a displays the call interface, while the secondary screen 194b is black. When the user holds the phone close to their ear, the sensor driver detects the proximity event and sends it to the sensor management service.
[0431] 1202. The sensor management service sends a proximity event to the phone application.
[0432] After receiving the proximity event sent by the sensor driver, the sensor management service sends the proximity event to the phone application.
[0433] 1203. The phone application notifies the power management service to turn off the screen.
[0434] Optionally, the phone application may carry an event that triggers the screen-off notification, ie, a proximity event, in the notification.
[0435] 1204. The power management service registers with the phone application to monitor call end events.
[0436] The power management service can register with the phone application to monitor call end events when it receives the screen-off notification triggered by a proximity event for the first time after the last call ends; when the power management service receives the screen-off notification triggered by a proximity event after the last call ends, but this is not the first time, it can skip 1204 and execute the following steps 1205, 1206 and 1207.
[0437] 1205. The power management service obtains the display mode from the folding screen management service.
[0438] 1206. The power management service obtains the power level and battery temperature from the battery management service.
[0439] 1207. The power management service determines whether the display mode is non-full screen display mode, whether the preset function is turned on, whether the power level is greater than a preset power threshold (eg, 20%), and whether the battery temperature is less than a preset temperature threshold.
[0440] If the display mode is one of the primary display mode, the secondary display mode, and the collaborative display mode, the preset function is enabled, the battery level is greater than 20%, and the battery temperature is less than the preset temperature threshold, the following step 1208 is executed. Otherwise, the power management service executes the following step 1209.
[0441] Specifically, when the display mode is full-screen, it means that the phone is currently in the expanded state, and the screen can be turned off directly; when a preset function is not enabled, it means that the user does not want to use the function, and the screen can be turned off directly; when the battery is low, the screen can be turned off directly to save power; when the battery temperature is too high, the screen can be turned off directly for safety. The method of enabling the preset function can be referred to the corresponding content in the above embodiment and will not be repeated here.
[0442] 1208. The power management service notifies the display application to open the first preset interface.
[0443] Exemplarily, the first preset interface is the game engine Unity interface. Various animation effects can be displayed through the Unity interface to enhance the user experience.
[0444] After the above step 1208, the display application executes steps 409 and 410 in FIG. 4C. For specific implementation, please refer to the corresponding contents in the above embodiments.
[0445] Optionally, after the presentation application launches the first preset interface (specifically, after the first preset interface is created), the power management service is notified to set the preset flag bit to 1. A preset flag bit of 1 indicates that the first preset interface has been launched; a preset flag bit of 0 indicates that the first preset interface has not been launched.
[0446] 1209. The power management service performs screen-off processing.
[0447] For steps not described in detail in the embodiments of this application, please refer to the corresponding contents in the above embodiments and will not be repeated here.
[0448] When a user holds the phone to their ear while making a call, as shown in Figure 5A (a), the phone's main screen 194a is black, and the phone's secondary screen 194b displays the first preset interface. When the user wants to check the time, change the caller, or hang up the call, the user holds the phone away from their ear. After the user holds the phone away from their ear, as shown in Figure 5A (b), the phone's main screen 194a displays the call interface, and the secondary screen 194b is black.
[0449] The following will introduce another interactive process involved in the interface display method provided in the embodiment of the present application with reference to FIG13:
[0450] 1300. The sensor management service sends a distance event to the phone application.
[0451] In the above step 1201 , the phone application registers with the sensor management service to monitor the away event. Thus, when the sensor management service receives the away event sent by the sensor driver, the sensor management service sends the away event to the phone application.
[0452] For example, after a user holds the phone close to their ear while making a call, as shown in Figure 5A (a), the phone's main screen 194a is black, and the phone's secondary screen 194b displays the first preset interface. When the user wants to check the time, change the calling party, or hang up the call, the user holds the phone away from their ear. At this point, the sensor driver sends a distance event to the sensor management service, which then sends the distance event to the phone application.
[0453] 1301. The phone application notifies the power management service to turn on the screen.
[0454] Optionally, the phone application may carry in the notification an event that triggers the screen-off notification, that is, an away event.
[0455] 1302. The power management service determines whether the preset flag is 1.
[0456] After the power management service receives the screen-on notification initiated by the away event, step 1302 is executed.
[0457] If the judgment result is yes, execute step 1303; otherwise, execute step 1304.
[0458] 1303. The power management service notifies the display application to stop displaying the first preset interface.
[0459] Optionally, the power management service notifies the presentation application to suspend display of the first preset interface. When the power management service receives the screen-off notification triggered by the proximity event again, the power management service may notify the presentation application to resume displaying the first preset interface.
[0460] After step 1303, the mobile phone executes steps 503 to 509 in FIG5B. For details, please refer to the corresponding contents in the above embodiments. After step 509, as shown in FIG5A (b), the main screen 194a displays the call interface and the secondary screen 194b is black.
[0461] 1304. The power management service performs screen-lighting processing.
[0462] For steps not described in detail in the embodiments of this application, please refer to the corresponding contents in the above embodiments and will not be repeated here.
[0463] After the user holds the phone away from their ear, if they simply want to check the time or change the user who answers the call, the subsequent user or the user after the change will hold the phone close to their ear again. After the phone is brought close to the ear again, as shown in (a) of Figure 5A, the main screen 194a is black and the secondary screen 194b displays the first preset interface. In addition, after the phone is brought close to the ear again, steps 1202 to 1209 in Figure 12 and step 410 in Figure 4C will be executed internally by the phone. For specific implementation, please refer to the corresponding content in the above embodiments. It should be noted here that if the phone application receives a proximity event for the first time after dialing a number or answering an incoming call (that is, the power management service receives a screen-off notification triggered by a proximity event for the first time after the previous call ends), then the display application needs to first execute step 409 in Figure 4C and then execute step 410 in Figure 4C; if the phone application receives a proximity event for the nth (n>1)th time after dialing a number or answering an incoming call (that is, the power management service receives a screen-off notification triggered by a proximity event for the nth time after the previous call ends), the display application will skip step 409 and execute step 410 because the first preset interface has been created. In addition, in this embodiment, step 410 is not the first time the display application executes after dialing a number or answering an incoming call. Therefore, the judgment result of step 24 "determining whether an animation has been drawn" in step 410 is yes; the judgment result of step 31 "determining whether a mask window exists" involved in step 410 is no.
[0464] The following describes the interaction process between the software modules within the mobile phone after the call ends with reference to FIG14:
[0465] 1400. The phone application ends the call.
[0466] When receiving a user action, the phone application ends the call. In one specific example, the phone application ends the call based on the user action. Alternatively, the phone application ends the call in response to the user action. The user action may specifically be a hang-up call action.
[0467] In another specific example, after the user at the communication end triggers a hang-up operation, the phone application receives a hang-up event; based on the hang-up event, the phone application ends the call.
[0468] It should be noted that before the phone application ends the call, the mobile phone may be in the display state shown in (a) of Figure 6A (that is, the main screen 194a is a black screen, and the sub-screen 194b displays the first preset interface), or it may be in the display state shown in (b) of Figure 6A (that is, the main screen 194a displays the call interface, and the sub-screen 194b is a black screen).
[0469] 1401. The phone application sends a call end event to the power management service.
[0470] It should be noted that in step 1205, the power management service has registered with the phone application to monitor call end events. Therefore, after the phone application ends the call, it will send a call end event to the power management service.
[0471] 1402. The power management service determines whether the preset flag is 1.
[0472] The power management service may execute step 1402 after receiving the call end event.
[0473] If the judgment result is yes, execute step 1403; otherwise, execute step 1404.
[0474] 1403. The power management service notifies the display application to destroy the first preset interface.
[0475] After step 1403, the mobile phone executes steps 63 to 69 in FIG. 6B . For details, see the corresponding contents of the above embodiments. After step 69, as shown in FIG. 6A (c), the main screen 194a of the mobile phone displays the call list interface, and the secondary screen 194b is black.
[0476] 1404. The power management service performs screen-on processing.
[0477] For steps not described in detail in the embodiments of this application, please refer to the corresponding contents in the above embodiments and will not be repeated here.
[0478] The following describes the interaction process between the software modules inside the mobile phone after it is unfolded, with reference to FIG15 :
[0479] 1501. The folding screen management service sends an expansion event to the display application.
[0480] In step 409 (Execute Interface Creation Method) in Figure 12, the display application has registered with the foldable screen management service to listen for the expand event. Therefore, when the phone's foldable screen is expanded, the foldable screen management service will send an expand event to the display application.
[0481] After the display application receives the expansion event, the mobile phone executes step 1502, steps 704 and 706 in Figure 7C, and steps 66 to 69 in Figure 6B. For specific implementation, please refer to the corresponding content in the above embodiments.
[0482] Optionally, the display application receives a high temperature event or a low battery event and executes step 1502, steps 705 and 706 in Figure 7C, and steps 66 to 69 in Figure 6B. For specific implementation, please refer to the corresponding content in the above embodiments.
[0483] 1502. The presentation application notifies the power management service to set the preset flag bit to 0. After receiving the notification of setting the preset flag bit to 0, the power management service sets the preset flag bit to 0.
[0484] 1503. The power management service turns the screen on or off based on the most recently received notification.
[0485] After receiving the notification of setting the preset flag bit to 0, the power management service executes step 1503 ; alternatively, after setting the preset flag bit to 0, the power management service executes step 1503 .
[0486] The power management service will perform corresponding processing based on the most recently received notification. For example, if the most recently received notification is a screen-off notification, the screen will be turned off, so that the phone is in the unfolded state and the entire screen is black, as shown in Figure 7B (b); if the most recently received notification is a screen-on notification, the screen will be turned on, so that the phone can display the call interface in full screen, as shown in Figure 7A (b).
[0487] For example, as shown in Figure 7A (a), main screen 194a displays the call interface, secondary screen 194b is black, and the last notification received by the power management service is a screen-on notification triggered by an away event. Then, after the phone's foldable screen is unfolded, the "screen-on processing" in step 1504 is executed; then, as shown in Figure 7A (b), the phone displays the call interface in full screen.
[0488] For example, as shown in Figure 7B (a), main screen 194a is black, secondary screen 194b displays the first preset interface, and the most recent notification received by the power management service is a screen-off notification triggered by a proximity event. Then, after the foldable screen of the phone is unfolded, the "screen-off process" in step 1504 is executed; thereafter, as shown in Figure 7B (b), the full screen of the phone is black.
[0489] For example, as shown in FIG7D (a), main screen 194a is black, secondary screen 194b displays the first preset interface, and the most recent notification received by the power management service is a screen-on notification triggered by an away event. Then, when the phone's battery level falls below a preset threshold or the battery temperature rises above a preset threshold, the "screen-off process" in step 1504 is executed; thereafter, as shown in FIG7D (b), both main screen 194a and secondary screen 194b are black.
[0490] For example, as shown in FIG7A(a), main screen 194a displays the call interface, secondary screen 194b is black, and the last notification received by the power management service is a screen-on notification triggered by an away event. Then, when the phone's battery level drops below a preset threshold or the battery temperature rises above a preset threshold, the "screen-on processing" in step 1504 is executed; thereafter, as shown in FIG7A(a), main screen 194a displays the call interface, and secondary screen 194b is black.
[0491] For steps not described in detail in the embodiments of this application, please refer to the corresponding contents in the above embodiments and will not be repeated here.
[0492] An embodiment of the present application also provides a computer program, which, when executed by an electronic device including a display screen, implements the steps performed by the above-mentioned display application, such as: steps 409 and 410 in Figure 4C; steps 503 and 504 in Figure 5B; steps 63 and 64 in Figure 6B; steps 702, 704 and 705 in Figure 7C; steps 802 and 803 in Figure 8; and steps 1102 and 1103 in Figure 11.
[0493] An embodiment of the present application also provides a computer program, which, when executed by an electronic device including a display screen, implements the steps performed by the above-mentioned display application and communication application, for example: steps 401 to 410 in Figure 4C; steps 500 to 504 in Figure 5B; steps 60 to 64 and step 70 in Figure 6B; steps 702 to 705 in Figure 7C; steps 802 and 803 in Figure 8; and steps 1102 and 1103 in Figure 11.
[0494] An embodiment of the present application also provides a computer program, which, when executed by an electronic device including a display screen, implements the steps performed by the above-mentioned display application and power management service, for example: steps 1200 to 1209, step 409, and step 410 in Figure 12; steps 1300 to 1304, step 503, and step 504 in Figure 13; steps 1400 to 1404, step 63, and step 64 in Figure 14; and steps 1501 to 1503, step 704, and step 705 in Figure 15.
[0495] An embodiment of the present application also provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a program; the processor is coupled to the memory and is used to execute the program stored in the memory to implement the interface display method in the above embodiments.
[0496] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer, can implement one or more steps in any of the above-mentioned interface display methods.
[0497] The computer readable storage medium may be a non-transitory computer readable storage medium, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0498] Another embodiment of the present application further provides a computer program product comprising instructions, which, when executed by a computer, can implement one or more steps in any of the above methods.
[0499] Among them, the electronic device, computer-readable storage medium, and computer program product provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0500] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0501] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0502] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0503] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for making a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. The above content is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. An interface display method, characterized in that, Applied to an electronic device including a display screen, the display screen includes a main screen and a secondary screen, and the main screen and the secondary screen are two different display areas of the display screen; when the electronic device is in the unfolded state, the display directions of the main screen and the secondary screen are the same; When the electronic device is in the folded state, the display directions of the main screen and the secondary screen are opposite; The method includes: At a first moment, the electronic device receives a first call; After answering the first call, display a first call interface on the main screen; After answering the first call, when a first event occurs, display a first preset interface on the secondary screen and do not display the first call interface on the main screen; When a second event occurs, display the first call interface on the main screen and do not display the first preset interface on the secondary screen; the occurrence moment of the second event is later than the occurrence moment of the first event; between the first moment and the occurrence moment of the second event, the electronic device is in the folded state.
2. The method according to claim 1, wherein The first event is that an object approaches a preset area of the electronic device, and the second event is that an object moves away from the preset area of the electronic device.
3. The method according to claim 1, characterized in that It further includes: When a third event occurs, display the first preset interface on the secondary screen and do not display the first call interface on the main screen, the occurrence moment of the third event is later than the occurrence moment of the second event, and the first event and the third event are the same event; When the first call is hung up, do not display the first preset interface on the secondary screen; The moment when the first call is hung up is later than the occurrence moment of the third event, and between the occurrence moment of the third event and the moment when the first call is hung up, the electronic device is in the folded state.
4. The method according to claim 1, wherein It further includes: At a second moment, the electronic device receives a second call; After answering the second call, when a fourth event occurs, the display screen turns off; Between the second moment and the occurrence moment of the fourth event, the electronic device is in the unfolded state, and the fourth event is the same as the first event.
5. The method according to claim 1, wherein When the first event occurs, the power of the electronic device is a first power; the method further includes: At a third moment, the electronic device receives a third call; After answering the third call, when a fifth event occurs, the display screen turns off; when the fifth event occurs, the power of the electronic device is a second power; the second power is less than the first power; the fifth event is the same as the first event; between the third moment and the occurrence moment of the fifth event, the electronic device is in the folded state.
6. The method according to claim 5, characterized in that, When the first event occurs, the temperature of the electronic device is a first temperature; the method further includes: At a fourth moment, the electronic device receives a fourth call; After answering the fourth call, when a sixth event occurs, the display screen turns off; when the sixth event occurs, the temperature of the electronic device is a second temperature; the second temperature is greater than the first temperature; the sixth event is the same as the first event; between the fourth moment and the occurrence moment of the sixth event, the electronic device is in the folded state.
7. The method according to claim 1, characterized in that Before the first moment, the method further includes: Display a settings interface; In response to a user's opening operation on the settings interface, open a preset function; When a first event occurs, display a first preset interface on the secondary screen and not display the first call interface on the main screen, including: When the first event occurs, based on the first event and the preset function being already open, display the first preset interface on the secondary screen and not display the first call interface on the main screen.
8. The method according to claim 1, wherein It further includes: Display a settings interface; In response to a closing operation triggered on the settings interface, close the preset function; At a fifth moment, the electronic device receives a fifth call; After answering the fifth call, when a seventh event occurs, based on the seventh event and the preset function being already closed, the display screen turns off; The seventh event is the same as the first event. Between the fifth moment and the occurrence moment of the seventh event, the electronic device is in a folded form.
9. The method according to claim 1, wherein It further includes: At a sixth moment, the electronic device receives a sixth call; After answering the sixth call, display a second call interface on the main screen; After answering the sixth call, when an eighth event occurs, display the first preset interface on the secondary screen and not display the second call interface on the main screen; the eighth event is the same event as the first event; between the sixth moment and the occurrence moment of the eighth event, the electronic device is in a folded form; When the electronic device changes from the folded form to the unfolded form, the first preset interface is not displayed on the secondary screen; the moment when the electronic device changes from the folded form to the unfolded form is later than the occurrence moment of the eighth event.
10. The method according to claim 1, characterized in that, After the first event occurs, when the sound collected by the electronic device is a male voice, the first preset interface includes a first interface element; when the sound collected by the electronic device is a female voice, the first preset interface includes a second interface element; the first interface element is different from the second interface element.
11. The method according to claim 1, wherein Between the occurrence moment of the first event and the occurrence moment of the second event, the first preset interface includes a third interface element, and the third interface element is displayed at a first position of the first preset interface; The method further includes: In response to a touch operation on the first preset interface, display the third interface element at a second position of the first preset interface.
12. The method according to claim 1, wherein When the first event occurs, display a first preset interface on the secondary screen and not display the first call interface on the main screen, including: When the first event occurs, create the first preset interface, set the first preset interface to a visible state, and set the display mode of the electronic device to the secondary screen display mode; the first preset interface has a top - level display attribute.
13. The method according to claim 1, wherein When the second event occurs, display the first call interface on the main screen and not display the first preset interface on the secondary screen, including: When the second event occurs, set the first preset interface to an invisible state and set the display mode of the electronic device to the main screen display mode.
14. The method according to claim 3, characterized in that, When the third event occurs, the first preset interface is displayed on the secondary screen, and the first call interface is not displayed on the main screen, including: When the third event occurs, the first preset interface is set to a visible state, and the display mode of the electronic device is set to the secondary screen display mode.
15. The method according to claim 3, wherein When the first call is hung up, the first preset interface is not displayed on the secondary screen, including: When the first call is hung up, the first preset interface and the first call interface are destroyed, and the display mode of the electronic device is set to the main screen display mode.
16. The method according to claim 9, wherein When the electronic device changes from a folded state to an unfolded state, the first preset interface is not displayed on the secondary screen, including: When the electronic device changes from a folded state to an unfolded state, the first preset interface is destroyed, and the display screen is turned off.
17. A computer program, characterized in that, When the computer program is executed by an electronic device including a display screen, the following method is implemented: After the electronic device answers the first call, when the first event occurs, the first preset interface is displayed on the secondary screen. After the first event occurs, the first call interface is not displayed. The first call interface is the call interface of the first call; When the second event occurs, the first preset interface is not displayed on the secondary screen. After the second event occurs, the first call interface is displayed on the main screen; The occurrence time of the second event is later than the occurrence time of the first event; between the occurrence time of the first event and the occurrence time of the second event, the electronic device is in a folded state; The display screen includes the main screen and the secondary screen. The main screen and the secondary screen are two different display areas of the display screen; when the electronic device is in an unfolded state, the display directions of the main screen and the secondary screen are the same; when the electronic device is in a folded state, the display directions of the main screen and the secondary screen are opposite.
18. The computer program according to claim 17, characterized in that, The first event is that an object approaches a preset area of the electronic device, and the second event is that an object moves away from the preset area of the electronic device.
19. An electronic device, characterized in that, Including: A memory, a processor, and a display screen, where The memory is used to store a program; The processor is coupled to the memory and the display screen and is used to execute the program stored in the memory to implement the method according to any one of claims 1 to 16.
20. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a computer, it can implement the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Folding double-screen mobile device and outer screen information display method
CN105721638A
Information processing method and electronic equipment
CN107025006A
Mobile terminal apparatus
JP2011082724A
Electronic Device Having Foldable Screen and Display Method
US20220191313A1
Outer screen display method and electronic device
WO2023020048A1