Display device and application switching method
Patent Information
- Application Number
- CN202611115348.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]本申请提供一种显示设备及应用切换方法,以解决跨控制器应用切换时被切换走的应用持续维持运行状态导致系统资源占用的问题
[0007]上述技术方案具有以下有益效果或优点:
Smart Images

Figure CN122933934A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display device technology, and in particular to a display device and application switching method. Background Technology
[0002] Display devices refer to terminal devices capable of outputting specific display images, such as smart TVs, communication terminals, smart advertising screens, and projectors. Taking smart TVs as an example, smart TVs are television products based on Internet application technology, possessing an open operating system and controller, an open application platform, and enabling two-way human-computer interaction. They integrate multiple functions such as audio-visual entertainment and data to meet diverse and personalized user needs.
[0003] To improve application performance, the display device can adopt a dual-controller architecture, which includes a first controller and a second controller connected via an internal HDMI channel. The first controller is connected to the monitor and is used to perform switching and scheduling of signal source channels, and control the monitor to display the image corresponding to the current signal source channel. Both the first and second controllers deploy various applications. When switching to the internal HDMI channel, the display image generated by the second controller is transmitted to the first controller via the internal HDMI channel, and finally output by the first controller to the monitor for display.
[0004] However, in the dual-controller architecture described above, when switching from the application on the second controller side to the application on the first controller side, the first controller will switch out its internal HDMI channel, but the application running on the second controller will continue to run and continuously occupy system resources. Summary of the Invention
[0005] This application provides a display device and application switching method to solve the problem of system resource consumption caused by the application being switched out continuing to run during cross-controller application switching.
[0006] In a first aspect, this application provides a display device, comprising: monitor; The first controller is connected to the display; the first controller and the second controller are connected via an internal HDMI channel. The first controller is configured to control the display to display a screen corresponding to an application running on the second controller, transmitted via the internal HDMI channel by the second controller, or to control the display to display a screen corresponding to an application running on the first controller; The first controller is also configured to: Control the display to show the display screen corresponding to the second application transmitted by the second controller via the internal HDMI channel; In response to a first switching command to switch from a second application on the second controller to a first application on the first controller, the internal HDMI channel is switched off so that the display shows the display screen corresponding to the first application; The second controller is configured as follows: In response to the first switching command, a preset empty activity component is launched to trigger the second application to switch from running in the foreground to running in the background and enter a stopped state; the empty activity component is an activity component without interface interaction controls.
[0007] The above technical solution has the following beneficial effects or advantages: In cross-controller application switching scenarios, when switching from a second application on a second controller to a first application on a first controller, the first controller disconnects its internal HDMI channel connected to the second controller. Simultaneously, the second controller launches an empty Activity component, utilizing Android's native Activity lifecycle management mechanism to switch the second application from foreground to background operation and enter the onStop state. This correctly pauses business logic and resolves the issue of system resource consumption caused by the switched-off application continuously maintaining a foreground running state during cross-controller application switching.
[0008] In some embodiments of this application, after the first controller switches off the internal HDMI channel in response to a first switching command from a second application on the second controller to a first application on the first controller, it is further configured to: In response to a second switching command to switch from a first application on the first controller to a second application on the second controller, the internal HDMI channel is switched in so that the display shows the display screen corresponding to the second application; In response to the first switching command, after activating a preset empty active component, the second controller is further configured to: In response to the second switching instruction, the empty active component is destroyed to trigger the second application to switch from a stopped state running in the background to running in the foreground.
[0009] The above technical solution has the following beneficial effects or advantages: When switching from the first application on the first controller to the second application on the second controller, the first controller switches to the internal HDMI channel connected to the second controller, while the second controller destroys any idle active components, allowing the second application to resume running from the background and into the foreground. This solution ensures complete preservation and rapid recovery of the application state; when the user switches back, the application can directly resume to its state before the switch without needing to restart, thus improving the user experience.
[0010] In some embodiments of this application, after the first controller responds to a first switching command from a second application on the second controller to a first application on the first controller, and switches to the signal source channel corresponding to the first application, it is further configured to: In response to a third switching command to switch from a first application on the first controller to a third application on the second controller, the internal HDMI channel is switched in so that the display shows the display screen corresponding to the third application transmitted by the second controller via the internal HDMI channel; In response to the first switching command, after activating a preset empty active component, the second controller is further configured to: In response to the third switching instruction, the third application is launched and the empty active component is destroyed so that the third application runs in the foreground.
[0011] The above technical solution has the following beneficial effects or advantages: When switching from the first application on the first controller to the third application on the second controller, the second controller launches the third application and destroys the empty activity component. In this scheme, regardless of whether the user switches back to the original application or launches a new application, the empty activity component is destroyed, avoiding issues such as system memory consumption and stack logic anomalies caused by residual activities. Furthermore, the new application naturally overwrites the empty activity component and triggers its destruction upon launch, conforming to the operational logic of the Activity stack, thereby improving system stability.
[0012] In some embodiments of this application, the first controller, in response to a second switching instruction to switch from a first application on the first controller to a second application on the second controller, is further configured to: Launch the transparent activity component; the transparent activity component is an activity component without user interface controls and with a transparent background. The display is controlled to show the transparent interface corresponding to the transparent active component in the graphics layer, and to show the display screen corresponding to the second application transmitted by the second controller via the internal HDMI channel in the video layer; the video layer is located below the graphics layer. In response to a first switching instruction from a second application on the second controller to a first application on the first controller, the first controller is further configured to: Destroy the transparent active component.
[0013] The above technical solution has the following beneficial effects or advantages: The first controller uses a layered display mechanism of graphics (OSD) and video (Video) layers to carry the final display image. The video layer is used to display the image transmitted from the second controller via its internal HDMI channel. When switching from the first application on the first controller to the second application on the second controller, the first controller activates a transparent active component to display the corresponding transparent interface on the graphics layer. This allows the image displayed on the second controller, located in the lower video layer, to be transparently displayed. When switching from the second application on the second controller back to the first application on the first controller, the first controller destroys the transparent active component, promptly releasing graphics layer resources to ensure the display efficiency and performance of the application on the first controller side. This solves the problem that the image displayed on the second controller side application might be obscured by the content displayed in the graphics layer when switching from the first controller side application to the second controller side application.
[0014] In some embodiments of this application, the second controller initiates a preset empty active component, specifically configured as follows: Start the empty activity component and place it on top of the activity stack to trigger the second application to switch from foreground to background operation and enter a stopped state; The second controller destroys the empty active component, specifically configured as follows: The end method of the empty activity component is called to destroy the empty activity component and remove it from the activity stack, thereby triggering the second application to switch from a stopped state running in the background to running in the foreground.
[0015] The above technical solution has the following beneficial effects or advantages: This solution leverages Android's activity stack management mechanism to switch application states. When an empty activity component is launched, it is placed at the top of the activity stack to preempt foreground execution, triggering the second application to switch from foreground to background execution and enter a stopped state. By calling the empty activity component's finish method, it is removed from the activity stack, thus triggering the second application to resume its foreground execution from the background stopped state. This approach is based on Android's native activity stack mechanism, requiring no modification to the underlying system framework. By placing the empty activity component at the top of the stack, it reliably triggers the original foreground application's lifecycle callbacks, improving the precision of state management. Furthermore, destroying the empty activity component via the finish method avoids memory leaks caused by activity remnants, enhancing system stability.
[0016] In some embodiments of this application, the first controller is further configured to: In response to a fourth switching instruction to switch from a first application to a fourth application on the first controller, the system obtains a list of first applications corresponding to the first controller and requests a list of second applications corresponding to the second controller from the second controller. Iterate through the first application list and the second application list; If the first application list contains the fourth application and the second application list does not contain the fourth application, then launch the fourth application; If the first application list does not contain the fourth application and the second application list does contain the fourth application, switch to the internal HDMI channel and send the fourth switching command to the second controller.
[0017] The above technical solution has the following beneficial effects or advantages: When switching applications, the system queries the application lists of both controllers to identify the application's affiliation, automatically selecting between starting the application on the same controller or across controllers. This intelligent scheduling of application switching improves operational convenience. In this solution, users do not need to be aware of which controller an application belongs to; they can trigger application switching through a unified entry point, enhancing the user experience. Furthermore, by placing the application affiliation determination at the beginning of the switching process, invalid cross-device communication and signal source switching are avoided, improving the execution efficiency of the switching process.
[0018] In some embodiments of this application, the first controller is further configured to: If the first application list contains the fourth application and the second application list does not contain the fourth application, the application status of the fourth application is detected, and if the application status of the fourth application indicates that it is available, the fourth application is launched. If the first application list does not contain the fourth application and the second application list does contain the fourth application, a detection request is sent to the second controller. If the application status indication of the fourth application is received from the second controller, the internal HDMI channel is switched in and the fourth switching command is sent to the second controller.
[0019] The above technical solution has the following beneficial effects or advantages: By adding an application availability check before launching the application, the startup or switching operation is only performed when the application is available. This avoids system errors, unresponsiveness, and black screen issues caused by launching unavailable applications (such as those that are not installed, corrupted, disabled, undergoing upgrades, or malfunctioning), thus improving the success rate of application switching and system stability. Furthermore, in cross-controller application switching scenarios, verifying the application status of the peer in advance through communication can reduce invalid signal source switching operations.
[0020] In some embodiments of this application, after the first controller switches off the internal HDMI channel in response to a first switching command from a second application on the second controller to a first application on the first controller, it is further configured to: The second controller is fed back a first successful switch notification indicating that the internal HDMI channel has been switched out. Before the second controller responds to the first switching command and activates the preset empty active component, it is also configured to: Waiting for the first handover success notification sent by the first controller; Upon receiving the first successful switch notification, the empty activity component is started.
[0021] The above technical solution has the following beneficial effects or advantages: In scenarios where the internal HDMI channel is switched out, a successful switch notification mechanism is introduced to achieve synchronous coordination of cross-controller application switching. The first controller switches out the internal HDMI channel first, and then the second controller starts the idle active component. This avoids the original application stopping prematurely due to the idle active component starting early, which could lead to black screen or screen flickering during the switchout process, thus improving the visual smoothness of the switching process.
[0022] In some embodiments of this application, after the first controller switches into the internal HDMI channel in response to a second switching instruction from a first application on the first controller to a second application on the second controller, it is further configured to: A second successful switch notification is sent to the second controller to indicate that the internal HDMI channel has been switched into. Before the second controller destroys the empty active component in response to the second switching command, it is further configured to: Waiting for the second successful handover notification sent by the first controller; Upon receiving the second successful switch notification, the empty active component is destroyed.
[0023] The above technical solution has the following beneficial effects or advantages: In scenarios involving switching to the internal HDMI channel, a successful switch notification mechanism is introduced to achieve synchronous coordination of cross-controller application switching. The first controller switches to the internal HDMI channel first, and then the second controller destroys the empty active components, ensuring the timing consistency between screen display and application state recovery. This avoids the problem of abnormal screen display or chaotic input events caused by the premature destruction of empty active components, resulting in the application resuming foreground operation before the channel switch is completed.
[0024] Secondly, this application provides an application switching method applied to a display device, the display device including a display, a first controller, and a second controller; the first controller is connected to the display, and the first controller and the second controller are connected via an internal HDMI channel; the first controller is used to control the display to display a display screen corresponding to an application running on the second controller, transmitted by the second controller via the internal HDMI channel, or to control the display to display a display screen corresponding to an application running on the first controller; The method includes: The first controller controls the display to show the display screen corresponding to the second application transmitted by the second controller via the internal HDMI channel; In response to a first switching command to switch from a second application on the second controller to a first application on the first controller, the internal HDMI channel is switched out by the first controller so that the display shows the display screen corresponding to the first application; and a preset empty active component is started by the second controller to trigger the second application to switch from foreground to background operation and enter a stopped state; the empty active component is an active component without interface interaction controls.
[0025] The above technical solution has the following beneficial effects or advantages: In cross-controller application switching scenarios, when switching from a second application on a second controller to a first application on a first controller, the first controller disconnects its internal HDMI channel connected to the second controller. Simultaneously, the second controller launches an empty Activity component, utilizing Android's native Activity lifecycle management mechanism to switch the second application from foreground to background operation and enter the onStop state. This correctly pauses business logic and resolves the issue of system resource consumption caused by the switched-off application continuously maintaining a foreground running state during cross-controller application switching. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application; Figure 2 This is a schematic diagram of the hardware configuration of a display device provided in some embodiments of this application; Figure 3 This is a schematic diagram of the software configuration of a display device provided in some embodiments of this application; Figure 4 A schematic diagram of a dual-controller architecture provided in some embodiments of this application; Figure 5 A schematic diagram of a three-controller architecture provided in some embodiments of this application; Figure 6 A flowchart illustrating the application switching method provided in some embodiments of this application; Figure 7 A flowchart illustrating the application scenario for switching back to the previous state, provided in some embodiments of this application; Figure 8 A schematic diagram illustrating the process of switching to a third application provided for some embodiments of this application; Figure 9 This application provides schematic diagrams of layer display for some embodiments; Figure 10 This is a schematic diagram illustrating the layered display process of transparent active components provided in some embodiments of this application; Figure 11 This application provides schematic diagrams of the application startup process for some embodiments. Figure 12Interaction timing diagrams for handover success notifications provided in some embodiments of this application; Figure 13 Timing diagrams for application switching initiated by the first controller side, provided for some embodiments of this application; Figure 14 Timing diagrams for application switching initiated by the second controller side, provided for some embodiments of this application. Detailed Implementation
[0028] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0029] In this embodiment, the display device 200 generally refers to a device with screen display and data processing capabilities. For example, the display device 200 includes, but is not limited to, smart TVs, mobile terminals, computers, monitors, advertising screens, wearable devices, virtual reality devices, augmented reality devices, etc.
[0030] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application. For example... Figure 1 As shown, a user can operate the display device 200 via touch operation, a mobile terminal 300, and a control device 100. The control device 100 receives user input commands and converts them into control commands that the display device 200 can recognize and respond to. For example, the control device 100 can be a remote control, a stylus, a gamepad, etc.
[0031] The mobile terminal 300 can function as a control device for human-computer interaction between the user and the display device 200. It can also function as a communication device for establishing a communication connection with the display device 200 and exchanging data. In some embodiments, the mobile terminal 300 can have software applications installed on it and communicate with the display device 200 via network communication protocols to achieve one-to-one control and data communication. Furthermore, it can transmit audio and video content displayed on the mobile terminal 300 to the display device 200 for synchronized display.
[0032] In some embodiments, the mobile terminal 300 or other electronic devices may also simulate the functions of the control device 100 by running an application that controls the display device 200.
[0033] like Figure 1The diagram also shows that the display device 200 communicates with the server 400 via various communication methods. This allows the display device 200 to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0034] Display device 200 can provide broadcast television reception function, and can also be equipped with intelligent network television function that provides computer support, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.
[0035] Figure 2 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of display device 200.
[0036] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface 280.
[0037] In some embodiments, the display device 200 may employ a multi-controller architecture to... Figure 2 Taking the hardware configuration block diagram of the display device 200 shown as an example, the display device 200 adopts a dual-controller architecture. The controller 250 includes a first controller 251 and a second controller 252. The first controller 251 and the second controller 252 have the same hardware configuration.
[0038] The first controller 251 is connected to the display 260 and is used to control the display 260 to show the image and to perform switching and scheduling of signal source channels. The first controller 251 and the second controller 252 are connected through an internal channel used to transmit the display image between the first controller 251 and the second controller 252. The internal channel can be an internal HDMI channel, which is invisible to the application and does not display an entry for the internal HDMI channel in the signal source list. The application does not need to be aware of the existence of the internal HDMI channel.
[0039] It should be understood that the display device 200 provided in this embodiment may also adopt a multi-controller architecture with two or more controllers. The above-mentioned dual-controller architecture is only an exemplary embodiment of this application and is not a specific limitation on the number of controllers used by the display device 200.
[0040] In some embodiments, detector 230 is used to acquire signals from the external environment or to interact with the outside world. For example, detector 230 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0041] In some embodiments, the display 260 includes display function components for presenting images and driving components for driving image display. The display 260 is used to receive and display image signals output from the controller 250. For example, the display 260 can be used to display video content, image content, menu control interface components, and user control UI interfaces, etc.
[0042] In some embodiments, the communication device 220 is a component used to communicate with external devices or the server 400 according to various communication protocol types. The display device 200 may have multiple communication devices 220 depending on the supported communication methods. For example, when the display device 200 supports wireless network communication, it may have a communication device 220 with WiFi functionality. When the display device 200 supports Bluetooth connectivity, it needs to have a communication device 220 with Bluetooth functionality.
[0043] The communication device 220 enables the display device 200 to communicate with external devices or the server 400 via wireless or wired connections. Wired connections utilize data cables, interfaces, or other components to connect the display device 200 to external devices. Wireless connections utilize wireless signals or wireless networks. The display device 200 can directly establish a connection with external devices or indirectly through gateways, routers, or other connection devices.
[0044] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.
[0045] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0046] In some embodiments, a user can input user commands through a graphical user interface (GUI) displayed on a display 260, and the user input interface 280 receives the user input commands through the graphical user interface (GUI).
[0047] In some embodiments, the audio output device 270 can be a built-in speaker of the display device 200 or an external audio output device connected to the display device 200. For the external audio output device connected to the display device 200, the display device 200 may also be provided with an external audio output terminal, through which the audio output device can be connected to the display device 200 to output sound from the display device 200.
[0048] In some embodiments, the user input interface 280 can be used to receive instructions from user input.
[0049] To enable user interaction, in some embodiments, the display device 200 may run an operating system. The operating system is a computer program used to manage and control the hardware and software resources of the display device 200. The operating system can control the display device to provide a user interface; for example, the operating system can directly control the display device to provide a user interface, or it can provide a user interface by running an application. The operating system also allows users to interact with the display device 200.
[0050] It should be noted that the operating system can be a native operating system based on a specific operating platform, a third-party operating system that is deeply customized based on a specific operating platform, or an independent operating system specifically developed for display devices.
[0051] An operating system can be divided into different modules or levels based on the functions it implements, for example... Figure 3 As shown, in some embodiments, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the System Runtime Library layer, and the Kernel Layer.
[0052] In some embodiments, the application layer provides services and interfaces for applications, enabling the display device 200 to run applications and interact with the user based on the applications. The application layer may contain at least one application, which may be a built-in Windows program, system settings program, or clock program of the operating system; or it may be an application developed by a third-party developer. In specific implementations, the application packages in the application layer are not limited to the examples above.
[0053] In some embodiments, based on the multi-controller architecture provided in the foregoing embodiments, the application layer may include multiple sub-application layers, each corresponding one-to-one with a controller, for different controllers to run applications in their respective sub-application layers. For example, taking the dual-controller architecture provided in the foregoing embodiments as an example, the application layer includes a first sub-application layer and a second sub-application layer. The first sub-application layer includes applications 1, 2, etc., which are applications running on the first controller 251; the second application layer includes applications 3, 4, etc., which are applications running on the second controller 252.
[0054] It should be noted that the number of sub-application layers is the same as the number of controllers in the multi-controller architecture. This ensures a one-to-one correspondence between sub-application layers and controllers, allowing controllers to run applications in isolation, preventing resource contention between applications running on different controllers, guaranteeing the stability of each controller, and improving the overall smoothness of the display device 200. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer acts as a processing center, determining the actions of applications within the application layer. Applications can access system resources and obtain system services during execution through the API interface.
[0055] like Figure 3 As shown, the application framework layer in this embodiment includes a view system, managers, and content providers. The view system designs and implements the application's interface and interactions, and includes lists, grids, text boxes, and buttons. The managers include at least one of the following modules: an activity manager for interacting with all running activities in the system; a location manager for providing system services or applications with access to system location services; a package manager for retrieving various information related to application packages currently installed on the device; a notification manager for controlling the display and clearing of notification messages; and a window manager for managing icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0056] In some embodiments, the Activity Manager manages the lifecycle of individual applications and common navigation and back functions, such as controlling application exit, opening, and back actions. The Window Manager manages all window programs, such as obtaining the screen size, determining if a status bar is present, locking the screen, capturing the screen, and controlling changes to the display window, such as shrinking the display window, shaking the display, or distorting the display.
[0057] In some embodiments, the system runtime library layer can provide support for the framework layer. When the framework layer is used, the operating system runs the instruction library contained in the system runtime library layer, such as the C / C++ instruction library, to implement the functions to be performed by the framework layer.
[0058] In some embodiments, the kernel layer is a functional layer situated between the hardware and software of the display device 200. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management. For example, ... Figure 3 As shown, hardware drivers can be configured in the kernel layer. The kernel layer can contain at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0059] It should be noted that the above examples are merely a simple division of operating system functions and do not limit the specific form of the operating system of the display device 200 in this application embodiment. Depending on the function of the display device, the type of operating system, and other factors, the number of levels and the specific level type of the operating system may be expressed in other forms.
[0060] To improve application performance, the display device 200 may adopt a dual-controller architecture, such as... Figure 4 The diagram shown is a schematic of a dual-controller architecture provided in an embodiment of this application. The dual-controller architecture includes a first controller 251 and a second controller 252. The first controller 251 is connected to a display 260 and is used to control the display 260 to display images and to perform switching and scheduling of signal source channels. The first controller 251 and the second controller 252 are connected via an internal HDMI channel, which is used to transmit display images between the first controller 251 and the second controller 252.
[0061] In the aforementioned dual-controller architecture, the internal HDMI channel refers to the HDMI transmission channel between the first controller 251 and the second controller 252. Unlike the HDMI transmission channel of external devices, this internal HDMI channel is invisible to the application, and its entry is not displayed in the signal source list. The application does not need to be aware of its existence. When the first controller 251 switches the signal source channel to the internal HDMI channel, the display image generated by the second controller 252 is transmitted to the first controller 251 through the internal HDMI channel, and finally output by the first controller 251 to the display 260 for display.
[0062] In some embodiments, the display device 200 may employ a multi-controller architecture, for example, the display device 200 may employ a three-controller architecture, such as... Figure 5 The diagram shown illustrates a three-controller architecture provided in this embodiment. The three-controller architecture includes a first controller 251, a second controller 252, and a third controller 253. The third controller 253 is connected to the display 260. The first controller 251 is connected to the second controller 252 via an internal HDMI channel, and the first controller 251 is connected to the third controller 253 via an HDMI channel. In other words, the first controller 251 can act as an HDMI access device for the third controller 253, and the second controller 252 can act as an HDMI access device for the first controller 251.
[0063] The first controller 251, acting as the main controller, is responsible for power-on / off control, status control, core communication logic, signal source input, image and audio quality processing, and running some applications. The first controller 251 inputs the display image to the third controller 253 via an HDMI channel, or receives the display image transmitted from the second controller 252 via an internal HDMI channel and inputs it to the third controller 253. The third controller 253 keeps the signal source continuously on the HDMI channel where the first controller 251 is located, converting the display image transmitted by the first controller 251 via the HDMI channel into a display signal of a specific resolution and outputting it to the monitor 260 for display. The second controller 252 is responsible for user peripherals, application ecosystem, and mobile application operating environment. The second controller 252 inputs the display image to the first controller 251 via an internal HDMI channel. There is no direct connection between the third controller 253 and the second controller 252.
[0064] In some embodiments, both the first controller 251 and the second controller 252 deploy various applications, and the deployment of applications can be determined based on the controller's capabilities. For example, if an application requires the use of physical channels, such as TV channels or HDMI channels, it is deployed on a controller equipped with physical channels; if an application requires the use of WiFi or Bluetooth functions, it is deployed on a controller configured with WiFi or Bluetooth modules; if an application has high performance requirements, it is deployed on a controller with higher performance. By deploying applications according to the controller's capabilities, the hardware advantages of each controller can be fully utilized, and functional redundancy can be avoided.
[0065] In some embodiments, the second controller 252 typically deploys most applications and third-party applications installed by the user, while the first controller 251 deploys applications and system applications related to the physical channel, such as settings and screensavers.
[0066] In the dual-controller architecture described above, when the application switches from the second controller 252 to the first controller 251, the first controller 251 will switch out its internal HDMI channel, but the application running in the foreground on the second controller 252 will continue to run and continuously occupy system resources.
[0067] For example, if the second controller 252 is currently running a video-on-demand application, the first controller 251 controls the display 260 to show the corresponding video-on-demand application content transmitted by the second controller 252 via the internal HDMI channel for the user to watch. At this time, the user switches to the live TV application on the first controller 251 via the source list or a shortcut key. The first controller 251 launches the live TV application and switches the source to the TV channel to receive broadcast television signals. The display content transmitted via the internal HDMI channel is not visible at this time. However, the video-on-demand application on the second controller 252 is unaware of the source switching operation by the first controller 251 and continues to play the video, continuously consuming system resources. When the user switches back to the video-on-demand application later, the video may have already played for a considerable time, degrading the user experience and wasting system resources.
[0068] In some embodiments, when switching from the application of the second controller 252 to the application of the first controller 251, the second controller 252 can directly launch the home page to put the current application into a stopped state. However, the disadvantage of this solution is that it is impossible to return to the application before the switch, which reduces the user experience.
[0069] To address the aforementioned issues, this application provides a display device and application switching method. In a cross-controller application switching scenario, when switching from an application on the second controller 252 to an application on the first controller 251, the first controller 251 disconnects the internal HDMI channel connected to the second controller 252. Simultaneously, the second controller 252 activates a preset empty activity component and utilizes an activity lifecycle management mechanism to switch the switched-off application from foreground to background operation and into a stopped state, correctly pausing business logic and thus preventing the switched-off application from continuously maintaining its running state and occupying system resources.
[0070] It should be noted that the embodiments of this application are illustrated using a dual-controller architecture as an example, but the technical solutions of this application are also applicable to cross-controller application switching in three-controller or more-controller architectures.
[0071] like Figure 6 The diagram shown is a flowchart illustrating the application switching method provided in this application embodiment, which specifically includes the following steps: S601, the first controller 251 controls the display 260 to display the display screen corresponding to the second application transmitted by the second controller 252 via the internal HDMI channel. In response to the first switching command to switch from the second application on the second controller 252 to the first application on the first controller 251, the internal HDMI channel is switched out so that the display 260 displays the display screen corresponding to the first application.
[0072] When the first controller 251 switches the signal source channel to the internal HDMI channel and controls the display 260 to display the display screen corresponding to the second application transmitted by the second controller 252 via the internal HDMI channel, if the user triggers a first switching command to switch from the second application on the second controller 252 to the first application on the first controller 251, the first controller 251 responds to the first switching command by switching out the internal HDMI channel, so that the display screen of the display 260 is switched from the display screen corresponding to the second application to the display screen corresponding to the first application.
[0073] In some embodiments, the first switching command may be triggered by the user via remote control, touch operation, voice command, or other means.
[0074] S602, the second controller 252 responds to the first switching command by activating a preset empty activity component to trigger the second application to switch from running in the foreground to running in the background and enter a stopped state.
[0075] While the first controller 251 switches out the internal HDMI channel, the second controller 252 responds to the first switching command and starts a preset empty activity component. An empty activity component is an activity component without any interface interaction controls, that is, a blank activity component (Activity) that does not contain any interface interaction controls (such as buttons, text boxes, images, etc.) and does not interact with the user.
[0076] Due to Android's activity lifecycle management mechanism, when an empty activity component is launched and placed in the foreground, the second application that was originally running in the foreground will be automatically switched to the background and enter the onStop state. In the onStop state, the application's interface is no longer visible, the application pauses the execution of business logic, and releases some system resources (such as GPU rendering resources, network connections, etc.), thereby reducing the consumption of system resources.
[0077] It should be noted that the empty activity component needs to be pre-registered and configured in the system of the second controller 252. In some embodiments, the empty activity component can be an independent activity component, which is registered when the system starts, but its initial state is not started. When the first switching instruction is received, the second controller 252 starts the empty activity component by calling the startActivity interface. In other embodiments, the empty activity component can also be dynamically created by the system service and instantiated on demand.
[0078] In some embodiments, to adapt to the needs of different display scenarios, the background color of the empty active component can be set to a variety of different colors, such as black, gray, or other colors consistent with the system theme color. It can be dynamically adjusted according to specific application scenarios and visual requirements. For example, when the first controller 251 needs to switch signal sources, its output screen will typically be briefly black. To avoid abrupt visual switching, the background color of the empty active component can be set to black to provide the user with a smooth visual transition experience.
[0079] In some embodiments, such as Figure 7 The diagram shown is a flowchart illustrating the application scenario for switching back according to an embodiment of this application. After the first controller 251 responds to the first switching command and switches out the internal HDMI channel, it is further configured to perform the following steps: S701, in response to a second switching command from a first application on the first controller 251 to a second application on the second controller 252, the first controller 251 switches to the internal HDMI channel so that the display 260 displays the display screen corresponding to the second application.
[0080] If the user triggers a second switching command to switch from the first application on the first controller 251 to the second application on the second controller 252, the first controller 251 responds to the second switching command by switching to the internal HDMI channel, so that the display screen of the monitor 260 is switched from the display screen corresponding to the first application to the display screen corresponding to the second application.
[0081] In response to the first switching command, after activating the empty active component, the second controller 252 is further configured to perform the following steps: S702, the second controller 252 responds to the second switching command by destroying the empty active component to trigger the second application to switch from a stopped state running in the background to running in the foreground.
[0082] While the first controller 251 switches to the internal HDMI channel, the second controller 252 responds to the second switching command and destroys the empty active component. After the empty active component is destroyed, the second application that was running in the background will be automatically restored to the foreground running state by the system, and the user can continue to use the second application, and the application state can remain in the state before the switch.
[0083] Because the second application enters the onStop state instead of the onDestroy state when switched to the background, the application's data and state remain in memory. When the empty active component is destroyed, the second application can directly restore to its state before the switch when it resumes running in the foreground, without needing to reload or initialize.
[0084] For example, if the second application is a video playback application, the video pauses when switched out; when switched back, the video playback application resumes running in the foreground, and the video continues playing from the paused position, so the user does not need to find the playback progress again. As another example, if the second application is a game application, the game pauses when switched out; when switched back, the game application resumes running from the paused state, so the user does not need to restart the game.
[0085] In some embodiments of the Android system, the activity stack is used to manage the lifecycle and switching order of Activities. The Activity at the top of the stack is in the foreground running state. The Activity below the top of the stack is in the background running state. When a new Activity is launched and pushed onto the top of the stack, the Activity that was previously at the top of the stack is pushed onto the stack (below the top of the stack) and enters the onStop state.
[0086] In response, the second controller 252 can start an empty activity component and place it on top of the activity stack to trigger the second application to switch from foreground to background operation and enter a stopped state.
[0087] Understandably, because the empty active component is placed on top of the stack, the second application, which was originally running in the foreground, is pushed onto the stack. The system automatically triggers the lifecycle callback of the second application, causing it to enter a stopped state. In the stopped state, the application's interface is invisible, and its business logic is suspended.
[0088] Correspondingly, the second controller 252 can call the finish method of the empty activity component to destroy the empty activity component and remove it from the activity stack, thereby triggering the second application to switch from a stopped state running in the background to running in the foreground.
[0089] Understandably, when the empty active component is removed, the second application located below it is automatically restored to the top of the stack, and the system triggers the lifecycle callback of the second application, restoring the second application to the foreground running state.
[0090] In some embodiments, such as Figure 8 The diagram shown is a schematic representation of the process of switching to a third application according to an embodiment of this application. After the first controller 251 responds to the first switching command and switches out the internal HDMI channel, it is further configured to perform the following steps: S801, in response to a third switching command from a first application on the first controller 251 to a third application on the second controller 252, the first controller 251 switches to the internal HDMI channel so that the display 260 displays the display screen corresponding to the third application transmitted by the second controller 252 via the internal HDMI channel.
[0091] If a user triggers a third switching command to switch from the first application on the first controller 251 to the third application on the second controller 252, the first controller 251 responds to the third switching command by switching to the internal HDMI channel, so that the display 260 displays the display screen corresponding to the third application transmitted by the second controller 252.
[0092] In response to the first switching command, after activating the empty active component, the second controller 252 is further configured to perform the following steps: S802, the second controller 252 starts the third application and destroys empty active components so that the third application runs in the foreground.
[0093] While the first controller 251 switches to the internal HDMI channel, the second controller 252 responds to the third switching command and launches the third application. When the third application starts and enters the foreground, the empty active components that were previously running in the foreground will be automatically switched to the background by the system. The second controller 252 can destroy the empty active components and remove them from the activity stack to ensure that the third application runs stably in the foreground.
[0094] It should be noted that when the third switching instruction is triggered, the empty activity component is still running in the foreground, while the second application is in a stopped state in the background. After the second controller 252 starts the third application, the third application is placed at the top of the activity stack, and the empty activity component is pushed onto the stack. At this time, the second controller 252 actively calls the finish method of the empty activity component to destroy it, so that only the second application (background) and the third application (foreground) remain in the activity stack, keeping the activity stack clean.
[0095] In some embodiments, in the display architecture of the display device 200, the displayed image is typically composed of multiple layers superimposed, including a video layer and an OSD layer. For example... Figure 9 The diagram shown is a schematic representation of layer display provided in an embodiment of this application. The video layer is located below the graphics layer and is used to display video content, such as a display screen input via an HDMI channel. The graphics layer is used to display user interface elements, such as menus, pop-ups, and buttons.
[0096] When the first controller 251 switches to the internal HDMI channel, the display image transmitted by the second controller 252 through the internal HDMI channel will be displayed on the video layer. If there is opaque display content on the graphics layer, it will block the display image on the video layer.
[0097] In this regard, such as Figure 10 The diagram shown illustrates the layered display process of a transparent active component provided in this embodiment. The first controller 251 is also configured to perform the following steps: S1001, in response to a second switching instruction to switch from a first application on the first controller 251 to a second application on the second controller 252, the transparent activity component is activated.
[0098] Among them, the transparent activity component is an activity component that does not have any interface interaction controls and has a transparent background. That is, an Activity with a completely transparent background does not contain any visible interface interaction controls, but occupies the display space of the graphics layer.
[0099] S1002, the control display 260 displays a transparent interface corresponding to the transparent active component on the graphics layer, and displays a display screen corresponding to the second application transmitted by the second controller 252 via the internal HDMI channel on the video layer.
[0100] When switching from the first application on the first controller 251 to the second application on the second controller 252, the first controller 251 activates the transparent activity component to display the corresponding transparent interface on the graphics layer. Since the transparent interface is completely transparent, the graphics layer does not obscure the content of the underlying video layer, allowing the display screen corresponding to the second application shown in the video layer to be displayed normally on the monitor 260 through the graphics layer.
[0101] S1003, in response to a first switching instruction to switch from the second application on the second controller 252 to the first application on the first controller 251, the transparent active component is destroyed.
[0102] When switching from the second application on the second controller 252 to the first application on the first controller 251, the first controller 251 destroys the transparent active component, releases the display resources of the graphics layer, and enables the display screen corresponding to the first application to be displayed normally.
[0103] In some embodiments, such as Figure 11 The diagram shown is a schematic of the application startup process provided in an embodiment of this application. The first controller 251 is also configured to perform the following steps: S1101, in response to the fourth switching instruction from the first application on the first controller 251 to the fourth application, obtain the first application list corresponding to the first controller 251, and request the second application list corresponding to the second controller 252 from the second controller 252.
[0104] When a user triggers a switch from the first application on the first controller 251 to the fourth application, the first controller 251 retrieves the first application list it maintains. Simultaneously, the first controller 251 sends an application list request to the second controller 252 to obtain the second application list maintained by the second controller 252.
[0105] The first application list contains application identifiers for all applications installed on the first controller 251, and the second application list contains application identifiers for all applications installed on the second controller 252. Application identifiers can be unique identifiers such as application package names or application names. The first controller 251 and the second controller 252 synchronize and query the application lists through an internal communication channel (such as a serial port or network socket).
[0106] The first controller 251 traverses the first application list and the second application list to determine the controller to which the fourth application belongs.
[0107] S1102, if the first application list contains the fourth application and the second application list does not contain the fourth application, start the fourth application.
[0108] If the first application list contains the fourth application and the second application list does not contain the fourth application, it means that the fourth application is installed on the first controller 251. The first controller 251 can directly start the fourth application without switching between controller applications.
[0109] S1103, if the first application list does not contain the fourth application and the second application list contains the fourth application, switch to the internal HDMI channel and send the fourth switching command to the second controller 252.
[0110] If the first application list does not contain the fourth application but the second application list does contain the fourth application, it means that the fourth application is installed on the second controller 252 and cross-controller application switching is required. In this case, the first controller 251 switches to the internal HDMI channel and sends a fourth switching instruction to the second controller 252 to indicate switching from the first application on the first controller 251 to the fourth application on the second controller 252, so as to notify the second controller 252 to execute the cross-controller application switching process and start the fourth application.
[0111] In some embodiments, the display device 200 can maintain all applications installed on the first controller 251 and the second controller 252 through a unified application list. This application list can be uniformly stored in a preset shared storage partition of the display device 200, and can be accessed and read by the first controller 251 and the second controller 252. The first controller 251 and the second controller 252 can directly obtain the application list from the shared storage partition to determine the ownership of the application to be launched.
[0112] In some embodiments, if the first application list contains the fourth application and the second application list does not contain the fourth application, the first controller 251 may also detect the application status of the fourth application and start the fourth application if the application status of the fourth application indicates that it is available.
[0113] When the fourth application is installed on the first controller 251, the first controller 251 checks the application status of the fourth application before starting it. The application status includes, but is not limited to, installed and working normally, not installed, damaged, disabled, upgrading, or abnormally failed. The first controller 251 only starts the fourth application when the application status indicator is available (i.e., installed and working normally).
[0114] If the first application list does not contain the fourth application and the second application list does contain the fourth application, the first controller 251 can send a detection request to the second controller 252. If the second controller 252 receives feedback that the application status indication of the fourth application is available, the first controller 251 switches to the internal HDMI channel and sends a fourth switching command to the second controller 252.
[0115] When the fourth application is installed on the second controller 252, the first controller 251 sends a detection request to the second controller 252, requesting the second controller 252 to detect the application status of the fourth application. After receiving the detection request, the second controller 252 detects the application status of the fourth application and feeds back the detection result to the first controller 251. Only when the application status indication fed back by the second controller 252 is available will the first controller 251 switch to the internal HDMI channel and send the fourth switching command.
[0116] In some embodiments, in response to a fourth switching command from a first application to a fourth application on the first controller 251, the first controller 251 detects whether the fourth application is in an upgrade list, the upgrade list including applications that need to be upgraded in the first controller 251 and the second controller 252. If the fourth application is not in the upgrade list, the fourth application is launched or a fourth switching command is sent to the second controller 252. If the fourth application is in the upgrade list, an upgrade process is triggered, generating and controlling the display 260 to show an upgrade reminder for the fourth application to prompt the user whether the fourth application needs to be upgraded.
[0117] If the user agrees to the upgrade, the controller installed in the fourth application will complete the upgrade of the fourth application. After the upgrade of the fourth application is completed, the first controller 251 will start the fourth application or send a fourth switching command to the second controller 252. If the user refuses the upgrade, the upgrade process will not be triggered, and the first controller 251 will directly start the fourth application or send a fourth switching command to the second controller 252 to complete the application switching operation.
[0118] In some embodiments, the first controller 251 and the second controller 252 may each maintain their own corresponding upgrade list. When the first controller 251 or the second controller 252 receives an application launch command, it can obtain its own corresponding upgrade list and request to obtain the upgrade list of the other controller to detect whether the application needs to be upgraded.
[0119] The above embodiment illustrates the application startup process executed by the first controller 251. Similarly, the second controller 252 can also execute application startup according to the same logic. That is, after receiving a switching instruction from the second application to the fifth application, the second controller 252 first obtains its own maintained list of second applications and requests the first controller 251 to obtain the list of first applications. After traversing both lists, it determines the ownership of the fifth application. If the fifth application is in the second application list, the second controller 252 directly checks the target application's status; if the status is available, it starts the application directly. If the fifth application is in the first application list, the second controller 252 sends the corresponding switching instruction to the first controller 251, which then completes the subsequent application startup process. Simultaneously, the same logic can be used to check whether the fifth application is in the upgrade list, and the user's choice can be used to decide whether to upgrade before starting the application.
[0120] In some embodiments, such as Figure 12The diagram shown is an interactive timing diagram of the switching success notification provided in an embodiment of this application. In the scenario of switching out the internal HDMI channel, the first controller 251 responds to the first switching command, switches out the internal HDMI channel, and then sends a first switching success notification to the second controller 252 to indicate that the internal HDMI channel has been switched out, notifying the second controller 252 that the channel switching has been completed.
[0121] Before the second controller 252 responds to the first switching command and starts the preset empty active component, it can wait for the first switching success notification sent by the first controller 251. After receiving the first switching success notification, the empty active component will be started.
[0122] Understandably, after receiving the first switching instruction, the second controller 252 does not immediately start the empty active component, but waits for the first switching success notification sent by the first controller 251. Only after the second controller 252 receives the first switching success notification will it start the empty active component. This timing control can prevent the empty active component from starting prematurely, causing the second application to enter the stopped state too early, thus avoiding problems such as black screen or flickering during the switching process.
[0123] Similarly, in the scenario of switching to the internal HDMI channel, the first controller 251 responds to the second switching command, and after switching to the internal HDMI channel, sends a second switching success notification to the second controller 252 to indicate that the internal HDMI channel has been switched, notifying the second controller 252 that the channel switching has been completed.
[0124] Before destroying the empty active component in response to the second switching command, the second controller 252 may wait for the second switching success notification sent by the first controller 251. After receiving the second switching success notification, the empty active component will be destroyed.
[0125] Understandably, upon receiving the second switching command, the second controller 252 does not immediately destroy the empty active component, but instead waits for the second switching success notification sent by the first controller 251. Only after the second controller 252 receives the second switching success notification does it destroy the empty active component. This timing control ensures the consistency of the timing between screen display and application state recovery, avoiding the problem of premature destruction of the empty active component causing the second application to resume foreground operation before the internal HDMI channel has completed the switching, resulting in abnormal screen display or chaotic input events.
[0126] In some embodiments, the first controller 251 and the second controller 252 are equipped with different functional services or functional modules. Both the first controller 251 and the second controller 252 can receive user input operation commands, and they support bidirectional forwarding of operation commands. That is, when the first controller 251 receives an application switching command, it can forward it to the second controller 252, and when the second controller 252 receives an application switching command, it can forward it to the first controller 251.
[0127] In the dual-controller architecture, the first controller 251 and the second controller 252 are each responsible for different functional modules. After receiving the operation command input by the user, either the first controller 251 or the second controller 252 can determine the functional service or functional module that the operation command needs to call, and thus determine whether it needs to be forwarded to the other controller for processing.
[0128] The following example illustrates the application switching provided in this application.
[0129] The user is watching a video on demand using a video-on-demand application on the second controller 252, while the monitor 260 displays the video-on-demand application's screen (transmitted via the internal HDMI channel). If the user wants to launch a live TV application on the second controller 252 via the source list or a shortcut key, the first controller 251 launches the live TV application and switches from the internal HDMI channel to the TV channel. The second controller 252 activates an empty active component and places it on top of the active stack. At this point, the video-on-demand application is pushed onto the stack, enters the onStop state, video playback pauses, and GPU rendering resources and network connections are released. The monitor 260 then displays the live TV application's screen.
[0130] When the user selects to return to the video-on-demand application via remote control, the first controller 251 switches to the internal HDMI channel, the second controller 252 destroys the empty active component, the video-on-demand application returns to the top of the active stack, enters the foreground running state, and the video resumes playback from the paused position. At this time, the display 260 shows the video-on-demand application's screen.
[0131] In some embodiments, cross-controller application switching is achieved through a transition service, which acts as a bridge between the two controllers and is responsible for coordinating the application switching process. Specifically, the first controller 251 integrates a first transition service module and a first state synchronization service module, while the second controller 252 integrates a second transition service module and a second state synchronization service module. The transition service module is responsible for uniformly receiving application switching commands, completing application ownership determination, availability detection, and upgrade status detection, and scheduling the application switching process. The state synchronization service module serves as a communication bridge between the two controllers, responsible for communication and command interaction during cross-controller application switching.
[0132] like Figure 13 The diagram shown is a timing diagram of application switching initiated by the first controller 251 side according to an embodiment of this application. In the scenario where application switching is initiated by the first controller 251 side, the cross-controller application switching process is triggered by a certain process, coordinated and scheduled by the first transition service module on the first controller 251 side, and completed in collaboration with other modules.
[0133] A process first sends an application switching instruction to the first transition service module to switch to the target application. After receiving the application switching instruction, the first transition service module first checks the ownership of the target application. If the target application belongs to the first controller 251, the same card boot process is executed. This process includes the logic of checking whether the target application is available and determining whether the target application is in the upgrade list. For details, please refer to the following description.
[0134] If the target application belongs to the second controller 252, the cross-card startup process is executed. The first transition service module initiates an application availability detection request to the second controller 252 through the first state synchronization service module. If the detection result returned by the second controller 252 is that the target application is unavailable, the first transition service module outputs the corresponding log information and terminates the current application switching process. If the detection result is that the target application is available, the subsequent upgrade status detection is continued.
[0135] The first transition service module retrieves the upgrade list and checks if the target application is on the list. If the target application is on the upgrade list, the first transition service module uses the preset upgrade processing logic to send a corresponding broadcast to the upgrade module, which then takes over the application upgrade-related processing, and the current application startup process terminates. If the target application is not on the upgrade list, the application startup process continues.
[0136] The first transition service module sends a start command to the transparent activity component, activating it. This transparent activity component contains no UI interaction controls and has a transparent background. It occupies the foreground activity stack in the Android system's graphics layer, allowing the display screen of the underlying video layer to pass through, thus preventing the display screen of the second controller 252 from being obscured by the original content of the graphics layer. After the transparent activity component starts, the first transition service module calls the middleware to perform a signal source switching operation, switching to the internal HDMI channel to complete the hardware display path switching. This allows the display screen of the second controller 252 to be transmitted to the first controller 251 through the internal HDMI channel and displayed in the video layer.
[0137] After the signal source switching is completed, the first transition service module sends a cross-card application launch command to the second state synchronization service module of the second controller 252 through the first state synchronization service module. The command may carry the Activity class name of the target application. After receiving the cross-card application launch command through the second state synchronization service module, the second controller 252 launches the corresponding target application according to the Activity class name of the target application, so that the target application runs at the top of the activity stack of the second controller 252. The display screen of the target application is transmitted to the first controller 251 through the internal HDMI channel, and finally output by the first controller 251 to the display 260 for display.
[0138] like Figure 14 The diagram shown is a timing diagram of application switching initiated by the second controller 252 side according to an embodiment of this application. In the scenario where application switching is initiated by the second controller 252 side, the cross-controller application switching process is triggered by a certain process, coordinated and scheduled by the second transition service module on the second controller 252 side, and completed in collaboration with other modules.
[0139] A process first sends an application switching instruction to the second transition service module to switch to the target application. After receiving the application switching instruction, the second transition service module first checks the ownership of the target application.
[0140] If the target application belongs to the second controller 252, the same-card boot process is executed. The second transition service module queries the second state synchronization service module to see if the target application is in the upgrade list. If the target application is in the upgrade list, the second transition service module sends an upgrade broadcast to the upgrade module, which then takes over the corresponding upgrade processing task, and the current application boot process terminates. If the target application is not in the upgrade list, the second transition service module further checks whether the current signal source of the first controller 251 is in the internal HDMI path corresponding to the second controller 252.
[0141] If the current signal source is already in the internal HDMI channel corresponding to the second controller 252, the second transition service module directly calls the system framework layer interface to start the target application, placing the target application at the top of the active stack and completing the application switching within this card.
[0142] If the current signal source is not in the internal HDMI channel corresponding to the second controller 252, the second transition service module sends a start command to the transparent active component on the first controller 251 side through the second state synchronization service module. The transparent active component then calls the middleware to perform a signal source switching operation, switching the signal source on the first controller 251 side into the internal HDMI channel, completing the hardware display channel switching. Then, the second transition service module calls the system framework layer to start the target application. The timing of the signal source switching and application startup in this process can be dynamically configured. In this embodiment, the first controller 251 side completes the signal source switching first, and then the second controller 252 side executes the application startup, avoiding the user observing the page animation during the application startup process and improving the visual smoothness of cross-channel switching.
[0143] If the target application belongs to the first controller 251, the cross-card startup process is executed. The second transition service module sends a cross-card application startup command to the first transition service module on the first controller 251 side through the second state synchronization service module, notifying the first controller 251 side to start the target application. After receiving the cross-card application startup command, the first transition service module starts the target application and simultaneously performs a signal source switching operation through middleware, switching out the internal HDMI channel so that the display 260 displays the display screen of the target application.
[0144] After the first transition service module detects a successful signal source switch, it sends a notification to the second transition service module to start an empty activity component. The second transition service module starts the preset empty activity component through the system framework layer, places it at the top of the activity stack, triggers the application that was originally running in the foreground to switch from the foreground to the background, and enters a stopped state, suspending the execution of business logic and releasing running resources.
[0145] When switching back from the application on the first controller 251 side to the application on the second controller 252 side, an application switchback process can be executed. After detecting the application return or switching event, the first transition service module on the first controller 251 side performs a signal source switching operation through middleware, switching to the corresponding internal HDMI channel of the second controller 252. At the same time, the application switchback command is synchronized to the second transition service module on the second controller 252 side. After receiving the application switchback command, the second transition service module calls the end method of the empty active component, removes the empty active component from the activity stack and destroys it, so that the application that was originally in the background stopped state is automatically restored to the top of the activity stack and re-enters the foreground running state. The user can continue the usage state before the switch without reloading the application.
[0146] When switching from the application on the first controller 251 side to a new application on the second controller 252 side, the second controller 252 destroys empty active components while starting the new application, and the new application is placed directly on the top of the activity stack and enters the foreground running state.
[0147] It should be noted that the timing flow in the two scenarios described above is merely illustrative and not intended to limit the technical solution of this application. In actual system design and implementation, the specific interaction logic between functional modules, the timing of instruction transmission, and the details of state switching can be flexibly adjusted according to the specific hardware architecture, operating system characteristics, and performance optimization requirements.
[0148] Based on the aforementioned display device 200, some embodiments of this application also provide an application switching method, applied to the display device, which includes a display 260, a first controller 251, and a second controller 252; the first controller 251 is connected to the display 260, and the first controller 251 and the second controller 252 are connected via an internal HDMI channel. The first controller 251 is used to control the display 260 to display a display screen corresponding to an application running on the second controller 252, transmitted via the internal HDMI channel, or to control the display 260 to display a display screen corresponding to an application running on the first controller 251. The method includes the following steps: The first controller 251 controls the display 260 to display the display screen corresponding to the second application transmitted by the second controller 252 via the internal HDMI channel.
[0149] In response to a first switching command from the second application on the second controller 252 to the first application on the first controller 251, the first controller 251 switches out its internal HDMI channel so that the display 260 shows the display screen corresponding to the first application; and the second controller 252 activates a preset empty active component to trigger the second application to switch from foreground to background operation and enter a stopped state. The empty active component is an active component without user interface controls.
[0150] Based on the above application switching method, when switching from an application on the second controller 252 to an application on the first controller 251, the first controller 251 switches out its internal HDMI channel, and at the same time, the second controller 252 starts an empty active component. By using the activity lifecycle management mechanism, the application that has been switched out enters a stopped state, correctly suspends business logic, and solves the problem of system resource occupation caused by the application that has been switched out continuing to maintain a foreground running state when switching between controllers.
[0151] It should be noted that the application switching method described in this application embodiment can adopt the same principle and implementation as the above-described display device 200 embodiment, and will not be repeated here. The application switching method described in this application embodiment can be applied to the heterogeneous architecture of at least two controllers, but is not a limitation thereof. The application switching method described in this application embodiment can also be applied to the display device 200 with three or more controllers.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0153] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that, include: monitor; The first controller is connected to the display; the first controller and the second controller are connected via an internal HDMI channel. The first controller is configured to control the display to display a screen corresponding to an application running on the second controller, transmitted via the internal HDMI channel by the second controller, or to control the display to display a screen corresponding to an application running on the first controller; The first controller is also configured to: Control the display to show the display screen corresponding to the second application transmitted by the second controller via the internal HDMI channel; In response to a first switching command to switch from a second application on the second controller to a first application on the first controller, the internal HDMI channel is switched off so that the display shows the display screen corresponding to the first application; The second controller is configured as follows: In response to the first switching command, a preset empty activity component is launched to trigger the second application to switch from running in the foreground to running in the background and enter a stopped state; the empty activity component is an activity component without interface interaction controls.
2. The display device according to claim 1, characterized in that, In response to a first switching command that switches from a second application on the second controller to a first application on the first controller, after the first controller switches off the internal HDMI channel, it is further configured to: In response to a second switching command to switch from a first application on the first controller to a second application on the second controller, the internal HDMI channel is switched in so that the display shows the display screen corresponding to the second application; In response to the first switching command, after activating a preset empty active component, the second controller is further configured to: In response to the second switching instruction, the empty active component is destroyed to trigger the second application to switch from a stopped state running in the background to running in the foreground.
3. The display device according to claim 1, characterized in that, In response to a first switching command from a second application on the second controller to a first application on the first controller, the first controller, after switching to the signal source channel corresponding to the first application, is further configured to: In response to a third switching command to switch from a first application on the first controller to a third application on the second controller, the internal HDMI channel is switched in so that the display shows the display screen corresponding to the third application transmitted by the second controller via the internal HDMI channel; In response to the first switching command, after activating a preset empty active component, the second controller is further configured to: In response to the third switching instruction, the third application is launched and the empty active component is destroyed so that the third application runs in the foreground.
4. The display device according to claim 2, characterized in that, In response to a second switching instruction that switches from a first application on the first controller to a second application on the second controller, the first controller is further configured to: Launch the transparent activity component; the transparent activity component is an activity component without user interface controls and with a transparent background. The display is controlled to show the transparent interface corresponding to the transparent active component in the graphics layer, and to show the display screen corresponding to the second application transmitted by the second controller via the internal HDMI channel in the video layer; the video layer is located below the graphics layer. In response to a first switching instruction to switch from a second application on the second controller to a first application on the first controller, the first controller is further configured to: Destroy the transparent active component.
5. The display device according to claim 1, characterized in that, The second controller initiates a preset empty active component, specifically configured as follows: Start the empty activity component and place it on top of the activity stack to trigger the second application to switch from foreground to background operation and enter a stopped state; The second controller destroys the empty active component, specifically configured as follows: The end method of the empty activity component is called to destroy the empty activity component and remove it from the activity stack, thereby triggering the second application to switch from a stopped state running in the background to running in the foreground.
6. The display device according to claim 1, characterized in that, The first controller is also configured to: In response to a fourth switching instruction to switch from a first application to a fourth application on the first controller, the system obtains a list of first applications corresponding to the first controller and requests a list of second applications corresponding to the second controller from the second controller. Iterate through the first application list and the second application list; If the first application list contains the fourth application and the second application list does not contain the fourth application, then launch the fourth application; If the first application list does not contain the fourth application and the second application list does contain the fourth application, switch to the internal HDMI channel and send the fourth switching command to the second controller.
7. The display device according to claim 6, characterized in that, The first controller is also configured to: If the first application list contains the fourth application and the second application list does not contain the fourth application, the application status of the fourth application is detected, and if the application status of the fourth application indicates that it is available, the fourth application is launched. If the first application list does not contain the fourth application and the second application list does contain the fourth application, a detection request is sent to the second controller. If the application status indication of the fourth application is received from the second controller, the internal HDMI channel is switched in and the fourth switching command is sent to the second controller.
8. The display device according to claim 1, characterized in that, In response to a first switching command that switches from a second application on the second controller to a first application on the first controller, after the first controller switches off the internal HDMI channel, it is further configured to: The second controller is fed back a first successful switch notification indicating that the internal HDMI channel has been switched out. Before the second controller responds to the first switching command and activates the preset empty active component, it is also configured to: Waiting for the first handover success notification sent by the first controller; Upon receiving the first successful switch notification, the empty activity component is started.
9. The display device according to claim 2, characterized in that, In response to a second switching command from a first application on the first controller to a second application on the second controller, after switching into the internal HDMI channel, the first controller is further configured to: A second successful switch notification is sent to the second controller to indicate that the internal HDMI channel has been switched into. Before the second controller destroys the empty active component in response to the second switching command, it is further configured to: Waiting for the second successful handover notification sent by the first controller; Upon receiving the second successful switch notification, the empty active component is destroyed.
10. An application switching method, characterized in that, The invention is applied to a display device, which includes a display, a first controller, and a second controller. The first controller is connected to the display, and the first controller and the second controller are connected via an internal HDMI channel. The first controller is used to control the display to display a display screen corresponding to an application running on the second controller, transmitted by the second controller via the internal HDMI channel, or to control the display to display a display screen corresponding to an application running on the first controller. The method includes: The first controller controls the display to show the display screen corresponding to the second application transmitted by the second controller via the internal HDMI channel; In response to a first switching command to switch from a second application on the second controller to a first application on the first controller, the internal HDMI channel is switched out by the first controller so that the display shows the display screen corresponding to the first application; and a preset empty active component is started by the second controller to trigger the second application to switch from foreground to background operation and enter a stopped state; the empty active component is an active component without interface interaction controls.