[go: up one dir, main page]

CN119645539A - Split-screen display method, electronic device, and computer-readable storage medium - Google Patents

Split-screen display method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN119645539A
CN119645539A CN202311168916.3A CN202311168916A CN119645539A CN 119645539 A CN119645539 A CN 119645539A CN 202311168916 A CN202311168916 A CN 202311168916A CN 119645539 A CN119645539 A CN 119645539A
Authority
CN
China
Prior art keywords
screen
window
application
split
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311168916.3A
Other languages
Chinese (zh)
Inventor
李航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311168916.3A priority Critical patent/CN119645539A/en
Publication of CN119645539A publication Critical patent/CN119645539A/en
Pending legal-status Critical Current

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The present application relates to the field of terminal display, and in particular, to a split screen display method, an electronic device, and a computer readable storage medium. The method is applied to the electronic equipment, and the electronic equipment comprises a display screen. According to the method provided by the embodiment of the application, the electronic equipment can automatically rotate the display direction of the preview flow of the camera under the condition that the camera is opened by the split screen application in the horizontal screen state or the screen is rotated after the camera is opened by the split screen application, so that the display content accords with the viewing direction of a user, and the user experience is improved.

Description

Split screen display method, electronic device and computer readable storage medium
Technical Field
The present application relates to the field of terminal display, and in particular, to a split screen display method, an electronic device, and a computer readable storage medium.
Background
With the development of terminal technology, the functional demands of users on electronic devices are becoming more diversified. For example, to meet the user's need for use of multiple applications during the same time period, more electronic devices may support a split-screen mode in which a screen of the electronic device may display two or more windows so that the user refers to content displayed in the multiple windows. However, at present, a camera is started through a split-screen application under a horizontal screen, and the display direction of a camera preview stream cannot be adaptively matched with the viewing direction of a user, so that the user experience is affected.
Disclosure of Invention
The application provides a split screen display method, electronic equipment and a computer readable storage medium, wherein the display direction of a camera preview stream can be automatically adjusted under the condition that a camera is started by a split screen application under a transverse screen, so that display content accords with the viewing direction of a user, and the user experience is improved.
In order to achieve the above purpose, the application adopts the following technical scheme:
In a first aspect, a split-screen display method is provided, and is applied to an electronic device, where the electronic device includes a display screen, and the method includes:
The display screen horizontally displays a first interface, wherein the first interface comprises a first split-screen window of a first application, and the first split-screen window comprises a first icon of a camera;
The electronic equipment receives a first operation of a user on the first icon, wherein the first operation is used for starting a camera;
Responding to the first operation, the electronic equipment adjusts a second direction according to a first direction of a second split screen window of the current camera relative to a display screen, and obtains the adjusted second direction, wherein the second direction is the direction of an image in a camera view finding frame relative to the display screen;
and the electronic equipment displays a second interface according to the adjusted second direction, wherein the second interface comprises the second split screen window, and the second split screen window comprises an image in a camera view-finding frame.
Wherein the first application is a non-camera application.
In the embodiment of the application, when the electronic equipment does not rotate, the electronic equipment can be regarded as being in a vertical screen (or vertical screen) state, when the electronic equipment rotates 90 degrees anticlockwise or clockwise, the electronic equipment can be regarded as being in a horizontal screen state, and when the electronic equipment rotates 180 degrees anticlockwise or clockwise, the electronic equipment can be regarded as being in a reverse screen state.
Taking an android system as an example, in the android system, content displayed to a user by an application program is a user interface. And opening the application program, and correspondingly starting an Activity. Activity is a component of an application program, each Activity having an application window associated therewith for exposing a user interface of the application. That is, in the embodiment of the present application, the application window refers to a window associated with Activity and used for displaying a user interface of an application. The split window refers to an application window in the split mode.
In the embodiment of the application, the electronic equipment opens the camera through the application A (first application) in the horizontal screen and split screen modes, and the image in the view-finding frame of the camera is 'positive', so that the view direction of a user is met. According to the method provided by the embodiment of the application, under the condition that the electronic equipment opens the camera through the split screen application in the horizontal screen state, the electronic equipment can automatically correct the direction of the preview flow of the camera, so that the situation that the display direction of the preview flow is askew caused by the rotation of the split screen window driving the preview flow to rotate is effectively reduced, the display content of the camera accords with the viewing direction of a user, and the user experience is improved.
In an implementation manner of the first aspect, the electronic device adjusts a second direction according to a first direction of a second split-screen window of a current camera relative to a display screen, to obtain the adjusted second direction, including:
the electronic equipment judges whether the second direction needs to be adjusted or not;
And if the second direction needs to be adjusted, the electronic equipment adjusts the second direction according to the first direction of the second split screen window of the current camera relative to the display screen, and the adjusted second direction is obtained.
In the embodiment of the application, judgment is firstly carried out and then adjustment is carried out, so that unnecessary adjustment steps can be effectively reduced.
In an implementation manner of the first aspect, the determining, by the electronic device, whether the second direction needs to be adjusted includes:
The electronic equipment detects a display mode of an application window of a current camera;
and if the display mode of the application window of the current camera is a split screen mode, the electronic equipment judges that the second direction needs to be adjusted.
It should be noted that, when the application window of the camera is displayed in the split screen mode, the application window of the camera may be referred to as a split screen window.
In one implementation, the activity task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) may obtain the display mode of the application window of the camera through the activity recording module (ActivityRecord).
In the embodiment of the application, the scheme of executing the second direction adjustment in the split screen mode is equivalent, and in this way, the influence on the camera preview flow in the full screen mode can be reduced.
In an implementation manner of the first aspect, after the electronic device detects a display mode of an application window of a current camera, the method further includes:
if the display mode of the application window of the current camera is a split screen mode, the electronic device judges whether the first application is in a first preset list or not, wherein the first preset list is configured in a system component;
And if the first application is in the first preset list, the electronic equipment judges that the second direction needs to be adjusted.
In one implementation, the first preset list includes application package names. And if the application package name of the first application is in the first preset list, indicating that the first application is in the first preset list.
In an implementation manner of the first aspect, after the electronic device determines whether the first application is in a first preset list, the method further includes:
If the application is not in the first preset list, the electronic equipment judges whether the first application is in a second preset list or not, wherein the second preset list is configured in an application component;
And if the first application is in a second preset list, the electronic equipment judges that the second direction needs to be adjusted.
In some implementations, the second preset list may be present in a configuration file of the CCM. The method comprises the steps of searching a package name of a first application in a second preset list of the configuration file, judging that the first application is in the second preset list of the configuration file of the CCM and returns true if the package name exists, and judging that the first application is not in the second preset list of the configuration file of the CCM and returns false if the package name does not exist.
In the embodiment of the application, the first preset list corresponds to a system component, and the second preset list corresponds to a product component (also called an application component). The system component is validated for the whole system and the product component is validated for a certain product. By adding the system side list, if the problem of commonality of all products occurs, the problem can be solved uniformly through the system side list, and single configuration of products one by one is not needed.
In other embodiments, when the first preset list does not exist, after the display mode of the application window of the current camera is detected, the determining whether the first application is in the second preset list is performed, that is, whether the Activity is in the first preset list is not required to be determined.
In an implementation manner of the first aspect, the electronic device adjusts a second direction according to a first direction of a second split-screen window of a current camera relative to a display screen, to obtain the adjusted second direction, including:
the electronic equipment calculates a first direction correction value according to a first direction of a second split screen window of the current camera relative to the display screen;
And the electronic equipment adjusts the second direction according to the direction correction value to obtain the adjusted second direction.
In an implementation manner of the first aspect, the calculating, by the electronic device, a first direction correction value according to a first direction of a second split-screen window of the current camera relative to the display screen includes:
If the first screen direction is greater than the first window direction, the first direction correction value is a difference value between the first screen direction and the first window direction, wherein the first screen direction is the direction of the current display screen, and the first window direction is the direction of the current second split-screen window;
If the first screen direction is equal to the first window direction, the first direction correction value is a first preset value, and the first preset value indicates that the display direction of the camera does not need to be adjusted;
If the first screen direction is smaller than the first window direction, the first direction correction value is the sum of the difference value between the first screen direction and the first window direction and a second preset value.
In the embodiment of the application, the screen direction refers to the direction of the display screen of the electronic equipment. In order to conform to the viewing habits of the user, the screen direction may be defined as a direction conforming to the viewing habits of the user. Taking a mobile phone as an example, the position of the charging port can be defined as the lower part of the mobile phone, and the position of the camera on the display screen can be defined as the upper part of the mobile phone. The direction from below the phone to above the phone generally corresponds to the viewing direction of the user, and the direction from below the phone to above the phone may be defined as the screen direction of the phone.
In some embodiments, the adjustment algorithm for the display orientation of the camera may include the steps of:
if the current screen direction is greater than the direction of the application window of the camera, the output result comprises a package name of the application program calling the camera and a first correction value, wherein the first correction value is a difference value of the screen direction minus the direction of the application window of the camera.
If the current screen direction is equal to the direction of the application window of the camera, the output result comprises a second correction value, wherein the second correction value indicates that the display direction of the camera does not need to be adjusted. For example, the second correction value is-1.
If the current screen direction is smaller than the direction of the application window of the camera, outputting a result including an entry of an application program calling the camera and a third correction value, wherein the third correction value is the sum of the difference value between the screen direction and the direction of the application window of the camera and a second preset value. For example, the second preset value is 4.
If the current screen direction (first screen direction) is greater than the direction (first window direction) of the application window (first split-screen window) of the camera, the calculated first direction correction value is a first correction value, if the current screen direction (first screen direction) is equal to the direction of the application window of the camera, the calculated first direction correction value is a second correction value (first preset value), and if the current screen direction (first screen direction) is less than the direction (first window direction) of the application window of the camera, the calculated first direction correction value is a third correction value.
In a second aspect, a split-screen method is provided, and is applied to an electronic device, wherein the electronic device comprises a display screen, and the method comprises the following steps:
The display screen vertically displays a third interface, wherein the third interface comprises a third split-screen window of a second application, and the third split-screen window comprises a second icon of the camera;
The electronic equipment receives a second operation of the second icon by a user, wherein the second operation is used for starting a camera;
In response to the second operation, the electronic device displays a fourth interface, the fourth interface including a fourth split-screen window of the camera, the fourth split-screen window including an image in a viewfinder of the camera;
the electronic equipment receives a third operation, wherein the third operation is used for rotating the display screen;
And responding to the third operation, and adjusting a fourth direction of the electronic equipment according to the current third direction of the fourth split-screen window relative to the display screen, wherein the fourth direction is the direction of an image in a camera view-finding frame included in the fourth split-screen window relative to the display screen.
In an implementation manner of the second aspect, the electronic device adjusts the fourth direction according to the current third direction of the fourth split-screen window relative to the display screen, including:
the electronic equipment judges whether the fourth direction needs to be adjusted or not;
And if the fourth direction needs to be adjusted, the electronic equipment adjusts the fourth direction according to the current third direction of the fourth split-screen window relative to the display screen.
In an implementation manner of the second aspect, the electronic device adjusts the fourth direction according to the current third direction of the fourth split-screen window relative to the display screen, including:
The electronic equipment judges whether the second application is in a first preset list or not, wherein the first preset list is configured in a system component;
And if the second application is in the first preset list, the electronic equipment judges that the fourth direction needs to be adjusted.
In an implementation manner of the second aspect, after the electronic device determines whether the second application is in the first preset list, the method further includes:
If the second application is not in the first preset list, the electronic equipment judges whether the second application is in a second preset list or not, wherein the second preset list is configured in an application component;
and if the second application is in a second preset list, the electronic equipment judges that the fourth direction needs to be adjusted.
In the embodiment of the application, the split screen display method is executed under the condition that the split screen mode is already entered, so that the display mode of the current application window is defaulted to be the split screen mode, and the display mode of the current application window is not required to be judged any more.
In an implementation manner of the second aspect, the electronic device adjusts the fourth direction according to the current third direction of the fourth split-screen window relative to the display screen, including:
the electronic equipment calculates a second direction correction value according to a third direction of a fourth split-screen window of the current camera relative to the display screen;
and the electronic equipment adjusts the fourth direction according to the second direction correction value.
In an implementation manner of the second aspect, the calculating, by the electronic device, a second direction correction value according to a third direction of a fourth split-screen window of the current camera relative to the display screen includes:
if the second screen direction is greater than the second window direction, the second direction correction value is a difference value between the second screen direction and the second window direction, wherein the second screen direction is the direction of the current display screen, and the second window direction is the direction of the current fourth split-screen window;
if the second screen direction is equal to the second window direction, the second direction correction value is a first preset value, and the first preset value indicates that the display direction of the camera does not need to be adjusted;
and if the second screen direction is smaller than the second window direction, the second direction correction value is the sum of the difference value between the second screen direction and the second window direction and a second preset value.
In some embodiments, the adjustment algorithm for the display orientation of the camera may include the steps of:
if the current screen direction is greater than the direction of the application window of the camera, the output result comprises a package name of the application program calling the camera and a first correction value, wherein the first correction value is a difference value of the screen direction minus the direction of the application window of the camera.
If the current screen direction is equal to the direction of the application window of the camera, the output result comprises a second correction value, wherein the second correction value indicates that the display direction of the camera does not need to be adjusted. For example, the second correction value is-1.
If the current screen direction is smaller than the direction of the application window of the camera, outputting a result including an entry of an application program calling the camera and a third correction value, wherein the third correction value is the sum of the difference value between the screen direction and the direction of the application window of the camera and a second preset value. For example, the second preset value is 4.
If the current screen direction (second screen direction) is greater than the direction (second window direction) of the application window (fourth split-screen window) of the camera, the calculated second direction correction value is the first correction value, if the current screen direction (second screen direction) is equal to the direction of the application window of the camera, the calculated second direction correction value is the second correction value (first preset value), and if the current screen direction (second screen direction) is less than the direction (second window direction) of the application window of the camera, the calculated second direction correction value is the third correction value.
In a third aspect, there is provided an electronic device comprising a processor for executing a computer program stored in a memory, implementing the method of any one of the first aspect or the method of any one of the second aspect of the application.
In a fourth aspect, there is provided a system on a chip comprising a processor coupled to a memory, the processor executing a computer program stored in the memory to implement the method of any one of the first aspect or the method of any one of the second aspect of the application.
In a fifth aspect, there is provided a computer readable storage medium storing a computer program which when executed by one or more processors performs the method of any one of the first aspect or the method of any one of the second aspect of the application.
In a sixth aspect, the application provides a computer program product for causing an apparatus to perform the method of any one of the first or second aspects of the application when the computer program product is run on the apparatus.
It will be appreciated that the advantages of the second to sixth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
Fig. 2 is a schematic diagram of an external structure of a folding screen mobile phone according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a coordinate system provided by an embodiment of the present application;
FIG. 4 is a schematic view of an angular region provided by an embodiment of the present application;
Fig. 5 is a schematic diagram of a screen direction of an electronic device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a display direction according to an embodiment of the present application;
Fig. 7 is a schematic diagram of a user operation application scenario provided in an embodiment of the present application;
FIG. 8 is a schematic diagram of a procedure for forcibly rotating a window in a horizontal screen or split screen mode according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a procedure for forcibly rotating a window after rotating a screen in a split screen mode according to the present application;
FIG. 10 is a schematic block diagram of a software architecture of an electronic device provided by an embodiment of the present application;
FIG. 11 is a timing diagram of a split screen display method according to an embodiment of the present application;
FIG. 12 is a flow chart of a method of determining whether an update of the display direction of a camera is required;
FIG. 13 is a timing diagram of a split screen display method according to another embodiment of the present application;
fig. 14is a schematic diagram of an application scenario of a split screen display method according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that in embodiments of the present application, "one or more" means one, two or more than two, "and/or" describes an association of associated objects, meaning that three relationships may exist, e.g., A and/or B may mean that A alone exists, while A and B together, B alone exists, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Furthermore, in the description of the present specification and the appended claims, the terms "first," "second," "third," "fourth," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The embodiment of the application provides a split-screen display method which can be applied to electronic equipment with a screen, a display function and a photographing function. The electronic device in the embodiment of the present application may also be referred to as a terminal device, a terminal, a User Equipment (UE), a user terminal, or the like. By way of example, the electronic device may be a cell phone, tablet computer, handheld computer, wearable device (e.g., smart watch, smart bracelet, etc.), notebook computer, palm top computer, personal computer, smart home device (e.g., television, etc.), smart screen, game console, mobile internet device (mobile INTERNET DEVICE, MID), point of sale (POS), augmented reality (augmented reality, AR) device, virtual Reality (VR) device, etc. The embodiment of the application does not limit the specific form of the electronic equipment. For convenience of explanation, the following embodiments will be described by taking a mobile phone as an example.
Exemplary, referring to fig. 1, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown.
As shown in fig. 1, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 140A, a battery 140B, 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The processor 110 may include one or more processing units, wherein different processing units may be separate devices or may be integrated in one or more processors.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge an electronic device, or may be used to transfer data between the electronic device and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also provide power to the electronic device through the power management module 140A while charging the battery 140B.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD) screen (liquid CRYSTAL DISPLAY), an organic light-emitting diode (OLED), an active-matrix organic LIGHT EMITTING diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microLed, micro-OLED, a quantum dot LIGHT EMITTING diodes (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1. In some embodiments, the electronic device 100 displays a user interface through the display 194.
When the electronic device 100 includes multiple display screens, it may be a folding screen device. The display of the electronic device 100 may be configured as a foldable display, simply referred to as a folding display. The folding screen can adopt an integrally formed flexible display screen, can also adopt a plurality of flexible display screens and a spliced display screen formed by hinges between every two flexible display screens, and can also adopt a plurality of rigid screens and a spliced display screen formed by hinges between every two rigid screens. The embodiment of the present application is not limited thereto.
For example, the electronic device 100 may be a folding screen cell phone. Referring to fig. 2, an external structure schematic diagram of a folding screen mobile phone according to an embodiment of the present application is shown. The display screen of the folding screen mobile phone can comprise an inner screen and an outer screen. The inner screen is a folding screen, and the size of the inner screen is larger than that of the outer screen. Fig. 2 (a) is an external schematic view of the folding mobile phone in the unfolded state of the inner screen. As shown in fig. 2 (a), the first portion 301 outside the folding screen phone may be provided as an external screen of the folding screen phone and the second portion 302 may be provided as a phone case. The first portion 301 and the second portion 302 outside the folding screen mobile phone may be provided with cameras. In other examples of a folding screen phone, the first portion 301 and the second portion 302 on the outside of the folding screen phone may both be provided as the outer screen of the folding screen phone, or may both be provided as the housing of the folding screen phone. Fig. 2 (b) is an inner schematic view of the folding mobile phone in the unfolded state. As shown in fig. 2 (b), the inner screen (i.e., the folding screen) of the folding screen mobile phone includes a first display unit 303 and a second display unit 304. The first display unit 303 and the second display unit 304 may display different display interfaces, respectively, or may display one display interface together. The posture or the form of the folding screen can be determined according to the angle between the first display unit 303 and the second display unit 304. For example, the folding screen is in a fully folded state when the angle between the first display unit 303 and the second display unit 304 is 0 degrees, in a fully unfolded state when the angle between the first display unit 303 and the second display unit 304 is 180 degrees, and in a semi folded state when the angle between the first display unit 303 and the second display unit 304 is greater than 0 degrees and less than 180 degrees. It should be noted that, in the above examples, the description of the magnitude of the included angle between the first display unit 303 and the second display unit 304 of the folding-screen mobile phone in the fully folded state, the semi-folded state, and the fully unfolded state is merely an example, and the embodiment of the present application is not limited thereto. In addition, the folding screen is in a fully unfolded state, a fully folded state or a semi-folded state, and can also be called that the folding screen mobile phone is in a fully unfolded state, a fully folded state or a semi-folded state.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The camera 193 is used to capture still images or video. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, the electronic device 100 stores the card punching data of the user in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, an application program required for at least one function, and the like. The storage data area may store data created during use of the electronic device 100 (e.g., interface information corresponding to a user interface, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity smaller than a first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
It should be understood that fig. 1 is only a structural example of an electronic device 100, and shows some modules related to a split screen display method according to an embodiment of the present application, and the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
For ease of understanding, the names related to the embodiments of the present application will be first described.
1. Defining a coordinate system
Referring to fig. 3, a schematic diagram of a coordinate system according to an embodiment of the present application is provided. As shown in fig. 3, 4 direction values 0, 1, 2, and 3 may be defined in the embodiment of the present application. Wherein the direction of gravity is defined as 2 and the direction opposite to the direction of gravity is defined as 0. The direction perpendicular to the 0 direction and satisfying the right hand rule is defined as 1, i.e., the thumb and the index finger of the right hand are protruded to be perpendicular to each other, and then the thumb is directed to the 0 direction, and the direction to which the index finger is directed is the 1 direction. The direction opposite to the 1 direction is defined as 3.
It should be noted that the above is only an example of a coordinate system, and other coordinate systems or other directions may be defined. For example, other numbers are used to define the various directions of the coordinate system in fig. 3. Or a three-dimensional rectangular coordinate system such as xyz coordinate system. Or the coordinate system shown in fig. 3 is further divided into more directions, such as 8 directions, 36 directions, etc. The coordinate system and the direction are not particularly limited in the embodiment of the application, and the coordinate system or the direction adopted in the process of executing the split screen display method in the embodiment of the application is consistent in definition.
As shown in fig. 3,4 direction values are defined in the embodiment of the present application. In practical application, when a sensor (such as a gyroscope) of the electronic device senses rotation of the electronic device, the electronic device obtains a direction after rotation, and corresponds the direction after rotation to a certain direction value of the 4 direction values, namely, the direction after rotation is assigned by using the certain direction value of the 4 direction values.
In some application scenarios, the angle of rotation of the electronic device is not necessarily exactly 90 ° or a multiple thereof. In this case, one possible implementation manner may divide a plurality of angle areas according to the coordinate system in fig. 3, where each angle area corresponds to one direction value, and the electronic device may determine the angle area to which the rotated direction belongs according to the direction before rotation and the rotation angle, so as to determine the rotated direction value.
Exemplary, referring to fig. 4, a schematic view of an angular region provided by an embodiment of the present application is shown. As shown in fig. 4, the coordinate system shown in fig. 3 is divided into 4 areas. Assuming that the 3 direction is the 0 ° direction and the 0 direction is the 90 ° direction, the divided 4 angular regions are (45 °,135 °), (-135 °,135 °), (-45 °, -135 °) and (-45 °,45 °). The electronic equipment determines an angle area according to the direction before rotation and the rotation angle, determines that the direction value after rotation is 0 if the angle area to which the direction after rotation belongs is (45 degrees, 135 degrees), determines that the direction value after rotation is 1 if the angle area to which the direction after rotation belongs is (-135 degrees, 135 degrees), determines that the direction value after rotation is 2 if the angle area to which the direction after rotation belongs is (-45 degrees, 135 degrees), and determines that the direction value after rotation is 3 if the angle area to which the direction after rotation belongs is (-45 degrees, 45 degrees). For example, if the direction value before rotation is 0 and the rotation is 60 ° clockwise, the angle area to which the direction after rotation belongs is (-45 °,45 °), and the direction value after rotation is determined to be 3.
It should be noted that the division of the angle areas shown in fig. 4 is only an example, and the angle ranges of the respective areas may be adjusted according to the user experience, for example, the angle area corresponding to the 0 direction may be adjusted to (45 °,135 °) to (30 °,150 °) according to the user experience. The division of the angle area in the embodiment of the application is not particularly limited.
For convenience of explanation, in the embodiment of the present application, the viewing direction of the user is the 0 direction.
2. Screen direction
In the embodiment of the application, the screen direction refers to the direction of the display screen of the electronic equipment. In order to conform to the viewing habits of the user, the screen direction may be defined as a direction conforming to the viewing habits of the user.
Exemplary, referring to fig. 5, a schematic diagram of a screen direction of an electronic device according to an embodiment of the present application is shown. As shown in fig. 5, taking a mobile phone as an example, the position of the charging port 51 may be defined as a lower side of the mobile phone, and the position of the camera 52 on the display screen may be defined as an upper side of the mobile phone. The direction from below the handset to above the handset generally corresponds to the viewing direction of the user, and the direction from below the handset to above the handset may be defined as the direction of the screen of the handset, as indicated by arrow 53 in figure 5.
In the embodiment of the application, when the electronic equipment does not rotate, the electronic equipment can be regarded as being in a vertical screen (or vertical screen) state, when the electronic equipment rotates 90 degrees anticlockwise or clockwise, the electronic equipment can be regarded as being in a horizontal screen state, and when the electronic equipment rotates 180 degrees anticlockwise or clockwise, the electronic equipment can be regarded as being in a reverse screen state. As shown in (a) of fig. 5, the screen direction is 0, indicating that the electronic device is not rotated. As shown in (c) of fig. 5, the screen direction is 1, which means that the electronic device is rotated 90 ° counterclockwise, i.e., the electronic device is in a landscape state. As shown in (b) of fig. 5, the screen direction is 2, which indicates that the electronic device is rotated 180 °, i.e., the electronic device is in the inverted screen state.
3. Display direction
In the embodiment of the application, the display direction of the screen refers to the direction in which the content displayed on the screen of the electronic equipment faces. In some application scenarios, after the electronic device screen rotates, in order to ensure the viewing experience of the user, the content displayed on the screen correspondingly rotates so as to conform to the viewing direction of the user. Therefore, in the above-described scene, the screen direction does not coincide with the display direction.
Exemplary, referring to fig. 6, a schematic diagram of display directions according to an embodiment of the present application is provided. As shown in fig. 6, the screen direction is 1, and the display direction (the direction pointed by the thick arrow) of the display content on the screen is 0.
4. Window direction
Taking an android system as an example, in the android system, the content displayed to a user by an application program is a user interface, and activities are components of the application program, and each Activity has an application window associated with the application window for displaying the user interface of the application. That is, in the embodiment of the present application, the application window refers to a window associated with Activity and used for displaying a user interface of an application.
In some application scenarios, after the electronic device rotates, the direction of the application window may be different from the display direction.
With the development of terminal technology, the functional demands of users on electronic devices are becoming more diversified. For example, to meet the user's need for use of multiple applications during the same time period, more electronic devices may support a split-screen mode in which a screen of the electronic device may display two or more windows so that the user refers to content displayed in the multiple windows.
In some application scenarios, a user may launch a camera in a split-screen window of a non-camera application. Referring to fig. 7, a schematic diagram of a user operation application scenario provided by an embodiment of the present application is shown. As shown in fig. 7 (a), the user interface 70 is a user interface 70 under a horizontal screen of the electronic device, and the user interface 70 is divided into left and right display areas by a split screen bar 701. Wherein the application window 702 of application a occupies the left display area and the application window 703 of the calculator occupies the right display area.
When the user clicks/touches the icon 7021 of the camera in the application window 702 of the application a, in response to the user operation, the electronic device displays a user interface 71 as shown in (b) in fig. 7. In this user interface 71, the application window 702 of the application a is replaced with the application window 704 of the camera, the application window 704 of the camera is in the 0 direction (see the direction of the text, button displayed in the application window 704 shown in fig. 7 (b)), and the display direction of the image in the camera viewfinder (see the direction pointed by the thick arrow 7041 shown in fig. 7 (b)) is rotated to the 3 direction.
As shown in fig. 7, in the landscape mode and split mode, the electronic device turns on the camera by applying a, and the visual perception given to the user is that the image in the camera viewfinder is "skewed".
The reason for this is that when the electronic device opens the camera through the application a in the landscape screen mode or the split screen mode, or when the screen is rotated after the camera is opened through the application a, the application window of the camera is forced to be rotated back to the 0 direction in order to ensure that the display direction of the information such as the buttons and the characters of the application window of the camera matches the direction of the user's view.
As an example of a case where the electronic device turns on the camera by applying a in the landscape screen or split screen mode, referring to fig. 8, a schematic diagram of a procedure of forcibly rotating a window in the landscape screen or split screen mode according to an embodiment of the present application is shown. In an application scene of the electronic equipment in a horizontal screen state, a camera in the application A is opened under the full screen, the direction of an application window is consistent with the screen direction, and the display direction is rotated so as to be consistent with the viewing direction of a user. As shown in fig. 8 (a), the screen direction and the direction of the application window 801 (see the text displayed in the application window 801 shown in fig. 8 (a), the direction of the button) are both 1 direction, and the display direction (the direction of the thick arrow 8011 shown in fig. 8 (a)) is 0 direction. In order to make the information such as buttons and characters in the application window conform to the viewing direction of the user, the application window 801 of the camera is forcibly rotated to the 0 direction, in which case the display direction changes with the rotation of the application window, and does not conform to the viewing direction of the user any more. As shown in fig. 8 (b), the direction after the application window 801 is rotated 90 ° clockwise is the 0 direction, and at this time, the direction of the application window 801 (see the direction of the text, button displayed in the application window 801 shown in fig. 8 (b)) coincides with the direction of the user's view, and the direction of the display is the 3 direction after the application window is rotated 90 ° clockwise (as indicated by the thick arrow 8011 in fig. 8 (b)). It can be seen that the display direction no longer corresponds to the direction of view of the user.
As an example of a case where the electronic device rotates the screen after opening the camera by application a in the split screen mode, see fig. 9, which is a schematic diagram of a procedure of forcibly rotating the window after rotating the screen in the split screen mode provided by the present application. In an application scene of the electronic equipment in a vertical screen state, a camera is opened through an application A in a split screen mode, and the direction of an application window, the screen direction and the display direction are consistent. As shown in (a) of fig. 9, the screen direction, the direction of the application window 901, and the display direction (the direction pointed by the thick arrow 9011 as shown in (a) of fig. 9) are all 0. After the electronic equipment rotates to the transverse screen (the electronic equipment rotates 90 degrees anticlockwise), the screen direction and the direction of the application window rotate along with the electronic equipment, and the display direction is 0 direction, so that the display content is ensured to accord with the viewing direction of a user. As shown in fig. 9 (b), the screen direction and the direction of the application window 901 (see the text, button direction displayed in the application window 901 shown in fig. 9 (b)) are rotated to the 1 direction, and the display direction (the direction pointed by the thick arrow 9011 shown in fig. 9 (b)) is still the 0 direction. In order to ensure that the direction of the application window conforms to the direction of the user's viewing, the application window is forced to rotate to the 0 direction, in which case the display direction changes with the rotation of the application window, and no longer conforms to the direction of the user's viewing. As shown in (c) of fig. 9, the direction after the application window 901 is rotated 90 ° clockwise is the 0 direction, at this time, the direction of the application window 901 (see the direction of the text, button displayed in the application window 901 shown in (c) of fig. 9) coincides with the direction of the user's view, and the direction of the display is the 3 (the direction indicated by the thick arrow 9011 in (c) of fig. 9) after the display direction is rotated 90 ° clockwise with the application window. It can be seen that the display direction no longer corresponds to the direction of view of the user.
It should be noted that the user interface viewed by the user does not display the process of (a) to (b) in fig. 8 and the process of forcing the application window of the camera to rotate to the 0 direction as shown in (a) to (c) in fig. 9. The above procedure is only used to illustrate the principle leading to the scenario shown in the embodiment of fig. 7. The user interface sees the scene shown in the embodiment of fig. 7, i.e. the image in the camera's viewfinder is "skewed".
As described above, when the electronic device opens the camera through the split-screen application in the landscape screen state, or rotates the screen after opening the camera through the split-screen application, the display direction of the camera preview stream does not conform to the viewing direction of the user, and the user experience is affected.
Based on the above, the embodiment of the application provides a split screen display method. According to the method provided by the embodiment of the application, the electronic equipment can automatically rotate the display direction of the preview flow of the camera under the condition that the camera is opened by the split screen application in the horizontal screen state or the screen is rotated after the camera is opened by the split screen application, so that the display content accords with the viewing direction of a user, and the user experience is improved.
The following describes the internal implementation flow of the split screen display method in the embodiment of the present application.
For ease of understanding, the software architecture of the electronic device will first be described.
The software system of the electronic device may employ a layered architecture, an event driven architecture, a microkernel architecture, a microserver architecture, or a cloud architecture. The software architecture of the electronic device is exemplarily described below.
Referring to fig. 10, a schematic block diagram of a software architecture of an electronic device according to an embodiment of the present application is provided. As shown in fig. 10, the software architecture of the electronic device may include an application layer and a system layer.
The application layer may include a plurality of applications, each application corresponding to an Activity. As shown in fig. 9, the application layer includes a camera application corresponding to an Activity for opening an interface to which the camera should be connected, and displaying a screen in a viewfinder of the camera.
The system layers may include IBinder, camera frame (Camera frame), native code bins (Android Open Source Project, AOSP), self-grinding code bins, and component configuration management modules (component configuration management, CCM).
IBinder is a basic interface for remote objects, and is a core part of a lightweight remote invocation mechanism designed for high performance, and is used for remote invocation (cross-process invocation) as well as in-process invocation. This interface defines the protocol for interacting with remote objects. IBinder is used for interaction between the application layer and the system layer.
AOSP can include an activity client control module (ActivityClientController), an activity Task management service module (ACTIVITYTASKMANAGERSERVICE, ATMS), an activity logging module (ActivityRecord), a Task module (Task), and a system parameters module (SystemProerties).
When the Activity of the camera application opens the interface of the camera application, the active client control module (ActivityClientController) can be notified by the IBinder on the system side, and the active task management service module (ACTIVITYTASKMANAGERSERVICE) can be notified by the active client control unit.
An active task management service module (ATMS) is responsible for the relevant management of activities, including the lifecycle of applications, such as launching applications, switching applications, and managing task stacks. The Activity recording module is used for recording the respective information of the activities. Typically, each Activity launched in the application has a ActivityRecord instance corresponding to it in the AMS module, and this ActivityRecord is created with the launching of the Activity and destroyed with the termination of the Activity. In some operating systems, activity related management may also be responsible for by the Activity management service module (ACTIVITYMANAGERSERVICE, AMS).
The task module is an Activity container. The Activity task management service module is used for managing Activity and containers (tasks, stacks, displays and the like) thereof. The Activity task management service module and the task module are used for providing a problem scene (such as the scene shown in fig. 7 and 8) and an Activity key flow, and controlling the camera frame to rotate the camera preview flow.
The system parameter module is used for providing relevant parameters of display direction rotation to the camera frame. Correspondingly, the camera frame rotates the display direction according to the parameters provided by the system parameter module, generates a preview stream, and provides the preview stream to the camera application of the application layer.
The self-lapping code bin may include a multi-window management module (HnMultiWindowManager), an active task management services extension module (HNACTIVITYTASKMANAGERSERVICE EX), and a multi-window configuration management module (HnMultiWinConfigManager).
The activity task management service expansion module is used for managing the implementation and the use of the self-research activity task related method.
The multi-window management module is used for managing the implementation and the use of the self-grinding multi-window correlation method.
The multi-window configuration management module is used for managing reading and using of the self-grinding multi-window configuration.
The CCM module stores a multi-window configuration file (hn_multi_window_config). The file can be an xml format file, the file can comprise a list, the Activity level split screen application is defined in the list, namely, when an application program in the list calls the camera application in the split screen mode, the display direction of the camera can be automatically rotated through the split screen display method provided by the embodiment of the application. The file may include an application package name and an Activity name for each application in the list.
The methods in the following embodiments may be implemented in an electronic device having a hardware structure as described in fig. 1 and a software architecture as described in fig. 10.
The split screen display method provided by the embodiment of the application is specifically introduced by combining the software architecture of the electronic equipment.
As shown in the embodiments of fig. 8 and fig. 9, in the embodiment of the present application, the call node of the split-screen display method is divided into two cases, in which, in one case, the electronic device opens the camera application (the application scene shown in fig. 8) in a state of non-0 direction (such as a horizontal screen or a reverse screen), in which, in the other case, the electronic device automatically rotates the display direction by using the split-screen display method shown in fig. 11, and in the other case, the electronic device rotates the screen (the application scene shown in fig. 9) after opening the camera application by using the split-screen display method shown in fig. 13, in which, in the other case, the electronic device automatically rotates the display direction by using the split-screen display method shown in fig. 13.
Referring to fig. 11, a timing diagram of a split screen display method according to an embodiment of the present application is shown. As shown in fig. 11, a timing chart is shown when the electronic device turns on the auto-rotate function with the start of the camera application.
S1101, an Activity task management service module (ATMS) monitors that the split screen application opens the camera application, and starts the Activity of the camera.
In some implementations, starting the camera in the split-screen mode through the application a includes starting an Activity of the camera, specifically, an Activity task management service module (ATMS) calls setResumeActivityUnchecklocked a function, through which a state of the Activity of the camera is set to resume, where the state indicates that the current Activity is in a use state.
In the embodiment of the application, the method is equivalent to setting the plug-in point in the process of starting the Activity of the camera, and executing the split screen display method provided by the embodiment of the application when the program runs to the plug-in point. For example, after setting the state of Activity to resume state, the plug-in point is set. Accordingly, after setting the state of Activity to resume state, the steps of S1102-S1107 described below are performed.
After the Activity is started by the Activity task management service module (ATMS), a notification (first notification as shown in fig. 11) may be sent to the Activity task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) to instruct the Activity task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) to perform S1102.
S1102, after the camera Activity is started, the Activity task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) judges whether the display direction of the camera needs to be updated.
After the Activity task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) monitors the first notification, it confirms that the Activity of the camera is started, and then performs the step of judging whether the display direction needs to be updated. In this step, the display direction is the display direction of the image in the camera viewfinder.
In some embodiments, referring to FIG. 12, a flow chart of a method of determining whether an update of the display orientation of a camera is required. As shown in fig. 12, the judgment process of S1102 includes the steps of:
s1201, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) detects a display mode of an application window of the camera.
In one implementation, the activity task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) may obtain the display mode of the application window of the camera through the activity recording module (ActivityRecord).
S1202, if the display mode of the application window of the camera is a split screen mode, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) checks whether the application A currently calling the camera is in the system list.
Wherein the system list may be configured in a system component, such as in a self-grinding code bin.
S1203, if the application a is in the system list, it is determined that the display direction of the camera needs to be updated.
S1203, if the application a is not in the system list, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) notifies the multi-window configuration management module (HnMultiWinConfigManager) to check.
The active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) may send a notification to the multi-window configuration management module (HnMultiWinConfigManager).
S1204, after the multi-window configuration management module (HnMultiWinConfigManager) receives the notification (second notification) of the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX), it checks whether the application A is in the list of the configuration file of the CCM, and returns a judgment result.
Specifically, the multi-window configuration management module (HnMultiWinConfigManager) acquires a configuration file from the CCM, searches the package name of the application A in the list of the configuration file, if the application A exists, determines that the application A is in the list of the configuration file of the CCM, returns true to the active task management service expansion module (HNACTIVITYTASKMANAGERSERVICE EX), and if the application A does not exist, determines that the application A is not in the list of the configuration file of the CCM, and returns false to the active task management service expansion module (HNACTIVITYTASKMANAGERSERVICE EX).
The active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) determines whether the display direction of the camera needs to be updated according to the judgment result returned by the multi-window configuration management module (HnMultiWinConfigManager). For example, if the return result is true, it is determined that the display direction of the camera needs to be updated, and if the return result is false, it is determined that the display direction of the camera does not need to be updated.
In the embodiment of the application, the system list corresponds to a system component, and the list in the CCM corresponds to a product component (also called an application component). The system component is validated for the whole system and the product component is validated for a certain product. By adding the system side list, if the problem of commonality of all products occurs, the problem can be solved uniformly through the system side list, and single configuration of products one by one is not needed.
In other embodiments, in the case where the system list does not exist, S1203 is executed after S1201, that is, it is not necessary to determine whether the Activity is in the system list.
S1103, if the direction of the application window of the camera needs to be updated, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) acquires the current screen direction.
As shown in the embodiments of fig. 8 and 9, when the electronic device turns on the camera through the split-screen application in the landscape screen state, or rotates the screen after the camera is turned on through the split-screen application, the direction of the application window of the camera is forced to be rotated to the 0 direction, so in the embodiment of the present application, the direction of the application window of the default camera is the 0 direction. Of course, in some implementations, to prevent accidental situations, the orientation of the application window of the camera may also be acquired to confirm whether the orientation is the 0 orientation.
In one implementation manner of obtaining the current screen direction, obtaining a Task bearing ActivityRecord of the Activity of the current camera, and finding TASKDISPLAYAREA to which the Task belongs, that is, a display area corresponding to the Task on the screen, so as to obtain the current screen direction.
S1104, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) transmits the acquired screen direction to the multi-window management module (HnMultiWindowManager) and notifies it to update the display direction of the camera.
In some implementations, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) can notify the multi-window management module (HnMultiWindowManager) to update the display direction by invoking updateCameraRotation.
S1105, after receiving the notification of the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX), the multi-window management module (HnMultiWindowManager) executes an adjustment algorithm of the display direction of the camera to obtain an output result.
In some embodiments, the adjustment algorithm for the display orientation of the camera may include the steps of:
if the current screen direction is greater than the direction of the application window of the camera, the output result comprises a package name of the application program calling the camera and a first correction value, wherein the first correction value is a difference value of the screen direction minus the direction of the application window of the camera.
If the current screen direction is equal to the direction of the application window of the camera, the output result includes a second correction value (a first preset value), and the second correction value indicates that the display direction of the camera does not need to be adjusted. For example, the second correction value is-1.
If the current screen direction (first screen direction) is smaller than the direction (first window direction) of the application window (first split screen window) of the camera, the output result comprises an entry of an application program calling the camera and a third correction value, wherein the third correction value is the sum of the difference value of the screen direction and the direction of the application window of the camera and a second preset value. For example, the second preset value is 4.
The first direction correction value calculated if the current screen direction is greater than the direction of the application window of the camera is the first correction value, the first direction correction value calculated if the current screen direction is equal to the direction of the application window of the camera is the second correction value, and the first direction correction value calculated if the current screen direction (first screen direction) is less than the direction of the application window (first split-screen window) of the camera (first window direction) is the third correction value.
By way of example, the meaning of the respective correction values may be set, for example, correction value 1 indicates a 90 degree counterclockwise rotation, correction value 2 indicates a 180 degree counterclockwise rotation, correction value 3 indicates a 270 degree counterclockwise rotation, and correction value-1 indicates no correction is required. The above is merely an example of the meaning of the correction value, and the embodiment of the present application is not particularly limited thereto.
In the application scenario shown in fig. 8 (b), the screen direction is 1, the direction of the application window of the camera is 0, and the screen direction is greater than the direction of the application window of the camera, and then the first direction difference value is 1-0=1, i.e. the obtained first correction value is 1, which indicates that the camera rotates 90 degrees counterclockwise.
In the embodiment of the application, the output result comprises the package name of the application program calling the camera, and in this way, the display direction of the application is adjusted in a targeted manner without affecting other applications.
S1106, the multi-window management module (HnMultiWindowManager) sends the output result to the system parameter module so that the system parameter module sets the system parameter according to the output result.
In one implementation, the multi-window management module (HnMultiWindowManager) may set the system parameters by calling a set sys_hn_ multiwin _for_camera function in the system parameters module.
S1107, the system parameter module sends the set system parameters to the camera frame so that the camera frame rotates the display direction of the image in the camera viewfinder according to the system parameters to generate a rotated preview stream.
Referring to fig. 13, a timing diagram of a split screen display method according to another embodiment of the application is shown. As shown in fig. 13, a timing chart is shown when the electronic device turns on the auto-rotation function along with the rotation of the electronic device after the camera is started.
S1301, the Task module (Task) detects a screen rotation.
In some implementations, the task module may monitor whether the task parameter changes by calling onConfigrationChangeLinner a function, and detect screen rotation by monitoring.
Upon detecting the screen rotation, the task module may send a third notification to the active task management services extension module (HNACTIVITYTASKMANAGERSERVICE EX) to instruct it to perform S1302.
In S1302, when the screen rotation is detected, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) determines whether the display direction of the camera needs to be updated.
In some embodiments, the determination process may include the steps of:
The method comprises the steps of checking whether an application A which calls a camera currently is in a system list by an active task management service expansion module (HNACTIVITYTASKMANAGERSERVICE EX), judging that the display direction of the camera needs to be updated if the application A is in the system list, notifying a multi-window configuration management module (HnMultiWinConfigManager) to check by the active task management service expansion module (HNACTIVITYTASKMANAGERSERVICE EX) if the application A is not in the system list, checking whether the application A is in a list of configuration files of a CCM after receiving a notification of the active task management service expansion module (HNACTIVITYTASKMANAGERSERVICE EX) by the multi-window configuration management module (HnMultiWinConfigManager), and returning a judging result.
The difference from the embodiment of fig. 12 is that, in fig. 13, the split display method is performed in the case that the split mode has been entered, so that the display mode of the current application window is defaulted to the split mode, and no further judgment is required.
S1303, if the display direction of the camera needs to be updated, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) acquires the current screen direction.
S1304, the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX) transmits the acquired screen direction to the multi-window management module (HnMultiWindowManager) and notifies it to update the display direction of the camera.
S1305, after the multi-window management module (HnMultiWindowManager) receives the notification of the active task management service extension module (HNACTIVITYTASKMANAGERSERVICE EX), an adjustment algorithm of the display direction of the camera is executed, and an output result is obtained.
S1306, the multi-window management module (HnMultiWindowManager) sends the output result to the system parameter module so that the system parameter module sets the system parameter according to the output result.
S1307, the system parameter module sends the set system parameters to the camera frame, so that the camera frame rotates the display direction of the image in the camera viewfinder according to the system parameters, and a rotated preview stream is generated.
Steps S1303-S1307 and S1103-S1107 described above can be specifically referred to the description of S1103-S1107 described above, and will not be repeated here.
It should be noted that, in the embodiment of fig. 11, the split screen display method is performed by setting the plug-in point in the process of starting the camera by the application a, whereas in the embodiment of fig. 13, the split screen display method is performed by setting the plug-in point in the process of rotating the screen of the electronic device after starting the camera by the application a.
Fig. 14 is a schematic diagram of an application scenario of a split screen display method according to an embodiment of the present application. Fig. 14 is a schematic diagram of a user operation application scenario provided in an embodiment of the present application. As shown in fig. 14 (a), the user interface 72 (first interface) under the electronic device landscape screen is divided into left and right display areas by a screen division bar 701. Wherein an application window 702 (first split screen window) of the application a (first application) occupies the left display area and an application window 703 of the calculator occupies the right display area.
When the user clicks/touches the icon 7021 (first icon) of the camera in the application window 702 of the application a, in response to the user operation, the electronic device displays the user interface 73 as shown in (b) in fig. 14. In this user interface 73, the application window 702 of the application a is replaced with the application window 704 (second split screen window) of the camera, the application window 704 of the camera is in the 0 direction, and the display direction of the image in the camera viewfinder (see the direction pointed by the thick arrow 7041 shown in fig. 14 (b)) is rotated to the 0 direction.
In the scenario shown in fig. 14, compared to the scenario shown in fig. 7, the electronic device turns on the camera by application a in the landscape, split-screen mode, and the image in the camera viewfinder is "positive" to conform to the viewing direction of the user. According to the method provided by the embodiment of the application, the electronic equipment can automatically rotate the display direction of the preview flow of the camera under the condition that the camera is opened by the split screen application in the horizontal screen state or the screen is rotated after the camera is opened by the split screen application, so that the display content accords with the viewing direction of a user, and the user experience is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
The embodiments of the present application also provide a computer readable storage medium storing a computer program, which when executed by a processor, implements the steps of the above-described method embodiments.
Embodiments of the present application also provide a computer program product enabling a first device to carry out the steps of the method embodiments described above, when the computer program product is run on the first device.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above-described embodiments, and may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium can include at least any entity or means capable of carrying computer program code to a first device, a recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The embodiment of the application also provides a chip system, which comprises a processor, wherein the processor is coupled with the memory, and the processor executes a computer program stored in the memory to realize the steps of any method embodiment of the application. The chip system can be a single chip or a chip module composed of a plurality of chips.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. It should be noted that the above description is only a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A split screen display method, characterized by being applied to an electronic device, the electronic device including a display screen, the method comprising:
The display screen horizontally displays a first interface, wherein the first interface comprises a first split-screen window of a first application, and the first split-screen window comprises a first icon of a camera;
The electronic equipment receives a first operation of a user on the first icon, wherein the first operation is used for starting a camera;
Responding to the first operation, the electronic equipment adjusts a second direction according to a first direction of a second split screen window of the current camera relative to a display screen, and obtains the adjusted second direction, wherein the second direction is the direction of an image in a camera view finding frame relative to the display screen;
and the electronic equipment displays a second interface according to the adjusted second direction, wherein the second interface comprises the second split screen window, and the second split screen window comprises an image in a camera view-finding frame.
2. The method of claim 1, wherein the electronic device adjusts a second direction according to a first direction of a second split-screen window of a current camera relative to a display screen, resulting in the adjusted second direction, comprising:
the electronic equipment judges whether the second direction needs to be adjusted or not;
And if the second direction needs to be adjusted, the electronic equipment adjusts the second direction according to the first direction of the second split screen window of the current camera relative to the display screen, and the adjusted second direction is obtained.
3. The method of claim 2, wherein the electronic device determining whether adjustment of the second direction is required comprises:
The electronic equipment detects a display mode of an application window of a current camera;
and if the display mode of the application window of the current camera is a split screen mode, the electronic equipment judges that the second direction needs to be adjusted.
4. The method of claim 3, wherein after the electronic device detects a display mode of an application window of a current camera, the method further comprises:
if the display mode of the application window of the current camera is a split screen mode, the electronic device judges whether the first application is in a first preset list or not, wherein the first preset list is configured in a system component;
And if the first application is in the first preset list, the electronic equipment judges that the second direction needs to be adjusted.
5. The method of claim 4, wherein after the electronic device determines whether the first application is within a first preset list, the method further comprises:
If the application is not in the first preset list, the electronic equipment judges whether the first application is in a second preset list or not, wherein the second preset list is configured in an application component;
And if the first application is in a second preset list, the electronic equipment judges that the second direction needs to be adjusted.
6. The method of any one of claims 1 to 5, wherein the electronic device adjusts a second direction according to a first direction of a second split window of a current camera relative to a display screen, the adjusted second direction comprising:
the electronic equipment calculates a first direction correction value according to a first direction of a second split screen window of the current camera relative to the display screen;
And the electronic equipment adjusts the second direction according to the direction correction value to obtain the adjusted second direction.
7. The method of claim 6, wherein the electronic device calculating a first orientation correction value based on a first orientation of a second split window of a current camera relative to a display screen, comprising:
If the first screen direction is greater than the first window direction, the first direction correction value is a difference value between the first screen direction and the first window direction, wherein the first screen direction is the direction of the current display screen, and the first window direction is the direction of the current second split-screen window;
If the first screen direction is equal to the first window direction, the first direction correction value is a first preset value, and the first preset value indicates that the display direction of the camera does not need to be adjusted;
If the first screen direction is smaller than the first window direction, the first direction correction value is the sum of the difference value between the first screen direction and the first window direction and a second preset value.
8. A split screen display method, characterized by being applied to an electronic device, the electronic device including a display screen, the method comprising:
The display screen vertically displays a third interface, wherein the third interface comprises a third split-screen window of a second application, and the third split-screen window comprises a second icon of the camera;
The electronic equipment receives a second operation of the second icon by a user, wherein the second operation is used for starting a camera;
In response to the second operation, the electronic device displays a fourth interface, the fourth interface including a fourth split-screen window of the camera, the fourth split-screen window including an image in a viewfinder of the camera;
the electronic equipment receives a third operation, wherein the third operation is used for rotating the display screen;
And responding to the third operation, and adjusting a fourth direction of the electronic equipment according to the current third direction of the fourth split-screen window relative to the display screen, wherein the fourth direction is the direction of an image in a camera view-finding frame included in the fourth split-screen window relative to the display screen.
9. The method of claim 8, wherein the electronic device adjusts a fourth direction according to a third direction of the fourth split-screen window relative to a display screen, comprising:
the electronic equipment judges whether the fourth direction needs to be adjusted or not;
And if the fourth direction needs to be adjusted, the electronic equipment adjusts the fourth direction according to the current third direction of the fourth split-screen window relative to the display screen.
10. The method of claim 9, wherein the electronic device adjusts a fourth direction according to a third direction of the fourth split-screen window relative to the display screen, comprising:
The electronic equipment judges whether the second application is in a first preset list or not, wherein the first preset list is configured in a system component;
And if the second application is in the first preset list, the electronic equipment judges that the fourth direction needs to be adjusted.
11. The method of claim 10, wherein after the electronic device determines whether the second application is within a first preset list, the method further comprises:
If the second application is not in the first preset list, the electronic equipment judges whether the second application is in a second preset list or not, wherein the second preset list is configured in an application component;
and if the second application is in a second preset list, the electronic equipment judges that the fourth direction needs to be adjusted.
12. The method of any one of claims 8 to 11, wherein the electronic device adjusts a fourth direction according to a third direction of the fourth split-screen window relative to a display screen, comprising:
the electronic equipment calculates a second direction correction value according to a third direction of a fourth split-screen window of the current camera relative to the display screen;
and the electronic equipment adjusts the fourth direction according to the second direction correction value.
13. The method of claim 12, wherein the electronic device calculating the second orientation correction value based on the third orientation of the fourth split-screen window of the current camera relative to the display screen comprises:
if the second screen direction is greater than the second window direction, the second direction correction value is a difference value between the second screen direction and the second window direction, wherein the second screen direction is the direction of the current display screen, and the second window direction is the direction of the current fourth split-screen window;
if the second screen direction is equal to the second window direction, the second direction correction value is a first preset value, and the first preset value indicates that the display direction of the camera does not need to be adjusted;
and if the second screen direction is smaller than the second window direction, the second direction correction value is the sum of the difference value between the second screen direction and the second window direction and a second preset value.
14. An electronic device comprising a processor for running a computer program stored in a memory to cause the electronic device to implement the method of any one of claims 1to 7, or any one of claims 8 to 13.
15. A computer readable storage medium, characterized in that it stores a computer program which, when executed by one or more processors, implements the method according to any one of claims 1 to 7, or any one of claims 8 to 13.
CN202311168916.3A 2023-09-09 2023-09-09 Split-screen display method, electronic device, and computer-readable storage medium Pending CN119645539A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311168916.3A CN119645539A (en) 2023-09-09 2023-09-09 Split-screen display method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311168916.3A CN119645539A (en) 2023-09-09 2023-09-09 Split-screen display method, electronic device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN119645539A true CN119645539A (en) 2025-03-18

Family

ID=94936936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311168916.3A Pending CN119645539A (en) 2023-09-09 2023-09-09 Split-screen display method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN119645539A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130162684A1 (en) * 2011-10-14 2013-06-27 Barnesandnoble.Com Llc System and method for locking the orientation of a display on a mobile
CN107357540A (en) * 2017-06-30 2017-11-17 维沃移动通信有限公司 The method of adjustment and mobile terminal of a kind of display direction
CN113473003A (en) * 2021-06-01 2021-10-01 荣耀终端有限公司 Image display method and apparatus
CN115686318A (en) * 2021-07-21 2023-02-03 华为技术有限公司 Camera preview image orientation adjustment method, readable medium and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130162684A1 (en) * 2011-10-14 2013-06-27 Barnesandnoble.Com Llc System and method for locking the orientation of a display on a mobile
CN107357540A (en) * 2017-06-30 2017-11-17 维沃移动通信有限公司 The method of adjustment and mobile terminal of a kind of display direction
CN113473003A (en) * 2021-06-01 2021-10-01 荣耀终端有限公司 Image display method and apparatus
CN115686318A (en) * 2021-07-21 2023-02-03 华为技术有限公司 Camera preview image orientation adjustment method, readable medium and electronic device

Similar Documents

Publication Publication Date Title
US20250272044A1 (en) Foldable screen display method and electronic device
EP3848786B1 (en) Display control method for system navigation bar, graphical user interface, and electronic device
EP3958117B1 (en) User interface layout method and electronic device
AU2019420297B2 (en) Display method and related apparatus
CN114397982B (en) Application display method and electronic device
US12401980B2 (en) Method for displaying Bluetooth device identifier and electronic device
EP3787298A1 (en) Flexible screen display method and terminal
CN116048436B (en) Application interface display method, electronic device and storage medium
EP4206910B1 (en) Split-screen method and apparatus, and electronic device
EP4224287B1 (en) Vr display control method, electronic device, and computer readable storage medium
CN110780929B (en) Method for calling hardware interface and electronic equipment
CN110647731A (en) Display method and electronic equipment
CN111159604A (en) Picture resource loading method and device
EP4478169A1 (en) Control method and central control equipment
US20250373579A1 (en) Message processing method, electronic device, and readable storage medium
EP4350471A1 (en) Button control method for electronic device, and electronic device
EP4180949A1 (en) Method and apparatus for generating graffiti patterns, electronic device, and storage medium
CN117389496B (en) Folding screen display method, electronic equipment and computer readable storage medium
CN119645539A (en) Split-screen display method, electronic device, and computer-readable storage medium
CN119645265A (en) Split-screen display method, electronic device, and computer-readable storage medium
CN116382896B (en) Calling method of image processing algorithm, terminal equipment, medium and product
CN114513479B (en) Message transmitting and receiving method, device, terminal, server and storage medium
CN115250261B (en) Information display method and electronic equipment
CN111414563B (en) Webpage interaction method, device, computer equipment and storage medium
CN120319199A (en) A display device and related method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination