A method, apparatus, and storage medium for synchronous display of a status bar on a secondary screen.
By calling the system display management service in the Android operating system to obtain the secondary screen display object and synchronize the main screen status bar content, the problem of untimely display of the secondary screen status bar is solved, realizing real-time synchronization and stable display of the secondary screen and the main screen status bar, thus improving the user experience of multi-screen devices.
Patent Information
- Application Number
- CN202610623817.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-08
- Publication Date
- 2026-07-31
AI Technical Summary
In the Android operating system, the secondary screen lacks an intuitive display of system status and notifications, which makes it impossible for users to obtain key information in a timely manner, affecting the user experience. Existing technologies are difficult to synchronize the display of the main screen status bar content to the secondary screen, and there are also significant bandwidth consumption and latency issues.
The secondary screen display object is obtained by calling the system display management service, a display window is created and a fixed-height top status bar content area is reserved, which is separated from the application content area. The system status content of the main screen is synchronized to the status bar display of the secondary screen, and the application display mode is monitored and automatically reset to a non-full-screen state to prevent obstruction.
It achieves real-time synchronization between the secondary screen status bar and the main screen status, ensuring consistency in user information acquisition, preventing the application interface and status bar from obscuring each other, and improving the user experience of multi-screen devices.
Smart Images

Figure CN122489180A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of dual-screen device application technology, and in particular to a method, device and storage medium for synchronous display of a status bar on a secondary screen. Background Technology
[0002] With technological advancements, dual-screen terminals, foldable screen devices, and terminals equipped with external secondary screens are becoming increasingly common. The secondary screen is primarily used to extend the display or showcase dedicated content. In operating systems like Android, the System UI is responsible for drawing and updating the main screen's status bar, which contains key information such as time and signal strength, and is tightly bound to the main screen. Although the system provides multi-display support mechanisms, it does not achieve synchronized display of the main screen's status bar content to the secondary screen.
[0003] In practical applications, when users primarily operate or view content on the secondary screen, the lack of a clear display of system status and notifications makes it difficult to obtain crucial information in a timely manner, impacting the user experience. Currently, there are several similar methods to display the status bar on the secondary screen, but all have limitations. While main screen mirroring or screen casting technologies allow the secondary screen to see the status bar, they limit the secondary screen's ability to independently display application content and introduce significant bandwidth consumption and latency issues, failing to meet the dual requirements of "independent application display on the secondary screen and a persistent status bar." Custom status bars within applications lack a data synchronization mechanism with the system status bar, making it difficult to ensure consistency of status information between the main and secondary screens. Furthermore, each application needs to repeatedly develop related functions, increasing maintenance costs. In addition, most dual-screen solutions adopt a design where "only the secondary screen displays the application, and the status bar remains only on the main screen," resulting in secondary screen users being unable to obtain system status information when viewing applications in full screen. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for synchronous display of the status bar on a secondary screen, which enables accurate synchronous display of status bar information on the primary screen on the secondary screen.
[0005] In a first aspect, this application provides a method for synchronous display of a status bar on a secondary screen, applicable to multi-screen devices containing a primary screen and a secondary screen, comprising:
[0006] The system display management service is invoked to obtain the secondary screen display object, and a display window is created based on the secondary screen display object. The display window has a top status bar content area with a fixed height, and the top status bar content area is separated from the application content area below. Configure the secondary screen application display mode to non-full-screen state, and synchronize the system status content of the main screen to the status bar content area of the secondary screen for display, so that the secondary screen application interface is only displayed in the application content area; The display mode of the secondary screen application is monitored. When the secondary screen application display mode is detected to be in full-screen mode, the secondary screen application display mode is reset to non-full-screen mode at a preset trigger time.
[0007] Optionally, the step of invoking the system display management service to obtain the secondary screen display object and creating a display window based on the secondary screen display object includes: Based on the identifier information of the pre-specified secondary screen, the getDisplays method of the system display management service is called to obtain the secondary screen display object; Based on the secondary screen display object, a custom status bar is created, and the original status bar in the system display window is inherited through the custom status bar.
[0008] Optionally, the method of configuring the secondary screen application display mode to a non-full-screen state and synchronizing the system status content of the main screen to the status bar content area of the secondary screen, so that the secondary screen application interface is only displayed before the application content area is displayed, further includes: In the initialization method, a secondary screen icon manager is created, and the secondary screen icon manager is bound to the secondary screen status icon container; Register the secondary screen icon manager to the global status bar icon controller.
[0009] Optionally, configuring the secondary screen application display mode to a non-full-screen state and synchronizing the system status content of the main screen to the status bar content area of the secondary screen includes: Configure the secondary screen application display mode to non-fullscreen state, and call the display method to make the display window appear on the secondary screen; The global status bar icon controller is invoked to synchronize the system status content of the main screen to the status bar content area of the display window.
[0010] Optionally, before invoking the system display management service to obtain the secondary screen display object and creating a display window based on the secondary screen display object, the method further includes: Call the system display management service to obtain the display device array, where the display device array represents the number of secondary screens; If the display device array is greater than 0 and the corresponding display device is valid, then it is determined that there is a valid secondary screen display object.
[0011] Optionally, after configuring the secondary screen application display mode to a non-full-screen state and synchronizing the system status content of the main screen to the status bar content area of the secondary screen, the method further includes: Obtain the notification inner area view of the main screen status bar, and add the notification inner area view of the main screen status bar to the secondary screen notification icon area container.
[0012] Optionally, the preset triggering timing includes at least one of setting application exit, secondary screen window configuration change, and preset strategy triggering.
[0013] Secondly, this application provides a secondary screen synchronous display device for a status bar, comprising: The processing unit is used to call the system display management service to obtain the secondary screen display object and create a display window based on the secondary screen display object. The display window has a top status bar content area with a fixed height, and the top status bar content area is separated from the application content area below. The synchronization unit is used to configure the secondary screen application display mode to a non-full-screen state and synchronize the system status content of the main screen to the status bar content area of the secondary screen for display, so that the secondary screen application interface is only displayed in the application content area. The monitoring and reset unit is used to monitor the display mode of the secondary screen application. When the secondary screen application display mode is detected to be full-screen mode, the secondary screen application display mode is reset to non-full-screen mode at a preset trigger time.
[0014] Optionally, the synchronization unit may also include: An initialization unit is used to create a secondary screen icon manager in the initialization method and bind the secondary screen icon manager to the secondary screen status icon container; The registration unit is used to register the secondary screen icon manager to the global status bar icon controller.
[0015] Optionally, the processing unit may also include: The first acquisition unit is used to call the system display management service to obtain the display device array, wherein the display device array represents the number of secondary screens. The verification unit is used to determine that there is a valid secondary screen display object if the display device array is greater than 0 and the corresponding display device is valid.
[0016] Optionally, the synchronization unit may also include: The second acquisition unit is used to acquire the notification inner area view of the main screen status bar and add the notification inner area view of the main screen status bar to the secondary screen notification icon area container.
[0017] Thirdly, this application provides a secondary screen synchronous display device for a status bar, comprising: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method of the first aspect and any possible implementation of the first aspect.
[0018] A fourth aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, causes the computer to perform the methods of the first aspect and any possible implementation thereof.
[0019] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The secondary screen display object is obtained by calling the system display management service and a display window is created based on the secondary screen display object. The window has a fixed height reserved for the top status bar content area and the bottom application content area. The two are separated from each other, which provides physical isolation between the status bar and application content from the window construction level, ensuring the clarity of the secondary screen display architecture and creating a structural foundation for the subsequent status bar. The secondary screen application display mode is configured to be non-full-screen, and the system status content of the main screen is synchronized to the status bar content area of the secondary screen. At the same time, the secondary screen application interface is displayed only in an independent application content area, which realizes real-time synchronization between the secondary screen status bar and the main screen status, ensuring the consistency of information acquisition for users on multiple screen devices. Furthermore, the area separation in non-full-screen mode avoids the application interface and status bar from obscuring each other. By continuously monitoring the display mode of secondary screen applications, when the secondary screen application's display mode is detected to switch to full-screen mode, it is reset to non-full-screen mode at a preset trigger time. This effectively prevents the secondary screen status bar from being hidden due to third-party applications forcing them into full-screen mode, ensuring the continuous visibility and display stability of the secondary screen status bar. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, 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.
[0021] Figure 1 A schematic flowchart of an embodiment of the method for synchronous display of the status bar on a secondary screen provided in this application; Figure 2 A schematic flowchart of another embodiment of the method for synchronous display of the status bar on a secondary screen provided in this application; Figure 3 A schematic flowchart of an embodiment of the verification sub-screen method provided in this application; Figure 4 A schematic diagram of an embodiment of the status bar secondary screen synchronous display device provided in this application; Figure 5A schematic diagram of another embodiment of the status bar secondary screen synchronous display device provided in this application. Detailed Implementation
[0022] This application provides a method, apparatus, and storage medium for synchronous display of the status bar on a secondary screen, which enables accurate synchronous display of status bar information from the main screen on the secondary screen.
[0023] The method of this application can be applied to various multi-screen devices that include a main screen and a secondary screen. These devices include, but are not limited to, combinations of tablet computers and external displays, laptop computers and external displays, multi-screen workstations, and smart terminals with main and secondary screen functions, etc., and this application does not limit them. Furthermore, the executing entity of this method is not specifically limited; it can be the operating system itself running on the multi-screen device, a specific application installed on the multi-screen device, or a combination of the operating system kernel and a specific application. For ease of description, the following description uses the system as the executing entity.
[0024] The embodiments of this application will now be described with reference to the accompanying drawings.
[0025] Please see Figure 1 An embodiment of the method for synchronous display of the status bar on a secondary screen in this application is applied to a multi-screen device containing a main screen and a secondary screen, including: S101. Call the system display management service to obtain the secondary screen display object, and create a display window based on the secondary screen display object. The display window has a fixed-height top status bar content area, and the top status bar content area is separated from the application content area below. The system uses a standard interface provided by the display management service to iterate through all display devices in a multi-screen setup. Based on parameters such as device identifier and display priority, it filters out the display objects corresponding to the secondary screens that are not the primary screen. These secondary screen display objects contain core parameter information, specifically including the secondary screen's physical resolution, pixel density, display orientation, screen size, and display status. After obtaining the secondary screen display object, a display window is created based on its core parameters to fully adapt to the secondary screen's display specifications. This ensures that the size and resolution of the display window perfectly match the secondary screen, completely covering the secondary screen's display area without stretching or distortion.
[0026] A fixed-height status bar content area is reserved at the top of the display window. This fixed height can be preset according to the actual size of the secondary screen and the standard display height of the system status bar, and can be flexibly adjusted according to actual application scenarios. Meanwhile, the top status bar content area and the application content area below adopt a clear separation design, with distinct boundaries between the two, ensuring they do not interfere with each other and operate independently. The status bar content area is specifically used to carry system status bar related information, while the application content area is specifically used to display the interface content of various applications. This provides a foundation for subsequent synchronized status bar display and independent application display, avoiding issues such as content overlap and obstruction.
[0027] S102. Configure the secondary screen application display mode to non-full-screen state, and synchronize the system status content of the main screen to the status bar content area of the secondary screen for display, so that the secondary screen application interface is only displayed in the application content area. After completing the creation of the display window and area division in step S101, configure the application display mode of the secondary screen to a non-full-screen state. Specifically, limit the display range of the secondary screen applications through system-level settings to prevent the application interface from directly filling the entire display area of the secondary screen, thereby preventing the reserved status bar content area from being obscured and ensuring that the status bar content area is always visible.
[0028] Simultaneously, a real-time synchronization mechanism is established between the system status content of the main screen and the status bar content area of the secondary screen. By calling the status data interface provided by the system interface (SystemUI), the system continuously renders the real-time status bar content of the main screen onto the top status bar content area of the secondary screen window in a mirrored or synchronous rendering manner, ultimately achieving consistency in display rules, layout style, update frequency, etc., between the top status bar content area of the secondary screen window and the main screen status bar.
[0029] The real-time status bar on the main screen includes, but is not limited to, the current time (accurate to the minute and second, supporting 12-hour / 24-hour format switching), mobile signal strength (including signal bars and carrier identification), WiFi connection status (including WiFi name and connection strength), battery level (including battery percentage and charging status indicator), system notification icons (including number of unread notifications and notification type identification), alarm clock reminders, and Bluetooth connection status.
[0030] The system interface controls the secondary screen application interface to only be displayed within the application content area below the display window, ensuring that the application interface can fully display its own content and operate normally, without exceeding the boundary of the application content area or obscuring the status bar content area above.
[0031] S103. Monitor the display mode of the secondary screen application. When the secondary screen application display mode is detected to be full-screen mode, reset the secondary screen application display mode to non-full-screen mode at a preset trigger time.
[0032] The system continuously monitors whether the current application on the secondary screen's display window requests or is in full-screen mode. Full-screen mode includes a display state where the application interface completely fills the entire display area of the secondary screen, obscuring the status bar content area reserved in step S101, resulting in the status bar information not being displayed. This state may be manually set by the user, forcibly triggered by the application itself, or caused by system abnormalities.
[0033] When the system detects that the secondary screen application has switched to full-screen mode, it will automatically trigger a reset mechanism. This means that at a preset trigger time, the secondary screen application's display mode will be reset to a non-full-screen state, ensuring that the status bar content area can be restored to visibility. This ensures that a fixed display space is always reserved for the secondary screen status bar content area, guaranteeing that the status bar content can be displayed stably.
[0034] In this embodiment, the secondary screen display object is obtained by calling the system display management service and a display window is created based on the secondary screen display object. The window has a fixed height reserved for the top status bar content area and the bottom application content area. The two are separated from each other, which provides physical isolation between the status bar and application content from the window construction level, ensuring the clarity of the secondary screen display architecture and creating a structural foundation for the subsequent status bar. The secondary screen application display mode is configured to be non-full-screen, and the system status content of the main screen is synchronized to the status bar content area of the secondary screen. At the same time, the secondary screen application interface is displayed only in an independent application content area, which realizes real-time synchronization between the secondary screen status bar and the main screen status, ensuring the consistency of information acquisition for users on multiple screen devices. Furthermore, the area separation in non-full-screen mode avoids the application interface and status bar from obscuring each other. By continuously monitoring the display mode of secondary screen applications, when the secondary screen application's display mode is detected to switch to full-screen mode, it is reset to non-full-screen mode at a preset trigger time. This effectively prevents the secondary screen status bar from being hidden due to third-party applications forcing them into full-screen mode, ensuring the continuous visibility and display stability of the secondary screen status bar.
[0035] The following provides a detailed explanation of the method for synchronizing the status bar on a secondary screen as provided in this application. Please refer to [link / reference]. Figure 2 Another embodiment of the method for synchronous display of the status bar on a secondary screen in this application includes: S201. Based on the identifier information of the pre-specified secondary screen, call the getDisplays method of the system display management service to obtain the secondary screen display object; The pre-assigned secondary screen's identification information consists of unique identification parameters pre-assigned to each secondary screen in a multi-screen device system. This information may include the secondary screen's device ID, hardware address, and display name. This identification information allows for precise location of the target secondary screen, avoiding identification errors and display misalignment in multi-screen scenarios. The system display management service manages multiple display devices (including the main screen and secondary screens). First, it obtains the pre-assigned secondary screen's identification information and then sends a request to the system display management service through a specific interface, calling its `getDisplays` method. This method searches and matches the input identification information within the system (the list of connected display devices). Once the corresponding secondary screen is found, the secondary screen display object is returned.
[0036] The secondary screen display object includes core parameters such as the secondary screen's physical resolution, pixel density, display orientation, screen size, and display status, providing basic data support for subsequent status bar creation and display window adaptation.
[0037] S202. Based on the secondary screen display object, create a custom status bar, and inherit the original status bar in the display window within the system through the custom status bar. After obtaining the secondary screen display object, based on the display parameters (such as size and resolution) provided by the secondary screen display object, a suitable status bar for display on the secondary screen is created by calling the corresponding graphical interface creation tool or framework. During the creation process, through a specific inheritance mechanism, the functions and attributes of the original status bar in the system's display window are passed to the custom status bar, giving it the same basic functionality. By inheriting from the original status bar in the system's display window, the display rules, update mechanisms, and status data interfaces of the original status bar can be directly reused.
[0038] S203. In the initialization method, create a secondary screen icon manager and bind the secondary screen icon manager to the secondary screen status icon container; The secondary screen icon manager manages and processes various icons displayed on the secondary screen status bar, such as application icons and system status icons. The secondary screen status icon container is the display container used to hold various icons in the secondary screen status bar; its position and size are adapted to the custom status bar of the secondary screen.
[0039] During the initialization phase, code creating a secondary screen icon manager is executed, instantiating a secondary screen icon manager object. Then, by calling specific binding methods or setting relevant properties, this icon manager object is associated with a pre-created secondary screen status icon container. Binding the secondary screen icon manager to the secondary screen status icon container establishes a relationship between the two, enabling the icon manager to control and manage the display, updating, and hiding of icons within the container. Binding the secondary screen icon manager to the secondary screen status icon container establishes a linkage mechanism between the two, allowing the secondary screen icon manager to directly control the display status of various icons within the container, ensuring that icons are displayed accurately according to preset rules, and facilitating subsequent reception of status information synchronized from the main screen and rapid icon updates.
[0040] S204. Register the secondary screen icon manager to the global status bar icon controller; The global status bar icon controller is a core component at the system level responsible for the unified management of all status bar icons (including the main screen and secondary screen). It can coordinate the status synchronization and update scheduling of status bar icons on the main and secondary screens to ensure that the status bar icons on the main and secondary screens can maintain a consistent display state.
[0041] The registration interface provided by the global status bar icon controller is called, passing the created and bound secondary screen icon manager object as a parameter. Internally, the global status bar icon controller adds the secondary screen icon manager to its management list and establishes the corresponding association for subsequent management and control. By registering the secondary screen icon manager with the global status bar icon controller, the global controller can recognize and manage the icon display on the secondary screen, enabling unified scheduling and collaborative work of status bar icons across different screens. This includes synchronizing icon display status across different screens and handling system-level icon update events.
[0042] S205. Configure the secondary screen application display mode to non-full-screen state, and call the display method to make the display window appear on the secondary screen; The system retrieves the current application display mode settings for the secondary screen. By calling the corresponding setting function or modifying configuration parameters, it sets the secondary screen's application display mode to non-fullscreen mode. This ensures that the secondary screen does not occupy the entire screen space when displaying applications, but instead reserves a certain area for displaying the status bar and other information. For example, in the Android system, specific system service interfaces can be used to modify the application's window attributes, setting the window's layout parameters to a non-fullscreen size and position.
[0043] The called display method is the window display interface provided by the system. The display method accurately projects the created display window (including the custom status bar and application content area) onto the secondary screen according to the parameters of the secondary screen display object, ensuring that the size and resolution of the display window are completely matched with the secondary screen, without stretching, deformation, offset or other phenomena, while ensuring that the display window can respond normally to system operations.
[0044] S206. Call the global status bar icon controller to synchronize the system status content of the main screen to the status bar content area of the display window; After the display window is successfully displayed on the secondary screen, the global status bar icon controller is invoked. Upon receiving the request, the global status bar icon controller collects the current status information of the main screen's system status bar. Then, according to the format and requirements of the display window's status bar content area, this information is converted and adapted. The adapted status information is then sent to the display window's status bar content area for display, ensuring that the status bar of the secondary screen display window is consistent with the content displayed in the main screen's system status bar. For example, if the main screen displays a 24-hour time format, the same format will be maintained when synchronized to the secondary screen.
[0045] S207. Obtain the notification inner area view of the main screen status bar and add the notification inner area view of the main screen status bar to the secondary screen notification icon area container. The notification inner area view in the main screen status bar is the core view component on the main screen used to display various system notifications and application notifications. It includes complete notification display elements such as notification icons, notification summaries, and unread notifications, and can intuitively reflect the current notification status.
[0046] By using the view acquisition interface provided by the system, the internal area view responsible for displaying notifications in the main screen status bar can be accurately obtained. The internal area view contains all currently displayed notification icons and related information, such as unread message notifications and system update notifications.
[0047] After obtaining the notification's internal area view, a secondary screen notification icon area container is created. This container is used to display notification icons on the secondary screen. Then, the obtained main screen notification's internal area view is added to this container, and appropriate layout adjustments and style settings are made to ensure the notification icons display correctly on the secondary screen and are consistent with the overall interface style.
[0048] This synchronization method not only ensures that secondary screen notifications and main screen notifications are completely consistent in display style and content details, but also ensures real-time updates of notifications. When main screen notifications are added, deleted, or their status changes, secondary screen notifications can also respond synchronously, allowing users to receive various notification information on the secondary screen in a timely manner without having to switch to the main screen to view them.
[0049] S208. Monitor the display mode of the secondary screen application. When the secondary screen application display mode is detected to be full-screen mode, reset the secondary screen application display mode to non-full-screen mode at a preset trigger time.
[0050] Step S208 is similar to step S103 in the aforementioned embodiment, and will not be described again here.
[0051] In this embodiment, the `getDisplays` method is called by pre-specifying the secondary screen identifier to accurately locate the target secondary screen. The core parameters of the secondary screen obtained provide accurate data support for subsequent adaptation operations. A custom status bar is created based on the secondary screen display object, and by inheriting from the original system status bar, it achieves accurate adaptation to the secondary screen while reusing the original core functions, significantly reducing development costs. Simultaneously, it ensures consistency in function and style between the main and secondary screen status bars, effectively improving the user's multi-screen interaction experience. During initialization, a secondary screen icon manager is created and bound to the secondary screen status icon container, establishing a refined icon management mechanism to ensure neat and real-time updates of the secondary screen status bar icons. The secondary screen icon manager is registered with the global status bar icon controller, successfully establishing a collaborative linkage mechanism for main and secondary screen icon management, effectively avoiding problems such as asynchronous updates and display errors between the main and secondary screen icons.
[0052] By configuring the secondary screen application to operate in non-fullscreen mode and calling the display method to project the display window onto the secondary screen, the status bar is prevented from being obscured by the application. Using a global status bar icon controller, the system status content of the main screen is synchronized to the status bar content area of the secondary screen display window, achieving real-time synchronization and complete consistency of status information between the main and secondary screens. By obtaining the notification inner area view of the main screen status bar and directly adding it to the secondary screen notification icon area container, consistency in notification display between the main and secondary screens is ensured, and no secondary development conversion of notification content is required, simplifying the implementation process. By monitoring the display mode of the secondary screen application in real time, a reset mechanism is automatically triggered when fullscreen mode is detected, restoring it to a non-fullscreen state, effectively avoiding status bar obstruction issues caused by persistent fullscreen states and ensuring the status bar remains visible.
[0053] In the above embodiments, the preset triggering time includes at least one of setting application exit, secondary screen window configuration change, and preset strategy triggering.
[0054] At a preset trigger time, the secondary screen application display mode will be reset to non-full-screen mode. The preset trigger time can be flexibly preset according to the actual application scenario of the multi-screen device, including but not limited to when the currently running full-screen application exits, when a new application starts on the secondary screen, when the secondary screen display state changes (such as from off to on, from landscape to portrait), after the system wakes up from sleep mode, and when the user changes the content displayed on the secondary screen.
[0055] Please see Figure 3One embodiment of the method for verifying the secondary screen in this application includes: S301. Call the system display management service to obtain the display device array, which represents the number of secondary screens. The system display management service, as the core component for managing all display terminals on the device, can adopt the DisplayManager service in the Android system. This service can monitor all connected and identified display devices on the device in real time and manage them in a unified manner.
[0056] By calling the corresponding interface provided by the system's display management service, all connected display devices in the system are traversed and collected. Detailed information about each display device (such as its unique identifier, resolution, and display mode) is encapsulated into objects, ultimately returning an array containing all display devices—the display device array. Each element in this array corresponds to a display device recognized by the system. The array's length (number of elements) directly corresponds to the total number of currently existing secondary screens. The array records basic identification information for each display device, used for subsequent device validity checks, providing data support for subsequent verification logic, and enabling rapid statistics on the number of secondary screens.
[0057] S302. If the display device array is greater than 0 and the corresponding display device is valid, then it is determined that there is a valid secondary screen display object.
[0058] Upon receiving the array of display devices, the system first checks the array's length. If the array length is 0, it's determined that there's no secondary screen, and no further status bar synchronization operations are needed. However, if the array length is greater than 0, it indicates that at least one display device is connected to the system, potentially suggesting the existence of a secondary screen, requiring further verification.
[0059] Even if the display device array is not empty, some display devices may be connected to the system but fail to function properly due to various reasons (such as driver issues, hardware failures, incorrect display settings, etc.). Therefore, each display device in the array is further validated. The validation includes whether the display device is in a normal connection state, whether it is successfully recognized by the system, whether it has normal display capabilities (e.g., not in a sleep, fault, or disconnected state), and whether it can respond normally to system commands. After validation, if at least one valid display device in the array meets the above conditions, a valid secondary display object is finally determined, and the detailed information of the secondary display object is then obtained.
[0060] In this embodiment, by calling the system display management service to obtain the display device array, the number of secondary screens currently existing on the device can be counted. Simultaneously, basic identification information of each display device is obtained, providing data support for secondary screen validity verification. Through dual verification of the display device array length and display device validity, the existence of a valid secondary screen display object can be accurately determined. This avoids problems such as wasted system resources and operation errors caused by performing subsequent operations when the secondary screen does not exist, and also eliminates potential risks such as abnormal status bar synchronization and operation failures due to invalid secondary screens (e.g., disconnection or malfunction).
[0061] Please see Figure 4 One embodiment of the secondary screen synchronous display device for the status bar in this application includes: The processing unit 401 is used to call the system display management service to obtain the secondary screen display object and create a display window based on the secondary screen display object. The display window has a fixed-height top status bar content area, and the top status bar content area is separated from the application content area below. Synchronization unit 402 is used to configure the secondary screen application display mode to a non-full-screen state and synchronize the system status content of the main screen to the status bar content area of the secondary screen for display, so that the secondary screen application interface is only displayed in the application content area. The monitoring and reset unit 403 is used to monitor the display mode of the secondary screen application. When the secondary screen application display mode is detected to be full-screen mode, the secondary screen application display mode is reset to non-full-screen mode at a preset trigger time.
[0062] In an optional embodiment, the synchronization unit 402 further includes: Initialization unit 404 is used to create a secondary screen icon manager in the initialization method and bind the secondary screen icon manager to the secondary screen status icon container; Registration unit 405 is used to register the secondary screen icon manager to the global status bar icon controller.
[0063] In an optional embodiment, the processing unit 401 further includes: The first acquisition unit 406 is used to call the system display management service to obtain the display device array, which represents the number of secondary screens. The verification unit 407 is used to determine that there is a valid secondary screen display object if the display device array is greater than 0 and the corresponding display device is valid.
[0064] In an optional embodiment, the synchronization unit 402 is followed by: The second acquisition unit 408 is used to acquire the notification inner area view of the main screen status bar and add the notification inner area view of the main screen status bar to the secondary screen notification icon area container.
[0065] In this implementation, the functions of each unit and the aforementioned Figures 1-3 The steps in the illustrated embodiments are the same and will not be repeated here.
[0066] Please see Figure 5 Another embodiment of the secondary screen synchronous display device for the status bar in this application includes: Processor 501, memory 502, input / output unit 503, and bus 504; The processor 501 is connected to the memory 502, the input / output unit 503, and the bus 504; The memory 502 stores a program, which the processor 501 calls to execute. Figures 1 to 2 The steps in the illustrated embodiment.
[0067] In this embodiment, the function of processor 501 is the same as described above. Figures 1 to 3 The steps in the illustrated embodiments are the same and will not be repeated here.
[0068] This application also provides a computer-readable storage medium on which a program is stored. When the program is executed on a computer, it causes the computer to perform the aforementioned actions. Figures 1 to 3 The method in any possible implementation.
[0069] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0070] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0071] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0072] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0073] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A status bar sub-screen synchronous display method applied to a multi-screen device comprising a main screen and a sub-screen, characterized in that, include: The system display management service is invoked to obtain the secondary screen display object, and a display window is created based on the secondary screen display object. The display window has a top status bar content area with a fixed height, and the top status bar content area is separated from the application content area below. Configure the secondary screen application display mode to non-full-screen state, and synchronize the system status content of the main screen to the status bar content area of the secondary screen for display, so that the secondary screen application interface is only displayed in the application content area; The display mode of the secondary screen application is monitored. When the secondary screen application display mode is detected to be in full-screen mode, the secondary screen application display mode is reset to non-full-screen mode at a preset trigger time.
2. The method of claim 1, wherein, The step of invoking the system display management service to obtain the secondary screen display object and creating a display window based on the secondary screen display object includes: Based on the identifier information of the pre-specified secondary screen, the getDisplays method of the system display management service is called to obtain the secondary screen display object; Based on the secondary screen display object, a custom status bar is created, and the original status bar in the system display window is inherited through the custom status bar.
3. The method of claim 2, wherein, The method of configuring the secondary screen application display mode to a non-full-screen state and synchronizing the system status content of the main screen to the status bar content area of the secondary screen, so that the secondary screen application interface is only displayed before the application content area is displayed, further includes: In the initialization method, a secondary screen icon manager is created, and the secondary screen icon manager is bound to the secondary screen status icon container; Register the secondary screen icon manager to the global status bar icon controller.
4. The method of claim 3, wherein, The step of configuring the secondary screen application display mode to a non-full-screen state and synchronizing the system status content of the main screen to the status bar content area of the secondary screen includes: Configure the secondary screen application display mode to non-fullscreen state, and call the display method to make the display window appear on the secondary screen; The global status bar icon controller is invoked to synchronize the system status content of the main screen to the status bar content area of the display window.
5. The method of claim 1, wherein, Before invoking the system display management service to obtain the secondary screen display object and creating a display window based on the secondary screen display object, the method further includes: Call the system display management service to obtain the display device array, where the display device array represents the number of secondary screens; If the display device array is greater than 0 and the corresponding display device is valid, then it is determined that there is a valid secondary screen display object.
6. The method of claim 1, wherein, After configuring the secondary screen application display mode to non-fullscreen and synchronizing the system status content of the main screen to the status bar content area of the secondary screen, the method further includes: Obtain the notification inner area view of the main screen status bar, and add the notification inner area view of the main screen status bar to the secondary screen notification icon area container.
7. The method according to any one of claims 1 to 6, characterized in that, The preset triggering timing includes at least one of the following: application exit, secondary screen window configuration change, and preset strategy triggering.
8. A status bar sub-screen synchronous display device, characterized by comprising: include: The processing unit is used to call the system display management service to obtain the secondary screen display object and create a display window based on the secondary screen display object. The display window has a top status bar content area with a fixed height, and the top status bar content area is separated from the application content area below. The synchronization unit is used to configure the secondary screen application display mode to a non-full-screen state and synchronize the system status content of the main screen to the status bar content area of the secondary screen for display, so that the secondary screen application interface is only displayed in the application content area. The monitoring and reset unit is used to monitor the display mode of the secondary screen application. When the secondary screen application display mode is detected to be full-screen mode, the secondary screen application display mode is reset to non-full-screen mode at a preset trigger time.
9. A status bar sub-screen synchronous display device, characterized by comprising: include: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, which, when executed on a computer, causes the computer to perform the method as described in any one of claims 1 to 7.