WO2024093520A1 - 控制亮屏的方法和电子设备 - Google Patents
控制亮屏的方法和电子设备 Download PDFInfo
- Publication number
- WO2024093520A1 WO2024093520A1 PCT/CN2023/117632 CN2023117632W WO2024093520A1 WO 2024093520 A1 WO2024093520 A1 WO 2024093520A1 CN 2023117632 W CN2023117632 W CN 2023117632W WO 2024093520 A1 WO2024093520 A1 WO 2024093520A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- electronic device
- angle
- screen
- sensor
- state
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 145
- 230000008569 process Effects 0.000 claims description 92
- 230000015654 memory Effects 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012545 processing Methods 0.000 claims description 6
- 230000007423 decrease Effects 0.000 claims 1
- 230000001960 triggered effect Effects 0.000 abstract description 31
- 238000007726 management method Methods 0.000 description 85
- 238000013459 approach Methods 0.000 description 26
- 238000004891 communication Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 17
- 230000003993 interaction Effects 0.000 description 15
- 230000008859 change Effects 0.000 description 13
- 230000006870 function Effects 0.000 description 9
- 230000004044 response Effects 0.000 description 7
- 238000010295 mobile communication Methods 0.000 description 5
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 4
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 4
- 229920001621 AMOLED Polymers 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 239000010985 leather Substances 0.000 description 2
- 230000033001 locomotion Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003238 somatosensory effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72463—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
Definitions
- the present application relates to the field of terminals, and in particular to a method for controlling screen lighting and an electronic device.
- electronic devices can be folded (also referred to as closed), unfolded (also referred to as opened), and may include display screens on two different sides.
- One of the two display screens may be referred to as an inner screen, and the other may be referred to as an outer screen.
- the inner screen may be understood as: a display screen on the same side as the front camera when the electronic device is not folded.
- the outer screen may be understood as: a display screen on the same side as the rear camera when the electronic device is not folded.
- the inner screen may be a display screen with folding and unfolding functions, and when the electronic device is folded, the inner screen is also folded. When the electronic device is unfolded, the inner screen is also unfolded.
- a reasonable design for turning on and off the two display screens includes: the initial state of the electronic device is unfolded, and when the electronic device is closed, the inner screen can be turned off and the outer screen can be turned on as soon as possible.
- the initial state of the electronic device is closed, and when the electronic device is unfolded, the outer screen can be turned off and the inner screen can be turned on as soon as possible.
- such a design meets the user's expectation of turning on the screen when closing the electronic device and unfolding the electronic device.
- the present application provides a method and electronic device for controlling screen lighting, which determines the device shape based on different posture sensors in different angle ranges, quickly responds to the expansion and closing of the electronic device, controls the lighting and extinguishing of the screen, and improves the user experience.
- the present application provides a method for controlling a lit screen, which is applied to an electronic device with a foldable screen, the electronic device comprising an inner screen and an outer screen, the inner screen being foldable to form a first screen and a second screen, the method comprising: when the initial state of the electronic device is closed and both the inner screen and the outer screen are off, when the electronic device is unfolded to a state where the first angle is greater than or equal to a first angle, the electronic device lights up the inner screen and keeps the outer screen off; the first angle is the angle between the first screen and the second screen, and when the initial state of the electronic device is closed, the first angle increases during the process of unfolding the electronic device; The state of the electronic device is unfolded, and the first angle becomes smaller during the process of closing the electronic device; when the initial state of the electronic device is closed, and at least one of the inner screen and the outer screen is lit, when the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device
- the first angle may be the inner screen angle involved in the embodiment.
- the initial state is closed. Regardless of whether the electronic device is in the screen-off state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen is lit and the outer screen is lit.
- the first angle for example, 10°
- the electronic device can determine that the electronic device is closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be turned off and the outer screen can be lit.
- the second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience.
- the non-screen-off includes at least one of the inner screen and the outer screen, and the screen-off includes both the inner screen and the outer screen being extinguished.
- the first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away"
- the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".
- the electronic device when the inner screen is off and the outer screen is on, after the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, it also includes: the electronic device lights up the inner screen and turns off the outer screen.
- the inner screen when the initial state is closed, and the inner screen is off and the outer screen is on, when the electronic device is opened to the point where the inner screen angle is greater than or equal to the first angle (e.g., 10°), the inner screen can be triggered to light up and the outer screen can be turned off.
- the electronic device can be put into a state where the inner screen is lit and the outer screen is off at a smaller angle as soon as possible, which is in line with the user's usage habits.
- the electronic device when the inner screen and the outer screen are both lit, after the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device further includes: turning off the outer screen.
- the outer screen when the initial state is closed and both the inner screen and the outer screen are lit, when the electronic device is opened to the point where the inner screen angle is greater than or equal to the first angle (e.g., 10°), the outer screen can be triggered to turn off, while the inner screen remains lit. At this time, if the user wants to unfold the inner screen of the electronic device, the electronic device can be put into a state where the inner screen is lit and the outer screen is turned off at a smaller angle as soon as possible, which is in line with the user's usage habits.
- the first angle e.g. 10°
- the electronic device when the inner screen and the outer screen are lit, after the electronic device is closed to the point where the first angle is less than or equal to the second angle, the electronic device further includes: the electronic device turning off the inner screen and keeping the outer screen off.
- the inner screen when the initial state is unfolded and both the inner screen and the outer screen are lit, when the electronic device is closed to the point where the angle between the inner screen and the inner screen is less than or equal to the second angle (e.g., 60°), the inner screen can be triggered to turn off, and the inner screen remains lit.
- the electronic device can be put into a state where the outer screen is lit and the inner screen is turned off at a larger angle as soon as possible, which is in line with the user's usage habits.
- the electronic device when the inner screen is lit and the outer screen is off, after the electronic device is closed to the point where the first angle is less than or equal to the second angle, the electronic device further includes: the electronic device turns off the inner screen and lights up the outer screen.
- the inner screen when the initial state is unfolded, the inner screen is on, and the outer screen is off, when the electronic device is closed to the angle between the inner screen and the inner screen is less than or equal to the second angle (for example, 60°), the inner screen can be turned off and lit. At this time, the user expects to close the outer screen of the electronic device, so the electronic device can be put into a state where the outer screen is lit and the inner screen is off as soon as possible at a larger angle, which is in line with the user's usage habits.
- the second angle for example, 60°
- the method also includes: when the first angle is greater than or equal to the first angle and is less than the third angle, and the electronic device is in a state where the inner screen is lit and the outer screen is off, the electronic device is closed to a state where the first angle is less than or equal to a fourth angle, the electronic device turns off the inner screen and lights up the outer screen; the fourth angle is less than the first angle.
- the third angle may be the preset angle 3 involved in the embodiment, for example, it may be the "folding and unfolding angle + supplementary angle 1".
- the fourth angle may be the preset angle 5 involved in the embodiment, for example, the "moving away and approaching" angle.
- the first angle is between the first angle (for example, 10°) and the third angle (for example, 65°)
- the fourth angle for example, 5°
- the inner screen angle is less than or equal to the fourth angle (for example, 5°)
- the inner screen is turned off and the outer screen is turned on, which is in line with the user's usage habits.
- the electronic device when both the inner screen and the outer screen are off, the electronic device is unfolded to a point where the first angle is greater than or equal to the third angle at a first moment, and the electronic device lights up the inner screen and keeps the outer screen off.
- the method further includes: when the electronic device is closed to a point where the first angle is less than the second angle at a second moment, the electronic device turns off the inner screen and lights up the outer screen; the second moment is later than the first moment.
- the time difference between the second moment and the first moment is less than or equal to a preset duration.
- the first form set by the first sensor of the electronic device includes that the first angle is less than or equal to the first angle, and the set second form includes that the first angle is greater than the first angle and less than the second angle; the first form set by the second sensor of the electronic device includes that the first angle is less than the second angle; when at least one of the inner screen and the outer screen is lit, the electronic device turns on the second sensor; when the initial state of the electronic device is closed, and the inner screen is off and the outer screen is lit, after the electronic device is unfolded to the first angle greater than or equal to the first angle, the electronic device lights up the inner screen and turns off the outer screen, specifically including: when the electronic device is unfolded to the first angle of the inner screen greater than or equal to the first angle, when the electronic device determines based on the first sensor that the device form of the electronic device has changed from the first form to the second form, the electronic device lights up the inner screen and turns off the outer screen; wherein the second form is different from the first form
- the first sensor may be the Hall sensor in the embodiment
- the second sensor may be the posture sensor in the embodiment
- the first form may be the folded state involved in the embodiment
- the second form may be the unfolded state involved in the embodiment (for example, a semi-expanded state, a fully unfolded state, an unfolded state mapped to the away state).
- the electronic device can also control the screen to light up based on the device form reported by the Hall sensor.
- the device form is determined based on the Hall sensor in small-angle opening and closing, and the device form is determined based on the posture sensor in large-angle opening and closing.
- the device form of the electronic device can also be determined based on the Hall sensor as being in the unfolded state, so that the inner screen is lit and the outer screen is off.
- the response is faster in the process of unfolding the electronic device, which enhances the user experience.
- the solution with Hall sensors as the auxiliary and posture sensors as the main cannot achieve this effect. Because when the screen is on, the posture sensor is turned on, and the electronic device does not process the device state reported by the Hall.
- the electronic device Even if the electronic device is unfolded to the first angle (for example, 10°), although the Hall sensor determines that the device state is unfolded, the electronic device will not process it and will continue to wait for the inner screen angle of the electronic device to unfold to the device state reported by the posture sensor (for example, unfolded to 45°) before the inner screen will light up and the outer screen will go out.
- the first angle for example, 10°
- the Hall sensor determines that the device state is unfolded
- the electronic device will not process it and will continue to wait for the inner screen angle of the electronic device to unfold to the device state reported by the posture sensor (for example, unfolded to 45°) before the inner screen will light up and the outer screen will go out.
- a posture sensor is introduced, and the device form is determined based on the posture sensor in the large-angle opening and closing. Therefore, when the initial state of the electronic device is unfolded, the inner screen is lit, and the outer screen is off, when the electronic device is closed to a larger angle (a second angle, such as 60°), the device form of the electronic device can be determined based on the posture sensor as being in a closed state, so that the inner screen is off and the outer screen is lit. When unfolding, the response is faster in the process of closing the electronic device, which enhances the user experience.
- the solution using only Hall sensors cannot achieve this effect.
- the Hall sensor Because the working range of the Hall sensor is in a smaller angle range (for example, 5°-10°), when the electronic device is closed to the second angle (for example, 60°), the Hall sensor will not report the device form, because it is impossible to achieve the inner screen angle based on the Hall sensor when it is closed to the second angle (for example, 60°), that is, the inner screen is off and the outer screen is lit.
- the second angle for example, 60°
- the initial state of the electronic device is closed, and when the first angle is less than the first angle and the inner screen and the outer screen are both off, the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device lights up the inner screen and keeps the outer screen off, specifically including: when the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, the electronic device determines based on the first sensor that the device form of the electronic device has changed from the first form to the second form, the electronic device lights up the inner screen and keeps the outer screen off; the electronic device lights up the inner screen and keeps the outer screen off.
- the method also includes: the electronic device turns on the second sensor; the second sensor obtains a first event, and the first event is used to indicate the device form of the electronic device; when the second sensor determines that the first event is not a first-frame event, or the first event is a first-frame event and the first event indicates that the device form of the electronic device is the second form, the electronic device turns off the inner screen and lights up the external screen; when the second sensor determines that the first event is a first-frame event and the first event indicates that the device form of the electronic device is the first form, the electronic device keeps the inner screen lit and the external screen off.
- the electronic device when the electronic device is unfolded when closed, the inner screen will be lit after the Hall sensor reports the unfolded state. At this time, the posture sensor can be turned on. When the first frame event reported by the posture sensor is in the folded state, the electronic device may not process the first frame event to avoid the inner screen being turned off again after the inner screen is lit during the unfolding of the electronic device.
- the electronic device when the second sensor determines that the first event is not a first-frame event, or that the first event is a first-frame event and the first event indicates that the device form of the electronic device is the second form, the electronic device The device turns off the inner screen and lights up the outer screen, specifically including: when the second sensor determines that the first event is a first-frame event, the first event indicates that the device form of the electronic device is the first form, and the first angle is less than the fifth angle, the electronic device turns off the inner screen and lights up the outer screen; when the second sensor determines that the first event is a first-frame event and the first event indicates that the device form of the electronic device is the first form, the first event is not processed, specifically including: when the second sensor determines that the first event is a first-frame event, the first event indicates that the device form of the electronic device is the first form, and the first angle is greater than the fifth angle, the electronic device keeps the inner screen lit and turns off the outer screen.
- the fifth angle may be the preset angle 5 (for example, 4°) involved in the embodiment.
- the attitude sensor can process the first frame event when determining that the angle is less than the preset angle 7, triggering the inner screen to turn off and the outer screen to light up. In this way, when the Hall fails at a small angle, the device form of the electronic device can still be judged based on the attitude sensor to control the screen to light up.
- the method also includes: when the first angle is greater than or equal to the first angle and is less than the third angle, and the electronic device is in a state where the inner screen is lit and the outer screen is off, the electronic device is closed to the state where the first angle is less than or equal to the fourth angle, and the electronic device determines based on the first sensor that the device form of the electronic device has changed from the second form to the first form, the electronic device turns off the inner screen and lights up the outer screen.
- the electronic device when the initial state of the electronic device is unfolded and the inner screen and the outer screen are both off, the electronic device is closed to an angle less than the fourth angle, and the electronic device keeps the outer screen and the inner screen off, wherein the first angle is smaller than the first angle.
- the inner screen and the outer screen can be kept off.
- the fourth angle for example, 5°
- the first sensor is a Hall sensor
- the second sensor is a posture sensor
- the electronic device when the initial state of the electronic device is unfolded and the inner screen and the outer screen are both off, the electronic device is closed to an angle less than the fourth angle, and the electronic device keeps the outer screen and the inner screen off, wherein the first angle is smaller than the first angle.
- the inner screen and the outer screen can be kept off.
- the fourth angle for example, 5°
- the electronic device when the inner screen is lit and the outer screen is off, after the electronic device is unfolded to the point where the first angle is greater than or equal to the first angle, it also includes: the electronic device keeps the inner screen lit and the outer screen off.
- the inner screen when the initial state is closed, and the inner screen is on and the outer screen is off, when the electronic device is opened to the point where the inner screen angle is greater than or equal to the first angle (e.g., 10°), the inner screen can remain on and the outer screen can be off.
- the electronic device can be put into a state where the inner screen is on and the outer screen is off at a smaller angle as quickly as possible, which is in line with the user's usage habits.
- the electronic device when the inner screen is off and the outer screen is on, after the electronic device is closed to the point where the first angle is less than or equal to the second angle, the electronic device further includes: the electronic device keeps the inner screen on and keeps the outer screen off.
- the inner screen when the initial state is unfolded, the inner screen is off, and the outer screen is on, when the electronic device is closed to the angle between the inner screen and the second angle (e.g., 60°), the inner screen can be kept off and the inner screen can be lit.
- the electronic device can be put into a state where the outer screen is lit and the inner screen is off as soon as possible at a larger angle, which is in line with the user's usage habits.
- the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in the first aspect or any one of the embodiments of the first aspect.
- the first angle may be the inner screen angle involved in the embodiment.
- the initial state is closed. Regardless of whether the electronic device is in the screen-off state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen is lit and the outer screen is lit.
- the first angle for example, 10°
- the electronic device can determine that the electronic device is closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be turned off and the outer screen can be lit.
- the second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience.
- the non-screen-off includes at least one of the inner screen and the outer screen, and the screen-off includes both the inner screen and the outer screen being extinguished.
- the first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away"
- the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".
- an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions so that the electronic device executes the method described in the first aspect or any one of the embodiments of the first aspect.
- the first angle may be the inner screen angle involved in the embodiment.
- the initial state is closed. Regardless of whether the electronic device is in a screen-off state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen is lit and the outer screen is lit.
- the first angle for example, 10°
- the electronic device can be determined to be closed when the inner screen angle is less than or equal to the second angle (for example, 60°), then the inner screen can be turned off and the outer screen can be lit.
- the second angle is greater than the first angle, so that when the electronic device is opened when it is closed, the screen can be triggered to light up as soon as possible at a smaller angle.
- the screen can be triggered to light up as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience.
- the non-screen-off includes at least one of the inner screen and the outer screen being lit, and the screen-off includes both the inner screen and the outer screen being extinguished.
- the first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away"
- the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding and folding angle + supplementary angle 2".
- an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any one of the implementations of the first aspect.
- the first angle may be the inner screen angle involved in the embodiment.
- the initial state is closed. Regardless of whether the electronic device is in the screen-off state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen is lit and the outer screen is lit.
- the first angle for example, 10°
- the electronic device can determine that the electronic device is closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be turned off and the outer screen can be lit.
- the second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience.
- the non-screen-off includes at least one of the inner screen and the outer screen, and the screen-off includes both the inner screen and the outer screen being extinguished.
- the first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away"
- the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".
- an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute the method described in the first aspect or any one of the implementations of the first aspect.
- the first angle may be the inner screen angle involved in the embodiment.
- the initial state is closed. Regardless of whether the electronic device is in the screen-off state or not when closed, when the electronic device is opened, it can be determined that the electronic device is unfolded when the inner screen angle is greater than or equal to the first angle (for example, 10°), so that the inner screen is lit and the outer screen is lit.
- the first angle for example, 10°
- the electronic device can determine that the electronic device is closed when the inner screen angle is less than or equal to the second angle (for example, 60°), so that the inner screen can be turned off and the outer screen can be lit.
- the second angle is greater than the first angle, so that when the electronic device is opened when closed, the screen can be triggered as soon as possible at a smaller angle, and when the electronic device is closed when opened, the screen can be triggered as soon as possible at a larger angle. It can quickly respond to the unfolding and closing of the electronic device, reasonably control the lighting and extinguishing of the screen, and enhance the user experience.
- the non-screen-off includes at least one of the inner screen and the outer screen, and the screen-off includes both the inner screen and the outer screen being extinguished.
- the first angle is the preset angle 5 involved in the embodiment, for example, it can be "approaching and unfolding and moving away"
- the second angle can be the preset angle 2 involved in the embodiment, for example, it can be "unfolding angle + supplementary angle 2".
- FIGS. 1A-1D are schematic diagrams showing the device form of an electronic device with longitudinal folding characteristics provided by an embodiment of the present application
- FIG2 is a schematic diagram of an electronic device with a horizontal folding feature provided by an embodiment of the present application.
- Figure 3 shows the process of the gesture sensor reporting gesture events
- FIG4 shows the process of the Hall sensor reporting a Hall event
- FIG5 shows an exemplary software structure block diagram of an electronic device controlling a screen to be lit
- 6A-6D are schematic diagrams showing a method of controlling a bright screen according to a preset rule 1;
- FIG. 7 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 11;
- FIG8 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 12;
- 9A and 9B are schematic diagrams showing a method of controlling the screen to be bright according to preset rule 2;
- FIG10 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 21;
- FIG11 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 22;
- FIG. 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- first and second are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features.
- a feature defined as “first” or “second” may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality” means two or more.
- the unfolding and folding status of the electronic device is determined by a Hall sensor.
- the Hall sensor can determine that the electronic device is unfolded when the angle of the inner screen (also referred to as the inner screen angle) is unfolded to angle 1 (for example, 10°), and the electronic device can trigger the outer screen to turn off and the inner screen to light up.
- angle 1 for example, 10°
- the Hall sensor can only determine that the electronic device is folded when the inner screen angle is closed to less than or equal to angle 2 (for example, 5°).
- a single Hall sensor is used to control the lighting and extinguishing of the screen. Since the working range of the Hall sensor is in a relatively small angle range, the angle range is usually when the inner screen angle is between 5° and 10°.
- the working range refers to the angle range in which the Hall sensor can report the device shape. Therefore, when the electronic device is opened and closed at a small angle, the Hall sensor performs well, and when it is opened and closed at a large angle, it performs poorly: although only using the Hall sensor can make the inner screen light up and the outer screen turn off quickly (for example, unfold to 10°) when the initial state of the electronic device is closed, during the process of opening the electronic device.
- the inner screen is turned off and the outer screen is turned on quickly.
- the inner screen can be turned off and the outer screen can be turned on only when the inner screen angle is closed to 5°. That is, when the electronic device is unfolded and closed, the Hall sensor performs poorly and reacts slowly, affecting the user experience.
- a method for controlling the screen is provided.
- Hall sensors and gesture sensors can be used in combination to determine the device form based on different gesture sensors in different angle ranges, quickly respond to the unfolding and closing of the electronic device, control the lighting and extinguishing of the screen, and improve the user experience.
- the screen is still controlled to be lit and extinguished based on the Hall sensor, retaining the advantages of the Hall sensor.
- a gesture sensor when opening and closing at a large angle, a gesture sensor is introduced, and the electronic device can control the lighting and extinguishing of the screen based on the gesture sensor, so that the electronic device responds to the closure faster (for example, closed to 40° or 60°), so that the inner screen is extinguished and the outer screen is lit. This can make up for the defects of the Hall sensor.
- the working range of the gesture sensor can be larger than that of the Hall sensor, and it can determine the device form of the electronic device in a larger angle range (for example, 40° to 65°), so that the electronic device controls the lighting and extinguishing of the screen based on the device form.
- the method can be applied to an electronic device with longitudinal folding or transverse folding characteristics, and the electronic device includes two display screens on different sides.
- One of the two display screens can be called an inner screen, and the other display screen can be called an outer screen.
- the electronic device can determine the device form change of the electronic device through a Hall sensor and a posture sensor according to preset rules, so that in more scenarios, the electronic device can realize reasonable screen lighting when unfolding or folding.
- the device form of the electronic device may include an unfolded state and a folded state, wherein the unfolded state may include a semi-unfolded state and a fully unfolded state.
- Figures 1A-1D show schematic diagrams of the device morphology of an electronic device with a longitudinal folding feature provided in an embodiment of the present application, where the folding edges of the longitudinal folding are perpendicular to the top edge line (for ease of description, the top edge line is referred to as the top edge) and the bottom edge line (for ease of description, the bottom edge line is referred to as the bottom edge) of the electronic device.
- Figure 1A is a schematic diagram of an unfolded form of a longitudinally foldable electronic device.
- the electronic device is not folded.
- the inner screen is a display screen on the same side as the front camera when the electronic device is not folded.
- the inner screen angle is 180°.
- the inner screen angle can be regarded as: the inner screen is divided into screen A and screen B along the folding edge, and the angle formed between screen A and screen B can be called the inner screen angle.
- a device form in which the inner screen angle is between 180° and a preset angle 1 (eg, 145°) can be referred to as a fully unfolded state of the electronic device.
- the inner screen angle ranging from a preset angle 1 (e.g., 145°) to a preset angle 2 (e.g., 40°) can be regarded as a semi-unfolded state of the electronic device.
- a schematic diagram of one of the semi-unfolded states can be shown in FIG1B.
- the inner screen angle ( ⁇ ) can be any angle between the preset angle 1 and the preset angle 2. Among them, the preset angle 1 is greater than the preset angle 2.
- the inner screen angle ranging from a preset angle 2 (for example, 40°) to 0° can be regarded as the folded state of the electronic device.
- a schematic diagram of one of the folding states can be shown in FIG1C.
- the inner screen angle ( ⁇ ) can be any angle between the preset angle 2 and 0.
- the inner screen can be triggered to turn off and the outer screen can be turned on.
- the outer screen can be regarded as the display screen on the same side as the rear camera when the electronic device is not folded.
- FIG. 1D Fold in direction 11a and/or direction 11b as shown in FIG. 1C. Make the inner screen angle 0°, and the sub-device is completely closed as shown in FIG. 1D. At this time, the device form of the electronic device can also be called a folded state. In FIG. 1D, screen A and screen B are opposite and invisible to the user.
- FIG. 1A to FIG. 1D illustrate the electronic device by taking the initial state of the electronic device as unfolded (eg, an angle equal to 180° or close to 180° in the unfolded state) and the closed electronic device as an example.
- closing the electronic device means making the inner screen angle of the electronic device gradually smaller. For example, making the inner screen angle gradually approach 0° or equal to 0°.
- the initial state of unfolding means that before the electronic device is closed, the device form of the electronic device is in the unfolded state.
- the inner screen angle is greater than the preset angle 2 (for example, 40°). For example, when the inner screen angle is 180°, it can be regarded as an unfolded state.
- the device form of the electronic device includes: when the inner screen angle is between 0° and preset angle 3 (for example, 45°), the device form of the electronic device can be a folded state.
- the inner screen angle is between preset angle 3 (for example, 45°) and preset angle 4 (for example, 150°)
- the device form of the electronic device can be a semi-unfolded state.
- the inner screen angle is between preset angle 4 (for example, 150°) and 180°
- the device form of the electronic device can be a fully unfolded state.
- preset angle 3 is less than preset angle 4.
- Preset angle 3 can be equal to preset angle 2, or it can be unequal to preset angle 2.
- Preset angle 1 can be equal to preset angle 4, or it can be unequal to preset angle 4.
- the embodiments of the present application are not limited to this.
- unfolding the electronic device means making the inner screen angle of the electronic device gradually larger. For example, making the inner screen angle gradually approach 180° or equal to 180°.
- the initial state is closed, which means that before the electronic device is unfolded, the inner screen angle of the electronic device is close to or equal to 0°, usually less than 10°.
- FIG2 shows a schematic diagram of an electronic device with a horizontal folding feature provided in an embodiment of the present application.
- the inner screen is a display screen on the same side as the front camera when the electronic device is not folded.
- the outer screen (not shown) can be regarded as a display screen on the same side as the rear camera when the electronic device is not folded.
- the inner screen angle can be regarded as 180°.
- the inner screen angle ( ⁇ ) can be regarded as: the inner screen is divided into screen A and screen B along the folding edge, and the angle formed between screen A and screen B can be called the inner screen angle.
- the difference from a longitudinally folding electronic device is that the folding edge of the horizontally folding screen is parallel to the top and bottom edges of the electronic device.
- Other descriptions of the device form of the horizontally folding electronic device are the same as those in the aforementioned Figures 1A-1D, and reference can be made to the descriptions of the aforementioned Figures 1A-1D, which will not be repeated here.
- the device form of the electronic device includes an approaching state and a distant state in addition to the folded state, semi-unfolded state and fully unfolded state mentioned above.
- the approach state includes the shape of the electronic device when the inner screen angle is between 0° and a preset angle 5 (for example, 10°).
- the distance state includes the shape of the electronic device when the inner screen angle is between a preset angle 5 (for example, 10°) and 180°. Among them, the preset angle 5 is less than the preset angle 2.
- the initial form of the electronic device is unfolded, and the closed electronic device is used as an example to illustrate the approach state and the distance state.
- the distance state includes the form of the electronic device when the inner screen angle is between 180° and a preset angle of 6 (for example, 5°).
- the approach state includes the form of the electronic device when the inner screen angle is between a preset angle of 6 (for example, 5°) and 0°.
- the preset angle 6 is smaller than the preset angle 2.
- the size relationship between the preset angle 5 and the preset angle 6 may not be limited, but generally speaking, the preset angle 5 may be larger than the preset angle 6.
- the electronic device can determine the device form of the electronic device through the Hall sensor and the posture sensor. For example, both the posture sensor and the Hall sensor can determine the device form based on data such as the inner screen angle.
- the Hall sensor can report the device form when the inner screen angle is small (for example, less than or equal to 10°), and the posture sensor can report the device form when the inner screen angle is large (for example, greater than or equal to 45°).
- the electronic device can only determine the device form when the Hall sensor and the posture sensor report the device form, and then control the lighting and extinguishing of the screen (including the inner screen and the outer screen) based on the device form.
- the timing for the Hall sensor and the posture sensor to report the device form includes: the first frame after startup can be reported (one frame is a device form), starting from the second frame, it can be reported when it is detected that the device form of the electronic device has changed compared to the previous frame.
- the attitude sensor can be used to determine whether the device form of the electronic device is one of a folded state, a semi-expanded state, and a fully expanded state.
- the Hall sensor can be used to determine whether the device form of the electronic device is one of an approaching state or a distant state.
- the device state reported by the attitude sensor may be referred to as an attitude event
- the device state reported by the Hall sensor may be referred to as a Hall event.
- FIG. 3 shows the process of the gesture sensor reporting a gesture event.
- the process of the posture sensor reporting a posture event is described below in an exemplary manner in conjunction with FIG. 3 .
- the posture sensor when the inner screen angle is between 0° and preset angle 2 (e.g., 40°), the posture sensor can determine that the device form of the electronic device is in a folded state.
- preset angle 3 e.g., 45°
- preset angle 1 e.g., 145°
- the posture sensor can determine that the device form of the electronic device is in a semi-expanded state.
- preset angle 4 e.g., 150°
- 180° the posture sensor can determine that the device form of the electronic device is in a fully expanded state.
- the device form of the electronic device can also be referred to as the following state 1.
- state 1 is used to indicate that: if the previous frame is in the folded state, when the inner screen angle is between the preset angle 2 (for example, 40°) and the preset angle 3 (for example, 45°), the current frame acquired by the attitude sensor is also in the folded state. If the previous frame is in the semi-expanded state, when the inner screen angle is between the preset angle 2 (for example, 40°) and the preset angle 3 (for example, 45°), the current frame acquired by the attitude sensor is also in the semi-expanded state.
- the attitude sensor can determine that the device form of the electronic device is in the folded state.
- the posture sensor can determine that the device shape of the electronic device is a semi-unfolded state.
- the device state of the electronic device can also be referred to as following state 2.
- state 2 is used to indicate that: if the previous frame is in a semi-expanded state, and the inner screen angle is between preset angle 1 (for example, 145°) and preset angle 4 (for example, 150°), the current frame acquired by the posture sensor is also in a semi-expanded state. If the previous frame is in a fully expanded state, and the inner screen angle is between preset angle 1 (for example, 145°) and preset angle 4 (for example, 150°), the current frame acquired by the posture sensor is also in a fully expanded state.
- the attitude sensor can determine that the device form of the electronic device is a semi-expanded state.
- the attitude sensor can determine that the device form of the electronic device is a fully unfolded state.
- the timing for the posture sensor to report the device state includes: the first frame after startup (one frame is one device state) can be reported, and starting from the second frame, it can be reported when it is detected that the device state of the electronic device has changed compared with the previous frame.
- the position of the black triangle symbol may be an exemplary time for the posture sensor to report a posture event.
- the electronic device When the electronic device is unfolded when closed, during the process of the inner screen angle changing from less than the preset angle 3 to greater than the preset angle 3, the device form of the electronic device changes from a folded state to a semi-expanded state, and the posture sensor may report a frame of device form (at this time, it is a semi-expanded state).
- the device form of the electronic device changes from a semi-expanded state to a fully-expanded state, and the posture sensor may report a frame of device form (at this time, it is a fully-expanded state). It should be understood that if the posture sensor is activated only when the inner screen angle is less than the preset angle 3, the first frame of device form after activation (at this time, it is a folded state) may also be reported, and one of the reporting times may be at the white square shown in (2) in FIG. 3 .
- the position of the triangle symbol may be an exemplary time for the posture sensor to report a posture event.
- the electronic device is closed when unfolded, during the process of the inner screen angle changing from greater than the preset angle 1 to less than the preset angle 1, the device form of the electronic device changes from the fully unfolded state to the semi-expanded state, and the posture sensor may report a frame of device form (at this time, the semi-expanded state).
- the device form of the electronic device changes from the semi-expanded state to the folded state, and the posture sensor may report a frame of device form (at this time, the folded state).
- the posture sensor is activated only when the inner screen angle is greater than the preset angle 1, and the first frame of device form after activation (at this time, the fully unfolded state) may also be reported, and one of the reporting times may be at the white square shown in (3) in FIG. 3 .
- unfolding the electronic device when closed refers to the process of closing the electronic device when the initial state of the electronic device is unfolded.
- Closing the electronic device when unfolded refers to the process of unfolding the electronic device when the initial state of the electronic device is closed.
- FIG. 4 shows the process of the Hall sensor reporting a Hall event.
- the Hall sensor can determine that the device state of the electronic device is in the approaching state.
- the inner screen angle is between a preset angle of 5 (e.g., 10°) and 180°
- the Hall sensor can determine that the device state of the electronic device is in the moving away state.
- the device form of the electronic device can also be referred to as a follow-up state 3.
- the follow-up state 3 is used to indicate that if the previous frame is in an approaching state, when the inner screen angle is between a preset angle 6 (e.g., 5°) and a preset angle 5 (e.g., 10°), the current frame acquired by the Hall sensor is also in an approaching state. That is, it can be understood that, as shown in (2) in FIG.
- the Hall sensor can determine that the device form of the electronic device is in an approaching state. If the previous frame is in a moving away state, when the inner screen angle is between a preset angle 6 (e.g., 5°) and a preset angle 5 (e.g., 10°), the current frame acquired by the Hall sensor is also in a moving away state. That is, it can be understood that, as shown in (3) in FIG.
- the Hall sensor can determine that the device state of the electronic device is in the away state.
- the electronic device may map the reported approaching state into a folded state, and map the reported distant state into an unfolded state (a semi-expanded state or a fully unfolded state).
- the timing for the Hall sensor to report the device state includes: the first frame after startup (one frame is one device state), and starting from the second frame, it can be reported when it is detected that the device state of the electronic device has changed compared with the previous frame.
- the position of the black triangle symbol may be an exemplary timing for the Hall sensor to report a Hall event.
- the electronic device is unfolded while closed, during the process of the inner screen angle changing from less than the preset angle 5 to greater than the preset angle 5, the device form of the electronic device changes from the approaching state to the distant state, and the Hall sensor may report a frame of device form (at this time, the distant state).
- the position of the black triangle symbol may be an exemplary timing for the Hall sensor to report a Hall event.
- the electronic device is closed when unfolded, during the process of the inner screen angle changing from greater than the preset angle 6 to less than the preset angle 6, the device form of the electronic device changes from the far state to the approach state, and the Hall sensor may report a frame of the device form (at this time, the approach state).
- the Hall sensor and the posture sensor can obtain and report the device form, and the electronic device can be integrated based on the device form reported by the Hall sensor and the posture sensor to determine the final device form of the electronic device.
- the preset rules include but are not limited to the following rules:
- the gesture sensor is used as the main sensor and the Hall sensor is used as the auxiliary sensor. Specifically, when the screen of the electronic device is off (both the inner and outer screens are off), the gesture sensor is turned off. When the screen is not off (the inner screen is on and/or the outer screen is on), the gesture sensor is turned on. Regardless of whether the screen is off or not, the electronic device turns on the Hall sensor after it is turned on. However, when the screen is not off, the Hall event reported by the Hall sensor is not processed. The electronic device determines the device form of the electronic device based on the most recent gesture event reported by the gesture sensor, and controls the screen to be lit based on the device form. When the screen is off, the electronic device determines the device form of the electronic device based on the Hall event reported by the Hall sensor, and controls the screen to be lit based on the device form. When the screen is off, the electronic device may not obtain gesture events through the gesture sensor.
- the preset rule 1 also includes a special case (special case 1): when the initial state of the electronic device is closed and the screen is off, when the angle between the electronic device and the inner screen is greater than or equal to the preset angle 5 (for example, 10°), the Hall sensor can determine that the device state of the electronic device is in the away state, and report the away state. Based on the away state, the electronic device determines that the device state of the electronic device is in the unfolded state, triggers the inner screen to light up, and keeps the outer screen off. After the inner screen lights up, the posture sensor is turned on, and then the posture sensor can obtain the posture event and report it.
- special case 1 when the initial state of the electronic device is closed and the screen is off, when the angle between the electronic device and the inner screen is greater than or equal to the preset angle 5 (for example, 10°), the Hall sensor can determine that the device state of the electronic device is in the away state, and report the away state. Based on the away state, the electronic device determines that the device state of the electronic device is in the
- the posture sensor can report the first frame (first frame) posture event (gesture event A).
- first frame first frame
- posture event A when the posture event A is a frame of folded state, it conflicts with the unfolded state mapped by the away state reported by the Hall sensor.
- the way the electronic device handles the conflict may include: in special case 1, within a preset time T (for example, 1s) after the posture sensor reports the posture event A, the electronic device does not report the posture event A based on the posture event. to be processed.
- Gesture sensors and Hall sensors are equally important. Specifically, when the electronic device is off (both the inner and outer screens are off), turn off the gesture sensor. When the screen is not off (the inner screen is on and/or the outer screen is on), turn on the gesture sensor. Electronic devices all turn on the Hall sensor after they are turned on.
- the gesture sensor reports a gesture event
- the electronic device can determine the device form of the electronic device based on the gesture event when it is closed and unfolded, and control the screen to light up based on the device form.
- the Hall sensor reports a Hall event
- the electronic device can determine the device form of the electronic device based on the Hall event when it is closed and unfolded, and control the screen to light up based on the device form.
- the preset rule 2 also includes a special case (special case 2): when the initial state of the electronic device is closed and the screen is off, when the angle between the electronic device and the inner screen is greater than or equal to the preset angle 5 (for example, 10°), the Hall sensor can determine that the device state of the electronic device is in the away state, and report the away state. Based on the away state, the electronic device determines that the device state of the electronic device is in the unfolded state, triggers the inner screen to light up, and keeps the outer screen off. After the inner screen is lit, the posture sensor is turned on to obtain and report the posture event. Between the preset angle 5 (for example, 10°) and the preset angle 3 (for example, 45°), the posture sensor can obtain the first frame posture event (gesture event B). Among them, when the posture event B is a frame of folded state, it conflicts with the unfolded state mapped by the away state reported by the Hall sensor. For this special case 2, the way the electronic device handles the conflict includes but is not limited to the following ways.
- Mode 1 In special case 2, after the gesture sensor determines that the gesture event B is in the folded state, the gesture event B may not be reported, and the electronic device may not control the screen to light up based on the gesture event B. In this way, the following problem 1 can be avoided: when the inner screen angle is unfolded to the preset angle 5 (for example, 10°), the electronic device triggers the inner screen to light up and the outer screen to turn off, and then between the preset angle 5 (for example, 10°) and the preset angle 3 (for example, 45°), the electronic device is triggered to turn off the inner screen and light up the outer screen based on the folded state.
- the preset angle 5 for example, 10°
- the preset angle 3 for example, 45°
- screen cutting refers to controlling the screen to light up based on the device form when the screen is not turned off.
- the operation of controlling the inner screen to turn off and the outer screen to light up can be called screen cutting.
- the operation of controlling the inner screen to light up and the outer screen to turn off can be called screen switching.
- Mode 2 In special case 2, after the posture sensor determines that the posture event B is a folding state, when it is determined that the inner screen angle in the folding state is less than the preset angle 7 (for example, 4°), the posture sensor can report the posture event B, and the electronic device can determine the device form of the electronic device based on the posture event B, and control the screen to light up (the inner screen is off and the outer screen is on) based on the device form.
- the posture event B may not be reported, and the electronic device may not control the screen to light up based on the posture event B.
- the preset angle 7 is less than or equal to the preset angle 5 (for example, 5°). This can not only solve the aforementioned problem 1. It can also solve problem 2: when the Hall sensor fails, the false alarm is now a far away state (actually a close state, the user may not expect to unfold the electronic device), so that the electronic device triggers the inner screen to light up, and after the outer screen is off, the folding state reported by the posture sensor can be triggered to turn off the inner screen and light up the outer screen in time.
- the preset angle 7 (for example, 4°) is obtained based on the posture sensor.
- the electronic device in the embodiments of the present application can achieve more reasonable control of the screen lighting.
- the reasonable lighting of the screen when the electronic device is unfolded or folded involved in this application includes but is not limited to the following scenarios.
- Scenario 1 The initial state of the electronic device is closed, and when both the inner screen and the outer screen are off, when the electronic device is unfolded (from a folded state to an unfolded state), the inner screen is triggered to light up and the outer screen is turned off as soon as possible (for example, unfolded to 10°).
- Scenario 1 can be implemented in the following way: In scenario 1, when both the inner screen and the outer screen are off, when the electronic device is unfolded when closed to an angle of the inner screen greater than or equal to a preset angle of 5 (for example, 10°), the Hall sensor can determine that the device state of the electronic device is a away state, and report the away state. Based on the away state, the electronic device determines that the device state of the electronic device is an unfolded state, triggers the inner screen to light up, and keeps the outer screen off.
- a preset angle of 5 for example, 10°
- Scenario 2 The initial state of the electronic device is unfolded, and when the inner screen or the outer screen is lit, when the electronic device is closed (from the unfolded state to the folded state), the inner screen is triggered to turn off and the outer screen is lit as soon as possible (folded to more than 10°, for example, 40°).
- Scenario 2 can be implemented in the following way: In scenario 2, when the inner screen or the outer screen is lit, the posture sensor is turned on. When the electronic device is unfolded and closed to the point where the angle between the inner screen and the outer screen is less than or equal to the preset angle 2 (for example, 40°), the posture sensor can determine that the device form of the electronic device is a folded state, and report the folded state.
- the electronic device triggers the inner screen to turn off and the outer screen to turn on based on the folded state.
- it can detect that the electronic device is in a folded state about 35° (40° minus 5°) in advance, and then the inner screen can be triggered to turn off and the outer screen can be lit 35° in advance. In this way, it is more in line with the user's expectation that the inner screen will turn on and the outer screen will turn off when the electronic device is closed.
- FIG. 5 shows an exemplary software structure block diagram involved in controlling the screen lighting of an electronic device.
- the following describes the process of interaction between some modules when the electronic device controls the screen to light up based on the device form reported by the Hall sensor and the posture sensor in conjunction with FIG. 5 .
- the software structure includes at least one subsystem.
- it may include an application subsystem and a system control subsystem.
- Different subsystems can be divided into several layers, and each layer has a clear role and division of labor.
- the layers communicate with each other through software interfaces.
- the application subsystem may include an application layer, an application framework layer, a hardware abstraction layer, and a kernel layer.
- the system control subsystem may include a framework layer and a kernel layer.
- the framework layer in the system control subsystem may be referred to as a co-framework layer
- the kernel layer in the system control subsystem may be referred to as a co-kernel layer. It should be understood that in actual applications, in addition to the levels shown in FIG. 5, more or fewer levels may be included in the application subsystem and the system control subsystem. This embodiment of the application is not limited thereto.
- the application layer in the application subsystem may include a series of application packages, such as camera, calendar, WLAN, music, gallery, call, navigation, and Bluetooth application packages.
- the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
- API application programming interface
- the application framework layer includes some predefined functions.
- the application framework layer in the application subsystem may include a system server, which may include a screen management module, a device status management server, a sensor service, and the like.
- the screen management module may include a power management server, a window management server, etc. Each module in the screen management module may be used to receive a screen lighting notification sent by the device status management server, and the notification is used to trigger The screen management module starts the screen lighting process.
- the power management server can be used to control the power on and off of the screen.
- the window management server can be used to draw the display window, and after the screen is powered on, the display window is placed on the screen for the user to view.
- the device state management server can be used to receive the posture events reported by the posture sensor and the Hall events reported by the Hall sensor. Then, the final device form of the electronic device is determined based on the posture events and the Hall events. Based on the device form, a decision is made to control the screen to light up, triggering the screen management module to start the screen light up process.
- the sensor service can be used to report received gesture events and Hall events to the device status management server.
- the hardware abstraction layer is an interface layer located between the kernel layer and the hardware layer (not shown), and its purpose is to abstract the hardware and provide a virtual hardware platform for the operating system.
- the hardware abstraction layer may include sensor interface services, inter-core communication module A, etc.
- the sensor interface service can be used to register each sensor and receive the data sent by each sensor after registration.
- the sensor interface service may include a posture sensor interface and a Hall sensor interface.
- the posture sensor interface can be used to manage the registration of posture sensors, receive posture events uploaded by posture sensors, and send the posture events to the sensor service.
- the Hall sensor interface can be used to manage the registration of Hall sensors, receive Hall events uploaded by Hall sensors, and send the Hall events to the sensor service.
- the inter-core communication module A can be used to manage the communication between the application subsystem and the system control subsystem, so that the system control subsystem and the application subsystem can transmit data to each other, such as receiving gesture events and Hall events transmitted by the system control subsystem.
- the cooperation framework layer in the system control subsystem may include an event distribution manager, a sensor client manager, an inter-core communication module B, and the like.
- the event distribution manager can be used to receive the data uploaded by the following cooperative kernel layer and distribute it to other modules registered with the event distribution manager.
- the event distribution manager can be used to receive the posture event reported by the posture sensor and then transmit the posture event to the sensor client manager.
- the event distribution manager can also be used to receive the Hall event reported by the Hall sensor and then transmit the Hall event to the sensor client manager.
- the sensor client manager can be used to obtain data uploaded by the event distribution manager after registering with the event distribution manager, such as gesture events and Hall events.
- the inter-core communication module B can be used to manage the communication between the application subsystem and the system control subsystem, so that the system control subsystem and the application subsystem can transmit data to each other.
- the inter-core communication module B can be used to receive gesture events, Hall events, etc. transmitted by the sensor client manager, and transmit the gesture events, Hall events, etc. data to the inter-core communication module A.
- the sensor driver can be used to start the sensor, for example, the posture sensor, the Hall sensor, etc.
- the posture event can be obtained and reported.
- the first frame posture event is reported to the event distribution manager.
- the current frame posture event can also be reported to the event distribution manager.
- the Hall sensor can be started, the Hall event can be obtained and reported.
- the first frame Hall event is reported to the event distribution manager. Later, if the current frame Hall event is different from the previous frame Hall event, the current frame Hall event can also be reported to the event distribution manager.
- the gesture sensor and the Hall sensor reporting data may also include: the gesture sensor and the Hall sensor may respectively transmit the gesture event and the Hall event through the transmission path of step 1 to step 4 in FIG5 (i.e., the path indicated by white circle 1 to white circle 4), and report the gesture event and the Hall event to the device state management server. Then, the device state management server executes step 5 (white circle 5 in the figure): based on the gesture event and the Hall event, the final device form of the electronic device is determined, and then a decision to control the screen to light up is made based on the device form, triggering the screen management module to start the screen light up process.
- step 5 white circle 5 in the figure
- FIG. 5 is an exemplary software block diagram of an electronic device, and should not constitute a limitation on the embodiments of the present application.
- the positions of the various modules may be different in actual applications.
- the attitude sensor is used as an example for illustration.
- the attitude sensor is a virtual sensor based on a software algorithm
- the attitude sensor can be run on the application subsystem side or on the system control subsystem side.
- the system control subsystem may also be referred to as a coprocessor subsystem.
- the electronic device can determine the device form change of the electronic device through the Hall sensor and the posture sensor according to the preset rule 1 mentioned above, and then realize the reasonable screen lighting based on the device form.
- the posture sensor is mainly used and the Hall sensor is auxiliary: except for the special case 1 mentioned above, in this embodiment, when the screen is not off (the inner screen is lit and/or the outer screen is lit), the device form of the electronic device is determined by the posture event reported by the posture sensor. When the screen is off (both the inner screen and the outer screen are off), the device form of the electronic device is determined by the posture event reported by the Hall sensor.
- Special case 1 includes: when the electronic device is unfolded when closed (the screen is off), when the electronic device is unfolded to the inner screen angle greater than or equal to the preset angle 5 (for example, 10°), the inner screen is lit based on the Hall sensor, and then the posture sensor is started, but when the first frame posture event reported by the posture sensor is a folded state, within the preset time T (for example, 1s), the electronic device does not process based on the first frame posture event. After reaching the preset time T, the device form of the electronic device is determined based on the posture event reported by the posture sensor the most recently.
- the preset angle 5 for example, 10°
- the gesture sensor when the electronic device is off (both the inner and outer screens are off), the gesture sensor is turned off. When the screen is not off (the inner screen is on and/or the outer screen is on), the gesture sensor is turned on. After the electronic device is turned on, the Hall sensor is turned on.
- preset rule 1 For a detailed description of preset rule 1, please refer to the above content and will not be repeated here.
- FIG. 6A-6D are schematic diagrams showing controlling the screen to be lit according to preset rule 1.
- FIG. 6A-6D are schematic diagrams showing controlling the screen to be lit according to preset rule 1.
- the “fully unfolded and half unfolded” angle (e.g., 145°) can be regarded as a preset angle 1.
- the “unfolded and folded” angle (e.g., 40°) can be regarded as a preset angle 2.
- the “folded and unfolded” angle (e.g., 45°) can be regarded as a preset angle 3.
- the “half unfolded and fully unfolded” angle e.g., 150°
- the “approaching and moving away” angle (e.g., 10°) can be regarded as a preset angle 5.
- the “moving away and approaching” angle (e.g., 5°) can be regarded as a preset angle 6.
- Case 11 The initial state is closed and the screen is off, and the electronic device is unfolded when closed (screen off).
- the initial state of the electronic device is closed which includes: before the electronic device is unfolded, the inner screen angle is less than the "approach-to-away" angle (for example, 10°), for example, the inner screen angle is close to 0° or equal to 0°.
- Screen off means that both the inner and outer screens of the electronic device are off.
- the initial state of the electronic device is off, and the attitude sensor is not turned on, so the attitude sensor does not work.
- the first device form involved is based on the Hall sensor.
- the Hall sensor can obtain the device state of the electronic device (at this time, the approach state).
- the electronic device continues to be unfolded.
- the inner screen angle reaches (greater than or equal to) the "approaching and cutting away” angle (for example, the black triangle in the Hall working axis)
- the Hall sensor can determine that the device form of the electronic device is in a away state, and report the away state as a Hall event.
- the electronic device maps the away state into an unfolded state, which triggers the inner screen to light up and the outer screen to go out.
- the electronic device can also turn on the posture sensor. Referring to the posture working axis, the posture sensor is turned on after the inner screen angle reaches the "approaching and cutting away" angle.
- the posture event obtained by the posture sensor is a folding state, which is inconsistent with the unfolding state mapped by the away state reported by the Hall sensor. Therefore, the angle between the inner screen angle of the "approaching and cutting away” angle and the "folding and unfolding” angle can also be called a conflict area (conflict area 1).
- the electronic device is unfolded to the inner screen angle in the conflict area 1, if the posture sensor reports a posture event (gesture event A), at this time, the posture event A is a folding state, then the electronic device can not be processed based on the posture event A within the preset time T. After the preset time T is reached, the device form of the electronic device is determined based on the gesture event reported by the gesture sensor the most recently.
- An exemplary position where the gesture event A is reported by the gesture sensor may be the white square in the gesture working axis.
- the most recently reported gesture event may include several possible results, and the electronic device controls the screen in different ways under different results. For details, please refer to the following description:
- Result 11 If the most recently reported gesture event is still gesture event A, then the electronic device determines that the electronic device is in a folded state based on gesture event A, and can trigger the inner screen to turn off and the outer screen to light up.
- the electronic device triggers the inner screen to light up when the inner screen angle is unfolded to a value greater than or equal to the "approach-to-away” angle (for example, 10°), and then switches to lighting up the outer screen when it is unfolded to the "fold-to-unfold” angle (for example, 45°).
- the subsequent preset rule 2 can avoid the occurrence of result 11.
- the electronic device determines that the electronic device is in a folded state based on gesture event A, and can trigger the inner screen to turn off and the outer screen to light up.
- the electronic device triggers the inner screen to light up when the inner screen angle is unfolded to a value greater than or equal to the "approach-to-away” angle (for example, 10°), and then switches to lighting up the outer screen when it is
- the most recently reported gesture event is not gesture event A, but may be other gesture events, and the other gesture events may be an unfolded state (including a semi-expanded state and a fully unfolded state).
- the other gesture events reported by the gesture sensor may be a semi-expanded state.
- An exemplary position for reporting one of the other gesture events may be the black triangle in the gesture working axis.
- the other gesture events reported by the gesture sensor may be a fully unfolded state.
- An exemplary position for reporting one of the other gesture events may be the white triangle in the gesture working axis.
- Case 12 The initial state is closed (not off), and the electronic device is unfolded when closed (not off).
- the initial state of the electronic device is closed, which includes: before the electronic device is unfolded, the inner screen angle is less than the "approach-to-away" angle (for example, 10°), for example, the inner screen angle is close to 0° or equal to 0°.
- Non-off screen refers to the inner and outer screens of the electronic device. At least one of them lights up.
- the initial state of the electronic device is non-screen off, then the posture sensor is turned on, and the device form of the electronic device is determined by the posture event reported by the posture sensor.
- the posture sensor is turned on, the electronic device does not process based on the Hall event reported by the Hall sensor (so the Hall working axis in FIG6B is represented by a dotted line).
- the posture sensor when the electronic device is unfolded, when the inner screen angle is unfolded to be greater than or equal to the "folding and unfolding" angle (for example, 45°), the posture sensor can report a frame of semi-expanded state, and the electronic device makes the inner screen light up and the outer screen turn off based on the semi-expanded state.
- One of the exemplary positions for reporting the semi-expanded state can be the black triangle in the posture working axis.
- the posture sensor can report a frame of fully unfolded state, and the electronic device keeps the inner screen lit and the outer screen off based on the fully unfolded state.
- One of the exemplary positions for reporting the fully unfolded state can be the white triangle in the posture working axis.
- Case 13 The initial state is unfolded (not off), and the electronic device is closed when unfolded (not off).
- the initial state of the electronic device is unfolded, including: before the electronic device is closed, the device shape of the electronic device is unfolded, which is usually greater than the "unfolding and folding" angle. For example, when the inner screen angle is 180° or close to 180 degrees, it can be unfolded.
- Non-off screen means that at least one of the inner screen and the outer screen of the electronic device is lit.
- the initial state of the electronic device is non-screen off, then the posture sensor is turned on, and the device form of the electronic device is determined by the posture event reported by the posture sensor.
- the posture sensor is turned on, the electronic device does not process based on the Hall event reported by the Hall sensor (so the Hall working axis in FIG6C is represented by a dotted line).
- the posture sensor when the electronic device is closed, when the inner screen angle is closed to less than or equal to the "full expansion and half expansion" angle (for example, 145°), the posture sensor can report a frame of semi-expanded state, and the electronic device determines that the electronic device is still in the expanded state based on the semi-expanded state.
- One of the exemplary positions for reporting the fully expanded state can be the black triangle in the posture working axis.
- the posture sensor can report a frame of folded state, and the electronic device turns off the inner screen and lights up the outer screen based on the folded state.
- One of the exemplary positions for reporting the folded state can be the white triangle in the posture working axis.
- the "folding-unfolding" angle (e.g., 45°) and the “unfolding-folding” angle (e.g., 40°) should be as close as possible, and the difference between the two is usually no greater than 10°, for example, 5°. This ensures that when the electronic device is unfolded when the screen is not turned off and when the electronic device is closed when the screen is not turned off, the electronic device can obtain the same device form at the close inner screen angle through the posture sensor, which is convenient for the implementation of other functions.
- Case 14 The initial state is unfolded (screen off), and the electronic device is closed when unfolded (screen off).
- the initial state of the electronic device is unfolded, including: before the electronic device is closed, the device shape of the electronic device is unfolded, usually greater than 45 degrees, for example, when the inner screen angle is 180 degrees or close to 180 degrees, it can be unfolded.
- Screen off means that both the inner screen and the outer screen of the electronic device are turned off.
- the first device state involved is determined based on the Hall sensor. For example, referring to the Hall working axis in FIG6D , it can be seen that: when the inner screen angle is 180° to “away from” or “close to” When the angle between the inner and outer screens is less than or equal to the "away-to-approach" angle, the Hall sensor can obtain the device state of the electronic device (at this time, it is in the away state), but does not report the away state.
- the Hall sensor can obtain the device state of the electronic device (at this time, it is in the approaching state) and report the approaching state. Then, the electronic device maps the approaching state into a folded state, keeping the inner and outer screens off. When both the inner and outer screens are off, the electronic device can light up the screen in response to an operation to light up the screen. And after the screen is turned on, the posture sensor is turned on. Among them, the operation to light up the screen includes operations on the power button, unlocking operations, etc.
- the Hall sensor reports a Hall event.
- the Hall event is a proximity state.
- the electronic device maps the proximity state to a folded state, it can also trigger the outer screen to light up and keep the inner screen off.
- the electronic device can also turn on the gesture sensor.
- the position of the first frame gesture event reported can be the position of the white square in the figure.
- the first frame gesture event is a folded state, which is the same as the device state after folding the proximity state reported by the Hall sensor.
- the electronic device keeps the inner screen off and the outer screen lit.
- the position where the Hall sensor reports the folded state can be the position of the black triangle in the figure.
- FIG. 7 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 11.
- the following describes in detail the process of controlling the screen to light up when the electronic device is unfolded when the initial state is closed (screen off) in conjunction with FIG. 7.
- the main modules involved in this process include a Hall sensor, a posture sensor, a sensor service, a device state management server, and a screen management module.
- the process can refer to the following description of steps S11 to S21b.
- the Hall sensor obtains a Hall event, which includes one of the device states such as the approaching state and the moving-away state.
- the Hall event is reported to the sensor service, wherein the approaching state can be mapped to the folded state, and the moving-away state can be mapped to the unfolded state.
- the Hall sensor determines that the device state is away and reports the away state as a Hall event to the sensor service.
- the device status management server notifies the screen management module to control the lighting of the inner screen.
- the screen management module can control the inner screen to light up through the power management server, window management server and other modules, while the outer screen remains off.
- the position unfolded to the “close to cut away” angle e.g., 10°
- the device state management server initiates a request to register the posture sensor to the sensor service.
- step S14a and step S14b may be operations initiated after the device state management server determines that the device state is the expanded state. There is no order of execution of step S14a and step S14b. Generally speaking, they may be executed concurrently.
- the sensor server notifies the start of the gesture sensor.
- the posture sensor obtains a posture event, which includes one of the device states such as folded state, semi-expanded state, and fully expanded state.
- the posture event is reported to the sensor service.
- the posture sensor determines that the device state is a semi-expanded state, and reports the semi-expanded state as a posture event to the sensor service.
- the sensor service reports the gesture event to the device status management server.
- the device status management server determines whether the gesture event is the first frame gesture event uploaded.
- the gesture event being a first-frame gesture event indicates that the frame gesture event is the first frame gesture event acquired after the gesture sensor is turned on.
- step S20a is executed.
- step S20b is executed.
- the device status management server notifies the screen management module to control the screen lighting based on the gesture event.
- the device status management server can control the screen switching: triggering the inner screen to turn off and the outer screen to light up.
- An example of this situation can refer to the aforementioned description of result 11: at this time, the gesture event is in the folded state and is the first frame gesture event, which means that the user unfolds the electronic device slowly, so after the inner screen is lit, it triggers the inner screen to turn off and the outer screen to light up.
- Another example of this situation includes: after the user unfolds the electronic device to the point where the inner screen angle is greater than or equal to the "folding-to-unfolding" angle (for example, 45°), the user begins to close the electronic device to the point where the inner screen angle is less than or equal to the "unfolding-to-folding” angle (for example, 40°).
- the device state management server may not process the gesture event, and continue to keep the inner screen lit and the outer screen off. For this situation, please refer to the description of result 12 above.
- the device state management server determines whether the gesture event is a folded state.
- step S21a is executed.
- step S21b is executed.
- the device status management server does not process the gesture event.
- the device state management server may not process the gesture event, and continue to keep the inner screen lit and the outer screen off. For this situation, please refer to the description of result 12 above.
- the device status management server does not process the gesture event A within the preset time T. After the preset time T is reached, it determines whether the gesture event most recently received is a folded state.
- step S21a is executed.
- step S20a is executed.
- FIG8 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 12.
- the main modules involved in this process include a posture sensor, a sensor service, a device status management server, and a screen management module.
- steps S30a, S31a, S32a, and S33a are placed in a dotted box, indicating that when the screen is not off, the posture sensor is turned on.
- the Hall sensor will report a Hall event
- the device status management server will not process based on the Hall event. This process can refer to the following description of steps S30a-S33b.
- the Hall sensor obtains a Hall event, which includes one of the device states such as the approach state and the distance state. When a change in the device state is detected, the Hall event is reported to the sensor service.
- the Hall sensor determines that the device state is away and reports the away state as a Hall event to the sensor service.
- the posture sensor obtains a posture event, which includes one of the device states such as folded state, semi-expanded state, and fully expanded state.
- a posture event is reported to the sensor service.
- step S30b there is no order of execution between step S30b and step S30a.
- the posture sensor determines that the device is in the expanded state and reports the expanded state as a posture event to the sensor service.
- S33b Notify the screen management module to control screen switching so that the inner screen lights up and the outer screen turns off.
- the interaction process between the modules is similar to the interaction process between the modules when the electronic device controls the screen to light up in situation 12, the difference is that the timing of the gesture sensor reporting the gesture event is different.
- the electronic device controls the screen to light up in situation 14 the interaction process between the modules is similar to the interaction process between the modules when the electronic device controls the screen to light up in situation 12, the difference is that when the screen is off, the gesture sensor is not turned on, and the content about the gesture sensor is not involved.
- the device form can be determined based on the Hall event reported by the Hall sensor. For other similarities, refer to the aforementioned description of the relevant content in Figure 8, which will not be repeated here.
- the electronic device can determine the change of the device form of the electronic device through the Hall sensor and the posture sensor according to the preset rule 2, and then realize the reasonable screen lighting based on the device form.
- the posture sensor and the Hall sensor are not primary or secondary and are equally important: except for the special case 2 mentioned above, in this embodiment, when the posture sensor reports a posture event, the electronic device can determine the device form of the electronic device based on the posture event, and control the screen lighting based on the device form.
- the Hall sensor reports a Hall event
- the electronic device can determine the device form of the electronic device based on the Hall event, and control the screen lighting based on the device form.
- Special case 2 includes: when the electronic device is unfolded when closed (screen off), when the electronic device is unfolded to a preset angle of 5 (for example, 10°), the inner screen is lit based on the Hall sensor, and then the posture sensor is started, but when the first frame posture event obtained by the posture sensor is a folded state, the posture event may not be reported, so that the electronic device can keep the inner screen lit and the outer screen off.
- the first frame posture event is a folded state and it is determined that the inner screen angle is less than a preset angle 7 (for example, 4°)
- the posture event can be reported. In this way, the electronic device can correct the outer screen to light up and the inner screen to turn off when the Hall sensor falsely reports a distant state (actually an approaching state).
- the gesture sensor when the electronic device is off (both the inner and outer screens are off), the gesture sensor is turned off. When the screen is not off (the inner screen is on and/or the outer screen is on), the gesture sensor is turned on. After the electronic device is turned on, the Hall sensor is turned on.
- preset rule 2 For a detailed description of preset rule 2, please refer to the above content and will not be repeated here.
- FIG. 9A and FIG. 9B are schematic diagrams showing how to control the screen to be bright according to preset rule 2.
- the “full expansion and half expansion” angle (eg, 145°) can be regarded as a preset angle.
- “Expanding folding angle + supplementary angle 2" (e.g. 60°) can be regarded as a preset angle 2.
- “Folding expanding angle + supplementary angle 1" (e.g. 65°) can be regarded as a preset angle 3.
- “folding and unfolding angle + supplementary angle 1” is the sum of the “folding and unfolding” angle involved in the aforementioned embodiment 1 and supplementary angle 1.
- "Unfolding and folding angle + supplementary angle 2” is the sum of the "unfolding and folding” angle involved in the aforementioned embodiment 1 and supplementary angle 2.
- Supplementary angle 1 and supplementary angle 2 can be angles greater than 0, such as 20°, 30°, and can be adjusted according to actual needs, and the embodiments of the present application are not limited to this.
- Example 2 the preset angle 3 involved in Example 2 is larger than the preset angle 3 involved in Example 1 (with a difference of a supplementary angle 1).
- the reason is that in Example 1, since the away state reported by the Hall sensor will be ignored when the screen is not turned off, it is necessary to continue to unfold to the "folding and unfolding" angle (for example, 45°) before the inner screen can be triggered to light up and the outer screen can be turned off based on the semi-expanded state reported by the posture sensor. Therefore, the "folding and unfolding" angle should not be too large, otherwise it will affect the rationality of the screen turning on when the electronic device is unfolded when closed.
- the "folding and unfolding" angle should not be too small, otherwise it will affect the rationality of the screen turning on when the electronic device is closed (non-screen turned off). Because in the process of closing the electronic device when unfolding (non-screen turned off), when the angle between the closing electronic device and the inner screen reaches the "unfolding and folding" angle (for example, 40°), the inner screen can be triggered to turn off and the outer screen can be lit.
- the "unfolding and folding" angle for example, 40°
- the “folding and unfolding” angle (for example, 45°) and the “folding and unfolding” angle (for example, 40°) should be as close as possible, so that when the electronic device is unfolded when the screen is not turned off and when the electronic device is closed when the screen is not turned off, the electronic device can obtain the same device form at the close inner screen angle through the posture sensor, which is convenient for the implementation of other functions. Therefore, the "folding and unfolding" angle can be taken to about 45°.
- the inner screen when the electronic device is closed and the screen is not turned off, and then unfolded, when the electronic device is unfolded to the inner screen angle reaching the "close to away" angle (for example, 10°), the inner screen can be triggered to light up and the outer screen can be turned off based on the away state reported by the Hall sensor in implementation 2. There is no need to trigger the inner screen to light up and the outer screen to turn off based on the semi-expanded state reported by the posture sensor. Therefore, the preset angle 3 ("folding and unfolding angle + supplementary angle 1") in this embodiment 2 can be set larger than the preset angle 3 ("folding and unfolding" angle) of implementation 1.
- the preset angle 2 in Example 2 can also be larger than the preset angle 2 in Example 1 (for example, the "unfolding and folding" angle).
- the preset angle 2 in Example 2 can be set to "unfolding and folding angle + supplementary angle 2", and the supplementary angle 2 is close to the supplementary angle 1.
- the supplementary angle 2 can be the same as the supplementary angle 1.
- the supplementary angle 1 can be an angle greater than 0, such as 20°, 30°, etc., which is not limited in the embodiments of the present application.
- 9A and 9B are combined to exemplarily describe the contents of controlling the screen to be lit in different situations in Embodiment 2. The following situations are described in detail.
- Case 21 The initial state is closed (screen off or not), and the electronic device is unfolded when closed (screen off or not).
- the initial state of the electronic device is closed, including: before the electronic device is unfolded, the inner screen angle is less than the "approaching cut-off" angle (for example, 10°), for example, the inner screen angle is close to 0° or equal to 0°.
- the inner screen when the electronic device is unfolded, the inner screen can be turned on and the outer screen can be turned off when the inner screen angle reaches the "approaching cut-off" angle (for example, 10°).
- the initial state is closed (screen off or not), and when the electronic device is unfolded until the inner screen angle reaches the "close to cut away” angle (for example, 10°), the inner screen is lit and the outer screen is off.
- the contents involved include but are not limited to the following Part or all of the content:
- the initial state of the electronic device is closed (screen off or not). Regardless of whether the posture sensor is not working when the screen is off, or is working when the screen is not off, when the electronic device is unfolded to the point where the angle between the inner screen and the outer screen reaches the "approaching and distancing" angle (for example, 10°), the electronic device can map the distancing state reported by the Hall sensor into the unfolded state, so that the inner screen is lit and the outer screen is off.
- the electronic device can map the distancing state reported by the Hall sensor into the unfolded state, so that the inner screen is lit and the outer screen is off.
- the Hall sensor in the process of unfolding the electronic device when the screen is off or not, when the inner screen angle is between 0° and the "approaching and cutting away” angle, the Hall sensor can obtain the device form of the electronic device (at this time it is the approaching state). Subsequently, the electronic device continues to be unfolded, and when the inner screen angle reaches (greater than or equal to) the "approaching and cutting away" angle (for example, the black triangle in the Hall working axis), the Hall sensor can determine that the device form of the electronic device is the away state, and report the away state as a Hall event.
- the electronic device maps the Hall event (away state) into an unfolded state, triggering the inner screen to light up, and keeping the outer screen off.
- an exemplary position where the Hall sensor reports the Hall event (away state) can be the black triangle in the Hall working axis.
- the posture sensor can also be turned on. Referring to the posture working axis, the posture sensor is turned on after the inner screen angle reaches the "approaching and cutting away" angle.
- the posture event obtained by the posture sensor is the folded state, which is inconsistent with the unfolded state mapped by the away state reported by the Hall sensor. Therefore, the angle between the inner screen angle of "approaching and moving away” angle and the "folding and unfolding angle + supplementary angle 1" can also be called the conflict area (conflict area 2).
- the posture sensor can obtain the first frame posture event (gesture event B).
- the gesture sensor may report the gesture event B.
- the electronic device may not process the gesture event B (semi-expanded state or expanded state), and still keep the inner screen lit and the outer screen off.
- an exemplary position for the gesture sensor to report a semi-expanded state may be the black triangle in the gesture working axis.
- An exemplary position for the gesture sensor to report a fully expanded state may be the white triangle in the gesture working axis, for example, when the inner screen angle is expanded to the "semi-expanded to fully expanded" angle.
- gesture event B If the gesture event B is a folded state, it conflicts with the unfolded state mapped by the away state reported by the Hall sensor.
- the electronic device may handle the conflict in the manner 1 and the manner 2 mentioned above.
- Method 1 After the gesture sensor determines that the gesture event B is the folded state, the gesture event B may not be reported, and the electronic device may not control the screen to light up based on the gesture event B. The inner screen remains lit and the outer screen is turned off.
- An exemplary position where the device obtains gesture event B but does not report it may be the white square in the gesture working axis.
- Method 2 After the posture sensor determines that the posture event B is in the folded state, when it is determined that the inner screen angle in the folded state is less than the preset angle 7 (for example, 4°), the posture sensor can report the posture event B, and the electronic device can determine that the device state of the electronic device is in the folded state based on the posture event B, triggering the inner screen to turn off and the outer screen to light up.
- the preset angle 7 for example, 4°
- the gesture sensor can continue to acquire gesture events (such as the gesture event of the second frame, etc.), and report the gesture events acquired subsequently.
- the Hall sensor can also report Hall events.
- the electronic device controls the screen to light up based on the reported events (gesture events or Hall events).
- Case 22 The initial state is unfolded (not off), and the electronic device is closed when unfolded (not off).
- the initial state of the electronic device is unfolded, including: before the electronic device is closed, the device form of the electronic device is unfolded, which is generally greater than "unfolding angle + supplementary angle 2", for example, the inner screen angle is 180° or close to 180°, which means that the device form of the electronic device can be unfolded.
- Non-off screen means that at least one of the inner screen and the outer screen of the electronic device is lit.
- the initial state of the electronic device is not off, and the posture sensor is turned on.
- the posture sensor In the process of closing the electronic device, when the inner screen angle is closed from close to greater than the "full expansion and half expansion” angle, such as 180°, to less than or equal to the "full expansion and half expansion” angle (for example, 145°), the posture sensor reports a posture event.
- the posture event is a semi-expanded state.
- the position where the posture sensor reports the semi-expanded state can be such as the white triangle in the posture working axis.
- the attitude sensor reports an attitude event.
- the attitude event is a folded state, and the electronic device turns off the inner screen and lights up the outer screen based on the folded state.
- the position where the attitude sensor reports the folded state can be the black triangle in the attitude working axis.
- the initial state is unfolded (not off), and when the electronic device is closed to the inner screen angle of "less than or equal to "unfolding angle + supplementary angle 2" (for example, 60°), the inner screen is turned off and the outer screen is turned on.
- the contents involved include but are not limited to part or all of the following contents:
- the Hall sensor reports a Hall event.
- the Hall event is an approaching state
- the electronic device maps the approaching state into a folding state, which is the same as the folding state reported by the posture sensor.
- the electronic device does not process the Hall event, and continues to keep the inner screen off and the outer screen lit.
- the position where the Hall sensor reports the folding state can be such as the white triangle in the Hall working axis.
- Case 23 The initial state is unfolded (screen off), and the electronic device is closed when unfolded (screen off). At this time, the posture sensor does not work when the screen is off. Therefore, in the process of closing the electronic device, the first device form involved is determined based on the Hall sensor.
- the inner screen angle is closed to be less than or equal to the "away and approach” angle (for example, 5°)
- the Hall sensor reports a Hall event.
- the Hall event is an approach state
- the electronic device maps the approach state into a folded state, keeping the inner and outer screens off.
- the schematic diagram of the operation of the Hall sensor and the posture sensor in Case 23 is similar to that of Figure 6D above. You can refer to the above description of Figure 6D and replace the "unfold and fold" angle with "unfold and fold angle + supplementary angle 2", which will not be repeated here.
- case 23 when the inner screen angle is closed to less than or equal to the "away-to-approach" angle (e.g., 5°), the Hall sensor reports a Hall event. At this time, the Hall event is a proximity state, and after the electronic device maps the proximity state into a folded state, it can also trigger the outer screen to light up and keep the inner screen off.
- the "away-to-approach" angle e.g. 5°
- FIG. 10 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 21.
- the following describes in detail the process of controlling the screen to light up when the electronic device is unfolded when the initial state is closed (screen off or not), in conjunction with FIG. 9A and FIG. 10.
- the main modules involved in this process include a Hall sensor, a posture sensor, a sensor service, a device state management server, and a screen management module.
- the process can refer to the following description of steps S101 to S113.
- the Hall sensor obtains a Hall event, which includes one of the device states such as the approaching state and the moving state.
- the Hall event is reported to the sensor service, wherein the approaching state can be mapped to the folded state, and the moving state can be mapped to the unfolded state.
- the Hall event acquired by the Hall sensor is an approaching state.
- the approaching state can be mapped to a folded state.
- the Hall event acquired by the Hall sensor is a away state.
- the away state can be mapped to an unfolded state.
- the unfolded state can be a semi-expanded state or a fully unfolded state, which is not limited to the embodiments of the present application.
- the Hall sensor determines that the device state is away and reports the away state as a Hall event to the sensor service.
- an exemplary position where the Hall sensor reports a Hall event may be the black triangle in the Hall operating axis shown in FIG. 9A .
- the device state management server may map the Hall event (away state) into an expanded state.
- the device status management server can execute the following step S105a to turn off the outer screen and light up the inner screen.
- the device status management server may execute the following step S105b to light up the inner screen while the outer screen remains off.
- S105a Notify the screen management module to switch the screen so that the inner screen is lit and the outer screen is turned off.
- the screen management module may utilize the power management server to power on the inner screen, and to power off the outer screen so that the outer screen is turned off.
- the window management server may draw display content, and after the inner screen is powered on, display the display content in the inner screen so that the inner screen is lit.
- S105b Notify the screen management module to control the lighting of the inner screen.
- the screen management module may utilize a power management server to power on the internal screen.
- the window management server may draw display content, and after the inner screen is powered on, display the display content in the inner screen so that the inner screen is lit.
- the posture sensor when the screen is off, the posture sensor is not turned on. After the device status management server determines that the device is in the unfolded state, the posture sensor can be triggered to turn on.
- step S105c The device state management server initiates a request to register the posture sensor to the sensor service. After registering the posture sensor, the device state management server can obtain the posture events reported by the posture sensor when the posture sensor is turned on.
- the execution timing of step S105c is the same as that of step S105a and step S105b.
- the sensor server notifies the start of the gesture sensor.
- the posture sensor determines a posture event based on the inner screen angle ⁇ , where the posture event includes one of the device states such as a folded state, a semi-expanded state, and a fully expanded state.
- the gesture sensor determines whether the gesture event is the first frame gesture event uploaded by the gesture sensor.
- Step S109b in order to handle the situation where the first-frame gesture event is the folded state and conflicts with the unfolded state mapped by the away state reported by the Hall sensor, the following step S109b may be executed, or the following step S109c may be executed: Steps S109b and S110 are performed to determine whether to report the folding state.
- step S109a When it is determined that the gesture event is not a first-frame gesture event, the following step S109a may be performed.
- the timing for the posture sensor to report posture events includes: when the posture event is the first frame, it can be reported after meeting condition 1, that is, the first frame posture event has changed compared to the previous frame by default. Alternatively, a non-first frame posture event can be reported when it changes compared to the previous frame, and it will not be reported if there is no change.
- condition 1 includes: the first frame posture event is not a folded state, or the posture sensor determines that the inner screen angle is less than the threshold angle.
- the threshold angle please refer to the description of the threshold angle in step S110 below, which will not be repeated here.
- the posture sensor determines whether the first frame posture event is a folding state.
- the gesture sensor may execute the following step S109a to report the first-frame gesture event.
- the posture sensor may execute the following step S110 to further determine whether the inner screen angle is less than the threshold angle, and the threshold angle is the preset angle 7 mentioned above, for example, it can be taken as 4°.
- the inner screen angle is greater than the threshold angle
- execute step S109a to report the first frame posture event.
- execute step S111 and do not report the first frame posture event.
- the posture sensor may not execute the following step S110, and directly execute the following step S111. The first frame posture event is not reported.
- the posture sensor determines whether the inner screen angle ⁇ is less than a threshold angle.
- the threshold angle is the preset angle 7 mentioned above, for example, a value of 4°.
- a value of 4° for example, a value of 4°.
- step S109a may be executed to report the first frame posture event to the sensor service.
- step S111 When the posture sensor determines that the inner screen angle ⁇ is greater than the threshold angle, the following step S111 is executed, and the first frame posture event may not be reported to the sensor service, so that the inner screen remains on and the outer screen remains off.
- the gesture sensor does not report the first frame gesture event to the sensor service, so that the inner screen remains on and the outer screen remains off.
- the gesture sensor reports the gesture event to the device status management server.
- the device state management server controls the screen switching through the screen management module, so that the inner screen is turned off and the outer screen is turned on.
- the gesture event in step S113 can be divided into the following types of results for description.
- Result 21 When the posture event is in the folded state and is the first frame posture event, it means that the Hall sensor fails at this time, and the false alarm is now in the away state (actually it is in the approaching state, and the user may not expect to unfold the electronic device). Executing step S113 can correct the false alarm of the Hall sensor based on the posture sensor, so that the electronic device triggers the inner screen to turn off and the outer screen to light up.
- Result 22 When the gesture event is in the folded state and is not the first frame gesture event, it means that the user has unfolded the electronic device until the inner screen angle is greater than or equal to "unfolding angle + supplementary angle 2", and then closed the electronic device again. This causes the electronic device to switch from the unfolded state to the folded state. At this time, the electronic device can trigger the inner screen to turn off and the outer screen to light up.
- the posture event when it is not a folded state, it can be a semi-expanded state or a fully expanded state, which is consistent with the expanded state mapped by the away state reported by the Hall sensor.
- the device status management server may not process the expanded state, keeping the inner screen lit and the outer screen off.
- FIG. 11 shows the interaction process between various modules when the electronic device controls the screen to light up in situation 22.
- the following describes in detail the process of controlling the screen to light up when the electronic device is closed when the initial state is unfolded (not off) in conjunction with FIG. 9B and FIG. 11.
- the main modules involved in this process include a Hall sensor, a posture sensor, a sensor service, a device state management server, and a screen management module.
- the process can refer to the following description of steps S201 to S205.
- the Hall sensor obtains a Hall event, which includes one of the device states such as the approaching state and the distant state.
- the Hall event is reported to the sensor service, wherein the approaching state can be mapped to the folded state, and the distant state can be mapped to the unfolded state.
- the Hall event acquired by the Hall sensor is a away state.
- the away state can be mapped to the unfolded state.
- the Hall event acquired by the Hall sensor is an approaching state.
- the approaching state can be mapped to a folded state.
- the unfolded state can be a semi-expanded state or a fully unfolded state, which is not limited in the embodiments of the present application.
- the Hall sensor can work, when the electronic device is closed when unfolded (not screen off), what the device status management server receives is the folded state of the posture sensor when the inner screen angle is closed to "unfolding and folding angle + supplementary angle 2" (for example, 60°). That is, when the inner screen angle is closed to "unfolding and folding angle + supplementary angle 2" (for example, 60°), the device status management server can trigger the inner screen to turn off and the outer screen to light up.
- the device status management server can trigger the inner screen to turn off and the outer screen to light up based on the Hall sensor when the inner screen angle is closed to the "far away and close" angle (for example, 5°).
- the process of the device status management server triggering the inner screen to turn off and the outer screen to light up based on the posture sensor please refer to the following description of steps S202-step S205.
- the posture sensor obtains a posture event, which includes one of the device states such as folded state, semi-expanded state, and fully expanded state.
- a posture event is reported to the sensor service.
- the posture event acquired by the posture sensor is the fully unfolded state.
- the inner screen angle is between the “full unfolded and half unfolded” angle and the "unfolded and folded angle + supplementary angle 2" (for example, 60°)
- the posture event acquired by the posture sensor is the semi-expanded state.
- the posture event acquired by the posture sensor is the folded state.
- the timing for the gesture sensor to report a gesture event includes: reporting when the gesture event is the first frame, or reporting when a gesture event of a non-first frame changes compared to the previous frame, and not reporting if there is no change.
- the posture sensor determines that the device is in a folded state and reports the folded state as a posture event to the sensor service.
- an exemplary position where the posture sensor reports the posture event (folded state) may be the black triangle in the posture working axis shown in FIG. 9B.
- S205 Notify the screen management module to control screen switching so that the inner screen turns off and the outer screen turns on.
- the screen management module may utilize the power management server to power on the external screen, and to power off the internal screen so that the internal screen is turned off.
- the window management server may draw display content, and after the external screen is powered on, display the display content on the external screen so that the external screen is lit.
- scenario 1 corresponds to the contents described in scenario 11 in embodiment 1 and scenario 21 in embodiment 2.
- scenario 2 corresponds to the contents described in scenario 13 in embodiment 1 and scenario 22 in embodiment 2.
- scenarios in which the screen of the electronic device is properly lit when it is unfolded or closed may also include other scenarios, such as scenario 3 to scenario 6 mentioned below.
- the scenario 3 to scenario 6 may be implemented in embodiment 2.
- Scenario 3 When the initial state of the electronic device is closed, and both the inner screen and the outer screen are off, the electronic device is unfolded.
- the electronic device unfolds the inner screen to an angle greater than or equal to the "approach and distance” angle (for example, 10°)
- the Hall sensor reports that the device state is a distance state
- the electronic device maps the distance state to an unfolded state, triggering the inner screen to light up, the outer screen to turn off, and turning on the gesture sensor.
- the unfolding is stopped, and the electronic device is not closed.
- the electronic device can always keep the inner screen lit and the outer screen off.
- the inner screen will not be triggered to turn off and the outer screen to light up after a preset time T (for example, 1s).
- T for example, 1s.
- the electronic device will not obtain the first frame gesture event reported by the gesture sensor. Therefore, the electronic device can continue to light up the inner screen and turn off the outer screen based on the distance state reported by the Hall sensor.
- Scenario 4 The initial state of the electronic device is closed, and both the inner and outer screens are off.
- the inner screen angle is greater than or equal to the "approach and distance” angle
- the Hall sensor reports that the device is in the distance state
- the electronic device maps the distance state to the unfolded state, triggering the inner screen to light up, keeping the outer screen off, and turning on the posture sensor.
- the electronic device continues to unfold.
- the inner screen angle is greater than or equal to the "folded” angle.
- the posture sensor reports that the device is in the unfolded state, and the electronic device keeps lighting the inner screen and turns off the outer screen.
- the unfolding of the electronic device stops, and when the electronic device is closed until the angle between the inner screen is less than or equal to "the unfolding and folding angle + supplementary angle 2" (for example, 60°), the electronic device determines that the device is in the folded state based on the posture sensor, triggers the inner screen to turn off, and the outer screen to turn on.
- the time difference between time A and time B may be less than the preset time T. Because in Example 2, when the non-first frame posture event obtained by the posture sensor is different from the previous frame posture event, it can be reported, and is not subject to the constraint of reporting only after the preset time T (involved in Example 1).
- Scenario 5 The initial state of the electronic device is closed (for example, the inner screen angle is equal to 0° or close to 0°), and whether the screen is turned off or not, the electronic device is unfolded.
- the electronic device unfolds the inner screen angle to be greater than or equal to the "approaching and moving away" angle the Hall sensor reports that the device state is in the moving away state, and the electronic device maps the moving away state to the unfolded state, triggering the inner screen to light up, keeping the outer screen off, and turning on the posture sensor.
- the electronic device continues to unfold, and when the inner screen angle is greater than or equal to the "approaching and moving away” angle (for example, 10°) and less than the "folding and unfolding angle + supplementary angle 1" (for example, 65°), the electronic device keeps the inner screen on and the outer screen off. Subsequently, the electronic device stops unfolding and starts to close the electronic device.
- the electronic device determines that the device state is in the approaching state based on the Hall sensor, and the electronic device maps the approaching state to the folded state, triggering the inner screen to turn off and the outer screen to light up.
- Implementation 2 of this scenario 5 can be implemented, but implementation 1 cannot be implemented.
- the reason is that in implementation 1, in the non-screen-off state, the posture sensor is turned on, and the electronic device does not process based on the Hall event reported by the Hall sensor. Therefore, at time C, when the angle between the closed electronic device and the inner screen is less than or equal to the "away-to-approach" angle (for example, 5°), the Hall sensor detects the approach state and reports the approach state, but the electronic device does not process based on the approach state, so it cannot trigger the inner screen to turn off and the outer screen to light up.
- the reason why implementation 1 cannot implement this scenario 5 also includes: the posture event reported by the posture sensor will not be processed by the electronic device until after time T.
- Scenario 6 The initial state of the electronic device is unfolded (for example, the inner screen angle is equal to 180° or close to 180°), and, in the case where the screen is not turned off, when the electronic device is closed to the point where the inner screen angle is less than the "unfolding and folding angle + supplementary angle 2" (for example, 60°) and greater than the "unfolding and folding angle” (for example, 40°), the posture sensor determines that the device is in a folded state at this time, and the electronic device keeps the inner screen off and the outer screen lit. At this time, at time D, the electronic device stops closing and then starts to unfold.
- the inner screen angle is equal to 180° or close to 180°
- the posture sensor determines that the device is in a semi-unfolded state, and the electronic device initially triggers the inner screen to light up and the outer screen to turn off based on the semi-unfolded state.
- Scenario 6 can be realized in Example 2, but cannot be realized in Example 1.
- Example 1 when the electronic device stops closing at time D, because the inner screen angle is greater than the "unfolding and folding angle" (for example, 40°) and less than the "unfolding and folding angle + supplementary angle 2" (for example, 60°), in Example 1, it is determined that the device form of the electronic device at this time is a semi-unfolded state rather than a folded state.
- the electronic device is unfolded to a value greater than or equal to the "folding and unfolding angle + supplementary angle 1" (for example, 65°) (for example, 65°)
- the posture sensor will not report the semi-unfolded state. Therefore, the electronic device cannot determine that it is in a folded state based on the posture sensor at this time, and the inner screen continues to be lit and the outer screen is off. It cannot switch to the outer screen being lit and the inner screen being off.
- the Hall sensor may not be used, and the screen may be controlled based on the gesture sensor.
- the preset angle 3 for example, the aforementioned "folding and unfolding angle” or “folding and unfolding angle”
- the posture sensor can determine that the device form of the electronic device is updated from the unfolded state to the folded state, and the electronic device can be in a state where the inner screen is off and the outer screen is lit.
- the unfolding electronic device involved in the embodiments of the present application can indicate that the electronic device is unfolded under user operation. It can also indicate that the electronic device is unfolded until the inner screen angle is at a certain angle.
- the closing electronic device involved in the embodiments of the present application can indicate that the electronic device is closed under user operation. It can also indicate that the electronic device is closed until the inner screen angle is at a certain angle.
- FIG. 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- the electronic device may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations.
- the various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
- the electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194 and a subscriber identification module (SIM) card interface 195, etc.
- SIM subscriber identification module
- 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.
- the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device.
- the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- 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 processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
- AP application processor
- GPU graphics processor
- ISP image signal processor
- controller a memory
- video codec a digital signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- Different processing units may be independent devices or integrated in one or more processors.
- the controller can be the nerve center and command center of the electronic device.
- the controller can respond to the instruction operation code and Timing signals generate operation control signals to complete the control of instruction fetching and execution.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
- the processor 110 may include one or more interfaces.
- the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, etc.
- I2C inter-integrated circuit
- I2S inter-integrated circuit sound
- PCM pulse code modulation
- the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device.
- the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the charging management module 140 is used to receive charging input from a charger.
- 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 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
- the wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
- the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied in electronic devices.
- a modem processor may include a modulator and a demodulator.
- the wireless communication module 160 can provide wireless communication solutions for application in electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), etc.
- WLAN wireless local area networks
- Wi-Fi wireless fidelity
- BT Bluetooth
- the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), etc.
- the electronic device realizes the display function through a GPU, a display screen 194, and an application processor.
- the display screen 194 is used to display images, videos, etc.
- the display screen 194 includes a display panel.
- the display panel may be a liquid crystal display (LCD).
- the display panel may also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microled, micro-oled, a quantum dot light-emitting diode (QLED), etc.
- the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device in the embodiment of the present application includes display screens on two different sides.
- One of the two display screens may be referred to as an inner screen, and the other display screen may be referred to as an outer screen.
- the inner screen may be a foldable The display screen with folding and unfolding functions, when the electronic device is folded, the inner screen is also folded. When the electronic device is unfolded, the inner screen is also unfolded.
- the internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
- RAM random access memories
- NVM non-volatile memories
- Non-volatile memory can include disk storage devices and flash memory.
- Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle. It can be divided into single-level cell (SLC) (single-level cell, SLC), etc. according to the potential level of the storage unit.
- SLC single-level cell
- the electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
- the gyro sensor 180B can be used to determine the motion posture of the electronic device.
- the angular velocity of the electronic device around three axes i.e., x, y, and z axes
- the gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device through reverse movement to achieve anti-shake.
- the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
- the magnetic sensor 180D includes a Hall sensor.
- the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
- the electronic device when the electronic device is a flip phone, the electronic device can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
- the Hall sensor can be directly implemented based on a physical Hall, or a virtual Hall sensor implemented based on a magnetometer, which is not limited here.
- the Hall event reported by the Hall sensor is an onchange event.
- the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in all directions (generally three axes). When the electronic device is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
- the electronic device may also include a posture sensor (not shown in the figure), which may be a physical sensor. It may also be a virtual posture sensor implemented by a fusion algorithm in combination with sensor data such as angle and acceleration, or in combination with virtual sensor data of angle.
- the posture sensor can provide richer and more accurate posture data such as folded state, semi-expanded state, fully expanded state, and notebook state.
- the posture event reported by the posture sensor is an onchange event.
- the processor 110 can call the computer instructions stored in the internal memory 121 to enable the terminal to execute the method for controlling the screen to light up in the embodiment of the present application.
- the term "when" may be interpreted to mean “if" or “after" or “in response to determining" or “in response to detecting", depending on the context.
- the phrases “upon determining" or “if (the stated condition or event) is detected” may be interpreted to mean “if it is determined", depending on the context. or “in response to determining that...” or “upon detection of (stated condition or event)” or “in response to detecting (stated condition or event)”.
- the computer program product includes one or more computer instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
- the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration.
- the available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
- the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium.
- the program When the program is executed, it can include the processes of the above-mentioned method embodiments.
- the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Telephone Function (AREA)
Abstract
本申请提供了控制亮屏的方法和电子设备。实施本申请提供的技术方案,通过姿态传感器以及霍尔传感器同等重要的方案,在闭合电子设备以及展开电子设备时确定电子设备的设备形态,进而基于该设备形态可以合理的控制两个显示屏的点亮与熄灭。一种合理的控制包括:电子设备的初始状态为展开,闭合电子设备时,可以尽快触发内屏熄灭且外屏点亮。电子设备的初始状态为闭合,在展开电子设备时,可以尽快触发外屏熄灭,内屏点亮。
Description
本申请要求于2022年11月4日提交中国专利局、申请号为202211379580.0、申请名称为“控制亮屏的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端领域,尤其涉及控制亮屏的方法和电子设备。
目前,电子设备可以折叠(也可以称为闭合)、展开(也可以称为打开),且可以包括两个不同侧的显示屏。该两个显示屏中的一个显示屏可以被称为内屏,另一个显示屏可以被称为外屏。其中,内屏可以理解为:电子设备未折叠时与前置摄像头在同一侧的显示屏。外屏可以理解为:电子设备未折叠时与后置摄像头在同一侧的显示屏。其中,内屏可以是具有折叠与展开功能的显示屏,在电子设备折叠时,内屏也被折叠。在电子设备展开时,内屏也被展开。
闭合电子设备以及展开电子设备时,对于两个显示屏的点亮与熄灭,一种合理的设计包括:电子设备的初始状态为展开,闭合电子设备时,可以尽快使得内屏熄灭且外屏点亮。电子设备的初始状态为闭合,在展开电子设备时,可以尽快使得外屏熄灭,内屏点亮。通常来说,这样的设计符合用户闭合电子设备以及展开电子设备时亮屏的预期。
闭合电子设备以及展开电子设备时,如何更好的控制两个显示屏的点亮与熄灭,是值得关注的。
发明内容
本申请提供了控制亮屏的方法和电子设备,在不同的角度范围基于不同的姿态传感器确定设备形态,快速响应电子设备的展开以及闭合,控制屏幕的点亮与熄灭,提升用户体验感。
第一方面,本申请提供了控制亮屏的方法,应用于屏幕可折叠的电子设备,该电子设备包括内屏和外屏,该内屏可折叠形成第一屏和第二屏,该方法包括:该电子设备的初始状态为闭合,且该内屏以及该外屏均熄灭的情况下,该电子设备展开到该第一夹角大于或者等于第一角度的情况下,该电子设备点亮该内屏,保持该外屏熄灭;该第一夹角为该第一屏和该第二屏的夹角,在该电子设备的初始状态为闭合,展开该电子设备的过程中,该第一夹角变大;在该电子设备的初始状态为展开,闭合该电子设备的过程中,该第一夹角变小;该电子设备的初始状态为闭合,且该内屏、该外屏中至少一个点亮的情况下,该电子设备展开到该第一夹角大于或者等于该第一角度的情况下,该电子设备处于内屏点亮,外屏熄灭的状态;该电子设备的初始状态为展开,且该内屏、该外屏中至少一个点亮的情况下,该电子设备闭合到该第一夹角小于或者等于第二角度的情况下,该电子设备处于该外屏点亮,该内屏熄灭的状态;其中,该第二角度大于该第一角度。
上述实施例中,该第一夹角可以为实施例中涉及的内屏夹角。初始状态为闭合,无论闭合时电子设备处于灭屏还是非灭屏,打开电子设备时,都可以在内屏夹角大于或者等于第一角度(例如10°)时确定电子设备展开了,以使得内屏点亮,外屏点亮。在初始状态为展开,且非灭屏时,闭合电子设备时,电子设备可以在内屏夹角小于或者等于第二角度(例如60°)时即可确定电子设备闭合,则可以使得内屏熄灭,外屏点亮。该第二角度大于第一角度,这样可以实现闭合时打开电子设备的情况下,可以在较小角度尽快触发亮屏,在打开时闭合电子设备的情况下,可以在较大角度尽快触发亮屏。可以快速响应电子设备的展开以及闭合,合理控制屏幕的点亮与熄灭,增强用户体验感。其中,非灭屏包括内屏以及外屏中至少一个亮屏,灭屏包括内屏以及外屏均熄灭。第一角度为实施例中涉及的预设角度5,例如可以为“接近切展开远离”,第二角度可以为实施例中涉及的预设角度2,例如可以为“展开切折叠角度+补充角度2”。
结合第一方面,在一些实施例中,在该内屏熄灭、该外屏点亮的情况下,该电子设备展开到该第一夹角大于或者等于第一角度之后,还包括:该电子设备点亮该内屏,熄灭该外屏。
上述实施例中,初始状态为闭合,且内屏熄灭、外屏点亮的情况下,打开电子设备到内屏夹角大于或者等于第一角度(例如10°)时,即可触发内屏点亮,且外屏熄灭。此时,用户期望展开使用电子设备的内屏,则在可以在较小角度尽快使得电子设备处于内屏点亮,且外屏熄灭的状态,符合用户的使用习惯。
结合第一方面,在一些实施例中,在该内屏、该外屏均点亮的情况下,该电子设备展开到该第一夹角大于或者等于第一角度之后,还包括:该电子设备熄灭该外屏。
上述实施例中,初始状态为闭合,且内屏以及外屏均点亮的情况下,打开电子设备到内屏夹角大于或者等于第一角度(例如10°)时,即可触发外屏熄灭,且保持内屏点亮。此时,用户期望展开使用电子设备的内屏,则在可以在较小角度尽快使得电子设备处于内屏点亮,且外屏熄灭的状态,符合用户的使用习惯。
结合第一方面,在一些实施例中,在该内屏点亮、该外屏点亮的情况下,该电子设备闭合到该第一夹角小于或者等于第二角度之后,还包括:该电子设备熄灭该内屏,保持该外屏熄灭。
上述实施例中,初始状态为展开,且内屏以及外屏均点亮的情况下,闭合电子设备到内屏夹角小于或者等于第二角度(例如60°)时,即可触发内屏熄灭,且保持内屏点亮。此时,用户期望闭合使用电子设备的外屏,则在可以在较大角度尽快使得电子设备处于外屏点亮,且内屏熄灭的状态,符合用户的使用习惯。
结合第一方面,在一些实施例中,在该内屏点亮、该外屏熄灭的情况下,该电子设备闭合到该第一夹角小于或者等于第二角度之后,还包括:该电子设备熄灭该内屏,点亮该外屏。
上述实施例中,初始状态为展开,且内屏点亮,外屏熄灭的情况下,闭合电子设备到内屏夹角小于或者等于第二角度(例如60°)时,即可触发内屏熄灭,内屏点亮。此时,用户期望闭合使用电子设备的外屏,则在可以在较大角度尽快使得电子设备处于外屏点亮,且内屏熄灭的状态,符合用户的使用习惯。
结合第一方面,在一些实施例中,该方法还包括:该第一夹角大于或者等于该第一角度小于该第三角度,且该电子设备处于内屏点亮,外屏熄灭的状态时,该电子设备闭合到该第一夹角小于或者等于第四角度的情况下,该电子设备熄灭该内屏,点亮该外屏;该第四角度小于该第一角度。
上述实施例中,第三角度可以为实施例中涉及的预设角度3,例如可以为“折叠切展开角度+补充角度1”。第四角度可以为实施例中涉及的预设角度5,例如“远离切接近”角度。该第一夹角处于第一角度(例如10°)以及第三角度(例如65°)之间时,在内屏点亮的情况下,再闭合电子设备到第四角度(例如5°)时,表示用户期望闭合电子设备,使用外屏,不使用内屏。则在内屏夹角小于或者等于第四角度(例如5°)时,熄灭内屏,点亮外屏,符合用户使用习惯。
结合第一方面,在一些实施例中,该内屏以及该外屏均熄灭的情况下,该电子设备展开到该第一夹角在第一时刻大于或者等于该第三角度,该电子设备点亮该内屏,保持该外屏熄灭之后,该方法还包括:该电子设备闭合到该第一夹角在第二时刻小于该第二角度时,该电子设备熄灭该内屏,点亮该外屏;该第二时刻晚于该第一时刻。
结合第一方面,在一些实施例中,该第二时刻与该第一时刻的时间差小于或者等于预设时长。
结合第一方面,在一些实施例中,该电子设备的第一传感器设定的第一形态包括该第一夹角小于或者等于该第一角度,设定的第二形态包括该第一夹角大于该第一角度小于第二角度;该电子设备的第二传感器设定的第一形态包括该第一夹角小于该第二角度;该内屏、该外屏中至少一个点亮时,该电子设备开启该第二传感器;该电子设备的初始状态为闭合,且该内屏熄灭、该外屏点亮的情况下,该电子设备展开到第一夹角大于或者等于该第一角度之后,该电子设备点亮该内屏,熄灭该外屏,具体包括:该电子设备展开到该内屏第一夹角大于或者等于该第一角度的情况下,该电子设备基于该第一传感器确定该电子设备的设备形态由该第一形态变更为该第二形态时,该电子设备点亮该内屏,熄灭该外屏;其中,该第二形态不同于该第一形态;该第一形态用于指示该电子设备折叠,该第二形态用于指示该电子设备展开。
上述实施例中,第一传感器可以为实施例中的霍尔传感器,第二传感器可以为实施例中的姿态传感器,第一形态可以为实施例中涉及的折叠态,第二形态可以为实施例中涉及的展开态(例如半展开态、全展开态、远离态映射的展开态)。
相比于使用霍尔传感器为辅助,姿态传感器为主的方案。该实施例中,姿态传感器和
霍尔传感器同等重要,在姿态传感器工作的情况下,电子设备也可以基于霍尔传感器上报的设备形态控制亮屏。其中,在小角度开合里基于霍尔传感器确定设备形态,在大角度开合里基于姿态传感器确定设备形态。因此,在电子设备的初始状态闭合,且内屏熄灭,外屏点亮的情况下,虽然姿态传感器工作,但是由于霍尔传感器也起作用,则电子设备展开到较小角度(第一角度,例如10°)时,也可以基于该霍尔传感器确定电子设备的设备形态为在展开态,则使得内屏点亮,外屏熄灭。在闭合时,展开电子设备的过程中,响应较快,增强用户体验。但是,以霍尔传感器为辅助,姿态传感器为主的方案达不到该效果。因为,在亮屏时,姿态传感器开启,电子设备不对霍尔上报的设备形态进行处理,及时电子设备展开到了第一角度(例如10°),虽然霍尔传感器确定设备形态为展开态,但是电子设备并不会处理,会继续等待电子设备的内屏夹角展开到姿态传感器上报设备形态时(例如展开到45°),才会使得内屏点亮,该外屏熄灭。
相比于使用只使用霍尔传感器的方案。在该实施例中,引入了姿态传感器,在大角度开合里基于姿态传感器确定设备形态。因此,在电子设备的初始状态展开,且内屏点亮,外屏熄灭的情况下,则电子设备闭合到较大角度(第二角度,例如60°)时,可以基于该姿态传感器确定电子设备的设备形态为在闭合态,则使得内屏熄灭,外屏点亮。在展开时,闭合电子设备的过程中,响应较快,增强用户体验。但是,只使用霍尔传感器的方案不可以达到该效果。因为,霍尔传感器的工作区间在较小角度范围(例如5°-10°)里,在电子设备闭合到第二角度(例如60°)时,霍尔传感器并不会上报设备形态,因为无法基于霍尔传感器实现内屏夹角在闭合到第二角度(例如60°)时,即使得内屏熄灭,外屏点亮。
结合第一方面,在一些实施例中,该电子设备的初始状态为闭合,在该第一夹角小于第一角度且该内屏以及该外屏均熄灭的情况下,该电子设备展开到该第一夹角大于或者等于该第一角度,该电子设备点亮该内屏,保持该外屏熄灭,具体包括:该电子设备展开到该第一夹角大于或者等于该第一角度的情况下,该电子设备基于该第一传感器确定该电子设备的设备形态由该第一形态变更为该第二形态时,该电子设备点亮该内屏,保持该外屏熄灭;该电子设备点亮该内屏,保持该外屏熄灭之后,该方法还包括:该电子设备开启该第二传感器;该第二传感器获取第一事件,该第一事件用于指示该电子设备的设备形态;在该第二传感器确定该第一事件不为首帧事件,或者该第一事件为首帧事件且该第一事件指示该电子设备的设备形态为该第二形态的情况下,该电子设备熄灭该内屏,点亮该外屏;在该第二传感器确定该第一事件为首帧事件且该第一事件指示该电子设备的设备形态为该第一形态的情况下,该电子设备保持该内屏点亮,该外屏熄灭。
上述实施例中,在一些实施例中,闭合时展开电子设备的情况下,在霍尔传感器上报展开态之后,会使得内屏点亮,此时,可以开启姿态传感器,对于姿态传感器上报的首帧事件为折叠态的情况下,电子设备可以不对该首帧事件进行处理,避免在展开电子设备的过程中内屏点亮之后,又触发内屏熄灭。
结合第一方面,在一些实施例中,该第二传感器确定该第一事件不为首帧事件,或者该第一事件为首帧事件且该第一事件指示该电子设备的设备形态为该第二形态时,该电子
设备熄灭该内屏,点亮该外屏,具体包括:在该第二传感器确定该第一事件为首帧事件,该第一事件指示该电子设备的设备形态为该第一形态,且该第一夹角小于第五角度的情况下,该电子设备熄灭内屏,点亮外屏;在该第二传感器确定该第一事件为首帧事件且该第一事件指示该电子设备的设备形态为该第一形态的情况下,不对该第一事件进行处理,具体包括:该第二传感器确定该第一事件为首帧事件,该第一事件指示该电子设备的设备形态为该第一形态,且该第一夹角大于该第五角度的情况下,该电子设备保持该内屏点亮,该外屏熄灭。
上述实施例中,第五角度可以为实施例中涉及的预设角度5(例如4°)。闭合时展开电子设备的情况下,在实际为闭合,但是霍尔传感器上报了远离态(即霍尔认为电子设备参考)的情况下,可以认为霍尔失效了,此时,姿态传感器可以在确定夹角小于预设角度7的情况,对首帧事件进行处理,触发内屏熄灭,外屏点亮。这样,可以在小角度开合时,霍尔失效的情况下,仍然基于姿态传感器准备判断电子设备的设备形态,控制亮屏。
结合第一方面,在一些实施例中,该方法还包括:该第一夹角大于或者等于该第一角度小于该第三角度,且该电子设备处于内屏点亮,外屏熄灭的状态时,该电子设备闭合到该第一夹角小于或者等于该第四角度的情况下,该电子设备基于该第一传感器确定该电子设备的设备形态从该第二形态变更至该第一形态时,该电子设备熄灭该内屏,点亮该外屏。
结合第一方面,在一些实施例中,该电子设备的初始状态为展开,且该内屏以及该外屏均熄灭的情况下,闭合该电子设备到小于该第四角度,该电子设备保持该外屏熄灭以及该内屏熄灭,其中,该第角度小于该第一角度。
上述实施例中,初始状态为展开,且内屏熄灭,外屏熄灭的情况下,闭合电子设备到内屏夹角小于或者等于第四角度(例如5°)时,可以保持内屏以及内屏均熄灭。此时,用户在内屏以及外屏均熄灭时闭合电子设备,则表示用户此时不期望再使用电子设备,则在闭合时保持外屏以及内屏均熄灭,符合用户的使用习惯。
结合第一方面,在一些实施例中,所述第一传感器为霍尔传感器,所述第二传感器为姿态传感器。
结合第一方面,在一些实施例中,该电子设备的初始状态为展开,且该内屏以及该外屏均熄灭的情况下,闭合该电子设备到小于该第四角度,该电子设备保持该外屏熄灭以及该内屏熄灭,其中,该第角度小于该第一角度。
上述实施例中,初始状态为展开,且内屏熄灭,外屏熄灭的情况下,闭合电子设备到内屏夹角小于或者等于第四角度(例如5°)时,可以保持内屏以及内屏均熄灭。此时,用户在内屏以及外屏均熄灭时闭合电子设备,则表示用户此时不期望再使用电子设备,则在闭合时保持外屏以及内屏均熄灭,符合用户的使用习惯。
结合第一方面,在一些实施例中,在该内屏点亮、该外屏熄灭的情况下,该电子设备展开到该第一夹角大于或者等于第一角度之后,还包括:该电子设备保持该内屏点亮,以及该外屏熄灭。
上述实施例中,初始状态为闭合,且内屏点亮、外屏熄灭的情况下,打开电子设备到内屏夹角大于或者等于第一角度(例如10°)时,可以保持内屏点亮,且外屏熄灭。此时,用户期望展开使用电子设备的内屏,则在可以在较小角度尽快使得电子设备处于内屏点亮,且外屏熄灭的状态,符合用户的使用习惯。
结合第一方面,在一些实施例中,在该内屏熄灭、该外屏点亮的情况下,该电子设备闭合到该第一夹角小于或者等于第二角度之后,还包括:该电子设备保持该内屏点亮,以及保持该外屏熄灭。
上述实施例中,初始状态为展开,且内屏熄灭,外屏点亮的情况下,闭合电子设备到内屏夹角小于或者等于第二角度(例如60°)时,可以保持内屏熄灭,内屏点亮。此时,用户期望闭合使用电子设备的外屏,则在可以在较大角度尽快使得电子设备处于外屏点亮,且内屏熄灭的状态,符合用户的使用习惯。
第二方面,本申请提供了一种电子设备,该电子设备包括:一个或多个处理器和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行如第一方面或第一方面的任意一种实施方式所描述的方法。
上述实施例中,该第一夹角可以为实施例中涉及的内屏夹角。初始状态为闭合,无论闭合时电子设备处于灭屏还是非灭屏,打开电子设备时,都可以在内屏夹角大于或者等于第一角度(例如10°)时确定电子设备展开了,以使得内屏点亮,外屏点亮。在初始状态为展开,且非灭屏时,闭合电子设备时,电子设备可以在内屏夹角小于或者等于第二角度(例如60°)时即可确定电子设备闭合,则可以使得内屏熄灭,外屏点亮。该第二角度大于第一角度,这样可以实现闭合时打开电子设备的情况下,可以在较小角度尽快触发亮屏,在打开时闭合电子设备的情况下,可以在较大角度尽快触发亮屏。可以快速响应电子设备的展开以及闭合,合理控制屏幕的点亮与熄灭,增强用户体验感。其中,非灭屏包括内屏以及外屏中至少一个亮屏,灭屏包括内屏以及外屏均熄灭。第一角度为实施例中涉及的预设角度5,例如可以为“接近切展开远离”,第二角度可以为实施例中涉及的预设角度2,例如可以为“展开切折叠角度+补充角度2”。
第三方面,本申请实施例提供了一种芯片***,该芯片***应用于电子设备,该芯片***包括一个或多个处理器,该处理器用于调用计算机指令以使得该电子设备执行如第一方面或第一方面的任意一种实施方式所描述的方法。
上述实施例中,该第一夹角可以为实施例中涉及的内屏夹角。初始状态为闭合,无论闭合时电子设备处于灭屏还是非灭屏,打开电子设备时,都可以在内屏夹角大于或者等于第一角度(例如10°)时确定电子设备展开了,以使得内屏点亮,外屏点亮。在初始状态为展开,且非灭屏时,闭合电子设备时,电子设备可以在内屏夹角小于或者等于第二角度(例如60°)时即可确定电子设备闭合,则可以使得内屏熄灭,外屏点亮。该第二角度大于第一角度,这样可以实现闭合时打开电子设备的情况下,可以在较小角度尽快触发亮屏,
在打开时闭合电子设备的情况下,可以在较大角度尽快触发亮屏。可以快速响应电子设备的展开以及闭合,合理控制屏幕的点亮与熄灭,增强用户体验感。其中,非灭屏包括内屏以及外屏中至少一个亮屏,灭屏包括内屏以及外屏均熄灭。第一角度为实施例中涉及的预设角度5,例如可以为“接近切展开远离”,第二角度可以为实施例中涉及的预设角度2,例如可以为“展开切折叠角度+补充角度2”。
第四方面,本申请实施例提供了一种包含指令的计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行如第一方面或第一方面的任意一种实施方式所描述的方法。
上述实施例中,该第一夹角可以为实施例中涉及的内屏夹角。初始状态为闭合,无论闭合时电子设备处于灭屏还是非灭屏,打开电子设备时,都可以在内屏夹角大于或者等于第一角度(例如10°)时确定电子设备展开了,以使得内屏点亮,外屏点亮。在初始状态为展开,且非灭屏时,闭合电子设备时,电子设备可以在内屏夹角小于或者等于第二角度(例如60°)时即可确定电子设备闭合,则可以使得内屏熄灭,外屏点亮。该第二角度大于第一角度,这样可以实现闭合时打开电子设备的情况下,可以在较小角度尽快触发亮屏,在打开时闭合电子设备的情况下,可以在较大角度尽快触发亮屏。可以快速响应电子设备的展开以及闭合,合理控制屏幕的点亮与熄灭,增强用户体验感。其中,非灭屏包括内屏以及外屏中至少一个亮屏,灭屏包括内屏以及外屏均熄灭。第一角度为实施例中涉及的预设角度5,例如可以为“接近切展开远离”,第二角度可以为实施例中涉及的预设角度2,例如可以为“展开切折叠角度+补充角度2”。
第五方面,本申请实施例提供了一种计算机可读存储介质,包括指令,当该指令在电子设备上运行时,使得该电子设备执行如第一方面或第一方面的任意一种实施方式所描述的方法。
上述实施例中,该第一夹角可以为实施例中涉及的内屏夹角。初始状态为闭合,无论闭合时电子设备处于灭屏还是非灭屏,打开电子设备时,都可以在内屏夹角大于或者等于第一角度(例如10°)时确定电子设备展开了,以使得内屏点亮,外屏点亮。在初始状态为展开,且非灭屏时,闭合电子设备时,电子设备可以在内屏夹角小于或者等于第二角度(例如60°)时即可确定电子设备闭合,则可以使得内屏熄灭,外屏点亮。该第二角度大于第一角度,这样可以实现闭合时打开电子设备的情况下,可以在较小角度尽快触发亮屏,在打开时闭合电子设备的情况下,可以在较大角度尽快触发亮屏。可以快速响应电子设备的展开以及闭合,合理控制屏幕的点亮与熄灭,增强用户体验感。其中,非灭屏包括内屏以及外屏中至少一个亮屏,灭屏包括内屏以及外屏均熄灭。第一角度为实施例中涉及的预设角度5,例如可以为“接近切展开远离”,第二角度可以为实施例中涉及的预设角度2,例如可以为“展开切折叠角度+补充角度2”。
图1A-图1D示出了本申请实施例提供的一种具有纵向折叠特性的电子设备的设备形态示意图;
图2示出了本申请实施例提供的一种具有横向折叠特性的电子设备示意图;
图3示出了姿态传感器上报姿态事件的过程;
图4示出了霍尔传感器上报霍尔事件的过程;
图5示出了电子设备控制亮屏时涉及的一种实例性软件结构框图;
图6A-图6D示出了按照预设规则1控制亮屏的示意图;
图7示出了情况11中电子设备控制屏幕亮屏时,各个模块间的交互流程;
图8示出了情况12中电子设备控制屏幕亮屏时,各个模块间的交互流程;
图9A以及图9B示出了按照预设规则2控制亮屏的示意图;
图10示出了情况21中电子设备控制屏幕亮屏时,各个模块间的交互流程;
图11示出了情况22中电子设备控制屏幕亮屏时,各个模块间的交互流程;
图12是本申请实施例提供的电子设备的结构示意图。
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
现有的方案中,通过霍尔传感器确定电子设备的展开与折叠情况。电子设备从折叠到展开时,霍尔传感器可以在内屏的夹角(也可以称为内屏夹角)展开到角度1(例如10°)时即可确定电子设备展开了,则电子设备可以触发外屏熄灭且内屏点亮。但是,由于霍尔传感器设计时的局限性:在电子设备展开时闭合电子设备的过程中,霍尔传感器在内屏夹角闭合到小于或者等于角度2(例如5°)时才可以确定电子设备折叠了,这时电子设备触发内屏熄灭且外屏点亮显得“为时过晚”,不符合用户希望在闭合电子设备时希望尽快触发内屏熄灭且外屏点亮的预期。
该现有的方案中,通过单一的霍尔传感器来控制屏幕的点亮与熄灭。由于霍尔传感器的工作区间在较小的角度范围里,该角度范围通常为内屏夹角处于5°至10°时。其中,工作区间是指霍尔传感器可以上报设备形态的角度范围。因此,电子设备在小角度里开合时,霍尔传感器表现良好,在大角度开合时,表现较差:只使用霍尔传感器虽然可以在电子设备的初始状态为闭合,打开电子设备的过程中,较快(例如展开到10°)的使得内屏点亮,外屏熄灭。但是,在电子设备的初始状态为展开,闭合电子设备的过程中,却不可
以较快的使得内屏熄灭,外屏点亮。例如,闭合电子设备,在内屏夹角闭合到5°时才可以使得内屏熄灭,外屏点亮。即,在展开时,闭合电子设备的过程中,霍尔传感器表现不好,反应较慢,影响用户体验。
本申请实施例中提供了控制亮屏的方法。可以使用霍尔传感器以及姿态传感器配合,在不同的角度范围基于不同的姿态传感器确定设备形态,快速响应电子设备的展开以及闭合,控制屏幕的点亮与熄灭,提升用户体验感。在该方法中,电子设备在小角度里开合时,仍然基于霍尔传感器控制屏幕的点亮与熄灭,保留了霍尔传感器的优点。但是,大角度开合时,引入姿态传感器,电子设备可以基于姿态传感器控制屏幕的点亮与熄灭,使得电子设备较快(例如闭合到40°或者60°)的响应闭合,使得内屏熄灭,外屏点亮。这样可以弥补霍尔传感器的缺陷。其原因在于,姿态传感器的工作区间相比于霍尔传感器可以更大,其可以在较大的角度范围(例如40°至65°)里确定电子设备的设备形态,使得电子设备基于该设备形态控制屏幕的点亮与熄灭。
该方法可以应用于具有纵向折叠或横向折叠特性的电子设备,且该电子设备中包括两个不同侧的显示屏。该两个显示屏中的一个显示屏可以被称为内屏,另一个显示屏可以被称为外屏。电子设备可以按照预设规则,通过霍尔传感器以及姿态传感器确定电子设备的设备形态变化,使得更多场景下,电子设备在展开或者折叠时实现合理亮屏。
在一些可能的情况下,电子设备的设备形态可以包括展开态、折叠态。其中,展开态又可以包括半展开态以及全展开态。
下面对配置纵向折叠特征的电子设备的设备形态进行介绍。
实例性的,图1A-图1D示出了本申请实施例提供的一种具有纵向折叠特性的电子设备的设备形态示意图,纵向折叠的折叠边垂直于电子设备的顶部边缘线(为便于描述,将顶部边缘线简称为顶边)和底部边缘线(为便于描述,将底部边缘线简称为底边)。
其中,图1A是可纵向折叠电子设备的一种展开形态的示意图。如图1A所示,电子设备没有进行折叠。内屏为电子设备未折叠时与前置摄像头在同一侧的显示屏。此时,可以看作内屏夹角为180°。其中,内屏夹角可以看作:沿着折叠边将内屏分为A屏和B屏,A屏与B屏之间形成的夹角可以称为内屏夹角。
按照图1A所示的方向11a和/或方向11b进行折叠,内屏夹角从180°至预设角度1(例如145°)之间的设备形态都可以称为电子设备的全展开态。
按照图1A所示的方向11a和/或方向11b进行折叠,内屏夹角从预设角度1(例如145°)至预设角度2(例如40°)之间的夹角都可以看作电子设备的半展开态。其中一种半展开态的示意图可以参考图1B所示。内屏夹角(α)可以取值为预设角度1至预设角度2之间的任一夹角。其中,预设角度1大于预设角度2。
按照图1B所示的方向11a和/或方向11b进行折叠。内屏夹角从预设角度2(例如40°)至0°之间的夹角都可以看作电子设备的折叠态。其中一种折叠态的示意图可以参考图1C所示。内屏夹角(α)可以取值为预设角度2至0之间的任一夹角。电子设备处于折叠态时,可以触发内屏熄灭,外屏点亮。其中,外屏可以看作电子设备未折叠时与后置摄像头在同一侧的显示屏。
按照图1C所示的方向11a和/或方向11b进行折叠。使得内屏夹角为0°,如图1D所示子设备完全闭合。此时,电子设备的设备形态也可以被称为折叠态。图1D中,A屏和B屏相对,对用户不可见。
应该理解的是,图1A-图1D中是以电子设备的初始状态为展开(例如等于180°或者接近180°等展开态下的角度),闭合电子设备为例进行说明的。
其中,闭合电子设备是指使得电子设备的内屏夹角逐渐变小。例如使得内屏夹角逐渐接近0°或者等于0°。初始状态为展开是指电子设备闭合电子设备之前,电子设备的设备形态为展开态,通常来说内屏夹角大于预设角度2(例如40°),例如内屏夹角为180°时可以看作一种展开态。
参考图1A-图1D的内容与描述,对于电子设备的初始状态为闭合(等于0°或者接近0°),展开电子设备的情况,电子设备的设备形态包括:内屏夹角在0°至预设角度3(例如45°)时,电子设备的设备形态可以为折叠态。内屏夹角在预设角度3(例如45°)至预设角度4(例如150°)时,电子设备的设备形态可以为半展开态。内屏夹角在预设角度4(例如150°)至180°时,电子设备的设备形态可以为全展开态。其中,预设角度3小于预设角度4。预设角度3可以和预设角度2相等,也可以和预设角度2不相等。预设角度1可以和预设角度4相等,也可以和预设角度4不相等。本申请实施例对此不做限定。
其中,展开电子设备是指使得电子设备的内屏夹角逐渐变大。例如使得内屏夹角逐渐接近180°或者等于180°。初始状态为闭合是指展开电子设备之前,电子设备的内屏夹角接近或者等于0°,通常来说小于10°。
下面对配置横向折叠特性的电子设备的设备形态进行介绍。
示例性的,图2示出了本申请实施例提供的一种具有横向折叠特性的电子设备示意图。内屏为电子设备未折叠时与前置摄像头在同一侧的显示屏。外屏(未示出)可以看作电子设备未折叠时与后置摄像头在同一侧的显示屏。未折叠时,可以看作内屏夹角为180°。其中,内屏夹角(α)可以看作:沿着折叠边将内屏分为A屏和B屏,A屏与B屏之间形成的夹角可以称为内屏夹角。与纵向折叠的电子设备的区别在于:横向折叠屏的折叠边平行于电子设备的顶边和底边。横向折叠的电子设备的设备形态的其他描述与前述图1A-图1D相同,可以参考前述图1A-图1D的描述,此处不再赘述。
在一些可能的情况下,电子设备的设备形态除了前述涉及的折叠态、半展开态以及全展开态以外,还包括接近态以及远离态。
以电子设备的初始状态为闭合,展开电子设备时为例对接近态以及远离态进行说明。此时,接近态包括内屏夹角在0°至预设角度5(例如10°)之间时电子设备的形态。远离态包括内屏夹角在预设角度5(例如10°)至180°之间时电子设备的形态。其中,预设角度5小于预设角度2。
以电子设备的初始形态为展开,闭合电子设备为例对接近态以及远离态进行说明。此时,远离态包括内屏夹角在180°至预设角度6(例如5°)之间时电子设备的形态。接近态包括内屏夹角在预设角度6(例如5°)至0°之间时电子设备的形态。其中,预设角度
6小于预设角度2。该预设角度5与预设角度6之间的大小关系可以没有限定,但是通常来说,该预设角度5可以大于预设角度6。
在一些可能的情况下,电子设备可以通过霍尔传感器以及姿态传感器确定电子设备的设备形态。例如,姿态传感器以及霍尔传感器都可以基于内屏夹角等数据确定设备形态。通常来说,霍尔传感器在内屏夹角较小(例如小于等于10°)时可以上报设备形态,姿态传感器在内屏夹角较大(例如大于等于45°)时可以上报设备形态。电子设备在霍尔传感器以及姿态传感器上报设备形态时,才可以确定设备形态,后续基于该设备形态控制屏幕(包括内屏、外屏)的点亮以及熄灭。且霍尔传感器以及姿态传感器上报设备形态的时机包括:启动后的第一帧可以上报(一帧就是一个设备形态),从第二帧开始,在检测到电子设备的设备形态相比于前一帧发生变化时可以上报。
基于以上描述的霍尔传感器和姿态传感器的物理特性。在一些可能的情况下,姿态传感器可以用于确定电子设备的设备形态为:折叠态、半展开态以及全展开态中的一个。霍尔传感器可以用于确定电子设备的设备形态为:接近态或者远离态中的一个。
为了便于描述,后文中可以将姿态传感器上报的设备形态称为姿态事件。将霍尔传感器上报的设备形态称为霍尔事件。
图3示出了姿态传感器上报姿态事件的过程。
下面结合图3对姿态传感器上报姿态事件的过程进行示例性描述。
如图3中(1)所示,在内屏夹角为0°至预设角度2(例如40°)之间时,姿态传感器可以确定电子设备的设备形态为折叠态。在内屏夹角为预设角度3(例如45°)至预设角度1(例如145°)之间时,姿态传感器可以确定电子设备的设备形态为半展开态。在内屏夹角为预设角度4(例如150°)至180°之间时,姿态传感器可以确定电子设备的设备形态为全展开态。
其中,在内屏夹角预设角度2(例如40°)至预设角度3(例如45°)之间时,电子设备的设备形态也可以被称为跟随态1。跟随态1用于表示:如果前一帧为折叠态,内屏夹角在预设角度2(例如40°)至预设角度3(例如45°)之间时,姿态传感器获取的当前帧也为折叠态。如果前一帧为半展开态,内屏夹角在预设角度2(例如40°)至预设角度3(例如45°)之间时,姿态传感器获取的当前帧也为半展开态。即可以理解为,如图3中(2)所示,在电子设备的初始状态为闭合,展开电子设备时,内屏夹角在预设角度2(例如40°)至预设角度3(例如45°)之间时,姿态传感器可以确定电子设备的设备形态为折叠态。如图3中(3)所示,在电子设备的初始状态为展开,闭合电子设备时,内屏夹角在预设角度2(例如40°)至预设角度3(例如45°)之间时,姿态传感器可以确定电子设备的设备形态为半展开态。
在内屏夹角预设角度1(例如145°)至预设角度4(例如150°)之间时,电子设备的设备形态也可以被称为跟随态2。跟随态2用于表示:如果前一帧为半展开态,内屏夹角在预设角度1(例如145°)至预设角度4(例如150°)之间时,姿态传感器获取的当前帧也为半展开态。如果前一帧为全展开态,内屏夹角在预设角度1(例如145°)至预设角度4(例如150°)之间时,姿态传感器获取的当前帧也为全展开态。即可以理解为,如
图3中(2)所示,在电子设备的初始状态为闭合,展开电子设备时,内屏夹角在预设角度1(例如145°)至预设角度4(例如150°)之间时,姿态传感器可以确定电子设备的设备形态为半展开态。如图3中(3)所示,在电子设备的初始状态为展开,闭合电子设备时,内屏夹角在预设角度1(例如145°)至预设角度4(例如150°)之间时,姿态传感器可以确定电子设备的设备形态为全展开态。
姿态传感器上报设备形态的时机包括:启动后的第一帧(一帧就是一个设备形态)可以上报,从第二帧开始,在检测到电子设备的设备形态相比于前一帧发生变化时可以上报。
例如,如图3中(2)所示,黑色三角形符号所在的位置可以是姿态传感器上报姿态事件的示例性时机。在闭合时展开电子设备的情况下,内屏夹角从小于预设角度3变化到大于预设角度3的过程中,电子设备的设备形态从折叠态变化到半展开态,则姿态传感器可以上报一帧设备形态(此时为半展开态)。内屏夹角从预设角度3至预设角度4之间的角度变化到大于预设角度4的过程中,电子设备的设备形态从半展开态变化到全展开态,则姿态传感器可以上报一帧设备形态(此时为全展开态)。应该理解的是,在内屏夹角小于预设角度3时才启动姿态传感器,则启动后的第一帧设备形态(此时为折叠态)也可以上报,其中一个上报的时机可以在图3中(2)所示出的白色正方形处。
再例如,如图3中(3)所示,三角形符号所在的位置可以是姿态传感器上报姿态事件的示例性时机。在展开时闭合电子设备的情况下,内屏夹角从大于预设角度1变化到小于预设角度1的过程中,电子设备的设备形态从全展开态变化到半展开态,则姿态传感器可以上报一帧设备形态(此时为半展开态)。内屏夹角从预设角度1至预设角度2之间的角度变化到小于预设角度2的过程中,电子设备的设备形态从半展开态变化到折叠态,则姿态传感器可以上报一帧设备形态(此时为折叠态)。应该理解的是,在内屏夹角大于预设角度1时才启动姿态传感器,则启动后的第一帧设备形态(此时为全展开态)也可以上报,其中一个上报的时机可以在图3中(3)所示出的白色正方形处。
其中,闭合时展开电子设备是指电子设备的初始状态为展开,闭合电子设备的过程。展开时闭合电子设备是指电子设备的初始状态为闭合,展开电子设备的过程。
图4示出了霍尔传感器上报霍尔事件的过程。
下面结合图4对霍尔传感器上报霍尔事件的过程进行实例性描述。
如图4中(1)所示,在内屏夹角为0°至预设角度6(例如5°)之间时,霍尔传感器可以确定电子设备的设备形态为接近态。在内屏夹角为预设角度5(例如10°)至180°之间时,霍尔传感器可以确定电子设备的设备形态为远离态。
在内屏夹角为预设角度6(例如5°)至预设角度5(例如10°)之间时,电子设备的设备形态也可以被称为跟随态3。该跟随态3用于表示:如果前一帧为接近态,内屏夹角在预设角度6(例如5°)至预设角度5(例如10°)之间时,霍尔传感器获取的当前帧也为接近态。即可以理解为,如图4中(2)所示,在电子设备的初始状态为闭合,展开电子设备时,内屏夹角在预设角度6(例如5°)至预设角度5(例如10°)之间时,霍尔传感器可以确定电子设备的设备形态为接近态。如果前一帧为远离态,内屏夹角在预设角度6(例如5°)至预设角度5(例如10°)之间时,霍尔传感器获取的当前帧也为远离态。
即可以理解为,如图4中(3)所示,在电子设备的初始状态为展开,闭合电子设备时,内屏夹角在预设角度6(例如5°)至预设角度5(例如10°)之间时,霍尔传感器可以确定电子设备的设备形态为远离态。
在一些可能的情况下,电子设备可以将上报后的接近态映射为折叠态,将上报后的远离态映射成为展开态(半展开态或者全展开态)。
霍尔传感器上报设备形态的时机包括:启动后的第一帧(一帧就是一个设备形态),从第二帧开始,在检测到电子设备的设备形态相比于前一帧发生变化时可以上报。
例如,如图4中(2)所示,黑色三角形符号所在的位置可以是霍尔传感器上报霍尔事件的示例性时机。在闭合时展开电子设备的情况下,内屏夹角从小于预设角度5变化到大于预设角度5的过程中,电子设备的设备形态从接近态变化到远离态,则霍尔传感器可以上报一帧设备形态(此时为远离态)。
再例如,如图4中(3)所示,黑色三角形符号所在的位置可以是霍尔传感器上报霍尔事件的示例性时机。在展开时闭合电子设备的情况下,内屏夹角从大于预设角度6变化到小于预设角度6的过程中,电子设备的设备形态从远离态变化到接近态,则霍尔传感器可以上报一帧设备形态(此时为接近态)。
本申请实施例中,按照预设规则,霍尔传感器以及姿态传感器可以获取设备形态并上报,电子设备可以基于霍尔传感器以及姿态传感器上报的设备形态进行融合,以确定电子设备最终的设备形态。在闭合电子设备的过程中,在电子设备的设备形态从展开态切换为折叠态的情况下,使得内屏熄灭,且外屏点亮。展开电子设备的过程中,在电子设备的设备形态从折叠态切换为展开态的情况下,使得外屏熄灭,且内屏点亮。其中,预设规则包括但不限于以下规则:
预设规则1:以姿态传感器为主,霍尔传感器为辅助。具体包括:电子设备在灭屏(内屏和外屏均熄灭)时,关闭姿态传感器。在非灭屏(内屏点亮和/或外屏点亮)时,开启姿态传感器。无论灭屏,还是非灭屏,电子设备在开机之后均开启霍尔传感器,但是,在非灭屏时,对于霍尔传感器上报的霍尔事件不进行处理,电子设备基于姿态传感器最近一次上报的姿态事件确定电子设备的设备形态,基于设备形态控制亮屏。在灭屏时,电子设备基于霍尔传感器上报的霍尔事件确定电子设备的设备形态,基于设备形态控制亮屏。灭屏时,电子设备可以不通过姿态传感器获取姿态事件。
该预设规则1中还包括一种特殊情况(特殊情况1):电子设备的初始状态为闭合且灭屏时,展开电子设备到内屏夹角大于或者等于预设角度5(例如10°)时,霍尔传感器可以确定电子设备的设备形态为远离态,并将该远离态进行上报,电子设备基于该远离态确定电子设备的设备形态为展开态,触发内屏点亮,且保持外屏熄灭。内屏点亮之后,姿态传感器开启,进而姿态传感器可以获取姿态事件并上报。在预设角度5(例如10°)至预设角度3(例如45°)之间,姿态传感器可以上报首帧(第一帧)姿态事件(姿态事件A)。其中,在该姿态事件A为一帧折叠态时,与霍尔传感器上报的远离态所映射的展开态冲突。针对该特殊情况2,电子设备处理该冲突的方式可以包括:特殊情况1时,在姿态传感器上报该姿态事件A之后的预设时间T(例如1s)内,电子设备不基于该姿态事件
进行处理。
预设规则2:姿态传感器和霍尔传感器同等重要。具体包括:电子设备在灭屏(内屏和外屏均熄灭)时,关闭姿态传感器。在非灭屏(内屏点亮和/或外屏点亮)时,开启姿态传感器。电子设备在开机之后均开启霍尔传感器。姿态传感器上报姿态事件时,电子设备在闭合以及展开时可以基于该姿态事件确定电子设备的设备形态,基于设备形态控制亮屏。霍尔传感器上报霍尔事件时,电子设备在闭合以及展开时可以基于该霍尔事件确定电子设备的设备形态,基于设备形态控制亮屏。
该预设规则2中还包括一种特殊情况(特殊情况2):电子设备的初始状态为闭合且灭屏时,展开电子设备到内屏夹角大于或者等于预设角度5(例如10°)时,霍尔传感器可以确定电子设备的设备形态为远离态,并将该远离态进行上报,电子设备基于该远离态确定电子设备的设备形态为展开态,触发内屏点亮,且保持外屏熄灭。内屏点亮之后,姿态传感器开启可以获取姿态事件并上报。在预设角度5(例如10°)至预设角度3(例如45°)之间,姿态传感器可以获取首帧姿态事件(姿态事件B)。其中,在该姿态事件B为一帧折叠态时,与霍尔传感器上报的远离态所映射的展开态冲突。针对该特殊情况2,电子设备处理该冲突的方式包括但不限于以下方式。
方式1:特殊情况2中,在姿态传感器确定该姿态事件B为折叠态之后,可以不将该姿态事件B进行上报,则电子设备可以不基于该姿态事件B控制屏幕亮屏。这样,可以避免以下问题1:在内屏夹角展开到预设角度5(例如10°)时,电子设备触发内屏点亮且外屏熄灭之后,又在预设角度5(例如10°)至预设角度3(例如45°)之间,基于折叠态触发电子设备将内屏熄灭,外屏点亮。使得用户在短时间内看见切屏,但是用户本意是展开电子设备,则内屏熄灭,外屏点亮不符合用户预期。其中,切屏指的是在其中非灭屏情况下,基于设备形态控制亮屏。例如,在内屏点亮,外屏熄灭的情况下,闭合电子设备到设备形态为折叠态时,控制内屏熄灭,外屏点亮的操作可以称为切屏。再例如,在内屏熄灭,外屏点亮的情况下,展开电子设备到设备形态为展开态时,控制内屏点亮,外屏熄灭的操作可以称为切屏。
方式2:特殊情况2中,在姿态传感器确定该姿态事件B为折叠态之后,在确定该折叠态下内屏夹角小于预设角度7(例如4°)的情况下,该姿态传感器可以将该姿态事件B上报,电子设备可以基于该姿态事件B确定电子设备的设备形态,基于设备形态控制亮屏(内屏熄灭,外屏点亮)。在确定该折叠态下内屏夹角大于或者等于预设角度7(例如4°)的情况下,可以不将该姿态事件B进行上报,则电子设备可以不基于该姿态事件B控制屏幕亮屏。其中,预设角度7小于或者等于预设角度5(例如5°)。这样不仅可以解决前述涉及的问题1。还可以解决问题2:在霍尔传感器失效时,误报现在是远离态(其实是接近态,用户也许并不期望展开电子设备),使得电子设备触发内屏点亮,外屏熄灭之后,可以及时使得基于姿态传感器上报的折叠态触发内屏熄灭,外屏点亮。其中,预设角度7(例如4°)是基于姿态传感器获取的。
基于前述涉及的预设规则1以及预设规则2,相比于只使用霍尔传感器控制亮屏的方
案,在一些场景下,本申请实施例中电子设备可以实现更合理的控制亮屏。
在一些可能的情况下,本申请涉及的在电子设备展开或者折叠时合理亮屏包括但不限于以下几个场景。
场景1:电子设备的初始状态为闭合,且,内屏以及外屏均熄灭的情况下,展开电子设备(从折叠态到展开态)时,尽快(例如展开到10°)触发内屏点亮且外屏熄灭。该场景1可以通过以下方式实现:场景1中,内屏以及外屏均熄灭的情况下,闭合时展开电子设备到内屏夹角大于或者等于预设角度5(例如10°)时,霍尔传感器可以确定电子设备的设备形态为远离态,并将该远离态进行上报,电子设备基于该远离态确定电子设备的设备形态为展开态,触发内屏点亮,且保持外屏熄灭。
场景2:电子设备的初始状态为展开,且,内屏或者外屏点亮的情况下,闭合电子设备(从展开态到折叠态)时,尽快(折叠到大于10°,例如40°)触发内屏熄灭且外屏点亮。该场景2可以通过以下方式实现:场景2中,内屏或者外屏点亮的情况下,姿态传感器开启。展开闭合电子设备到内屏夹角小于或者等于预设角度2(例如40°)时,姿态传感器可以确定电子设备的设备形态为折叠态,并将该折叠态进行上报,电子设备基于该折叠态触发内屏熄灭且外屏点亮。相比于在场景2中使用霍尔传感器检测电子设备形态变化的方案,可以提前35°(40°减5°)左右检测到电子设备处于折叠态了,进而可以提前35°触发内屏熄灭且外屏点亮。这样,更符合用户闭合电子设备时,希望内屏点亮,外屏熄灭的预期。
图5示出了电子设备控制亮屏时涉及的一种实例性软件结构框图。
下面结合图5描述电子设备基于霍尔传感器以及姿态传感器上报的设备形态控制亮屏时,部分模块交互的过程。
如图5所示,软件结构中包括至少一个子***。例如可以包括应用程序子***以及***控制子***。不同的子***可以被分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。
在一些实施例中,将应用程序子***中可以包括应用程序层,应用程序框架层,硬件抽象层,以及内核层。***控制子***中可以包括框架层、内核层。为了便于区分,可以将***控制子***中的框架层称为协框架层、将***控制子***中的内核层称为协内核层。应该理解的是,实际应用中,除了图5中示出的层级以外,该应用程序子***以及***控制子***中还可以包括更多或者更少的层级。本申请实施例对此不作限定。
其中,应用程序子***中的应用程序层可以包括一系列应用程序包。例如,可以包括相机、日历、WLAN、音乐、图库、通话、导航以及蓝牙等应用程序包。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
应用程序子***中的应用程序框架层可以包括***服务器。该***服务器中可以包括屏幕管理模块、设备状态管理服务器、传感器服务等。
其中,屏幕管理模块中可以包括电源管理服务器、窗口管理服务器等。屏幕管理模块中的各个模块可以用于接收设备状态管理服务器发送的点亮屏幕的通知,该通知用于触发
屏幕管理模块启动亮屏流程。在一些可能的情况下,电源管理服务器可以用于控制屏幕的上电与下电。窗口管理服务器可以用于绘制显示窗口,在屏幕上电之后,将显示窗口置于屏幕中供用户查看。
设备状态管理服务器在向传感器服务注册姿态传感器以及霍尔传感器之后,即可以用于接收姿态传感器上报的姿态事件,以及霍尔传感器上报的霍尔事件。然后基于姿态事件以及霍尔事件确定电子设备最终的设备形态。基于该设备形态作出控制亮屏的决策,触发屏幕管理模块启动亮屏流程。
传感器服务可以用于将接收到的姿态事件以及霍尔事件上报至设备状态管理服务器。
硬件抽象层是位于内核层与硬件层(未示出)之间的接口层,其目的在于将硬件抽象化,为操作***提供虚拟硬件平台。
硬件抽象层中可以包括传感器接口服务、核间通信模块A等。
其中,传感器接口服务可以用于注册各传感器,在注册之后接收各传感器发送的数据。例如,该传感器接口服务中可以包括姿态传感器接口以及霍尔传感器接口。其中,姿态传感器接口可以用于管理注册姿态传感器,以及接收姿态传感器上传的姿态事件,并且,将该姿态事件发送至传感器服务。霍尔传感器接口可以用于管理注册霍尔传感器,以及接收霍尔传感器上传的霍尔事件,并且,将该霍尔事件发送至传感器服务。
核间通信模块A可以用于管理应用程序子***与***控制子***间的通信。使得***控制子***以及应用程序子***可以相互传输数据。例如接收***控制子***传输的姿态事件、霍尔事件等。
***控制子***中的协框架层中可以包括事件分发管理器、传感器客户端管理器、核间通信模块B等。
其中,事件分发管理器可以用于接收下述协内核层上传的数据,并将其分发给其他已向该事件分发管理器注册的模块。例如,该事件分发管理器可以用于接收姿态传感器上报的姿态事件,然后将该姿态事件传输至传感器客户端管理器。该事件分发管理器还可以用于接收霍尔传感器上报的霍尔事件,然后将该霍尔事件传输至传感器客户端管理器。
传感器客户端管理器可以用于向事件分发管理器注册之后,获取事件分发管理器上传的数据,例如包括姿态事件以及霍尔事件等。
核间通信模块B可以用于管理应用程序子***与***控制子***间的通信。使得***控制子***以及应用程序子***可以相互传输数据。例如,核间通信模块B可以用于接收传感器客户端管理器传输的姿态事件、霍尔事件等,并将该姿态事件、霍尔事件等数据传输至核间通信模块A。
传感器驱动可以用于启动传感器,例如可以启动姿态传感器、霍尔传感器等。姿态传感器在启动之后,可以获取姿态事件,并将该姿态事件进行上报。例如,在将第一帧姿态事件上报至事件分发管理器。后续,如果当前帧姿态事件与前一帧姿态事件不同,也可以将当前帧姿态事件上报至事件分发管理器。霍尔传感器在启动之后,可以获取霍尔事件,并将该霍尔事件进行上报。例如,在将第一帧霍尔事件上报至事件分发管理器。后续,如果当前帧霍尔事件与前一帧霍尔事件不同,也可以将当前帧霍尔事件上报至事件分发管理器。
在一些可能的情况下,姿态传感器以及霍尔传感器上报数据还可以包括:姿态传感器以及霍尔传感器可以分别将姿态事件以及霍尔事件经过图5中步骤1-步骤4的传输路径(即白色圆圈1-白色圆圈4指示的路径),将姿态事件和霍尔事件上报至设备状态管理服务器。然后,设备状态管理服务器执行步骤5(图中白色圆圈5):基于姿态事件以及霍尔事件确定电子设备最终的设备形态,然后基于该设备形态作出控制亮屏的决策,触发屏幕管理模块启动亮屏流程。
应该理解的是,图5示出的是电子设备的一种示例性软件框图,不应该构成对本申请实施例的限定。例如,各个模块的位置(例如所属层级)在实际应用中可以不同。这里以姿态传感器为例进行说明,在姿态传感器为基于软件算法的虚拟传感器时,姿态传感器可以在应用程序子***侧运行,也可以在***控制子***侧运行。其中,该***控制子***也可以被称为协处理器子***。
在一些可能的实施例(实施例1)中,电子设备可以按照前述涉及的预设规则1,通过霍尔传感器以及姿态传感器确定电子设备的设备形态变化,进而基于设备形态实现合理亮屏。在该实施例中,以姿态传感器为主,霍尔传感器为辅助:除前述涉及的特殊情况1外,在该实施例中,非灭屏(内屏点亮和/或外屏点亮)时,以姿态传感器上报的姿态事件确定电子设备的设备形态。在灭屏(内屏和外屏均熄灭)时,以霍尔传感器上报的姿态事件确定电子设备的设备形态。特殊情况1包括:闭合(灭屏)时展开电子设备的情况下,在电子设备展开到内屏夹角大于或者等于预设角度5(例如10°)时,基于霍尔传感器点亮内屏,然后启动姿态传感器,但是在姿态传感器上报的首帧姿态事件为折叠态时,在预设时间T(例如1s)内,电子设备不基于该首帧姿态事件进行处理。达到预设时间T之后,再基于姿态传感器最近一次上报的姿态事件确定电子设备的设备形态。
该实施例中,电子设备在灭屏(内屏和外屏均熄灭)时,关闭姿态传感器。在非灭屏(内屏点亮和/或外屏点亮)时,开启姿态传感器。电子设备在开机之后均开启霍尔传感器。
关于预设规则1的详细描述可以参考前述内容,此处不再赘述。
图6A-图6D示出了按照预设规则1控制亮屏的示意图。
图6A-图6D中,“全展开切半展开”角度(例如145°)可以看作一种预设角度1。“展开切折叠”角度(例如40°)可以看作一种预设角度2。“折叠切展开”角度(例如45°)可以看作一种预设角度3。“半展开切全展开”角度(例如150°)可以看作一种预设角度4。“接近切远离”角度(例如10°)可以看作一种预设角度5。“远离切接近”角度(例如5°)可以看作一种预设角度6。
下面结合图6A-图6D对实施例1中,针对不同情况下控制亮屏的相关内容进行示例性描述。具体从以下几种情况进行描述。
情况11:初始状态为闭合且灭屏,在闭合(灭屏)时展开电子设备。其中,电子设备初始状态为闭合包括:电子设备在展开之前,内屏夹角小于“接近切远离”角度(例如10°),例如,内屏夹角接近0°或者等于0°。灭屏是指电子设备的内屏和外屏均熄灭。
如图6A所示,该情况11中,电子设备的初始状态为灭屏,则姿态传感器未开启,故姿态传感器不工作。此时,展开电子设备的过程中,涉及的首个设备形态是基于霍尔传感
器确定的。例如,参考图6A中的霍尔工作轴可知:展开电子设备的过程中,在内屏夹角为0°至“接近切远离”角度之间的角度时,霍尔传感器可以获取电子设备的设备形态(此时为接近态)。
后续,继续展开电子设备,在内屏夹角达到(大于或者等于)“接近切远离”角度处(例如,霍尔工作轴中的黑色三角形处),霍尔传感器可以确定电子设备的设备形态为远离态,并将该远离态作为霍尔事件上报。然后,电子设备将该远离态映射成为展开态,则触发内屏点亮且外屏熄灭。此时,电子设备还可以开启姿态传感器。参考姿态工作轴,姿态传感器在内屏夹角达至“接近切远离”角度之后开启。在内屏夹角处于“接近切远离”角度至“折叠切展开”角度的过程中,姿态传感器获取的姿态事件为折叠态,与霍尔传感器上报的远离态所映射的展开态矛盾。因此,也可以称内屏夹角处于“接近切远离”角度至“折叠切展开”角度之间的角度为冲突区域(冲突区域1)。电子设备展开到内屏夹角处于冲突区域1时,如果姿态传感器上报姿态事件(姿态事件A),此时,该姿态事件A为折叠态,则电子设备可以在预设时间T内不基于该姿态事件A进行处理。达到预设时间T之后,再基于姿态传感器最近一次上报的姿态事件确定电子设备的设备形态。其中,姿态传感器上报姿态事件A的一个示例性位置可以为姿态工作轴中白色正方形处。
其中,该最近一次上报的姿态事件包括可以下几种结果,不同结果下电子设备控制亮屏的方式不同。具体可以参考以下描述:
结果11:该最近一次上报的姿态事件仍然为姿态事件A,则电子设备基于该姿态事件A确定电子设备为折叠态,则可以触发内屏熄灭,外屏点亮。在该结果11中,展开电子设备的过程中,电子设备在内屏夹角展开到大于或者等于“接近切远离”角度(例如10°)处触发内屏点亮之后,在展开至“折叠切展开”角度(例如45°)处又切换到外屏点亮。存在不符合用户预期的可能性,后续涉及的预设规则2中可以避免该结果11的产生,具体可以参考下述相关内容的描述,此处暂不赘述。
结果12:该最近一次上报的姿态事件不为姿态事件A,可以为其他姿态事件,该其他姿态事件可以为展开态(包括半展开态以及全展开态)。例如,在内屏夹角展开到大于或者等于“折叠切展开”角度(例如45°)时,姿态传感器上报的其他姿态事件可以为半展开态。其中一个上报该其他姿态事件的一个示例性位置可以为姿态工作轴中黑色三角形处。再例如,在内屏夹角展开到大于或者等于“半展开切全展开”角度(例如150°)时,姿态传感器上报的其他姿态事件可以为全展开态。其中一个上报该其他姿态事件的一个示例性位置可以为姿态工作轴中白色三角形处。在该结果12中,在展开电子设备的过程中,电子设备在内屏夹角展开到大于或者等于“接近切远离”角度(例如10°)处触发内屏点亮之后,不会在继续展开电子设备的过程中触发切换到外屏点亮,符合用户期望。
关于情况11中电子设备控制屏幕亮屏涉及的流程可以参考下述对图7的描述,此处不再赘述。
情况12:初始状态为闭合(非灭屏),在闭合(非灭屏)时展开电子设备。其中,电子设备初始状态为闭合包括:电子设备在展开之前,内屏夹角小于“接近切远离”角度(例如10°),例如,内屏夹角接近0°或者等于0°。非灭屏是指电子设备的内屏以及外屏
中至少一个点亮。
如图6B所示,该情况12中,电子设备的初始状态为非灭屏,则姿态传感器开启,以姿态传感器上报的姿态事件确定电子设备的设备形态。姿态传感器开启时,电子设备不基于霍尔传感器上报的霍尔事件进行处理(因此图6B中霍尔工作轴用虚线表示)。此时,参考姿态工作轴,展开电子设备时,在内屏夹角展开到大于或者等于“折叠切展开”角度(例如45°)时,姿态传感器可以上报一帧半展开态,电子设备基于该半展开态使得内屏点亮,外屏熄灭。其中一个上报半展开态的示例性位置可以为姿态工作轴中黑色三角形处。后续,继续展开电子设备时,在内屏夹角展开到大于或者等于“半展开切全展开”角度(例如150°)时,姿态传感器可以上报一帧全展开态,电子设备基于该全展开态保持内屏点亮,外屏熄灭。其中一个上报全展开态的示例性位置可以为姿态工作轴中白色三角形处。
关于情况12中电子设备控制屏幕亮屏涉及的流程可以参考下述对图8的描述,此处不再赘述。
情况13:初始状态为展开(非灭屏),在展开(非灭屏)时闭合电子设备。其中,电子设备初始状态为展开包括:电子设备在闭合之前,电子设备的设备形态为展开态,通常来说大于“展开切折叠”角度,例如,内屏夹角为180°或者接近180度时,可以为展开态。非灭屏是指电子设备的内屏以及外屏中至少一个点亮。
如图6C所示,该情况13中,电子设备的初始状态为非灭屏,则姿态传感器开启,以姿态传感器上报的姿态事件确定电子设备的设备形态。姿态传感器开启时,电子设备不基于霍尔传感器上报的霍尔事件进行处理(因此图6C中霍尔工作轴用虚线表示)。此时,参考姿态工作轴,闭合电子设备时,在内屏夹角闭合到小于或者等于“全展开切半展开”角度(例如145°)时,姿态传感器可以上报一帧半展开态,电子设备基于该半展开态确定电子设备仍然处于展开态。其中一个上报全展开态的示例性位置可以为姿态工作轴中黑色三角形处。后续,继续闭合电子设备时,在内屏夹角闭合到小于或者等于“展开切折叠”角度(例如40°)时,姿态传感器可以上报一帧折叠态,电子设备基于该折叠态使得内屏熄灭,外屏点亮。其中一个上报折叠态的示例性位置可以为姿态工作轴中白色三角形处。
应该理解的是,参考图6B以及图6C,“折叠切展开”角度(例如45°)与“展开切折叠”角度(例如40°)之间应当尽量接近,两者之差通常不大于10°,例如可以为5°。这样可以保证在非灭屏时展开电子设备以及非灭屏时闭合电子设备时,电子设备可以通过姿态传感器在接近的内屏夹角处获取到相同的设备形态,便于其他功能的实施。
情况14:初始状态为展开(灭屏),在展开(灭屏)时闭合电子设备。其中,电子设备初始状态为展开包括:电子设备在闭合之前,电子设备的设备形态为展开态,通常来说大于45°,例如,内屏夹角为180°或者接近180度时,可以为展开态。灭屏是指电子设备的内屏以及外屏均熄灭。
如图6D中所示,该情况14中,电子设备的初始状态为灭屏,则姿态传感器未开启,故姿态传感器不工作。因此,闭合电子设备的过程中,涉及的首个设备形态是基于霍尔传感器确定的。例如,参考图6D中的霍尔工作轴可知:在内屏夹角为180°至“远离切接近”
角度之间的角度时,霍尔传感器可以获取电子设备的设备形态(此时为远离态),但是不上报该远离态。后续闭合电子设备到内屏夹角小于或者等于“远离切接近”角度时,霍尔传感器可以获取电子设备的设备形态(此时为接近态),并将该接近态上报。然后,电子设备将该接近态映射成为折叠态,保持内屏以及外屏熄灭。在内屏和外屏均熄灭的情况下,响应于针对亮屏的操作,电子设备可以实现亮屏。并且在亮屏之后,开启姿态传感器。其中,亮屏的操作包括针对电源键的操作,解锁操作等。
在另一些可能的情况下,情况14中,在内屏夹角闭合到小于或者等于“远离切接近”角度(例如5°)的情况下,霍尔传感器上报霍尔事件。此时,该霍尔事件为接近态,电子设备将该接近态映射成为折叠态后,还可以触发外屏点亮,保持内屏熄灭。且,电子设备还可以开启姿态传感器。姿态传感器在开启之后,上报首帧姿态事件的位置可以为图中白色正方形所在的位置。该首帧姿态事件为折叠态,与霍尔传感器上报的接近态折叠后的设备状态相同,电子设备保持内屏熄灭且外屏点亮。其中,霍尔传感器上报折叠态的位置可以为图中黑色三角形所在位置。
图7示出了情况11中电子设备控制屏幕亮屏时,各个模块间的交互流程。
下面结合图7详细描述初始状态为闭合(灭屏),展开电子设备时控制屏幕亮屏的过程。该过程涉及的主要模块包括霍尔传感器、姿态传感器、传感器服务、设备状态管理服务器、屏幕管理模块。该过程可以参考下述对步骤S11-步骤S21b的描述。
S11.霍尔传感器获取霍尔事件,该霍尔事件包括接近态、远离态等设备形态中的一个,在检测到设备形态发生变化的情况下,向传感器服务上报霍尔事件,其中,接近态可以被映射为折叠态,远离态可以被映射为展开态。
S12.内屏夹角从角度A0(接近0°)展开至“接近切远离”角度(例如10°)时,霍尔传感器确定设备形态为远离态,并将该远离态作为霍尔事件上报至传感器服务。
S13.将霍尔事件上报至设备状态管理服务器,以使得设备状态管理服务器确定设备形态为展开态。
S14a.设备状态管理服务器通知屏幕管理模块控制内屏点亮。
这样,如图6A所示,在电子设备展开至“接近切远离”角度(例如10°)时,屏幕管理模块可以通过电源管理服务器、窗口管理服务器等模块控制内屏点亮,此时外屏仍然保持熄灭。其中,展开至“接近切远离”角度(例如10°)的位置可以参考霍尔工作轴中黑色三角形所在的位置处。
S14b.设备状态管理服务器向传感器服务发起注册姿态传感器的请求。
这里应该理解的是,步骤S14a以及步骤S14b可以为设备状态管理服务器确定设备形态为展开态之后出发的操作。该步骤S14a以及步骤S14b的执行顺序没有先后之分。通常来说,可以并发执行。
S15.传感器服务器通知启动姿态传感器。
S16.姿态传感器获取姿态事件,该姿态事件包括折叠态、半展开态、全展开态等设备形态中的一个,在检测到设备形态发生变化的情况下,向传感器服务上报姿态事件。
S17.内屏夹角从角度A1(10°-45°之间)展开至“折叠切展开”角度(例如45°)时,
姿态传感器确定设备形态为半展开态,并将该半展开态作为姿态事件上报至传感器服务。
S18.传感器服务将姿态事件上报至设备状态管理服务器。
S19.设备状态管理服务器确定该姿态事件是否为上传的首帧姿态事件。
该姿态事件为首帧姿态事件表示该帧姿态事件为姿态传感器开启之后获取的第一帧姿态事件。
在该姿态事件不为上传的首帧姿态事件的情况下,执行下述步骤S20a。
在该姿态事件为上传的首帧姿态事件的情况下,执行下述步骤S20b。
S20a.设备状态管理服务器基于该姿态事件通知屏幕管理模块控制屏幕亮屏。
在该姿态事件为折叠态的情况下,设备状态管理服务器可以控制切屏:触发内屏熄灭,外屏点亮。该情况涉及的一种示例可以参考前述对结果11的描述:此时该姿态事件为折叠态且为首帧姿态事件,这表示用户展开电子设备的速度较慢,因此在内屏点亮之后,又触发了内屏熄灭,外屏点亮。该情况涉及的另一种示例包括:用户展开电子设备到内屏夹角大于或者等于“折叠切展开”角度(例如45°)之后,又开始闭合电子设备到内屏夹角小于或者等于“展开切折叠”角度(例如40°)。
在该姿态事件为展开态的情况下,表示姿态传感器与霍尔传感器上报的事件不冲突。设备状态管理服务器可以不对该姿态事件进行处理,继续保持内屏点亮,外屏熄灭。该情况可以参考前述对结果12的描述。
S20b.设备状态管理服务器确定该姿态事件是否为折叠态。
在该姿态事件不为折叠态的情况下,执行下述步骤S21a。
在该姿态事件为折叠态的情况下,执行下述步骤S21b。
S21a.设备状态管理服务器不对姿态事件进行处理。
在该姿态事件为展开态的情况下,表示姿态传感器与霍尔传感器上报的事件不冲突。设备状态管理服务器可以不对该姿态事件进行处理,继续保持内屏点亮,外屏熄灭。该情况可以参考前述对结果12的描述。
S21b.设备状态管理服务器在预设时间T内,不对姿态事件A进行处理,预设时间T达到后,确定最近一次接收的姿态事件是否为折叠态。
在该最近一次接收的姿态事件不为折叠态的情况下,执行步骤S21a。
在该最近一次接收的姿态事件为折叠态的情况下,执行步骤S20a。
图8示出了情况12中电子设备控制屏幕亮屏时,各个模块间的交互流程。
下面结合图8详细描述初始状态为闭合(非灭屏),展开电子设备时控制屏幕亮屏的过程。该过程涉及的主要模块包括姿态传感器、传感器服务、设备状态管理服务器、屏幕管理模块。其中,步骤S30a、步骤S31a、步骤S32a、步骤S33a置于虚线框中,表示在非灭屏的情况下,姿态传感器开启,则虽然霍尔传感器会上报霍尔事件,但是设备状态管理服务器不会基于该霍尔事件进行处理。该过程可以参考下述对步骤S30a-步骤S33b的描述。
S30a.霍尔传感器获取霍尔事件,该霍尔事件包括接近态、远离态等设备形态中的一个,在检测到设备形态发生变化的情况下,向传感器服务上报霍尔事件。
S31a.内屏夹角从角度A0(接近0°)展开至“接近切远离”角度(例如10°)时,霍尔传感器确定设备形态为远离态,并将该远离态作为霍尔事件上报至传感器服务。
S32a.将霍尔事件上报至设备状态管理服务器。
S33a.在姿态传感器启动的情况下,不基于该霍尔事件进行处理。
S30b.姿态传感器获取姿态事件,该姿态事件包括折叠态、半展开态、全展开态等设备形态中的一个,在检测到设备形态发生变化的情况下,向传感器服务上报姿态事件。
应该理解的是,步骤S30b以及步骤S30a的执行时间没有先后之分。
S31b.内屏夹角从角度A1(接近0°)展开至“折叠切展开”角度(例如45°)时,姿态传感器确定设备形态为展开态,并将该展开态作为姿态事件上报至传感器服务。
S32b.将姿态事件上报至设备状态管理服务器,以使得设备状态管理服务器确定设备形态为展开态。
S33b.通知屏幕管理模块控制切屏,使得内屏点亮,外屏熄灭。
应该理解的是,情况13中电子设备控制屏幕亮屏时,各个模块间的交互流程与情况12中电子设备控制屏幕亮屏时,各个模块间的交互流程相似,不同之处在于姿态传感器上报姿态事件的时机不同。可以参考前述对图8中相关内容的描述,此处不再赘述。情况14中电子设备控制屏幕亮屏时,各个模块间的交互流程与情况12中电子设备控制屏幕亮屏时,各个模块间的交互流程相似,不同之处在于灭屏时,姿态传感器未开启,则关于姿态传感器的内容不涉及。且情况14中可以基于霍尔传感器上报的霍尔事件确定设备形态,其他相同之处可以参考前述对图8中相关内容的描述,此处不再赘述。
在另一些可能的实施例(实施例2)中,电子设备可以按照预设规则2,通过霍尔传感器以及姿态传感器确定电子设备的设备形态变化,进而基于设备形态实现合理亮屏。在该实施例中,姿态传感器与霍尔传感器不分主次,同等重要:除前述涉及的特殊情况2外,在该实施例中姿态传感器上报姿态事件时,电子设备可以基于该姿态事件确定电子设备的设备形态,基于设备形态控制亮屏。霍尔传感器上报霍尔事件时,电子设备可以基于该霍尔事件确定电子设备的设备形态,基于设备形态控制亮屏。特殊情况2包括:闭合(灭屏)时展开电子设备的情况下,在电子设备展开到大于或者等于预设角度5(例如10°)时,基于霍尔传感器点亮内屏,然后启动姿态传感器,但是在姿态传感器获取的首帧姿态事件为折叠态时,可以不将该姿态事件进行上报,这样,电子设备可以保持内屏点亮,外屏熄灭。或者,在该首帧姿态事件为折叠态以及确定内屏夹角小于预设角度7(例如4°)时,可以将该姿态事件进行上报,这样,电子设备可以在霍尔传感器误报远离态(实际为接近态)时更正到外屏点亮,内屏熄灭。
该实施例中,电子设备在灭屏(内屏和外屏均熄灭)时,关闭姿态传感器。在非灭屏(内屏点亮和/或外屏点亮)时,开启姿态传感器。电子设备在开机之后均开启霍尔传感器。
关于预设规则2的详细描述可以参考前述内容,此处不再赘述。
图9A以及图9B示出了按照预设规则2控制亮屏的示意图。
图9A以及图9B中,“全展开切半展开”角度(例如145°)可以看作一种预设角度
1。“展开切折叠角度+补充角度2”(例如60°)可以看作一种预设角度2。“折叠切展开角度+补充角度1”(例如65°)可以看作一种预设角度3。“半展开切全展开”角度(例如150°)可以看作一种预设角度4。“接近切远离”角度(例如10°)可以看作一种预设角度5。“远离切接近”角度(例如5°)可以看作一种预设角度6。
其中,“折叠切展开角度+补充角度1”是前述实施例1中涉及的“折叠切展开”角度与补充角度1的和。“展开切折叠角度+补充角度2”是前述实施例1中涉及的“展开切折叠”角度与补充角度2的和。补充角度1和补充角度2可以为大于0的角度,例如20°、30°,可以根据实际需求进行调整,本申请实施例对此不作限定。
这里应该理解的是,实施例2涉及的预设角度3相比于实施例1中涉及的预设角度3相比更大(相差一个补充角度1)。其原因在于,实施例1中,由于非灭屏时,霍尔传感器上报的远离态会被忽略,需继续展开至“折叠切展开”角度(例如45°)时,才可以基于姿态传感器上报的半展开态触发内屏点亮,外屏熄灭。因此,“折叠切展开”角度通常不宜过大,否则会影响闭合时展开电子设备的亮屏合理性。同时,该“折叠切展开”角度也不宜太小,否则影响展开(非灭屏)时闭合电子设备的亮屏合理性。因为展开(非灭屏)时闭合电子设备的过程中,在闭合电子设备到内屏夹角达至“展开切折叠”角度(例如40°)时,才可以触发内屏熄灭,外屏点亮。“折叠切展开”角度(例如45°)与“折叠切展开”角度(例如40°)之间应当尽量接近,这样才可以保证在非灭屏时展开电子设备以及非灭屏时闭合电子设备时,电子设备可以通过姿态传感器在接近的内屏夹角处获取到相同的设备形态,便于其他功能的实施。因此,可以将该“折叠切展开”角度取到45°左右。但是,在该实施例2中,在闭合且非灭屏,然后展开电子设备的情况下,在展开电子设备到内屏夹角达至“接近切远离”角度(例如10°)时,实施2中即可基于霍尔传感器上报的远离态触发内屏点亮,外屏熄灭。不需要基于姿态传感器上报的半展开态触发内屏点亮,外屏熄灭。因此在该实施例2中的预设角度3(“折叠切展开角度+补充角度1”)可以设置的比实施1的预设角度3(“折叠切展开”角度)更大。由于预设角度2与预设角度3应当尽量接近,则实施例2中的预设角度2相比于实施1中的预设角度2(例如“展开切折叠”角度)也可以更大,例如可以将实施例2中的预设角度2设置为“展开切折叠角度+补充角度2”,该补充角度2与补充角度1大小接近,通常来说补充角度2可以与补充角度1相同。其中,该补充角度1可以取值为大于0的角度,例如20°、30°等,本申请实施例对此不作限定。
下面结合图9A以及图9B对实施例2中,针对不同情况下控制亮屏的相关内容进行示例性描述。具体从以下几种情况进行描述。
情况21:初始状态为闭合(灭屏或非灭屏),在闭合(灭屏或非灭屏)时展开电子设备。其中,电子设备初始状态为闭合包括:电子设备在展开之前,内屏夹角小于“接近切远离”角度(例如10°),例如,内屏夹角接近0°或者等于0°。无论闭合时屏幕的状态如何,展开电子设备时都可以在内屏夹角达至“接近切远离”角度(例如10°)时使得内屏点亮、外屏熄灭。
应该理解的是,初始状态为闭合(灭屏或非灭屏),展开电子设备到内屏夹角达至“接近切远离”角度(例如10°)时使得内屏点亮、外屏熄灭。涉及的内容包括但不限于以下
内容中的部分或者全部:
内容11:初始状态为闭合,且内屏以及外屏均熄灭的情况下,展开电子设备到内屏夹角达至“接近切远离”角度(例如10°)时,触发内屏点亮,保持外屏熄灭。
内容12:初始状态为闭合,且内屏熄灭、外屏点亮的情况下,展开电子设备到内屏夹角达至“接近切远离”角度(例如10°)时,触发内屏点亮,外屏熄灭。
内容13:初始状态为闭合,且内屏点亮、外屏均熄灭的情况下,展开电子设备到内屏夹角达至“接近切远离”角度(例如10°)时,保持内屏点亮,外屏熄灭。
内容14:初始状态为闭合,且内屏以及外屏均点亮的情况下,展开电子设备到内屏夹角达至“接近切远离”角度(例如10°)时,保持内屏点亮,触发外屏熄灭。在一些实施例中,闭合时内屏熄灭。
如图9A所示,电子设备的初始状态为闭合(灭屏或者非灭屏),无论姿态传感器在灭屏时不工作,还是在非灭屏时工作的情况下,当展开电子设备到内屏夹角达至“接近切远离”角度(例如10°)时,电子设备均可以将霍尔传感器上报远离态映射成为展开态,使得内屏点亮、外屏熄灭。
参考图9A的霍尔工作轴可知:灭屏或者非灭屏时展开电子设备的过程中,在内屏夹角为0°至“接近切远离”角度之间的角度时,霍尔传感器可以获取电子设备的设备形态(此时为接近态)。后续,继续展开电子设备,在内屏夹角达到(大于或者等于)“接近切远离”角度处(例如,霍尔工作轴中的黑色三角形处),霍尔传感器可以确定电子设备的设备形态为远离态,并将该远离态作为霍尔事件上报。电子设备将该霍尔事件(远离态)映射成为展开态,触发内屏点亮,保持外屏熄灭。其中,霍尔传感器上报该霍尔事件(远离态)的一个示例性位置可以为霍尔工作轴中黑色三角形处。此时,如果初始状态为闭合且灭屏,触发内屏点亮,保持外屏熄灭的情况下,还可以开启姿态传感器。参考姿态工作轴,姿态传感器在内屏夹角达至“接近切远离”角度之后开启。在内屏夹角处于“接近切远离”角度至“折叠切展开角度+补充角度1”的过程中,姿态传感器获取的姿态事件为折叠态,与霍尔传感器上报的远离态所映射的展开态矛盾。因此,也可以称内屏夹角处于“接近切远离”角度至“折叠切展开角度+补充角度1”之间的角度为冲突区域(冲突区域2)。电子设备展开到内屏夹角处于冲突区域2时,姿态传感器可以获取首帧姿态事件(姿态事件B)。
此时,如果该姿态事件B为半展开态或者展开态,则姿态传感器可以将该姿态事件B进行上报。电子设备可以不对该姿态事件B(半展开态或者展开态)进行处理,仍然保持内屏点亮,外屏熄灭。其中,姿态传感器上报半展开态的一个示例性位置可以为姿态工作轴中黑色三角形处。姿态传感器上报全展开态的一个示例性位置可以为姿态工作轴中白色三角形处,例如在内屏夹角展开至“半展开切全展开”角度时。
如果该姿态事件B为折叠态,则与霍尔传感器上报的远离态所映射的展开态冲突。电子设备处理该冲突的方式可以包括前述涉及的方式1以及方式2。
方式1:在姿态传感器确定该姿态事件B为折叠态之后,可以不将该姿态事件B进行上报,则电子设备可以不基于该姿态事件B控制屏幕亮屏。仍然保持内屏点亮,外屏熄灭。关于该方式1的详细描述可以参考前述对方式1的描述,此处不再赘述。其中,姿态传感
器获取姿态事件B但是不上报的一个示例性位置可以为姿态工作轴中白色正方形处。
方式2:在姿态传感器确定该姿态事件B为折叠态之后,在确定该折叠态下内屏夹角小于预设角度7(例如4°)的情况下,该姿态传感器可以将该姿态事件B上报,电子设备可以基于该姿态事件B确定电子设备的设备形态为折叠态,触发内屏熄灭,外屏点亮。关于该方式2的详细描述可以参考前述对方式2的描述,此处不再赘述。
后续,姿态传感器可以继续获取姿态事件(例如第二帧姿态事件等),并将后续获取的姿态事件进行上报。且,霍尔传感器也可以上报霍尔事件。电子设备基于上报的事件(姿态事件或者霍尔事件)控制亮屏。
关于情况21中电子设备控制屏幕亮屏涉及的流程可以参考下述对图10的描述,此处不再赘述。
情况22:初始状态为展开(非灭屏),在展开(非灭屏)时闭合电子设备。其中,电子设备初始状态为展开包括:电子设备在闭合之前,电子设备的设备形态为展开态,通常来说大于“展开切折叠角度+补充角度2”,例如内屏夹角为180°或者接近180°是电子设备的设备形态可以为展开态。非灭屏是指电子设备的内屏以及外屏中至少一个点亮。
如图9B所示,情况22中,电子设备的初始状态为非灭屏,则姿态传感器开启。在闭合电子设备的过程中,在内屏夹角从接近大于“全展开切半展开”角度,例如180°闭合到小于或者等于“全展开切半展开”角度(例如145°)的情况下,姿态传感器上报姿态事件。此时,该姿态事件为半展开态。其中,姿态传感器上报半展开态的位置可以如姿态工作轴中白色三角形处。
后续,在内屏夹角从“全展开切半展开”角度(例如145°)闭合到小于或者等于“展开切折叠角度+补充角度2”(例如60°)的情况下,姿态传感器上报姿态事件。此时,该姿态事件为折叠态,电子设备基于该折叠态使得内屏熄灭,外屏点亮。其中,姿态传感器上报折叠态的位置可以如姿态工作轴中黑三角形处。
应该理解的是,初始状态为展开(非灭屏),闭合电子设备到内屏夹角至“小于或者等于“展开切折叠角度+补充角度2”(例如60°)时使得内屏熄灭、外屏点亮。涉及的内容包括但不限于以下内容中的部分或者全部:
内容21:初始状态为展开,且内屏熄灭、外屏点亮的情况下,闭合至“小于或者等于“展开切折叠角度+补充角度2”(例如60°)时,保持内屏熄灭、外屏点亮。
内容22:初始状态为展开,且内屏点亮、外屏熄灭的情况下,闭合至“小于或者等于“展开切折叠角度+补充角度2”(例如60°)时,触发内屏熄灭、外屏点亮。
内容23:初始状态为展开,且内屏点亮、外屏点亮的情况下,闭合至“小于或者等于“展开切折叠角度+补充角度2”(例如60°)时,触发内屏熄灭,保持外屏点亮。
后续,在内屏夹角从“展开切折叠角度+补充角度2”(例如60°)闭合到小于或者等于“远离切接近”角度(例如5°)的情况下,霍尔传感器上报霍尔事件。此时,该霍尔事件为接近态,电子设备将该接近态映射成为折叠态,与姿态传感器上报的折叠态相同,则电子设备不对该霍尔事件进行处理,继续保持内屏熄灭,外屏点亮。其中,霍尔传感器上报折叠态的位置可以如霍尔工作轴中白色三角形处。
该情况22中,在展开(非灭屏)时闭合电子设备的情况下,相比于前述实施1,该情况下,电子设备可以更早触发内屏熄灭,外屏点亮。
关于情况22中电子设备控制屏幕亮屏涉及的流程可以参考下述对图11的描述,此处不再赘述。
情况23:初始状态为展开(灭屏),在展开(灭屏)时闭合电子设备。此时,由于灭屏的情况下姿态传感器不工作。因此,闭合电子设备的过程中,涉及的首个设备形态是基于霍尔传感器确定的。在内屏夹角闭合到小于或者等于“远离切接近”角度(例如5°)的情况下,霍尔传感器上报霍尔事件。此时,该霍尔事件为接近态,电子设备将该接近态映射成为折叠态,保持内屏和外屏熄灭。该情况23中霍尔传感器以及姿态传感器工作的示意图,与前述图6D相似,可以参考前述对图6D的描述,将其中的“展开切折叠”角度替换成为“展开切折叠角度+补充角度2”即可,此处不再赘述。
在另一些可能的情况下,情况23中,在内屏夹角闭合到小于或者等于“远离切接近”角度(例如5°)的情况下,霍尔传感器上报霍尔事件。此时,该霍尔事件为接近态,电子设备将该接近态映射成为折叠态后,还可以触发外屏点亮,保持内屏熄灭。
图10示出了情况21中电子设备控制屏幕亮屏时,各个模块间的交互流程。
下面结合图9A以及图10详细描述初始状态为闭合(灭屏或非灭屏),展开电子设备时控制屏幕亮屏的过程。该过程涉及的主要模块包括霍尔传感器、姿态传感器、传感器服务、设备状态管理服务器、屏幕管理模块。该过程可以参考下述对步骤S101-步骤S113的描述。
S101.霍尔传感器获取霍尔事件,该霍尔事件包括接近态、远离态等设备形态中的一个,在检测到设备形态发生变化的情况下,向传感器服务上报霍尔事件,其中,接近态可以被映射为折叠态,远离态可以被映射为展开态。
参考前述图9A中的霍尔工作轴,闭合(灭屏或非灭屏)时展开电子设备的情况下,内屏夹角在0°至“接近切远离”角度(例如10°)之间时,霍尔传感器获取的霍尔事件为接近态。该接近态可以被映射成为折叠态。内屏夹角在大于或者等于“接近切远离”角度时,霍尔传感器获取的霍尔事件为远离态。该远离态可以被映射成为展开态。其中,展开态可以为半展开态也可以为全展开态,本申请实施例对此不作限定。
S102.内屏夹角从角度A0(接近0°)展开至“接近切远离”角度(例如10°)时,霍尔传感器确定设备形态为远离态,并将该远离态作为霍尔事件上报至传感器服务。
步骤S102中,霍尔传感器上报霍尔事件(远离态)的一个示例性位置可以为图9A示出的霍尔工作轴中黑色三角形处。
S103.将霍尔事件上报至设备状态管理服务器,以使得设备状态管理服务器确定设备形态为展开态。
设备状态管理服务器可以将该霍尔事件(远离态)映射成为展开态。
S104.外屏是否熄灭。
在外屏点亮(未熄灭)的情况下,设备状态管理服务器可以执行下述步骤S105a使得外屏熄灭,以及内屏点亮。
在外屏熄灭的情况下,设备状态管理服务器可以执行下述步骤S105b使得内屏点亮,外屏继续保持熄灭。
S105a.通知屏幕管理模块进行切屏,使得内屏点亮,外屏熄灭。
在一些可能的实现方式中,屏幕管理模块可以利用电源管理服务器对内屏进行上电,以及对外屏进行下电使得外屏熄灭。
窗口管理服务器可以绘制显示内容,在内屏上电之后,将显示内容显示在内屏中,以使得内屏被点亮。
S105b.通知屏幕管理模块控制内屏点亮。
在一些可能的实现方式中,屏幕管理模块可以利用电源管理服务器对内屏进行上电。
窗口管理服务器可以绘制显示内容,在内屏上电之后,将显示内容显示在内屏中,以使得内屏被点亮。
这里应该理解的是,在灭屏的情况下,姿态传感器未开启,在设备状态管理服务器确定设备形态为展开态后,可以触发开启姿态传感器。
S105c.设备状态管理服务器向传感器服务发起注册姿态传感器的请求。设备状态管理服务器在注册姿态传感器之后。在姿态传感器开启的情况下,即可以获取到姿态传感器上报的姿态事件。其中,步骤S105c的执行时机与步骤S105a、步骤S105b的执行时机没有先后之分。
S106.传感器服务器通知启动姿态传感器。
S107.姿态传感器基于内屏夹角α确定姿态事件,该姿态事件包括折叠态、半展开态、全展开态等设备形态中的一个。
参考前述图9A中的姿态工作轴。闭合(灭屏或非灭屏)时展开电子设备的情况下,内屏夹角在0°至“折叠切展开角度+补充角度1”之间时,姿态传感器获取的姿态事件为折叠态。内屏夹角在“折叠切展开角度+补充角度1”至“半展开切全展开”角度之间时,姿态传感器获取的姿态事件为半展开态。内屏夹角在“半展开切全展开”角度至180°之间时,姿态传感器获取的姿态事件为全展开态。
S108.姿态传感器确定该姿态事件是否为姿态传感器上传的首帧姿态事件。
在确定该姿态事件为首帧姿态事件的情况下,为了处理该首帧姿态事件为折叠态,与霍尔传感器上报的远离态所映射的展开态冲突的情况,可以执行下述步骤S109b、或者执
行步骤S109b以及步骤S110以确定是否将该折叠态进行上报。
在确定该姿态事件不为首帧姿态事件的情况下,可以执行下述步骤S109a。
S109a.姿态事件相比于前一帧发生变化时,姿态传感器将姿态事件上报至传感器服务。
这里应该理解的是,姿态传感器上报姿态事件的时机包括:姿态事件为首帧时,在满足条件1之后可以上报,即首帧姿态事件默认相比与前一帧发生了变化。或者,非首帧姿态事件相比于前一帧发生变化时可以上报,没有发生变化则不上报。其中,条件1包括:首帧姿态事件不为折叠态,或者,姿态传感器确定内屏夹角小于阈值角度。对于该阈值角度的描述可以参考下述步骤S110中对阈值角度的描述,此处暂不赘述。
S109b.姿态传感器确定该首帧姿态事件是否为折叠态。
在确定该首帧姿态事件不为折叠态的情况下,姿态传感器可以执行下述步骤S109a,将该首帧姿态事件进行上报。
在确定该首帧姿态事件为折叠态时,在一些可能的情况下,姿态传感器可以执行下述步骤S110,进一步确定内屏夹角是否小于阈值角度,该阈值角度即为前述涉及的预设角度7,例如可以取值为4°。在内屏夹角大于阈值角度的情况下,执行步骤S109a将该首帧姿态事件进行上报。在内屏夹角大于阈值角度的情况下,执行步骤S111,不将该首帧姿态事件进行上报。在另一些可能的情况下,姿态传感器可以不执行下述步骤S110,直接执行下述步骤S111。不将该首帧姿态事件进行上报。
S110.姿态传感器确定内屏夹角α是否小于阈值角度。
该阈值角度即为前述涉及的预设角度7,例如可以取值为4°。关于预设角度7的相关描述可以参考前述内容,此处不再赘述。
在姿态传感器确定内屏夹角α小于阈值角度的情况下,可以执行下述步骤S109a,将该首帧姿态事件上报至传感器服务。
在姿态传感器确定内屏夹角α大于阈值角度的情况下,执行下述步骤S111,可以不将该首帧姿态事件上报至传感器服务,使得内屏保持亮屏,外屏保持灭屏。
S111.姿态传感器不将该首帧姿态事件上报至传感器服务,使得内屏保持亮屏,外屏保持灭屏。
S112.姿态传感器将姿态事件上报至设备状态管理服务器。
S113.在姿态事件为折叠态的情况下,设备状态管理服务器通过屏幕管理模块控制切屏,使得内屏熄灭,外屏点亮。
该步骤S113中的姿态事件可以分为以下几种结果进行描述。
结果21:在该姿态事件为折叠态,且为首帧姿态事件的情况下,表示此时霍尔传感器失效时,误报现在是远离态(其实是接近态,用户也许并不期望展开电子设备),执行步骤S113可以基于姿态传感器纠正霍尔传感器的误报,使得电子设备触发内屏熄灭,外屏点亮。
结果22:在该姿态事件为折叠态,且不为首帧姿态事件的情况下,表示此时用户在展开电子设备到内屏夹角大于或者等于“展开切折叠角度+补充角度2”之后,又重新闭合电子设备。使得电子设备从展开态又转换到折叠态了。这时电子设备可以触发内屏熄灭,外屏点亮。
这里应该理解的时,在姿态事件不为折叠态的情况下,可以为半展开态或者全展开态,与霍尔传感器上报的远离态所映射的展开态一致,设备状态管理服务器可以不对该展开态进行处理,保持内屏点亮,外屏熄灭。
图11示出了情况22中电子设备控制屏幕亮屏时,各个模块间的交互流程。
下面结合图9B以及图11详细描述初始状态为展开(非灭屏),闭合电子设备时控制屏幕亮屏的过程。该过程涉及的主要模块包括霍尔传感器、姿态传感器、传感器服务、设备状态管理服务器、屏幕管理模块。该过程可以参考下述对步骤S201-步骤S205的描述。
S201.霍尔传感器获取霍尔事件,该霍尔事件包括接近态、远离态等设备形态中的一个,在检测到设备形态发生变化的情况下,向传感器服务上报霍尔事件,其中,接近态可以被映射为折叠态,远离态可以被映射为展开态。
参考图9B中的霍尔工作轴,展开(非灭屏)时闭合电子设备的情况下,内屏夹角在180°至“远离切接近”角度(例如5°)之间时,霍尔传感器获取的霍尔事件为远离态。该远离态可以被映射成为展开态。内屏夹角在小于或者等于“远离切接近”角度时,霍尔传感器获取的霍尔事件为接近态。该接近态可以被映射成为折叠态。其中,展开态可以为半展开态也可以为全展开态,本申请实施例对此不作限定。
应该理解的时,虽然霍尔传感器可以工作,但是在展开(非灭屏)时闭合电子设备的情况下,设备状态管理服务器接收到的是姿态传感器在内屏夹角闭合到“展开切折叠角度+补充角度2”(例如60°)时的折叠态。即,内屏夹角闭合到“展开切折叠角度+补充角度2”(例如60°)时,设备状态管理服务器即可触发内屏熄灭,外屏点亮。在姿态传感器损坏或者因姿态传感器依赖的器件损坏而失效的情况下,设备状态管理服务器可以基于霍尔传感器在内屏夹角闭合到“远离切接近”角度(例如5°)时触发内屏熄灭,外屏点亮。其中,关于设备状态管理服务器基于姿态传感器触发内屏熄灭,外屏点亮的过程可以参考下述对步骤S202-步骤S205的描述。
S202.姿态传感器获取姿态事件,该姿态事件包括折叠态、半展开态、全展开态等设备形态中的一个,在检测到设备形态发生变化的情况下,向传感器服务上报姿态事件。
参考前述图9B中的姿态工作轴。展开(非灭屏)时闭合电子设备的情况下,内屏夹角在180°至“全展开切半展开”(例如145°)角度之间时,姿态传感器获取的姿态事件为全展开态。内屏夹角在“全展开切半展开”角度至“展开切折叠角度+补充角度2”(例如60°)之间时,姿态传感器获取的姿态事件为半展开态。内屏夹角在“展开切折叠角度+补充角度2”至0°之间时,姿态传感器获取的姿态事件为折叠态。
应该理解的是,姿态传感器上报姿态事件的时机包括:姿态事件为首帧时可以上报。或者,非首帧姿态事件相比于前一帧发生变化时可以上报,没有发生变化则不上报。
S203.内屏夹角从角度A3(小于180°大于60°)折叠到“展开切折叠角度+补充角度2”(例如60°)时,姿态传感器确定设备形态为折叠态,并将该折叠态作为姿态事件上报至传感器服务。
步骤S203中,姿态传感器上报姿态事件(折叠态)的一个示例性位置可以为图9B示出的姿态工作轴中黑色三角形处。
S204.将姿态事件上报至设备状态管理服务器,以使得设备状态管理服务器确定设备形态为折叠态。
S205.通知屏幕管理模块控制切屏,使得内屏熄灭,外屏点亮。
在一些可能的实现方式中,屏幕管理模块可以利用电源管理服务器对外屏进行上电,以及对内屏进行下电使得内屏熄灭。
窗口管理服务器可以绘制显示内容,在外屏上电之后,将显示内容显示在外屏中,以使得外屏被点亮。
应该理解的是,情况23中电子设备控制屏幕亮屏时,各个模块间的交互流程前述与情况22中电子设备控制屏幕亮屏时,各个模块间的交互流程相似,不同之处在于姿态传感器未开启,以霍尔传感器上报的霍尔事件确定设备形态。可以参考前述对图11中相关内容的描述,此处不再赘述。
应该理解的是,本申请涉及的在电子设备在展开或者闭合时合理亮屏的场景可以包括前述涉及的场景1以及场景2。其中,场景1与实施例1中的情况11以及实施例2中的情况21中描述的内容对应。场景2与实施例1中的情况13以及实施例2中的情况22中描述的内容对应。
除了场景1以及场景2,电子设备在展开或者闭合时合理亮屏的场景还可以包括其他场景,例如下述涉及的场景3-场景6。该场景3-场景6可以在实施例2中实现。
场景3:电子设备的初始状态为闭合,且,内屏以及外屏均熄灭时,展开电子设备的情况下。在电子设备展开内屏夹角至大于或者等于“接近切远离”角度(例如10°)时,霍尔传感器上报设备形态为远离态,电子设备将该远离态映射成为展开态,触发内屏点亮,外屏熄灭,且开启姿态传感器。后续,继续展开电子设备到“接近切远离”角度至“折叠切展开角度+补充角度1”(例如65°)之间后,停止展开,且不闭合电子设备,电子设备可以始终保持点亮内屏,熄灭外屏。不会在预设时间T(例如1s)后,触发内屏熄灭,外屏点亮。因为在实施例2中,在姿态传感器上传的首帧姿态事件为折叠态且内屏夹角大于预设角度7(例如4°)的情况下,电子设备不会获取到姿态传感器上报的首帧姿态事件,因此,电子设备可以基于霍尔传感器上报的远离态继续使得内屏点亮,外屏熄灭。
场景4:电子设备的初始状态为闭合,且,内屏以及外屏均熄灭时,展开电子设备的情况下。在电子设备展开内屏夹角至大于或者等于“接近切远离”角度时,霍尔传感器上报设备形态为远离态,电子设备将该远离态映射成为展开态,触发内屏点亮,保持外屏熄灭,且开启姿态传感器。后续,继续展开电子设备,时刻A,内屏夹角大于或者等于“折
叠切展开角度+补充角度1”时,姿态传感器上报设备形态为展开态,电子设备保持点亮内屏,熄灭外屏。时刻B,停止展开电子设备,闭合电子设备到内屏夹角小于或者等于“展开切折叠角度+补充角度2”(例如60°)时,电子设备基于姿态传感器确定设备形态为折叠态,触发内屏熄灭,外屏点亮。其中,时刻A与时刻B的时间差可以小于预设时间T。因为在实施例2中,在姿态传感器获取的非首帧姿态事件在于前一帧姿态事件不同时可以上报,不受预设时间T(实施例1中涉及的)之后才上报的约束。
场景5:电子设备的初始状态为闭合(例如内屏夹角等于0°或者接近0°),且无论是非灭屏还是灭屏,展开电子设备的情况下。在电子设备展开内屏夹角至大于或者等于“接近切远离”角度时,霍尔传感器上报设备形态为远离态,电子设备将该远离态映射成为展开态,触发内屏点亮,保持外屏熄灭,且开启姿态传感器。后续,继续展开电子设备,内屏夹角处于大于或者等于“接近切远离”角度(例如10°)且小于“折叠切展开角度+补充角度1”(例如65°)时,电子设备保持内屏点亮,外屏熄灭。后续,停止展开电子设备且开始闭合电子设备,时刻C,闭合电子设备到内屏夹角小于或者等于“远离切接近”角度(例如5°)时,电子设备基于霍尔传感器确定设备形态为接近态,电子设备将该接近态映射成为折叠态,触发内屏熄灭,外屏点亮。该场景5实施例2可以实现,实施1无法实现,其原因在于:实施例1中,在非灭屏状态下,姿态传感器开启,电子设备不基于霍尔传感器上报的霍尔事件进行处理。因此时刻C,闭合电子设备到内屏夹角小于或者等于“远离切接近”角度(例如5°)时,霍尔传感器检测到接近态之后,上报该接近态,但是电子设备不基于该接近态进行处理,因此无法触发内屏熄灭,外屏点亮。其中,在电子设备的初始状态为闭合且灭屏的情况下,实施1无法实现该场景5的原因还包括:姿态传感器上报的姿态事件会在T时刻之后才会被电子设备进行处理。
场景6:电子设备的初始状态为展开(例如内屏夹角等于180°或者接近180°),且,非灭屏的情况下,闭合电子设备到内屏夹角小于“展开切折叠角度+补充角度2”(例如60°)且大于“展开切折叠角度”(例如40°)的情况下,姿态传感器确定此时设备形态为折叠态,电子设备保持内屏熄灭,外屏点亮。此时,在时刻D停止闭合电子设备,然后开始展开电子设备,在内屏夹角展开到大于或者等于“折叠切展开角度+补充角度1”(例如65°)时,姿态传感器确定设备形态变更为半展开态,则电子设备基于该半展开态初触发内屏点亮,外屏熄灭。该场景6实施例2可以实现,实施1无法实现,其原因在于:实施例1中,在时刻D停止闭合电子设备时,由于内屏夹角大于“展开切折叠角度”(例如40°)且小于“展开切折叠角度+补充角度2”(例如60°)时,实施例1中,确定此时电子设备的设备形态为半展开态不是折叠态,这时刻D之后,展开电子设备到大于或者等于“折叠切展开角度+补充角度1”(例如65°)时,仍然处于半展开态。由于设备形态没有发生改变,则姿态传感器不会将该半展开态上报,因此电子设备无法基于姿态传感器确定此时为折叠态,则继续保持内屏点亮,外屏熄灭,无法切换到外屏点亮,内屏熄灭。
在一些可能的实施例中,可以不使用霍尔传感器,基于姿态传感器控制亮屏即可。在电子设备的初始状态为闭合(灭屏或者非灭屏),展开电子设备的过程中,在展开到内屏夹角大于或者等于预设角度3(例如前述涉及的“折叠切展开角度”或者“折叠切展开角
度+补充角度1”)时,姿态传感器即可确定电子设备的设备形态从折叠态更新为了展开态(半展开态或者全展开态),电子设备即可处于内屏点亮,外屏熄灭的状态。在电子设备的初始状态为展开(灭屏或者非灭屏),闭合电子设备的过程中,在闭合到内屏夹角大于或者等于预设角度2(例如前述涉及的“展开切折叠角度”或者“展开切折叠角度+补充角度2”)时,姿态传感器即可确定电子设备的设备形态从展开态更新为了折叠态,电子设备即可处于内屏熄灭,外屏点亮的状态。
应该理解的是,本申请实施例中涉及的展开电子设备可以指示电子设备在用户操作下展开。也可以指示电子设备展开到内屏夹角处于某个角度。本申请实施例中涉及的闭合电子设备可以指示电子设备在用户操作下闭合。也可以指示电子设备闭合到内屏夹角处于某个角度。
下面首先介绍本申请实施例提供的示例性电子设备。
图12是本申请实施例提供的电子设备的结构示意图。
下面以电子设备为例对实施例进行具体说明。应该理解的是,电子设备可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
电子设备可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和
时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。
调制解调处理器可以包括调制器和解调器。
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT)等无线通信的解决方案。
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS)等。
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)。显示面板还可以采用有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),miniled,microled,micro-oled,量子点发光二极管(quantum dot light emitting diodes,QLED)等制造。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。本申请实施例中的电子设备包括两个不同侧的显示屏。该两个显示屏中的一个显示屏可以被称为内屏,另一个显示屏可以被称为外屏。其中,内屏可以是具有折
叠与展开功能的显示屏,在电子设备折叠时,内屏也被折叠。在电子设备展开时,内屏也被展开。
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。
非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)等。
电子设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
陀螺仪传感器180B可以用于确定电子设备的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
磁传感器180D包括霍尔传感器。电子设备可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备是翻盖机时,电子设备可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
在一些可能的情况下,霍尔传感器可以直接基于实体霍尔实现,也可以基于磁力计实现的虚拟霍尔传感器,此处也不做限制。该霍尔传感器上报的霍尔事件为onchange事件。
加速度传感器180E可检测电子设备在各个方向上(一般为三轴)加速度的大小。当电子设备静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
在一些可能的情况下,电子设备还可以包括姿态传感器(图中未示出),该姿态传感器可以是实体传感器。也可以是结合角度、加速度等传感器数据,或者结合夹角虚拟传感器数据,采用融合算法实现的虚拟姿态传感器。姿态传感器可以提供诸如折叠态、半展态、全展开态、笔记本态等更丰富准确的姿态数据。该姿态传感器上报的姿态事件为onchange事件。
本申请实施例中,该处理器110可以调用内部存储器121中存储的计算机指令,以使得终端执行本申请实施例中的控制亮屏的方法。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”
或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
Claims (16)
- 一种控制亮屏的方法,其特征在于,应用于屏幕可折叠的电子设备,所述电子设备包括内屏和外屏,所述内屏可折叠形成第一屏和第二屏,所述方法包括:所述电子设备的初始状态为闭合,且所述内屏以及所述外屏均熄灭的情况下,所述电子设备展开到所述第一夹角大于或者等于第一角度的情况下,所述电子设备点亮所述内屏,保持所述外屏熄灭;所述第一夹角为所述第一屏和所述第二屏的夹角,在所述电子设备的初始状态为闭合,展开所述电子设备的过程中,所述第一夹角变大;在所述电子设备的初始状态为展开,闭合所述电子设备的过程中,所述第一夹角变小;所述电子设备的初始状态为闭合,且所述内屏、所述外屏中至少一个点亮的情况下,所述电子设备展开到所述第一夹角大于或者等于所述第一角度的情况下,所述电子设备处于内屏点亮,外屏熄灭的状态;所述电子设备的初始状态为展开,且所述内屏、所述外屏中至少一个点亮的情况下,所述电子设备闭合到所述第一夹角小于或者等于第二角度的情况下,所述电子设备处于所述外屏点亮,所述内屏熄灭的状态;其中,所述第二角度大于所述第一角度。
- 根据权利要求1所述的方法,其特征在于,在所述内屏熄灭、所述外屏点亮的情况下,所述电子设备展开到所述第一夹角大于或者等于第一角度之后,还包括:所述电子设备点亮所述内屏,熄灭所述外屏。
- 根据权利要求1或2所述的方法,其特征在于,在所述内屏、所述外屏均点亮的情况下,所述电子设备展开到所述第一夹角大于或者等于第一角度之后,还包括:所述电子设备熄灭所述外屏。
- 根据权利要求1-3中任一项所述的方法,其特征在于,在所述内屏点亮、所述外屏点亮的情况下,所述电子设备闭合到所述第一夹角小于或者等于第二角度之后,还包括:所述电子设备熄灭所述内屏,保持所述外屏熄灭。
- 根据权利要求1-3中任一项所述的方法,其特征在于,在所述内屏点亮、所述外屏熄灭的情况下,所述电子设备闭合到所述第一夹角小于或者等于第二角度之后,还包括:所述电子设备熄灭所述内屏,点亮所述外屏。
- 根据权利要求1-5中任一项所述的方法,其特征在于,所述方法还包括:所述第一夹角大于或者等于所述第一角度小于所述第三角度,且所述电子设备处于内屏点亮,外屏熄灭的状态时,所述电子设备闭合到所述第一夹角小于或者等于第四角度的情况下,所述电子设备熄灭所述内屏,点亮所述外屏;所述第四角度小于所述第一角度。
- 根据权利要求1-6中任一项所述的方法,其特征在于,所述内屏以及所述外屏均熄灭 的情况下,所述电子设备展开到所述第一夹角在第一时刻大于或者等于所述第三角度,所述电子设备点亮所述内屏,保持所述外屏熄灭之后,所述方法还包括:所述电子设备闭合到所述第一夹角在第二时刻小于所述第二角度时,所述电子设备熄灭所述内屏,点亮所述外屏;所述第二时刻晚于所述第一时刻。
- 根据权利要求7所述的方法,其特征在于,所述第二时刻与所述第一时刻的时间差小于或者等于预设时长。
- 根据权利要求5-8中任一项所述的方法,其特征在于,所述电子设备的第一传感器设定的第一形态包括所述第一夹角小于或者等于所述第一角度,设定的第二形态包括所述第一夹角大于所述第一角度小于第二角度;所述电子设备的第二传感器设定的第一形态包括所述第一夹角小于所述第二角度;所述内屏、所述外屏中至少一个点亮时,所述电子设备开启所述第二传感器;所述电子设备的初始状态为闭合,且所述内屏熄灭、所述外屏点亮的情况下,所述电子设备展开到第一夹角大于或者等于所述第一角度之后,所述电子设备点亮所述内屏,熄灭所述外屏,具体包括:所述电子设备展开到所述内屏第一夹角大于或者等于所述第一角度的情况下,所述电子设备基于所述第一传感器确定所述电子设备的设备形态由所述第一形态变更为所述第二形态时,所述电子设备点亮所述内屏,熄灭所述外屏;其中,所述第二形态不同于所述第一形态;所述第一形态用于指示所述电子设备折叠,所述第二形态用于指示所述电子设备展开;所述电子设备的初始状态为展开,在所述内屏点亮、所述外屏熄灭的情况下,所述电子设备闭合到所述第一夹角小于或者等于第二角度之后,所述电子设备熄灭所述内屏,点亮所述外屏,具体包括:所述电子设备展开到所述内屏第一夹角小于或者等于所述第二角度的情况下,所述电子设备基于所述第二传感器确定所述电子设备的设备形态为所述第一形态时,所述电子设备熄灭所述内屏,点亮所述外屏。
- 根据权利要求9所述的方法,其特征在于,所述电子设备的初始状态为闭合,在所述第一夹角小于第一角度且所述内屏以及所述外屏均熄灭的情况下,所述电子设备展开到所述第一夹角大于或者等于所述第一角度,所述电子设备点亮所述内屏,保持所述外屏熄灭,具体包括:所述电子设备展开到所述第一夹角大于或者等于所述第一角度的情况下,所述电子设备基于所述第一传感器确定所述电子设备的设备形态由所述第一形态变更为所述第二形态时,所述电子设备点亮所述内屏,保持所述外屏熄灭;所述电子设备点亮所述内屏,保持所述外屏熄灭之后,所述方法还包括:所述电子设备开启所述第二传感器;所述第二传感器获取第一事件,所述第一事件用于指示所述电子设备的设备形态;在所述第二传感器确定所述第一事件不为首帧事件,或者所述第一事件为首帧事件且所述第一事件指示所述电子设备的设备形态为所述第二形态的情况下,所述电子设备熄灭所述内屏,点亮所述外屏;在所述第二传感器确定所述第一事件为首帧事件且所述第一事件指示所述电子设备的设备形态为所述第一形态的情况下,所述电子设备保持所述内屏点亮,所述外屏熄灭。
- 根据权利要求10所述的方法,其特征在于,所述第二传感器确定所述第一事件不为首帧事件,或者所述第一事件为首帧事件且所述第一事件指示所述电子设备的设备形态为所述第二形态时,所述电子设备熄灭所述内屏,点亮所述外屏,具体包括:在所述第二传感器确定所述第一事件为首帧事件,所述第一事件指示所述电子设备的设备形态为所述第一形态,且所述第一夹角小于第五角度的情况下,所述电子设备熄灭内屏,点亮外屏;在所述第二传感器确定所述第一事件为首帧事件且所述第一事件指示所述电子设备的设备形态为所述第一形态的情况下,不对所述第一事件进行处理,具体包括:所述第二传感器确定所述第一事件为首帧事件,所述第一事件指示所述电子设备的设备形态为所述第一形态,且所述第一夹角大于所述第五角度的情况下,所述电子设备保持所述内屏点亮,所述外屏熄灭。
- 根据权利要求9-11中任一项所述的方法,其特征在于,所述方法还包括:所述第一夹角大于或者等于所述第一角度小于所述第三角度,且所述电子设备处于内屏点亮,外屏熄灭的状态时,所述电子设备闭合到所述第一夹角小于或者等于所述第四角度的情况下,所述电子设备基于所述第一传感器确定所述电子设备的设备形态从所述第二形态变更至所述第一形态时,所述电子设备熄灭所述内屏,点亮所述外屏。
- 根据权利要求1-12中任一项所述的方法,其特征在于,所述第一传感器为霍尔传感器,所述第二传感器为姿态传感器。
- 一种计算机存储介质,其特征在于,所述存储介质中存储有计算机程序,所述计算机程序包括可执行指令,所述可执行指令当被处理器执行时使所述处理器执行如权利要求1至13中任一项所述的方法。
- 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器和存储器;所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行如权利要求1至13中任一项所述的方法。
- 一种芯片***,其特征在于,所述芯片***应用于电子设备,所述芯片***包括一个或多个处理器,所述处理器用于调用计算机指令以使得所述电子设备执行如权利要求1至13中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211379580.0A CN118042043A (zh) | 2022-11-04 | 2022-11-04 | 控制亮屏的方法和电子设备 |
CN202211379580.0 | 2022-11-04 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024093520A1 true WO2024093520A1 (zh) | 2024-05-10 |
Family
ID=90929655
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/117632 WO2024093520A1 (zh) | 2022-11-04 | 2023-09-08 | 控制亮屏的方法和电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118042043A (zh) |
WO (1) | WO2024093520A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113504866A (zh) * | 2019-02-22 | 2021-10-15 | 华为技术有限公司 | 屏幕控制方法、电子设备及存储介质 |
WO2022161119A1 (zh) * | 2021-01-30 | 2022-08-04 | 华为技术有限公司 | 一种显示方法及电子设备 |
CN114980286A (zh) * | 2022-04-29 | 2022-08-30 | 荣耀终端有限公司 | 电子设备熄屏显示方法 |
CN115167616A (zh) * | 2022-06-07 | 2022-10-11 | 荣耀终端有限公司 | 显示控制方法及装置 |
CN115268738A (zh) * | 2021-04-30 | 2022-11-01 | 华为技术有限公司 | 显示控制方法,电子设备及计算机存储介质 |
-
2022
- 2022-11-04 CN CN202211379580.0A patent/CN118042043A/zh active Pending
-
2023
- 2023-09-08 WO PCT/CN2023/117632 patent/WO2024093520A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113504866A (zh) * | 2019-02-22 | 2021-10-15 | 华为技术有限公司 | 屏幕控制方法、电子设备及存储介质 |
WO2022161119A1 (zh) * | 2021-01-30 | 2022-08-04 | 华为技术有限公司 | 一种显示方法及电子设备 |
CN115268738A (zh) * | 2021-04-30 | 2022-11-01 | 华为技术有限公司 | 显示控制方法,电子设备及计算机存储介质 |
CN114980286A (zh) * | 2022-04-29 | 2022-08-30 | 荣耀终端有限公司 | 电子设备熄屏显示方法 |
CN115167616A (zh) * | 2022-06-07 | 2022-10-11 | 荣耀终端有限公司 | 显示控制方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN118042043A (zh) | 2024-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210132779A1 (en) | Electronic device and method for configuring display thereof | |
WO2021052279A1 (zh) | 一种折叠屏显示方法及电子设备 | |
WO2021036771A1 (zh) | 具有可折叠屏幕的电子设备及显示方法 | |
CN114840127A (zh) | 一种显示方法及电子设备 | |
US11281814B2 (en) | Screen-on method and related apparatus | |
CN110839096A (zh) | 一种具有折叠屏的设备的触控方法与折叠屏设备 | |
US11915017B2 (en) | Method for switching theme of application and electronic device | |
CN105893078B (zh) | 用于控制相机***的方法、电子装置和存储介质 | |
WO2023103951A1 (zh) | 一种折叠屏的显示方法及相关装置 | |
WO2021129254A1 (zh) | 控制屏幕显示的方法和电子设备 | |
CN112445276A (zh) | 一种折叠屏显示应用方法及电子设备 | |
CN115328563B (zh) | ***启动方法及电子设备 | |
CN114257670A (zh) | 一种具有折叠屏的电子设备的显示方法 | |
WO2019069474A1 (ja) | 表示装置 | |
CN114257671A (zh) | 一种图像显示方法及电子设备 | |
WO2020228735A1 (zh) | 一种显示应用的方法及电子设备 | |
CN116489494A (zh) | 拍摄方法、可读介质和电子设备 | |
US20130326092A1 (en) | Processing input event of external device | |
CN111897465A (zh) | 弹窗显示方法、装置、设备及存储介质 | |
WO2024093520A1 (zh) | 控制亮屏的方法和电子设备 | |
WO2021254318A1 (zh) | 终端设备及其手势操作方法和介质 | |
CN116368464A (zh) | 一种显示方法及电子设备 | |
CN112181915B (zh) | 执行业务的方法、装置、终端和存储介质 | |
WO2019154183A1 (zh) | 注册网络的方法和移动终端 | |
US20150148097A1 (en) | Electronic device, connection destination switching method and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23884455 Country of ref document: EP Kind code of ref document: A1 |