Application window switching method and apparatus, storage medium, and electronic device

By using an image rendering engine in the Android system to achieve seamless transitions and progressive display of application windows, the dynamic switching problem in multi-window scenarios of the Android system is solved, improving user experience and system efficiency.

CN118689580BActive Publication Date: 2026-01-27BEIJING YINWO AUTOMOBILE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411156313.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2026-01-27
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

The Android system does not support dynamic switching and priority adjustment of window levels in multi-window scenarios, resulting in screen flickering and a poor user experience.

Method used

Without modifying the Android Framework source code, the target application window and the original application window are added to the same rendering engine through the image rendering engine, and image data is copied under certain conditions to achieve seamless transition and progressive display updates between application windows.

Benefits of technology

It enables smooth switching between application windows, reduces screen flickering, improves user experience stability and system resource utilization efficiency, and ensures smooth operation of new windows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689580B_ABST
    Figure CN118689580B_ABST
Patent Text Reader

Abstract

The application provides an application window switching method and device, a storage medium and an electronic device, and relates to the technical field of computers. The method comprises the following steps: in the case that a first application scene changes into a second application scene, obtaining a target application window matched with the second application scene which is created by a user on a target level; adding the target application window and an original application window to the same image rendering engine; if a target condition is met, copying image data in the original application window to the target application window, and rendering the original application window and the target application window by using the image rendering engine; and closing the original application window after the image data of the target application window and the original application window is displayed on a target screen for a first time. The application can reduce the phenomenon of flashing screens and improve the stability of pictures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to an application window switching method and apparatus, storage medium and electronic device. Background Technology

[0002] Currently, in addition to smartphones, smart cars are also increasingly using the Android system as the in-vehicle user control system.

[0003] However, Android's small screen size means that most Android applications are single-window full-screen displays, which presents some design flaws for multi-window applications. For example, Android does not support dynamic switching of window layers, and especially does not support dynamic adjustment of window priority. Summary of the Invention

[0004] In view of this, embodiments of this application provide an application window switching method and apparatus, a storage medium and an electronic device.

[0005] In a first aspect, one embodiment of this application provides an application window switching method applied to an Android vehicle infotainment system, which includes multiple application windows with priority levels. The method includes: when a first application scenario changes to a second application scenario, obtaining a target application window created by the user at the target level that matches the second application scenario, wherein the target application window is at least one of the multiple application windows; adding the target application window and the original application window to the same image rendering engine; if target conditions are met, copying image data from the original application window to the target application window, and rendering both the original and target application windows using the image rendering engine; and closing the original application window after the image data of both the target and original application windows are displayed on the target screen for a first time.

[0006] In conjunction with the first aspect, in some implementations of the first aspect, rendering the original application window and the target application window using an image rendering engine includes: rendering the original application window and the target application window using an image rendering engine during a second time period, wherein the second time period is determined based on the refresh rate of the target screen; and stopping rendering the original application window after the second time period.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, an image rendering engine is used to render the original application window and the target application window, including: in a sub-thread independent of the main thread, the image rendering engine is used to render the original application window and the target application window, wherein the image rendering engine is a custom image rendering engine.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: if a view is attached to a window event is detected through the target interface, then it is determined that the target application window has been added to the image compositor, thereby determining that the target condition is met.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: rendering and displaying the original application window if the target condition is not met; wherein, not meeting the target condition includes listening for the view detachment event from the window through the target interface.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: drawing the last frame image data displayed by the original application window on the target screen as transparent in a first time period; and, after closing the original application window, further including: deleting the original application window from the image rendering engine.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the target application window and the original application window are the same size, and the target application window and the original application window are in the same coordinate position on the target screen; the target application window is located above or below the original application window.

[0012] Secondly, one embodiment of this application provides an application window switching device applied to an Android vehicle infotainment system, which includes multiple application windows with priority levels. The device includes: an acquisition module, configured to acquire a target application window created by the user at a target level that matches the second application scenario when a first application scenario changes to a second application scenario; the target application window being at least one of multiple application windows; an adding module, configured to add the target application window and the original application window to the same image rendering engine when target conditions are met; a rendering module, configured to copy image data from the original application window to the target application window and render both the original and target application windows using the image rendering engine; and a display module, configured to close the original application window after the image data of the target application window and the original application window are displayed on the target screen for a first time.

[0013] Thirdly, one embodiment of this application provides a computer-readable storage medium storing a computer program for performing the application window switching method described in the first aspect.

[0014] Fourthly, one embodiment of this application provides an electronic device, the electronic device comprising: a processor; a memory for storing processor-executable instructions; the processor being configured to execute the application window switching method described in the first aspect.

[0015] In this application, by adding the target application window and the original application window to the same image rendering engine and copying image data when certain conditions are met, a seamless transition between application windows is achieved. Users do not experience noticeable interface jumps or delays when switching scenes, resulting in a smoother and more natural experience. Furthermore, by rendering both the target application window and the original application window simultaneously on the target screen before closing the original application window, screen flickering caused by window switching is reduced. This gradual display update helps maintain the stability of the user interface and avoids visual interference. Simultaneously, by removing unnecessary windows, the cleanliness of the user interface is ensured, redundant information on the screen is avoided, system resource utilization efficiency is improved, and the smooth operation of the new target application window is guaranteed.

[0016] This application allows the system to dynamically acquire and render the target application window based on changes in user operations and application scenarios. This flexibility enables the Android vehicle infotainment system to quickly adapt to different user needs and environmental changes, providing more personalized services. Furthermore, this solution is implemented within the application permission scope and on the native Android Framework specification, ensuring maximum compatibility. The same effect can be achieved on all existing Android systems. Attached Figure Description

[0017] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0018] Figure 1 The diagram shown is a flowchart of an application window switching method provided in an embodiment of this application.

[0019] Figure 2 The diagram shown is a flowchart illustrating the rendering process of the original application window and the target application window according to an embodiment of this application.

[0020] Figure 3 The diagram shown is a flowchart of an application window switching method provided in another embodiment of this application.

[0021] Figure 4 The diagram shown is a structural schematic of an application window switching device provided in an embodiment of this application.

[0022] Figure 5 The diagram shown is a structural schematic of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] First, the technical terms appearing in this application are explained as follows.

[0025] Android system: an open-source operating system for mobile devices. The Android Framework is the framework layer of the Android system, which defines and implements the operating specifications and behavioral boundaries of Android system services and applications.

[0026] Window Layout: This is the display standard set by the Android Framework for the layout of application windows, including window size, position, and window hierarchy priority between different applications.

[0027] Z-order: is a dimension of window layout. Relative to the (x, y) plane coordinate system, z represents the dimension perpendicular to the screen direction. It determines which window will be above or below another window when multiple windows are displayed at the same time.

[0028] Secondly, due to its open-source nature, Android has become one of the de facto standards for mobile devices, dominating not only the smartphone market but also gradually becoming the preferred choice for smart car infotainment systems. However, Android was originally designed for small-screen devices, and its single-window full-screen display feature is inadequate in multi-window application scenarios, especially in terms of design flaws regarding dynamic switching of window layers.

[0029] Specifically, window hierarchy management in the Android Framework differs fundamentally from that of desktop systems like Windows. For instance, traditional desktop systems adjust the order of windows by sharing a Z-axis dimension, while Android introduces the concept of window priority, adding a new dimension to window hierarchy management. This means that windows of different priorities have independent Z-axis attributes, and lower-priority windows cannot cover higher-priority windows by adjusting their Z-axis height. Therefore, the Android Framework implementation does not support dynamic changes to window priorities. In other words, a window's priority is determined at creation and cannot be modified before the window is destroyed. This forces us to destroy the original window and recreate it with the new priority when we need to dynamically adjust the window hierarchy. This process inevitably causes screen flickering, affecting user experience and the overall product feel.

[0030] Within the existing technological framework, Android system integration service providers have the ability to modify the Android Framework source code, which makes it possible to solve the problem of dynamically adjusting window priority in the Android system. By deeply customizing the Android system, service providers can extend system functionality and implement dynamic modification of window priority, thereby avoiding screen flickering caused by window destruction and reconstruction, and improving the user experience.

[0031] However, the Android system needs to maintain compatibility with the existing application ecosystem. Any changes to the core mechanisms can trigger a chain reaction, causing many applications to malfunction or experience compatibility issues. Therefore, when customizing or extending the system, service providers often limit modifications to the internal layers of system services and applications to ensure that these changes do not have a widespread impact on the entire application ecosystem.

[0032] In light of this, this application aims to provide a novel solution for dynamically adjusting the Z-order of desktop application window layouts without modifying the Android Framework source code. This method is suitable for scenarios where the window display order needs to be frequently changed based on user interaction or application logic, thereby effectively enhancing the user experience and improving the overall product performance. By implementing this dynamic change, users can enjoy a smoother and more intuitive user interface, while developers are provided with greater flexibility and control to create richer and more dynamic user interface effects.

[0033] The following is combined with Figures 1 to 3 This paper elaborates on the application window switching method in this application.

[0034] Figure 1The diagram shown is a flowchart illustrating an application window switching method according to an embodiment of this application. Exemplarily, this method is applied to an Android vehicle infotainment system, which includes multiple application windows with priority levels.

[0035] As we can understand, an Android-based in-vehicle infotainment system refers to a central control system installed in a car, based on the Android operating system. This system has multiple application windows, each with its own priority level. Furthermore, the priority level indicates that different application windows have different levels of importance or display order. For example, in certain application scenarios, navigation windows, panoramic windows, driver assistance windows, and reverse gear engagement windows have a higher priority level than music playback windows, and therefore will be displayed over the music playback window. This priority setting helps users access the most important information and functions more conveniently while driving.

[0036] like Figure 1 As shown, the method includes the following steps.

[0037] Step S110: When the first application scenario changes to the second application scenario, obtain the target application window created by the user at the target level that matches the second application scenario.

[0038] Specifically, an application scenario refers to the different contexts or usage modes in which a user operates within an Android in-vehicle infotainment system. For example, the first application scenario might be entertainment mode, while the second might be navigation mode, assisted driving mode, panoramic mode, etc. The target hierarchy refers to the priority of the application window that the user wants to display at the top level within a specific application scenario. The target application window is the window that matches the second application scenario; that is, the application window the user needs to use when switching to the second application scenario. For example, these windows are either predefined or dynamically generated based on user preferences and scenario requirements. Furthermore, it can be understood that the target application window is at least one of multiple application windows included in the Android in-vehicle infotainment system.

[0039] In this step, the user first identifies the current application scenario and determines whether a switch to a new scenario is necessary. If a switch is required, the user creates a target application window at the target level that matches the requirements of the second application scenario. The system then retrieves the target application window created by the user at the target level.

[0040] For example, suppose a user activates entertainment mode before driving and switches to navigation mode while driving. In this case, navigation mode has the highest priority and is displayed on the screen. Correspondingly, the target application window includes a navigation window.

[0041] Step S120: Add the target application window and the original application window to the same image rendering engine.

[0042] In Android in-vehicle infotainment systems, the image rendering engine is responsible for drawing the content of application windows onto the screen. It's a core component capable of handling the rendering tasks of multiple windows, ensuring a smooth and responsive user interface. Original application windows refer to the windows the user was using before switching application scenarios. These windows no longer need to be displayed on top in the new scenario, but still need to be managed by the rendering engine. For example, original application windows include a music player window or a video player window.

[0043] Specifically, based on step S120, if the target condition is met, then step S130 is executed.

[0044] Step S130: Copy the image data from the original application window to the target application window, and use the image rendering engine to render both the original application window and the target application window.

[0045] Once the target conditions are met, the system will perform an image data copying operation. Specifically, the image data (i.e., the visual content currently displayed on the screen) in the original application window will be copied to the target application window to achieve some form of transition effect between the two windows.

[0046] After copying the image data, the system will use the image rendering engine to render both the original application window and the target application window. In other words, the image rendering engine calculates the final display effect of each window on the screen based on the window's attributes (such as position, size, transparency, priority, etc.) and the copied image data.

[0047] Step S140: After the image data of the target application window and the original application window are displayed on the target screen for the first time, close the original application window.

[0048] Specifically, the system uses an image rendering engine to render these two windows, enabling their image data to be displayed on the target screen. Here, "first time" refers to the time after the image data is added to the rendering engine and the initial rendering is completed, after which the user can see the updated user interface.

[0049] Then, after successfully displaying the image data of the target application window and the original application window on the target screen, the system will close the original application window; that is, the system will stop displaying the content of the original application window. For example, this process is accompanied by visual effects such as fade-out or slide-out to achieve a smooth transition. Additionally, closing the window involves releasing resources, such as memory and processor resources, which can then be reallocated to other tasks or windows.

[0050] In this application, by adding the target application window and the original application window to the same image rendering engine and copying image data when certain conditions are met, a seamless transition between application windows is achieved. Users do not experience noticeable interface jumps or delays when switching scenes, resulting in a smoother and more natural experience. Furthermore, by rendering both the target application window and the original application window simultaneously on the target screen before closing the original application window, screen flickering caused by window switching is reduced. This gradual display update helps maintain the stability of the user interface and avoids visual interference. Simultaneously, by removing unnecessary windows, the cleanliness of the user interface is ensured, redundant information on the screen is avoided, system resource utilization efficiency is improved, and the smooth operation of the new target application window is guaranteed.

[0051] This application allows the system to dynamically acquire and render the target application window based on changes in user operations and application scenarios. This flexibility enables the Android vehicle infotainment system to quickly adapt to different user needs and environmental changes, providing more personalized services. Furthermore, this solution is implemented within the application permission scope and on the native Android Framework specification, ensuring maximum compatibility. The same effect can be achieved on all existing Android systems.

[0052] Combination Figure 1 In the embodiments shown, in other embodiments of this application, the application window switching method further includes: if a view is attached to a window event is detected through the target interface, it is determined that the target application window has been added to the image compositor, thereby determining that the target condition is met.

[0053] An interface is an abstract type that defines a set of methods, while a listener is a design pattern used to receive notifications when specific events occur. In this embodiment, the target interface defines a series of operations and events related to the application window, including the event of a view being attached to the window. This event refers to the event triggered during the application window's lifecycle when a new view is attached to the window.

[0054] The image compositor is a system component responsible for compositing multiple views and windows into a final image displayed on the screen. When a view attachment event is detected, the system checks and determines that the target application window has been successfully added to the image compositor, indicating that it is ready to be rendered. At this point, the target condition for window switching is considered met. This condition triggers subsequent operations: copying the image data of the original application window to the target application window and performing rendering.

[0055] For example, the target interface is the View.On Attach State Change Listener interface, and the event for the view to be attached to the window is the on View Attached To Window event.

[0056] In this embodiment, by listening to events where a view is attached to a window through the target interface, the system can accurately identify when a new view or application window is ready to be rendered. This mechanism provides a clear trigger point, ensuring that the timing of window switching is accurately controlled. Furthermore, when the system determines that a target application window has been added to the image compositor, it can immediately begin the rendering process without waiting for other uncertain conditions to occur. This reduces rendering latency and improves overall rendering efficiency.

[0057] In other embodiments of this application, failing to meet the target condition includes detecting a view detachment event from the window via the target interface. In cases where the target condition is not met, the original application window is rendered and displayed.

[0058] A view detachment event is an event triggered when a view is no longer needed on the window, or when the user switches back to the original application context. When the system detects a view detachment event, indicating that the target condition is not met, the system will not execute the previously described window switching process. Instead, the system will maintain the rendering and display of the original application window, ensuring that the user can continue to use the current application window.

[0059] For example, the event that causes a view to detach from a window is the onView Detached From Window event.

[0060] This mechanism in this embodiment allows users to switch flexibly between different application scenarios while maintaining operational continuity. If a user does not find the required function or information in a new scenario, they can easily return to the original application window without losing their previous work or view state. By maintaining the display of the original application window when the target conditions are not met, the system provides users with more control and flexibility. This solution improves the system's adaptability and robustness by adding handling for unmet target conditions. Even if window switching cannot be performed in certain specific situations, the system can still operate normally and provide the functions required by the user.

[0061] Figure 2 The diagram shown is a schematic representation of the rendering process for the original application window and the target application window according to an embodiment of this application. Figure 1 Extending from the illustrated embodiment Figure 2 The illustrated embodiment will be described in detail below. Figure 2 The illustrated embodiments and Figure 1The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.

[0062] like Figure 2 As shown, in this embodiment, the original application window and the target application window are rendered using an image rendering engine, including the following steps.

[0063] In step S210, during the second time interval, the original application window and the target application window are rendered using the image rendering engine.

[0064] Specifically, the second time is determined based on the refresh rate of the target screen. The screen refresh rate refers to the number of times the screen can refresh its display per second, usually measured in Hertz (Hz). For example, if the screen refresh rate is 60Hz, then the screen refreshes 60 times per second, and the time corresponding to each frame is approximately 16.67 milliseconds. Assuming the second time is the time corresponding to two frames, then in this embodiment, the second time is 33.34 milliseconds.

[0065] Step S220: After the second time interval, stop rendering the original application window.

[0066] Specifically, after the second time interval is reached, the image rendering engine will no longer draw the contents of the original application window onto the screen. For example, this can be achieved by stopping sending rendering commands to the graphics processing unit or by changing the window's visibility state.

[0067] Additionally, in this second time period, the user can see the content of two windows on the screen, including the original application window gradually fading out while the target application window gradually appears, or both appearing simultaneously for a smooth transition. The purpose of this step is to achieve a smooth transition between the original and target application windows when switching application scenarios. By rendering in the second time period, the system can gradually guide the user's attention from the original application window to the target application window without affecting the user experience, providing a more natural and comfortable user experience.

[0068] Furthermore, as described above, in step S210, the original application window and the target application window are rendered simultaneously. After the second time interval, only the target application window continues to be rendered, while the original application window stops rendering. This helps ensure smooth updates and transitions in the user interface. Moreover, stopping the rendering of the original application window after the second time interval avoids visual inconsistencies or confusion for the user, reduces unnecessary visual interference, and allows the user to focus more on the current application scenario.

[0069] Step S230: In a child thread independent of the main thread, the original application window and the target application window are rendered using the image rendering engine.

[0070] It should be noted that the rendering operation in this embodiment is not performed on the application's main thread, but rather in a separate child thread. This design helps prevent rendering operations from blocking the main thread, thereby maintaining the smoothness and responsiveness of the user interface.

[0071] Furthermore, the image rendering engine is a custom one. That is, the image rendering engine used is custom-designed, meaning it has been optimized and tailored for specific needs or scenarios. A custom engine provides greater flexibility and control to meet the window switching requirements of specific applications.

[0072] In a child thread, the image rendering engine renders both the original application window and the target application window simultaneously. This simultaneous rendering mechanism allows the system to visually transition smoothly from one window to another without flickering or jumps in the user interface.

[0073] In step S230, rendering in a sub-thread fully leverages the advantages of multi-core processors, improving rendering performance. Simultaneously, this allows the main thread to continue processing user input and other tasks, thereby improving overall application performance and reducing the impact of errors during rendering on the main thread. A custom image rendering engine can more effectively manage graphics processing resources, such as memory and processing power. Rendering in a sub-thread helps balance resource usage and avoids negatively impacting other system tasks during rendering. Furthermore, using a custom image rendering engine in a sub-thread makes it easier to implement complex transition effects, such as fade-in / fade-out, sliding, and scaling. These effects enhance the user experience, making window transitions appear more natural and smooth.

[0074] Figure 3 The diagram shown is a flowchart illustrating an application window switching method according to another embodiment of this application. Figure 1 Extending from the illustrated embodiment Figure 3 The illustrated embodiment will be described in detail below. Figure 3 The illustrated embodiments and Figure 1 The differences between the embodiments shown are not repeated here, and the similarities are not repeated here.

[0075] like Figure 3 As shown, in this embodiment, the application window switching method further includes the following steps.

[0076] Step S310: In the first time interval, the last frame image data displayed by the original application window on the target screen is drawn as transparent.

[0077] The "first moment" refers to the initial stage of the application window switching process, typically shortly after the user triggers the scene switch or the system detects a scene change. The last frame image data refers to the last image displayed by the original application window on the target screen; this is the last scene the user sees before the window is closed. Representing the last frame image data as transparent gradually makes its visible content transparent, thus visually eliminating it. This process can be achieved by adjusting the image's transparency, gradually decreasing it from completely opaque (100% opaque) to completely transparent (0% opaque).

[0078] For example, suppose a user is using a map navigation application, and the window of that application is the original application window. When the user reaches their destination, they switch to the reverse gear application to park. In step S310, the system first determines that the user has completed navigation and is ready to switch applications. At this point, the system will immediately begin gradually making the last frame of the navigation application window transparent. As the transparency gradually decreases, the user will see the content of the navigation window slowly fade out until it is completely invisible. During this process, if the target application window of the reverse gear application is ready, the user's gaze can smoothly shift to the reverse gear application interface because the last frame of the navigation window is fading out.

[0079] Step S320: After closing the original application window, delete the original application window from the image rendering engine.

[0080] In this step, the original application window is first closed, meaning all interactive functions of the window are stopped, accompanied by visual changes such as a fade-out effect, causing the window content to disappear from the user interface. Afterward, the system will remove the window from the graphics rendering engine. That is, the graphics rendering engine will stop tracking and processing any rendering tasks for that window, including no longer drawing any content from that window on the screen.

[0081] Deleting a window from the rendering engine helps free up resources associated with that window, including graphics memory, processor resources, etc. These resources can then be reallocated to other running applications or system tasks.

[0082] In this embodiment, by rendering the last frame image data as transparent, a smooth transition effect can be created, making the original application window appear to gradually fade out of the screen. This effect reduces visual abruptness and provides a more natural visual experience. Timely deletion of unnecessary windows avoids unnecessary rendering work, improving overall rendering efficiency and performance, which is crucial for maintaining smooth system operation, especially on resource-constrained devices. Deleting the original application window after it is closed ensures a clean user interface, avoiding potential visual clutter or inconsistencies. Users will only see currently active windows and content, without being distracted by residual images from closed windows. Simultaneously, deleting the original application window frees up space and resources for the new target application window, ensuring the new window can display smoothly on the screen and continue to provide services to the user.

[0083] In conjunction with the foregoing embodiments, in other embodiments of this application, the target application window and the original application window are the same size, and the target application window and the original application window are at the same coordinate position on the target screen; the target application window is located above or below the original application window.

[0084] Specifically, "same size" means that the target application window and the original application window (i.e., the window the user previously used) have the same dimensions; that is, they occupy the same space in both the horizontal and vertical directions. "Same coordinate position" means that the two windows are in the same horizontal and vertical coordinate position on the target screen; in other words, they share the same screen area, only offset in the vertical direction, for example, one is above or below the other.

[0085] For example, suppose a user is using a navigation app, whose window is the original app window. When the user reaches their destination and wants to switch to a music player app, the music player app's window (the target app window) is created. In this case, the music player window and the navigation window have the same width and height, and they occupy the same area on the screen, but the music player window is designed to appear above the navigation window so that the user can immediately see the music playback interface.

[0086] In this way, the system can achieve smooth switching between application windows without changing the user interface layout, while maintaining the continuity and consistency of user operations. This design also allows users to quickly return to the original application window when needed, or choose between two windows, thus providing a more flexible and personalized user experience.

[0087] The above text combined Figures 1 to 3 The application window switching method of this application is described in detail below. Figure 4This application describes in detail the embodiments of the application window switching device. It should be understood that the descriptions of the application window switching method embodiments correspond to the descriptions of the application window switching device embodiments; therefore, any parts not described in detail can be referred to the preceding method embodiments.

[0088] Figure 4 The diagram shown is a structural schematic of an application window switching device provided in an embodiment of this application. Exemplarily, it is applied to an Android vehicle infotainment system, which includes multiple application windows with priority levels. Figure 4 As shown, the application window switching device 40 provided in this application embodiment includes:

[0089] The acquisition module 410 is used to acquire, when the first application scenario changes to the second application scenario, a target application window created by the user at the target level that matches the second application scenario, wherein the target application window is at least one of multiple application windows;

[0090] Add module 420 to add the target application window and the original application window to the same image rendering engine, provided that the target conditions are met.

[0091] The rendering module 430 is used to copy the image data from the original application window to the target application window, and to render the original application window and the target application window using the image rendering engine.

[0092] Display module 440 is used to close the original application window after the image data of the target application window and the original application window are displayed on the target screen for a period of time.

[0093] In one embodiment of this application, the rendering module 430 is further configured to render the original application window and the target application window using an image rendering engine during a second time period, wherein the second time period is determined based on the refresh rate of the target screen; and after the second time period, to stop rendering the original application window.

[0094] In one embodiment of this application, the rendering module 430 is further configured to render the original application window and the target application window in a sub-thread independent of the main thread using an image rendering engine, wherein the image rendering engine is a custom image rendering engine.

[0095] In one embodiment of this application, the adding module 420 is further configured to determine that the target application window has been added to the image compositor if a view is attached to a window event is detected through the target interface, thereby determining that the target condition is met.

[0096] In one embodiment of this application, the rendering module 430 is further configured to render and display the original application window if the target conditions are not met; wherein, not meeting the target conditions includes listening for a view detachment event from the window through the target interface.

[0097] In one embodiment of this application, the display module 440 is further configured to: draw the last frame image data displayed by the original application window on the target screen as transparent in a first time period; and delete the original application window from the image rendering engine after closing the original application window.

[0098] In one embodiment of this application, the target application window and the original application window are the same size, and the target application window and the original application window are at the same coordinate position on the target screen; the target application window is located above or below the original application window.

[0099] Below, for reference Figure 5 This describes an electronic device according to embodiments of the present application. Figure 5 The diagram shown is a structural schematic of an electronic device provided in an exemplary embodiment of this application.

[0100] like Figure 5 As shown, the electronic device 50 includes one or more processors 501 and memory 502.

[0101] The processor 501 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 50 to perform desired functions.

[0102] The memory 502 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 501 may execute the program instructions to implement the application window switching methods and / or other desired functions described in the various embodiments of this application above. The computer-readable storage medium may also store various content such as a first application scenario, a second application scenario, a target application window, an image rendering engine, etc.

[0103] In one example, the electronic device 50 may also include an input device 503 and an output device 504, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0104] The input device 503 may include, for example, a keyboard, a mouse, etc.

[0105] The output device 504 can output various information to the outside, including a first application scenario, a second application scenario, a target application window, an image rendering engine, etc. The output device 504 may include, for example, a monitor, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0106] Of course, for the sake of simplicity, Figure 5 Only some of the components of the electronic device 50 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 50 may include any other suitable components depending on the specific application.

[0107] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the application window switching methods according to various embodiments of this application described above.

[0108] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0109] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the application window switching methods according to various embodiments of this application described above.

[0110] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0111] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0112] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0113] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0114] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0115] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for switching application windows, characterized in that, The method, applicable to an Android in-vehicle infotainment system, includes multiple application windows with a priority hierarchy, the priority hierarchy representing the display order of the multiple application windows, and comprises: When the first application scenario changes to the second application scenario, the target application window created by the user at the target level that matches the second application scenario is obtained, and the target application window is at least one of the plurality of application windows; Add the target application window and the original application window to the same image rendering engine, with the target application window located above or below the original application window; If the target conditions are met, the image data in the original application window is copied to the target application window, and the image rendering engine is used to render the original application window and the target application window. After the image data of the target application window and the original application window are displayed on the target screen for a first time, the original application window is closed. The rendering of the original application window and the target application window using the image rendering engine includes: In the second time period, the image rendering engine is used to render the original application window and the target application window, wherein the second time period is determined based on the refresh rate of the target screen; After the second time period, rendering of the original application window is stopped.

2. The application window switching method according to claim 1, characterized in that, The rendering of the original application window and the target application window using the image rendering engine includes: In a child thread independent of the main thread, the original application window and the target application window are rendered using the image rendering engine, wherein the image rendering engine is a custom image rendering engine.

3. The application window switching method according to claim 1 or 2, characterized in that, Also includes: If a view is attached to a window event is detected through the target interface, it is determined that the target application window has been added to the image compositor, and thus the target condition is satisfied.

4. The application window switching method according to claim 1 or 2, characterized in that, Also includes: If the target conditions are not met, the original application window will be rendered and displayed. Among them, not meeting the target conditions includes listening for the view detachment event from the window through the target interface.

5. The application window switching method according to claim 1 or 2, characterized in that, Also includes: During the first time period, the last frame image data displayed by the original application window on the target screen is drawn as transparent. In addition, after closing the original application window, the following is also included: Remove the original application window from the image rendering engine.

6. The application window switching method according to claim 1 or 2, characterized in that, The target application window is the same size as the original application window, and the target application window and the original application window are in the same coordinate position on the target screen.

7. An application window switching device, characterized in that, An application for an Android-based in-vehicle infotainment system, the Android in-vehicle infotainment system including multiple application windows with a priority hierarchy, the priority hierarchy indicating the display order of the multiple application windows, the device comprising: The acquisition module is used to acquire, when the first application scenario changes to the second application scenario, a target application window created by the user at the target level that matches the second application scenario, wherein the target application window is at least one of the plurality of application windows; An add module is used to add the target application window and the original application window to the same image rendering engine when the target conditions are met, wherein the target application window is located above or below the original application window; The rendering module is used to copy the image data from the original application window to the target application window, and to render the original application window and the target application window using the image rendering engine. The display module is used to close the original application window after the image data of the target application window and the original application window are displayed on the target screen for a first time. The rendering module is further configured to, within a second time period, render the original application window and the target application window using the image rendering engine, wherein the second time period is determined based on the refresh rate of the target screen; and after the second time period, stop rendering the original application window.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that is executed to implement the application window switching method according to any one of claims 1 to 6.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute instructions in the memory to implement the application window switching method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image display method and related device

    CN117472483A

  • Application switching display method and device, equipment and storage medium

    CN117909011A