CN116028265B - Snapshot acquisition method, electronic equipment and readable storage medium - Google Patents
Snapshot acquisition method, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN116028265B CN116028265B CN202210961235.1A CN202210961235A CN116028265B CN 116028265 B CN116028265 B CN 116028265B CN 202210961235 A CN202210961235 A CN 202210961235A CN 116028265 B CN116028265 B CN 116028265B
- Authority
- CN
- China
- Prior art keywords
- application
- split
- screen
- window
- task
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 83
- 238000007667 floating Methods 0.000 claims abstract description 105
- 230000008569 process Effects 0.000 claims abstract description 37
- 238000011084 recovery Methods 0.000 claims abstract description 4
- 239000007858 starting material Substances 0.000 claims description 48
- 230000000694 effects Effects 0.000 claims description 32
- 238000004590 computer program Methods 0.000 claims description 17
- 238000012544 monitoring process Methods 0.000 claims description 5
- 239000003999 initiator Substances 0.000 description 22
- 238000010586 diagram Methods 0.000 description 21
- 238000004891 communication Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 14
- 238000007726 management method Methods 0.000 description 14
- 230000004044 response Effects 0.000 description 13
- 238000012545 processing Methods 0.000 description 11
- 230000005236 sound signal Effects 0.000 description 9
- 238000010295 mobile communication Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a snapshot acquisition method, electronic equipment and a readable storage medium, and relates to the technical field of terminal display; when the window of an application is switched to a floating window, determining that the window of the application is switched to the bottom application below the floating window through a task list, and thus quickly determining the bottom application; under the condition that the bottom application is a split-screen application, the electronic equipment can acquire the snapshot of each application in the split-screen application and splice the snapshot of the split-screen application. When the window of the application is switched to the floating window, the electronic equipment needs to restore the window of the application by the bottom part screen, so that the snapshot of the application by the split screen can be used as the bottom background in the process of restoring the window of the application by the split screen; from the perspective of a user, the recovery process of the bottom part screen to the window of the application cannot be observed, and the process of the electronic equipment for recovering the bottom part screen to the window of the application can be considered to be quicker, so that the user experience is improved.
Description
Technical Field
The present application relates to the field of terminal display technologies, and in particular, to a snapshot obtaining method, an electronic device, and a readable storage medium.
Background
In order to improve user experience, the snapshot of the application can be used as an action to play a multi-transition role; to meet the user requirement, the electronic device may generally provide a split-screen function, for example, the electronic device may display windows of two applications simultaneously, where the area occupied by the windows of the two applications displayed by the split-screen corresponds to the area occupied by the window of one application displayed by the full screen, and the two applications displayed by the split-screen are combined into a split-screen pair application.
In some scenarios, for example, when a window of an application is switched to a floating window, the system will restore the application before the application (denoted as the bottom application) below the floating window, and the snapshot of the bottom application may act as a transitional effect. However, it is difficult for the system to quickly determine the bottom application; and in the case that the bottom application is a split-screen pair application, an integral snapshot of the split-screen pair application (two applications in split-screen mode) cannot be provided in the android native flow.
Disclosure of Invention
The application provides a snapshot acquisition method, electronic equipment and a readable storage medium, which can rapidly determine a bottom application and acquire an integral snapshot of a split screen pair application under the condition that the bottom application is the split screen pair application.
In order to achieve the above purpose, the application adopts the following technical scheme:
in a first aspect, the present application provides a snapshot obtaining method, including:
responding to a first operation, wherein the electronic equipment acquires a task list, and the first operation is used for triggering a window of a first application to be switched into a floating window;
the electronic equipment determines the bottom application of the first application according to the task list, wherein the bottom application is an application positioned below a floating window when a window of the first application is switched to the floating window;
if the bottom application is a split-screen application, the electronic device acquires a snapshot of each application in the split-screen application;
the electronic device splices the snapshot of each application in the split-screen pair application into the snapshot of the split-screen pair application, wherein the snapshot of the split-screen pair application is used as a bottom background in the process of recovering a window of the bottom application.
In the application, when the window of an application is switched to the floating window, the task list is used for determining that the window of the application is switched to the bottom application below the floating window, and the determination speed of the bottom application is improved; under the condition that the bottom application is a split-screen application, the electronic equipment can acquire the snapshot of each application in the split-screen application and splice the snapshot of the split-screen application. When the window of the application is switched to the floating window, the electronic equipment needs to restore the window of the application by the bottom part screen, so that the snapshot of the application by the split screen can be used as the bottom background in the process of restoring the window of the application by the split screen; from the perspective of a user, the recovery process of the bottom part screen to the window of the application cannot be observed, and the process of the electronic equipment for recovering the bottom part screen to the window of the application can be considered to be quicker, so that the user experience is improved.
As an implementation manner of the first aspect, the determining, by the electronic device, a bottom application of the first application according to the task list includes:
the electronic device determines the bottom application of the first application according to the application corresponding to the task in the task list and the window attribute.
In the application, the task contained in the task list can correspond to different applications and carry window attributes of the corresponding applications, and the bottom application of the first application can be determined based on the task list.
As another implementation manner of the first aspect, before the first operation, a display screen of the electronic device displays a split-screen window of the first application and a split-screen window of the split-screen initiator.
The method and the device can be applied to the scene that the window of the first application is a split-screen window before being switched into a floating window, and the split-screen window of the split-screen starter form a full-screen window, and the split-screen starter is not usually used as a bottom application after the window of the first application is switched into the floating window, so that the bottom application of the first application needs to be determined.
As another implementation manner of the first aspect, the determining, by the electronic device, the bottom application of the first application according to the application corresponding to the task in the task list and the window attribute includes:
The electronic equipment sequentially judges whether the application corresponding to each task is a target application or not from large to small based on indexes of each task in a task list, wherein the target application comprises a first application, a split screen starter and an application with window attributes in a floating window mode;
the electronic equipment takes an application corresponding to a task which is not a target application and is searched for the first time as a bottom application.
In the application, the larger the index of the task in the task list is, the closer the window of the application corresponding to the task is to the top of the screen (when the screen of the electronic equipment is parallel to the horizontal plane, the top is in the direction vertical to the horizontal plane), so that whether the application corresponding to the task is a bottom application can be judged from the index of the task to be small in sequence.
As another implementation manner of the first aspect, the determining, by the electronic device, the bottom application of the first application according to the application corresponding to the task in the task list and the window attribute includes:
the electronic equipment judges whether the application corresponding to each task in the task list is a target application or not, wherein the target application comprises a first application, a split screen starter and an application with a window attribute of a floating window mode;
the electronic equipment takes an application corresponding to the task with the largest index in the tasks which are not target applications as a bottom application.
In the application, whether the application corresponding to each task is likely to be the bottom application or not can be judged, and then the application with the highest index in the applications which are likely to be the bottom application is taken as the bottom application.
As another implementation manner of the first aspect, the method further includes:
and responding to the first operation, the electronic equipment closes the split-screen window of the split-screen starter, restores the window of the bottom application, and switches the split-screen window of the first application into a floating window.
As another implementation manner of the first aspect, the method further includes:
in the process that the electronic equipment switches the split screen window of the first application into the floating window, the electronic equipment moves the snapshot of the first application to a first position, wherein the first position is the position where the floating window of the first application is to be displayed;
the electronic device removes a snapshot of the first application from the first location after monitoring that the floating window drawing of the first application is complete.
As another implementation manner of the first aspect, the method further includes:
in the process that the electronic equipment closes a split screen window of a split screen starter and restores a window of a bottom application, the electronic equipment takes a snapshot of the bottom application as a bottom background of the snapshot of a first application and a bottom background of a floating window of the first application;
The electronic device removes the snapshot of the bottom application after displaying the snapshot of the bottom application for a first time period or after monitoring that the window restoration of the bottom application is complete.
In the application, the snapshot of the bottom application is taken as the bottom background before the window of the bottom application is restored, and from the perspective of a user, the window of the bottom application is considered to be restored when the snapshot of the bottom application is displayed, and the processing speed of the electronic equipment is considered to be higher, so that the experience is better.
As another implementation manner of the first aspect, the electronic device includes a dynamic effect class, an ATMS, a WMS, and a tasksnappshotcontroller, and the obtaining, by the electronic device, the task list includes:
the electronic equipment acquires a task list from the ATMS through the dynamic effect class;
correspondingly, the electronic device obtaining the snapshot of each application in the split screen pair applications comprises:
the electronic equipment sends a snapshot acquisition request of each application in the split screen to the WMS through the dynamic effect class;
the electronic equipment sends a snapshot acquisition request of a split screen to each application in the applications to a tasksnapphashtcontroller through a WMS;
the electronic equipment sends a snapshot of each application in the split screen pair applications to the WMS through a TaskSnapshot controller;
the electronic equipment sends a snapshot of each application in the applications to the dynamic effect class through the WMS;
Correspondingly, the electronic device splicing the snapshot of each application in the split-screen pair application into the snapshot of the split-screen pair application comprises:
the electronic equipment sends a splicing request to the Graphic through the dynamic effect class, wherein the splicing request carries snapshot and splicing parameters of each application in the split screen pair application;
the electronic equipment splices the snapshot of each application in the split-screen application based on splicing parameters through Graphic to obtain the snapshot of the split-screen application;
the electronic equipment sends the snapshot of the split screen to the application to the dynamic effect class through Graphic.
As another implementation manner of the first aspect, the splicing parameters include: the current screen resolution, the split direction and the split proportion of the split pair application of the electronic equipment.
According to the method and the device, the snapshot of the split screen to the application can be obtained through each module in the electronic equipment.
In a second 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 aspects of the application.
In a third 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 of the first aspects of the application.
In a fourth 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 of the first aspects of the application.
In a fifth aspect, the application provides a computer program product for causing a device to perform the method of any of the first aspects of the application when the computer program product is run on the device.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
Fig. 1 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an interface for split-screen display of an application and a split-screen starter according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an interface for split-screen display of another application and a split-screen initiator according to an embodiment of the present application;
fig. 4 is an interface schematic diagram in a process of switching an application into a floating window according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an interface in a process of switching to a floating window according to another embodiment of the present application;
FIG. 6 is a schematic diagram of an interface during a process of switching to a floating window according to another embodiment of the present application;
FIG. 7 is a schematic diagram of a task list and an interface according to an embodiment of the present application;
fig. 8 is an interface schematic diagram corresponding to a scene of switching a floating window according to an embodiment of the present application;
fig. 9 is an interface schematic diagram corresponding to a scene of another embodiment of the present application for switching a floating window;
fig. 10 is an interface schematic diagram corresponding to a scene of another embodiment of the present application for switching a floating window;
FIG. 11 is a schematic flow chart of determining a bottom application through a task list according to an embodiment of the present application;
fig. 12 is a flowchart of a process for obtaining a snapshot of a bottom application 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 relationship of the association object, indicating that three relationships may exist; for example, a and/or B may represent: a alone, a and B together, and B alone, 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 snapshot obtaining method provided by the embodiment of the application can be applied to electronic equipment such as tablet computers, folding screen electronic equipment, mobile phones, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and the like. The embodiment of the application does not limit the specific type of the electronic equipment.
Fig. 1 shows a schematic structural diagram of an electronic device. 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 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. Among other things, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, and the like.
It should be understood that the illustrated structure of 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.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
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 may be called directly from 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 the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device.
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, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes 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 application programs (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system.
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 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.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
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. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
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 mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques.
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 audio module 170 is used to convert digital audio signals to analog audio signal outputs and also to convert analog audio inputs to digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to listening to voice information. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
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.
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 motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback.
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. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
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 SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1.
The embodiment of the present application is not particularly limited to a specific structure of an execution body of a snapshot obtaining method, as long as the execution body can execute a code recorded with the snapshot obtaining method of the embodiment of the present application to process the execution body with the snapshot obtaining method provided according to the embodiment of the present application. For example, the execution body of a snapshot obtaining method provided by the embodiment of the application may be a functional module in an electronic device capable of calling a program and executing the program, or a processing device, such as a chip, applied to the electronic device.
Currently, to meet user needs, electronic devices often provide a split screen function. As an example, windows of two applications may be displayed simultaneously in a display screen of an electronic device.
In some electronic devices, in order to better provide a split-screen function, a split-screen starter is also provided, and the split-screen starter can be generally applied to folding-screen electronic devices and tablet computers, and of course, in practical application, the split-screen starter can also be applied to tablet phones.
Referring to fig. 2, a schematic view of a window of a split-screen initiator and a window of an application (for example, an instant messaging application) of the split-screen initiator are provided in an embodiment of the present application.
The split-screen window of the instant messaging application occupies the left half part of the display screen of the electronic device, and the window of the split-screen starter occupies the right half part of the display screen of the electronic device.
Referring to fig. 3, a schematic view of a window of another split-screen initiator and a window of an instant messaging application according to an embodiment of the present application is provided, where a floating window of another application (e.g., a calculator) may be displayed above a split-screen window of the instant messaging application, and a floating window of another application (e.g., file management) may also be displayed above a split-screen initiated window. Of course, in practical application, only a split-screen window of the instant messaging application or only a window of the split-screen starter can display the floating window, and the embodiment of the application does not limit a specific scene.
In either the scenario shown in fig. 2 or fig. 3, the split window of the instant messaging application in the split mode may also enter the floating window mode. The application that the split screen window of the split screen starter and the split screen window in the scene form a full screen window and the split screen window of the split screen starter is switched into a floating window can be recorded as a first application, the instant messaging application is taken as an example of the first application, and in the practical application, the first application can also be other applications.
As an example, a user may trigger the electronic device to perform the following actions through a preset operation (e.g., by clicking a bar control over a split window of an instant messaging application, triggering the display of three widgets, clicking one of the widgets for switching a floating window): the split screen starter exits, and the window of the instant messaging application is switched from a split screen mode to a floating window mode. After the window of the instant communication application is switched from the split screen mode to the floating window mode, the window of the bottom application is displayed below the floating window of the instant communication application. The window of the bottom application can be a system desktop of the electronic device, can be a full-screen window of one application, and can be split-screen windows of two applications. For a specific form of the bottom application reference is made to the description of the subsequent embodiments. In the embodiment of the present application, the operation of switching the window for triggering the instant messaging application from the split screen mode to the floating window mode is referred to as a first operation, and the above operation is only one example of the first operation.
In the above process, the internal flow of the electronic device includes:
s101, the electronic equipment creates a layer with higher hierarchy, loads a layout file corresponding to the layer, and executes animation at the view level by utilizing the snapshot of the instant messaging application, the snapshot of the split-screen starter and the black background.
The electronic device first changes from the interface schematic diagram shown in fig. 2 to the interface schematic diagram shown in fig. 4 (a); firstly, a fuzzy graph of the snapshot of the instant messaging application and a fuzzy graph of the snapshot of the split-screen starter are displayed in a split-screen mode. Since (a) in fig. 4 is directly switched from fig. 2, the electronic device may screen the content displayed in the state in fig. 2 to obtain snapshots of windows of two applications, and then splice, blur, etc. the snapshots of the windows of the two applications to obtain the interface schematic diagram shown in (a) in fig. 4. After the interface schematic diagram shown in fig. 4 (a) is displayed at the bottom of the display screen of the electronic device, the black background shown in fig. 4 (b) is displayed at the bottom of the display screen of the electronic device. The black background may cover the bottom variation process.
S102, the electronic equipment moves the fuzzy graph of the snapshot of the instant messaging application to a pre-calculated position. This position is used to subsequently display a floating window for instant messaging applications. May be noted as a first position.
Referring to (b) of fig. 4, the blurred view of the snapshot of the instant messaging application is moved to a pre-calculated location (e.g., centered on the right side of the display screen).
In practical applications, the moment when the bottom of the display screen of the electronic device changes to a black background and the moment when the blurred snapshot of the instant messaging application is moved to a pre-calculated position may be the same or may be different (e.g., the bottom changes to a black background first and then even if the snapshot of the messaging application is moved to a calculated position again). Of course, to obtain a better effect, the same may be set, for example, the time when the bottom changes to black background and the time when the blurred snapshot of the instant messaging application starts to move are the same. The application is not limited in this regard.
S103, the electronic device controls the black background to gradually change to transparent after a period of time (e.g., 400 ms) from the start of the animation until the window of the bottom application is exposed.
Wherein the setting of the period of time is used to ensure that the window of the bottom application has been drawn.
Referring to fig. 4 (b) to 4 (c), the display screen of the electronic device is gradually changed from the black background in fig. 4 (b) to the transparent window in fig. 4 (c) to expose the bottom application.
And S104, the electronic equipment removes the layer with higher created hierarchy after monitoring that the floating window drawing of the instant messaging application is completed.
Referring to fig. 4 (c) to 4 (d), after the floating window of the instant messaging application is drawn, the floating window is displayed at the position where the blurred image of the snapshot of the instant messaging application in fig. 4 (b) is located. Meanwhile, as the real floating window of the instant messaging application is drawn, the fuzzy graph of the snapshot of the instant messaging application above is moved out. Here, the dynamic effects shown in (a) in fig. 4 to (c) in fig. 4 are each realized by the layer in step S101, so that the upper layer is actually removed.
In step S102, the position of the snapshot blur map of the instant messaging application is the same as the position of the floating window of the subsequent instant messaging application, so the user does not perceive the removal process, but only perceives that the window of the instant messaging application becomes clear.
Of course, in the above example, the blurred image of the snapshot is used as the bottom background, or as the floating window transition of the instant messaging application, in practical application, the snapshot may be directly used as the background or as the transition instead of the blurring process.
As described above, in setting the dynamic effect at the time of switching, it is necessary to set the bottom content display in (a) in fig. 4 and (b) in fig. 4 for a period of time to ensure that the drawing of the window of the bottom application is completed. On some electronic devices with better performance, the electronic device is enough to finish the exiting of the split-screen starter, the recovery of the bottom application and the like. However, on some electronic devices with poor performance, this period of time may be insufficient to complete the exit of the split screen initiator, the restoration of the bottom application, etc., resulting in a displayed bottom process and poor user experience. Of course, in practical application, the time period may be set longer, however, the experience of the user is still poor in the case of longer setting time.
Referring to fig. 5, a schematic view of the bottom effect of the bottom treatment process not being completed within a set time is shown.
Fig. 5 (a) and fig. 4 (a) have the same content, and fig. 5 (b) and fig. 4 (b) have the same content.
After changing to the black background shown in (b) of fig. 4 or (b) of fig. 5 and a period of time, the black background becomes transparent gradually.
When the entire processing of the bottom contents is completed, the interface diagram shown in fig. 4 (c) should be displayed or the interface diagram shown in fig. 5 (e) should be displayed after the black background becomes transparent. Until the interface schematic shown in fig. 4 (d) or fig. 5 (f) is displayed.
If the bottom content is not completely processed, the black background becomes transparent, and then the bottom content shown in fig. 5 (c) is displayed: because the split-screen starter is not completely withdrawn at this time, the bottom content can display the split-screen starter which is not completely withdrawn, but is switched to the left side of the display screen in the withdrawal process of the split-screen starter; because the right side of the display screen has no window content, the right side of the display screen is displayed in black; the black displayed on the right side of the display screen at this time is different from the black in (b) of fig. 5. Over time, the split-screen initiator exits, at which point the bottom application has not resumed, so the left side of the bottom is also displayed black, referring to (d) of fig. 5, at which point the black displayed by the display screen as a whole is also different from the black in (b) of fig. 5. As time continues, the bottom application resumes to completion, the bottom application will be displayed over the black content, i.e., the bottom of the display screen of the electronic device displays the window of the bottom application shown in fig. 5 (e), until the interface schematic shown in fig. 5 (f) is displayed.
As can be understood from the changing process of the interface schematic diagrams from fig. 5 (a) to fig. 5 (f), the bottom content is always changed and the user experience is poor in the process of switching the split screen window of the instant messaging application into the floating window.
Of course, the above examples are all examples using the instant messaging application as an application, and in practical applications, the examples may be examples of switching the split screen window of any application into the floating window in the process of splitting the screen of the split screen starter and splitting the screen of any application.
In order to improve user experience, instead of adopting an animation that the bottom background is black and changes to transparent after 400ms of display, the embodiment of the application adopts a blurred image of a snapshot of the bottom application to be displayed below the floating window as the bottom background. Since the bottom content is always the snapshot (or the blurred image) of the bottom application to be displayed in the process of exiting the split screen starter and recovering the bottom application, even if the bottom snapshot is displayed for a long time, the bottom application is considered to be recovered to be completed, so that the user experience is better.
Referring to fig. 6, a snapshot of the bottom application is taken as an interface change effect diagram of the bottom application.
Fig. 6 (a) and fig. 5 (a) are the same, and fig. 6 (b) uses the snapshot of the bottom application as the bottom background, and the time for which the bottom background is displayed can be set long enough for the electronic device to complete the restoration of the bottom content. After the lapse of the sufficient time, the process is changed from (b) in fig. 6 to (c) in fig. 6 until the process is changed to (d) in fig. 6.
Although the time for the bottom background display is set longer, since the bottom background is a snapshot of the bottom application, the user does not perceive a change in the bottom content in the process of switching the bottom background to the window of the bottom application, since the snapshot of the bottom application and the window content of the bottom application are the same or similar. From the user's perspective, it is considered that from (b) in fig. 6, the bottom application has been restored, so the user considers the processing speed of the electronic device to be faster and the experience to be better.
In the above example, the snapshot of the bottom application in the interface shown in fig. 6 (c) has been switched to the window of the bottom application, the blurred image of the snapshot of the instant messaging application has not been switched to the floating window of the instant messaging application, which indicates that the window of the bottom application has been restored to be completed within the set time (which may be noted as the first time length), however, the floating window of the instant messaging application has not been drawn yet.
In another scenario, the bottom background in the interface shown in fig. 6 (c) may be a snapshot of the bottom application, with a floating window of the instant messaging application shown above. The floating window of the instant messaging application may be drawn within the set time, the snapshot of the instant messaging application is removed in advance, and after the set time is reached, the snapshot of the bottom application is changed to be transparent (or removed), so as to expose the window of the bottom application.
Of course, in practical applications, it may also be configured to remove (or make transparent) the snapshot of the bottom application after the window drawing of the bottom application is monitored.
In view of the above understanding, the floating window of the instant messaging application may be drawn earlier than the window of the bottom application, which may also be drawn earlier than the floating window of the instant messaging application. Therefore, in practical applications, the snapshot of the bottom application may be used as the bottom background of the snapshot of the instant messaging application, and may also be used as the bottom background of the floating window of the instant messaging application.
The embodiment of the application does not limit the scene in specific application.
In the embodiment of the application, the application to be switched into the floating window can be recorded as the current application, and the application corresponding to the full-screen window (which can be the full-screen window of one application or the full-screen window formed by the split-screen windows of two applications) below the floating window of the current application is recorded as the bottom application. Based on this understanding, the bottom application cannot be a floating window (not a full screen window of a single application, nor a full screen window with windows of other applications) and a split screen initiator (and a split screen window of a current application). In practical application, if the full-screen window displayed by the electronic device before displaying the current application is the system desktop, the bottom application is the system desktop.
In the above example, a floating window may also exist above the split window of the instant messaging application and the window of the split starter, and in general, when the split window of the instant messaging application is switched to the floating window, other floating windows may still remain above if the other floating windows do not collide with the floating window of the instant messaging application.
In view of the above analysis, it will be appreciated that the bottom application may also be understood as a full-screen application or two split-screen applications with the latest display time, with a non-floating window, a non-split-screen initiator, and a display screen displaying the application prior to the current application. Of course, in other words, the system desktop may also be understood as a full screen application.
If the bottom application is the system desktop, the system desktop screenshot is directly replaced by the black background in the dynamic effect. If the bottom application is a full-screen application (non-system desktop), the snapshot corresponding to the full-screen application can be obtained by utilizing the original flow of the android system, and the snapshot (or the fuzzy diagram) of the full-screen application is used for replacing the black background in the dynamic effect; if the bottom application is a split-screen application, however, the android native system does not provide a process of obtaining a snapshot of the split-screen application.
In an android system, generally, all tasks are managed in a list manner, and different tasks can correspond to different applications. And the order in which the electronic device displays the tasks is related to the order in which the indexes of the tasks in the list are sized. In general, the larger the index of a task, the higher the window the electronic device displays the task.
The embodiment of the application can determine the bottom application of the current application through the task list, and simultaneously determine whether the bottom application is an application or a split screen pair application consisting of two applications based on the window attribute carried by the task.
As described above, in the android system, all the tasks are managed in a list manner, and in the task list, each task has an index and a window attribute, and the sequence of the task display is related to the size of the index of the task in the list. For example, the greater the index value of a task in the list, the later the order in which the task is displayed on the electronic device. The window attribute in the Task may determine whether the window of the application corresponding to the Task is a full screen window, a split screen window, or a floating window.
Referring to fig. 7 (a), if three tasks exist in the current task list, the indexes are sequentially from large to small, the tasks corresponding to the calculator are sequentially selected, and the window attribute is a full-screen window; the task corresponding to the instant messaging application is provided with a full-screen window as a window attribute; the task corresponding to the system desktop, and the window attribute is a full-screen window. The index of the task corresponding to the calculator is the largest, and the window attribute of the task corresponding to the calculator is a full-screen window, so that the display screen of the electronic device currently displays the full-screen window of the calculator.
Referring to (b) of fig. 7, if the user triggers the full screen window of the currently displayed calculator to switch to the floating window by operation, the task list has the largest index of the task corresponding to the instant messaging application except for the task corresponding to the calculator. Therefore, as the full screen window of the calculator is switched to the floating window, the electronic device displays the full screen window of the instant messaging application at the bottom of the floating window of the calculator, and meanwhile, the window attribute of the task corresponding to the calculator is changed to the floating window.
In the above example, the user may trigger the display screen of the electronic device to display the interface shown in (a) of fig. 7 through the following execution sequence, while the current task list is the task list shown in (a) of fig. 7.
The user clicks an icon of the instant messaging application on the system desktop to start the instant messaging application. The electronic equipment responds to the operation and displays a full-screen window of the instant messaging application, and at the moment, the task list sequentially comprises a system desktop (full-screen window) and the instant messaging application (full-screen window) according to the sequence from small index to large index; then, triggering the electronic equipment to display a full-screen window of the calculator through a side navigation bar (or a latest historical task) by the user; the electronic equipment responds to the operation, and displays a full-screen window of the calculator, and at the moment, the task list sequentially comprises a system desktop (full-screen window), an instant messaging application (full-screen window) and a calculator application (full-screen window) according to the sequence from small index to large index. In this scenario, the electronic device will display the interface described in fig. 7 (a), while the task list is the task list shown in fig. 7 (a).
If the split-screen starter and the instant messaging application split-screen window provided by the embodiment of the application are applied to form a full-screen window, the following scene may exist:
as an example of a scenario, referring to (a) in fig. 8, when the user clicks an icon of an application B on the system desktop to open the application B, the electronic device displays a full-screen window of the application B through the display screen in response to the operation, where the task list is in order of the indexes from small to large: system desktop (full screen window), application B (full screen window).
Then, referring to (B) in fig. 8, the user triggers the electronic device to open the application C by operating, and the application B and the application C are displayed in the form of split screens on the display screen of the electronic device, wherein the split screen window of the application B and the split screen window of the application C together occupy the display screen of the electronic device. At this time, the task list is in the order of the indexes from small to large: system desktop (full screen window), application B (split screen window), application C (split screen window).
On the basis of the interface shown in fig. 8 (b), the user opens the application a in the form of a floating window by operating the trigger electronic device. Referring to (C) in fig. 8, in response to the operation, the electronic device displays a floating window of the application a above a full screen window composed of a split screen window of the application B and a split screen window of the application C. At this time, the task list is in the order of the indexes from small to large: system desktop (full screen window), application B (split screen window), application C (split screen window), application a (floating window).
On the basis of the interface shown in fig. 8 (c), the user triggers the hover window of application a to switch to full screen mode by operation. Referring to (d) in fig. 8, in response to the operation, the electronic device displays the full screen window of the application a full screen. At this time, the task list is in the order of the indexes from small to large: system desktop (full screen window), application B (split screen window), application C (split screen window), application a (full screen window).
On the basis of the interface shown in (d) of fig. 8, the user triggers the electronic device display split-screen starter by operation. Referring to (e) in fig. 8, in response to the operation, the electronic device displays a split-screen window of the application a and a window of the split-screen initiator. At this time, the task list is in the order of the indexes from small to large: system desktop (full screen window), application B (split screen window), application C (split screen window), application a (split screen window), split screen initiator (split screen window).
On the basis of the interface shown in (e) of fig. 8, the user switches to the floating window by operating the split window of the trigger application a, and the electronic device displays the interface shown in (f) of fig. 8. The example scene is a scene in which the split-screen window of the instant messaging application forming a full-screen window with the split-screen window of the split-screen starter is switched to a floating window in the above embodiment. The latest task list before this operation: the indexes are from small to large in order of a system desktop (full screen window), an application B (split screen window), an application C (split screen window), an application A (split screen window) and a split screen starter (split screen window). The full screen window before the current application A is a full screen window formed by a split screen window of the application B and a split screen window of the application C, so that the bottom application is a split screen pair application formed by the application B and the application C. In response to this operation, the electronic apparatus will eventually display the interface shown in (f) in fig. 8. As described above, in order to obtain a better user experience, a snapshot of a full screen window composed of the split screen window of the application B and the split screen window of the application C needs to be obtained as a background in dynamic effects.
As another example of the scene, referring to (a) in fig. 9, when the user clicks an icon of the application B on the system desktop to open the application B, the electronic device displays a full screen window of the application B through the display screen in response to the operation, and at this time, the task list is in order of index from small to large: system desktop (full screen window), application B (full screen window).
On the basis of the interface shown in fig. 9 (a), the user opens the application a in the form of a floating window by operating the trigger electronic device. Referring to (B) in fig. 9, in response to the operation, the electronic device displays a floating window of application a over a full screen window of application B. At this time, the task list is in the order of the indexes from small to large: system desktop (full screen window), application B (full screen window), application a (floating window).
On the basis of the interface shown in fig. 9 (b), the user triggers the hover window of application a to switch to full-screen mode by operation. Referring to (c) in fig. 9, in response to this operation, the electronic device displays the full screen window of application a full screen. At this time, the task list is in the order of the indexes from small to large: a system desktop (full screen window), application B (full screen window), application a (full screen window).
On the basis of the interface shown in fig. 9 (c), the user triggers the electronic device display split-screen initiator by operation. Referring to (d) in fig. 9, in response to the operation, the electronic device displays a split-screen window of the application a and a window of the split-screen initiator. At this time, the task list is in the order of the indexes from small to large: a system desktop (full screen window), an application B (split screen window), an application A (split screen window) and a split screen starter (split screen window).
On the basis of the interface shown in (d) of fig. 9, the user triggers the split-screen window of the application a to be switched to the floating window by operating, and this exemplary scenario is that in the above embodiment, the split-screen window of the instant messaging application that forms a full-screen window with the split-screen window of the split-screen initiator is switched to the floating window. The latest task list before this operation: the indexes are from small to large in order of a system desktop (full screen window), an application B (full screen window), an application A (split screen window) and a split screen starter (split screen window). The full screen window before the current application a is the full screen window of application B, so the bottom application is application B. In response to this operation, the electronic apparatus will eventually display the interface shown in (e) in fig. 9. As previously described, in order to obtain a better user experience, a snapshot of the full screen window of application B needs to be taken as a background in the dynamic effect.
As another example of the scene, referring to (a) in fig. 10, when the user clicks an icon of the application a on the system desktop to open the application a, the electronic device displays a full-screen window of the application a through the display screen in response to the operation, and at this time, the task list is in order of index from small to large: system desktop (full screen window), application a (full screen window).
On the basis of the interface shown in fig. 10 (a), the user triggers the electronic device display split-screen initiator by operation. Referring to (b) in fig. 10, in response to the operation, the electronic device displays a split-screen window of the application a and a window of a split-screen initiator. At this time, the task list is in the order of the indexes from small to large: a system desktop (full screen window), an application A (split screen window) and a split screen starter (split screen window).
On the basis of the interface shown in fig. 10 (b), the user triggers the split window of the application a to switch to the floating window through operation, and this exemplary scenario is a scenario in which in the above embodiment, the split window of the instant messaging application that forms a full-screen window with the split window of the split initiator is switched to the floating window. The latest task list before this operation: the indexes are from small to large in sequence, namely a system desktop (full screen window), an application A (split screen window) and a split screen starter (split screen window). The full screen window before the current application a is the full screen window of the system desktop, so the bottom application is the system desktop. In response to this operation, the electronic apparatus will eventually display the interface shown in (c) in fig. 10.
Through the above scenario, when the split screen window of the application a (and the split screen starter form a full-screen window) is switched to the floating window, according to the task list at the time from the maximum index to the minimum index, sequentially checking whether the application corresponding to the task is the current application (application a), the split screen starter or the application in the floating window mode, if the application is not the current application (application a), the split screen starter and the application in the floating window mode, continuing checking the application corresponding to the next task until one full-screen application, two split screen pairs or the system desktop which are not the current application (application a), the split screen starter and the application in the floating window mode are found. At this time, the determined one full-screen application, two split-screen pair applications or the system desktop is the bottom application.
Based on the above understanding, the bottom application can be determined based on the task list with reference to the flowchart shown in fig. 11.
Firstly, acquiring an application corresponding to a task with the largest index in a task list; then, judging whether the application corresponding to the task is a current application or not, if not, continuing to judge whether the application corresponding to the task is a split screen starter or not; if the application is not the split-screen starter, continuing to judge whether the application corresponding to the task is the application corresponding to the floating window mode; if the application is not the application corresponding to the floating window mode, determining that the application corresponding to the current task is the bottom application; if the application corresponding to the task is a full-screen application, the full-screen application is directly output as a bottom application, and if the application corresponding to the task is a split-screen application (the application of which the window mode is a split-screen window), the application corresponding to the task is one application in the bottom application, and the other split-screen application of the split-screen application component screen pair is continuously obtained. The two split screen applications together constitute the bottom application. The further split-screen application may be denoted as second application.
In particular implementations, the electronic device may also obtain another split-screen application from the system that is grouped into a split-screen pair with the current split-screen application.
Of course, in the above process, if any of the judging results is yes in the process of judging whether the application corresponding to the current task is the current application, the split screen starter or the application corresponding to the floating window mode, it is determined that the application corresponding to the current task is unlikely to be the bottom application, and then the application corresponding to the next task is continuously determined as the application corresponding to the current task according to the index size in the task list, and whether the application corresponding to the next task is the current application, the split screen starter or the application corresponding to the floating window mode is continuously judged.
Judging whether the application corresponding to the task is the current application, the split-screen starter or the application process corresponding to the floating window mode is not sequential, or in the practical application, judging whether the application corresponding to the task is the split-screen starter first, and then judging whether the application is the current application and the application corresponding to the floating window mode; or firstly judging whether the application corresponding to the task is the application corresponding to the floating window mode, and then judging whether the application is a split screen starter and the current application.
Based on the above understanding, when the window attribute of the application corresponding to the task, which is not the "current application, the split-screen initiator, and the application corresponding to the floating window mode", that is searched for by the electronic device for the first time is the split-screen window, another split-screen application needs to be determined based on the searched application, so that the split-screen pair application forming the bottom application is determined.
As another example, the electronic device may also perform a process of determining, for each task in the task list, whether the task is the "current application, the split-screen initiator, and the application corresponding to the floating window mode" once, and finally, determine, as the bottom application, the application corresponding to the task with the largest index in the task that is not the "current application, the split-screen initiator, and the application corresponding to the floating window mode". Of course, if the application corresponding to the task with the largest index in the task of the "current application, split-screen initiator, and application corresponding to the floating window mode" is the split-screen window, another split-screen application needs to be determined. The two split screen applications together constitute the bottom application. In the case of determining one split-screen application in one bottom application, the manner of determining the other split-screen application refers to the description of the above embodiment, and will not be repeated here.
Of course, for convenience of description, "current application, split-screen initiator, and application corresponding to the floating window mode" will be collectively referred to as a target application.
After the bottom application is determined by the schematic diagram shown in fig. 11, a snapshot of the bottom application may be taken based on the bottom application.
As described above, if the bottom application is a full-screen application, a snapshot of the full-screen application is obtained according to the native procedure of the android system. If the bottom application is a split-screen pair application, the system needs to acquire the snapshot of each application in the split-screen pair application, and then the snapshot of each application in the split-screen pair application is spliced based on the initial split-screen form of the split-screen pair application, so that the snapshot of the split-screen pair application is obtained.
When the method is specifically implemented, firstly, a container is created according to the current screen resolution of the electronic equipment; and adding the snapshots of the two applications in the container according to the split screen direction and the split screen position, and finally adding a split screen line in the container according to the split screen proportion, so that the snapshots of the split screen applications can be obtained.
For a clearer understanding of embodiments of the present application, reference may be made to the flow diagram between the modules shown in fig. 12.
S301, the dynamic effect class sends a request for acquiring a current task list to the component task management service (ActivityTaskManagerService, ATMS).
the task list is maintained by the ATMS, and the dynamic effect class can obtain the current task list by requesting from the ATMS.
S302, the ATMS returns a current task list to the dynamic effect class based on the request.
S303, the dynamic effect class receives the current task list and determines the bottom application based on the current task list.
The process of determining the bottom application may refer to the description of the embodiment shown in fig. 11, and will not be described herein.
If it is determined that the bottom application is a split-screen application, S304 to S311 are performed.
S304, the dynamic effect class requests the window management service (WindowManagerService, WMS) to acquire snapshots of two applications in the split screen application.
S305, the WMS requests the TaskSnappShotController to acquire snapshots of two applications in the applications by the split screen.
S306, the TaskSnappShotController returns a snapshot of two applications in the split screen pair applications to the WMS.
S307, the WMS returns the snapshots of two applications in the split screen pair application to the dynamic effect class.
S308, after receiving the snapshots of the two applications from the split screen pair, the dynamic effect class acquires the splicing parameters (e.g., the current screen resolution, the split screen direction, the split screen position, etc.). The split position can be understood as the split ratio.
S309, the dynamic effect class sends a splicing request to the Graphic, wherein the splicing request can carry snapshots of two applications in the split screen pair application and splicing parameters.
And S310, after the Graphic receives the splicing request, splicing the two snapshots based on the splicing parameters to obtain the snapshot of the split screen application.
S311, graphic returns the snapshot of the split screen pair application obtained by splicing to the dynamic effect class.
S312, after the dynamic effect class receives the snapshot of the split screen to the application, generating dynamic effect based on the snapshot of the split screen to the application.
It should be noted that, the method for obtaining the snapshot of the application by the split screen provided by the embodiment of the present application can be applied not only in a scenario in which the application is switched from the split screen window to the floating window when the split screen of the application and the split screen starter provided by the embodiment of the present application is displayed. In practical application, any application scene requiring to acquire the snapshot of the split screen to the application or using the snapshot of the split screen to the application can acquire the snapshot of the split screen to the application through the method for acquiring the snapshot of the split screen to the application provided by the embodiment of the application.
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 may include at least: any entity or device capable of carrying computer program code to a first device, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium. 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.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (12)
1. A snapshot acquisition method, comprising:
when a display screen of the electronic equipment displays a split-screen window of a first application and a split-screen window of a split-screen starter, receiving a first operation;
responding to the first operation, the electronic equipment acquires a task list, wherein the first operation is used for triggering a split screen window of a first application to be switched into a floating window;
the electronic equipment determines a bottom application of the first application according to an application corresponding to a task in the task list and a window attribute, wherein the bottom application is an application positioned below the floating window when a split screen window of the first application is switched to the floating window;
if the bottom application is a split-screen pair application, the electronic equipment acquires a snapshot of each application in the split-screen pair application;
the electronic equipment splices the snapshot of each application in the split-screen pair application into the snapshot of the split-screen pair application, wherein the snapshot of the split-screen pair application is used as a bottom background in the window recovery process of the bottom application;
the determining, by the electronic device, the bottom application of the first application according to the application corresponding to the task in the task list and the window attribute includes:
And the electronic device determines that an application corresponding to the task with the largest index in the task which is not the target application and is included in the task list is the bottom application, and the target application includes the first application, the split-screen starter and the application with the window attribute of a floating window mode.
2. The method of claim 1, wherein the determining, by the electronic device, that the task list includes an application corresponding to a task with a largest index among tasks that are not target applications as the bottom application includes:
the electronic equipment sequentially judges whether the application corresponding to each task is a target application or not from large to small based on indexes of each task in the task list;
and the electronic equipment determines the bottom application based on the application which is not the task corresponding to the target application and is searched for the first time.
3. The method of claim 2, wherein the determining, by the electronic device, the bottom application based on the first-found application that is not corresponding to the task of the target application comprises:
if the window attribute of the application which is not the task of the target application and is searched for the first time by the electronic equipment is a split screen window, the electronic equipment acquires a second application which is formed into a split screen pair application by the application which is not the task of the target application and is searched for the first time, wherein the bottom application is the split screen pair application which is formed by the application which is not the task of the target application and is searched for the first time and the second application;
Or if the window attribute of the application which is not the task of the target application and is searched for the first time by the electronic equipment is a split screen window, the electronic equipment acquires the application which is not the task of the target application and is corresponding to the next task, wherein the bottom application is a split screen pair application formed by the application which is not the task of the target application and is searched for the first time and the application which is not the task of the target application and is corresponding to the next task.
4. The method of claim 1, wherein the determining, by the electronic device, that the task list includes an application corresponding to a task with a largest index among tasks that are not target applications as the bottom application includes:
the electronic equipment judges whether the application corresponding to each task in the task list is a target application or not;
the electronic equipment sorts the indexes of the tasks of which the corresponding applications are not the target applications in the task list from big to small;
the electronic device will not determine the bottom application for the application corresponding to the task with the largest index in the tasks of the target application.
5. The method of claim 4, wherein the determining, by the electronic device, the bottom application based on the application corresponding to the task that is not the largest index of the tasks of the target application comprises:
If the window attribute of the application corresponding to the task with the largest index in the task which is not the target application is a split screen window, the electronic device acquires a third application of the application group split screen pair application corresponding to the task with the largest index in the task which is not the target application, wherein the bottom application is the split screen pair application composed of the application corresponding to the task with the largest index in the task which is not the target application and the third application;
or if the window attribute of the application corresponding to the task with the largest index in the task which is not the target application is a split screen window, the electronic device obtains the application corresponding to the next task with the largest index in the task which is not the target application, wherein the bottom application is a split screen pair application formed by the application corresponding to the task with the largest index in the task which is not the target application and the application corresponding to the next task.
6. The method of any one of claims 2 to 5, further comprising:
and responding to the first operation, closing a split-screen window of the split-screen starter by the electronic equipment, recovering the window of the bottom application, and switching the split-screen window of the first application into a floating window.
7. The method of claim 6, wherein the method further comprises:
in the process that the electronic equipment switches the split screen window of the first application into a floating window, the electronic equipment moves the snapshot of the first application to a first position, wherein the first position is a position where the floating window of the first application is to be displayed;
the electronic device removes the snapshot of the first application from the first location after monitoring that the floating window drawing of the first application is complete.
8. The method of claim 7, wherein the method further comprises:
in the process that the electronic equipment closes a split screen window of the split screen starter and restores the window of the bottom application, the electronic equipment takes the snapshot of the bottom application as the bottom background of the snapshot of the first application and the bottom background of the floating window of the first application;
the electronic device removes or changes the snapshot of the bottom application to transparent after displaying the snapshot of the bottom application for a first time period or after monitoring that the window of the bottom application is restored to completion.
9. The method according to any one of claims 1 to 5, wherein the electronic device includes a dynamic class, ATMS, WMS, and tasksnapshutcontroller, and the electronic device obtaining the task list includes:
The electronic equipment acquires a task list from the ATMS through the dynamic effect class;
correspondingly, the electronic device obtaining the snapshot of each application in the split-screen pair application includes:
the electronic equipment sends a snapshot acquisition request of the split screen to each application in the applications to the WMS through the dynamic effect class;
the electronic equipment sends a snapshot acquisition request of the split screen to each application in the applications to a tasksnapphashtcontroller through a WMS;
the electronic equipment sends the snapshot of each application in the split screen pair applications to the WMS through a TaskSnapshot controller;
the electronic equipment sends a snapshot of each application in the split screen pair applications to the dynamic effect class through the WMS;
correspondingly, the electronic device splicing the snapshot of each application in the split-screen pair application into the snapshot of the split-screen pair application includes:
the electronic equipment sends a splicing request to Graphic through the dynamic effect class, wherein the splicing request carries snapshot and splicing parameters of each application in the split screen pair application;
the electronic equipment splices the snapshot of each application in the split-screen pair application based on the splicing parameters through Graphic to obtain the snapshot of the split-screen pair application;
And the electronic equipment sends the snapshot of the split screen to the application to the dynamic effect class through Graphic.
10. The method of claim 9, wherein the splice parameters comprise: the current screen resolution of the electronic equipment, the split screen direction and the split screen position of the split screen pair application.
11. An electronic device comprising a processor for executing a computer program stored in a memory to cause the electronic device to implement the method of any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by one or more processors, implements the method of any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210961235.1A CN116028265B (en) | 2022-08-11 | 2022-08-11 | Snapshot acquisition method, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210961235.1A CN116028265B (en) | 2022-08-11 | 2022-08-11 | Snapshot acquisition method, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116028265A CN116028265A (en) | 2023-04-28 |
CN116028265B true CN116028265B (en) | 2023-11-14 |
Family
ID=86074910
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210961235.1A Active CN116028265B (en) | 2022-08-11 | 2022-08-11 | Snapshot acquisition method, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116028265B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104793838A (en) * | 2014-01-20 | 2015-07-22 | 中兴通讯股份有限公司 | Suspension display implementing method and device |
CN106126236A (en) * | 2016-06-24 | 2016-11-16 | 北京奇虎科技有限公司 | The multi-screen display method of terminal screen, device and terminal |
CN109062479A (en) * | 2018-07-09 | 2018-12-21 | Oppo广东移动通信有限公司 | Split screen application switching method, device, storage medium and electronic equipment |
CN109710422A (en) * | 2018-12-07 | 2019-05-03 | 北京小米移动软件有限公司 | Information extracting method, device and terminal device |
CN109960446A (en) * | 2017-12-25 | 2019-07-02 | 华为终端有限公司 | It is a kind of to control the method and terminal device that selected object is shown in application interface |
CN111966252A (en) * | 2020-05-14 | 2020-11-20 | 华为技术有限公司 | Application window display method and electronic equipment |
WO2021043223A1 (en) * | 2019-09-06 | 2021-03-11 | 华为技术有限公司 | Split-screen display method and electronic device |
CN114201097A (en) * | 2020-09-16 | 2022-03-18 | 华为技术有限公司 | Interaction method among multiple application programs |
WO2022094939A1 (en) * | 2020-11-06 | 2022-05-12 | 千手数字科技股份有限公司 | Multi-task suspended visual framework application processing method and system based on multi-task operating environment |
-
2022
- 2022-08-11 CN CN202210961235.1A patent/CN116028265B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104793838A (en) * | 2014-01-20 | 2015-07-22 | 中兴通讯股份有限公司 | Suspension display implementing method and device |
CN106126236A (en) * | 2016-06-24 | 2016-11-16 | 北京奇虎科技有限公司 | The multi-screen display method of terminal screen, device and terminal |
CN109960446A (en) * | 2017-12-25 | 2019-07-02 | 华为终端有限公司 | It is a kind of to control the method and terminal device that selected object is shown in application interface |
CN109062479A (en) * | 2018-07-09 | 2018-12-21 | Oppo广东移动通信有限公司 | Split screen application switching method, device, storage medium and electronic equipment |
CN109710422A (en) * | 2018-12-07 | 2019-05-03 | 北京小米移动软件有限公司 | Information extracting method, device and terminal device |
WO2021043223A1 (en) * | 2019-09-06 | 2021-03-11 | 华为技术有限公司 | Split-screen display method and electronic device |
CN111966252A (en) * | 2020-05-14 | 2020-11-20 | 华为技术有限公司 | Application window display method and electronic equipment |
CN114201097A (en) * | 2020-09-16 | 2022-03-18 | 华为技术有限公司 | Interaction method among multiple application programs |
WO2022094939A1 (en) * | 2020-11-06 | 2022-05-12 | 千手数字科技股份有限公司 | Multi-task suspended visual framework application processing method and system based on multi-task operating environment |
Non-Patent Citations (4)
Title |
---|
Dynamic Offloading of Web Application Execution Using Snapshot;Hyuk-Jin Jeong;ACM Transactions on the Web;第14卷(第4期);全文 * |
一种用于存储网络软故障恢复的快照技术的设计和实现;冯泳,张延园;计算机应用研究(第12期);全文 * |
同窗口分屏配置模式研究;许峰;;中国建设信息(第11期);全文 * |
基于多线程和乒乓缓存的分屏显示技术;郑艺强;杨佰成;陈阿军;;电子科学技术(第03期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN116028265A (en) | 2023-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113905179B (en) | Method for switching cameras by terminal and terminal | |
CN112394811B (en) | Interaction method of air-separation gestures and electronic equipment | |
CN116126201B (en) | Application starting method, electronic device and readable storage medium | |
CN115866121B (en) | Application interface interaction method, electronic device and computer readable storage medium | |
CN118051111A (en) | High-energy-efficiency display processing method and equipment | |
CN112188461B (en) | Control method and device of near field communication device, medium and electronic equipment | |
CN107547704A (en) | Call MIC switching method, device and mobile terminal | |
CN110888616B (en) | Information display method, apparatus and storage medium | |
CN116028265B (en) | Snapshot acquisition method, electronic equipment and readable storage medium | |
CN104980582A (en) | Screen switching method and mobile terminal | |
CN112133319A (en) | Audio generation method, device, equipment and storage medium | |
CN111294470B (en) | Call processing method, device, equipment and storage medium | |
CN112260845B (en) | Method and device for accelerating data transmission | |
CN116301483A (en) | Application card management method, electronic device and storage medium | |
CN115543470B (en) | Application starting method, electronic device and readable storage medium | |
CN115086888A (en) | Message notification method and device and electronic equipment | |
CN114265662B (en) | Information recommendation method, electronic device and readable storage medium | |
CN116540908A (en) | Application layout control method and related device | |
CN116700592B (en) | Response method of clicking operation, electronic equipment and chip system | |
CN111343335A (en) | Image display processing method, system, storage medium and mobile terminal | |
CN116048872B (en) | Management and control method for data cloning process, electronic equipment and storage medium | |
CN116708659B (en) | Electronic equipment and call processing method thereof | |
CN111246147B (en) | Video caching method, device, terminal and storage medium | |
CN117687524A (en) | Auxiliary input device switching method, electronic equipment and readable storage medium | |
WO2022143048A1 (en) | Dialogue task management method and apparatus, and electronic device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |