Picture switching method and apparatus for head unit screen, and electronic device, and storage medium
By distinguishing the front desk status of the target page in the car machine and delaying or instantly obtaining skin replacing information, the IO resource run caused by skin replacing broadcast is solved, and a smoother screen switching effect of the car machine is achieved.
Patent Information
- Application Number
- PCT/CN2024/115084
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-13
- Filing Date
- 2024-08-28
- Publication Date
- 2025-03-20
AI Technical Summary
In car computers, in multiple processes and multiple page scenarios, skin replacing broadcasts lead to a run of system IO resources, causing the problem of screen viewing lag.
By distinguishing whether the target page is in the foreground state, the target pages that are not in the foreground state are delayed to obtain skin replacing information, and only the target pages in the foreground state are allowed to obtain skin replacing information instantly, reducing the CPU resources consumed for processing IO things.
It alleviates the car crash caused by skin removal, optimizes the use of computing resources, and ensures the smoothness of users' use under the current page.
Smart Images

Figure CN2024115084_20032025_PF_FP_ABST
Abstract
Description
Method, device, electronic device, and storage medium for switching screens on a vehicle Technical Field
[0001] The present application relates to the field of screen images, and in particular to a method for switching screen images of a vehicle computer screen, a device for switching screen images of a vehicle computer screen, an electronic device, a storage medium and a vehicle. Background Art
[0002] Under the current technological background, the computing power resources of car computers are weaker than those of mobile phones. Although it is more convenient to directly transplant the system solution of mobile phones, the weak computing power resources of car computers make it difficult for the car computers to run the processes well. For example, there is a problem of slow screen response.
[0003] This is because, from the system's perspective, every time a new app is launched, regardless of whether it is in the foreground, every time a skinning broadcast arrives, IO operations are performed to read resources and update the style. Even though most apps are invisible in the foreground, in fact, most processes do not need to perform IO operations at this time, and users cannot see the entire page at this time. From the perspective of a single process, every time a new page is launched, a corresponding skinning control pool needs to be built. Whenever a skinning broadcast arrives, regardless of whether the page is in the foreground, IO operations are performed to read resources and skin it. At this time, only the foreground page that the user can see needs to be skinned.
[0004] Therefore, based on the analysis of the above technical background, a car screen switching solution is needed, which can prevent the arrival of skin change broadcasts and the squeeze of system IO resources, resulting in screen freeze caused by skin change, in scenarios where multiple processes and multiple pages have been opened.
[0005] Summary of the Invention
[0006] The object of the present invention is to provide a method for switching screens on a vehicle computer, a device for switching screens on a vehicle computer, an electronic device, a storage medium and a vehicle, so as to solve at least one of the above-mentioned technical problems.
[0007] The present invention provides the following solutions:
[0008] According to one aspect of the present invention, a method for switching screens on a vehicle computer is provided, the method comprising:
[0009] The target APP is started and the skin change information initialization is completed;
[0010] According to the target APP, the skin change information initialization is completed, the target page of the target APP is started, the skin change information is obtained, and the skin change broadcast notification is waited for;
[0011] According to the target APP receiving the skin-changing broadcast notification, the target page of the target APP obtains the skin-changing information and performs the skin-changing;
[0012] Among them, according to the non-foreground state of the target page of the target APP, the target page of the target APP is delayed to obtain the skin change information; according to the foreground state of the target page of the target APP, the target page of the target APP immediately obtains the skin change information and changes the skin.
[0013] Furthermore, the target APP starts and completes the skinning information initialization including:
[0014] After the App is started, background tasks are started, including reading theme attributes, parsing skin packages to obtain resources, replacing default resource parsing objects, and notifying the skin-changing control collection;
[0015] The skin-changing control set includes parsing a page layout file when the target page of the target APP is started, converting native Android controls into skinnable controls defined by the framework during the parsing process, and adding them to the skin-changing control set;
[0016] According to the completion of the background task and the receipt of the skin-changing broadcast notification by the skin-changing control set, a resource update style is obtained from the resource resolution object.
[0017] Furthermore, according to the target APP receiving the skin-changing broadcast notification, the target page of the target APP obtains the skin-changing information, and the skin-changing includes:
[0018] According to the target APP receiving the skin change broadcast notification, traverse all the target pages of the target APP to determine whether it is the current foreground page;
[0019] If it is the current foreground page, the target page of the target APP is immediately skinned according to the skinning control set;
[0020] If it is not the current foreground page, the target page of the target APP is marked with a delay mark;
[0021] A delay mark is marked according to the target page of the target APP, and after the target page of the target APP is switched to the foreground and the target APP receives a skin-changing broadcast notification, the skin is changed according to the skin-changing control set.
[0022] Furthermore, the current front page includes:
[0023] Preset a page counter and foreground mark according to each process of the target APP;
[0024] When the target page of the target APP is promoted to the foreground, the page counter count is increased by 1, and when it is demoted to the background, the page counter count is decreased by 1;
[0025] According to the target page of the target APP having the largest page count, a foreground mark is marked as the current foreground page.
[0026] Furthermore, the current front page includes:
[0027] Preset a floating window mark according to each process of the target APP;
[0028] A floating window mark is marked according to the target page of the target APP, and the skin is immediately changed according to the skin change broadcast notification and the skin change control set.
[0029] Furthermore, it also includes:
[0030] Generate a floating window page according to the target page of the target APP with a floating window mark;
[0031] Divide the skinning area based on the pixel coordinates of the floating window page and the current foreground page;
[0032] According to the divided skinning area, the floating window page and the current foreground page are skinned immediately according to the skinning broadcast notification and the skinning control set.
[0033] According to two aspects of the present invention, a device for switching screen images on a vehicle computer is provided, the device comprising:
[0034] APP initialization module, used to start the target APP and complete the skinning information initialization;
[0035] Notification waiting module, used to start and complete skin change information initialization according to the target APP, start the target page of the target APP, obtain skin change information, and wait for skin change broadcast notification;
[0036] A skin changing module is used to obtain skin changing information from the target page of the target APP and perform skin changing according to the skin changing broadcast notification received by the target APP;
[0037] An information delay module, configured to delay the target page of the target APP from obtaining skinning information according to the non-foreground state of the target page of the target APP;
[0038] The information acquisition module is used to enable the target page of the target APP to instantly obtain skinning information and perform skinning according to the foreground state of the target page of the target APP.
[0039] According to three aspects of the present invention, there is provided an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0040] A computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the vehicle screen switching method.
[0041] According to four aspects of the present invention, a computer-readable storage medium is provided, comprising: a computer program executable by an electronic device is stored therein, and when the computer program runs on the electronic device, the electronic device executes the steps of the vehicle screen switching method.
[0042] According to five aspects of the present invention, there is provided a vehicle comprising:
[0043] An electronic device, used to implement the steps of the vehicle screen switching method;
[0044] A processor, wherein the processor runs a program, and when the program runs, the steps of the vehicle screen switching method are executed based on the data output by the electronic device;
[0045] The storage medium is used to store a program, and when the program is running, it executes the steps of the vehicle screen switching method for data output from the electronic device.
[0046] Through the above solution, the following beneficial technical effects are achieved:
[0047] This application distinguishes whether the target page is in the foreground state, delays the acquisition of skin change information for the target page that is not in the foreground state, and only allows the target page in the foreground state to obtain the skin change information, thereby reducing the CPU resources consumed in processing IO transactions and alleviating the car computer lag caused by skin change.
[0048] This application sets the priority of obtaining skin change information by distinguishing the order of the current foreground pages to prevent missing the skin change information of the foreground page with the highest priority.
[0049] This application divides the area of the floating window and the current page, updates the display page after obtaining the skin change information, and prevents the floating window from being covered by the foreground page. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] FIG1 is a flowchart of a method for switching screens on a vehicle computer provided by one or more embodiments of the present invention.
[0051] FIG2 is a structural diagram of a device for switching screens on a vehicle computer provided by one or more embodiments of the present invention.
[0052] FIG3 is a schematic diagram of a mainstream skinning framework according to a specific embodiment of the present invention.
[0053] FIG4 is a schematic diagram of delayed page skinning according to a specific embodiment of the present invention.
[0054] FIG5 is a schematic diagram of a judgment page in the foreground according to a specific embodiment of the present invention.
[0055] FIG6 is a schematic diagram of a foreground and background skinning process according to a specific embodiment of the present invention.
[0056] FIG7 is a block diagram of an electronic device structure of a method for switching screens on a vehicle computer provided by one or more embodiments of the present invention. DETAILED DESCRIPTION
[0057] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0058] FIG1 is a flowchart of a method for switching screens on a vehicle computer provided by one or more embodiments of the present invention.
[0059] As shown in Figure 1, the method for switching the screen of the vehicle computer includes:
[0060] Step S1, the target APP is started and the skinning information is initialized;
[0061] Step S2: The target APP is started and the skin change information initialization is completed. The target page of the target APP is started, the skin change information is obtained, and the skin change broadcast notification is waited for;
[0062] Step S3: upon receiving the skin-changing broadcast notification from the target APP, the target page of the target APP obtains the skin-changing information and performs the skin-changing;
[0063] Step S4, wherein, according to the non-foreground state of the target page of the target APP, the target page of the target APP is delayed to obtain the skinning information;
[0064] Step S5: According to the foreground state of the target page of the target APP, the target page of the target APP immediately obtains the skin-changing information and changes the skin.
[0065] Through the above solution, the following beneficial technical effects are achieved:
[0066] This application distinguishes whether the target page is in the foreground state, delays the acquisition of skin change information for the target page that is not in the foreground state, and only allows the target page in the foreground state to obtain the skin change information, thereby reducing the CPU resources consumed in processing IO transactions and alleviating the car computer lag caused by skin change.
[0067] This application sets the priority for obtaining skin change information by distinguishing the order of the current foreground pages to prevent missing the skin change information for the foreground page with the highest priority.
[0068] This application divides the area of the floating window and the current page, updates the display page after obtaining the skin change information, and prevents the floating window from being covered by the foreground page.
[0069] Specifically, under normal circumstances, each time a new page is launched, the skin information for that page is read. However, before the new page is displayed on the foreground, reading the skin information will only consume CPU resources and occupy memory, and will not produce actual application effects on the terminal.
[0070] Since car computers, like mobile phones, work in a multi-threaded manner, the page at the foreground naturally needs to complete the task of reading skin information synchronously. However, other pages that are not displayed at the foreground can temporarily postpone reading skin information and concentrate resources on processing the consumption of the current page, giving priority to ensuring the smoothness of users' use of the current page.
[0071] In other words, no matter how many pages are opened, only the current foreground page consumes the resources required to read skin information, which greatly optimizes computing resources.
[0072] In this embodiment, starting the target APP and completing the skinning information initialization includes:
[0073] After the App is started, background tasks are started, including reading theme properties, parsing skin packages to obtain resources, replacing the default resource parsing object, and notifying the skin change control collection;
[0074] The skinnable control set includes parsing the page layout file when the target page of the target APP is started, converting the native Android controls into skinnable controls defined by the framework during the parsing process, and adding them to the skinnable control set;
[0075] When the background task is completed and the skin-changing control collection receives the skin-changing broadcast notification, the resource update style is obtained from the resource resolution object.
[0076] Specifically, background tasks delay the most resource-intensive tasks and complete other necessary work as much as possible. For example, after the app launches, it retrieves the theme attributes, parses the skin package to obtain resources, replaces the default resource resolution object, and notifies the skin change control collection. It then waits for a skin change broadcast notification. Upon receiving the skin change broadcast notification, it decides whether to immediately change the skin.
[0077] In this embodiment, according to the target APP receiving the skin-changing broadcast notification, the target page of the target APP obtains the skin-changing information, and the skin-changing includes:
[0078] According to the target APP receiving the skin change broadcast notification, traverse the target pages of all target APPs to determine whether it is the current foreground page in the foreground state;
[0079] If it is the current foreground page, the target page of the target APP will be skinned immediately according to the skinning control set;
[0080] If it is not the current foreground page, the target page of the target APP will be marked with a delay mark;
[0081] Mark the target page of the target APP with a delay mark, wait for the target page of the target APP to be switched to the foreground, and the target APP receives the skin-changing broadcast notification, and then changes the skin according to the skin-changing control set.
[0082] Specifically, the target app is the one that executes the solution. When it receives a skinning broadcast notification, it first identifies which page is currently the foreground page and immediately skins it. For pages that are not currently the foreground, it first marks them with a delay. Data with delay marks can be stacked and popped up together with the pages that come to the foreground, directly pointing to the skinning control collection for skinning.
[0083] In this embodiment, the current front page includes:
[0084] Preset page counters and foreground markers for each process of the target APP;
[0085] When the target page of the target APP is promoted to the foreground, the page counter count is increased by 1, and when it is demoted to the background, the page counter count is decreased by 1;
[0086] According to the target page of the target APP with the largest page count, mark it with the foreground mark and use it as the current foreground page.
[0087] Specifically, due to the multi-threading, the skinning priority of the pages is different, and the opening of new threads is also random. Therefore, by setting a counter for each page, by comparing the counts of all current pages, marking the foreground mark, and selecting the foreground page with the foreground mark, and preparing for the instant skinning for the corresponding page, that is, waiting for the page count to be the largest among all pages, and then instant skinning.
[0088] In this embodiment, the current front page includes:
[0089] Preset floating window mark according to each process of the target APP;
[0090] Mark the target page of the target APP with a floating window marker, and instantly change the skin according to the skin change broadcast notification and skin change control set.
[0091] Specifically, in many processes, in addition to regular pages, there are also floating windows. Floating windows have the highest priority, and page updates are immediate. However, floating windows cannot affect the skinning of other pages. Therefore, floating windows are marked as floating windows, which are different from the foreground marked pages. Both are handled according to the immediate skinning strategy based on skinning broadcast notifications and skinning control collections.
[0092] In this embodiment, it also includes:
[0093] Generate a floating window page based on the target page of the target APP with a floating window tag;
[0094] Generate the current foreground page based on the foreground mark of the target page of the target APP;
[0095] Divide the skinning area based on the pixel coordinates of the floating window page and the current foreground page;
[0096] Based on the divided skinning area, the floating window page and the current foreground page are skinned immediately according to the skinning broadcast notification and the skinning control set.
[0097] Specifically, the floating window page does not occupy the entire display screen, but occupies a fixed part of the display screen, and the part outside the floating window is processed according to the skin of the current foreground page. The skinning control cannot cover all floating window situations. Therefore, it is necessary to set the boundary between the floating window and the foreground page. When the foreground page is skinned, the skinning area is determined according to the coordinate line of the boundary. This allows the floating window page skinning and the foreground page skinning to be independent of each other and to be skinned according to their own independent processes.
[0098] FIG2 is a structural diagram of a device for switching screens on a vehicle computer provided by one or more embodiments of the present invention.
[0099] The vehicle screen switching device shown in FIG2 includes: an APP initialization module, a notification waiting module, a skinning module, an information delay module, and an information acquisition module;
[0100] APP initialization module, used to start the target APP and complete the skinning information initialization;
[0101] Notification waiting module, used to start and complete skin change information initialization according to the target APP, start the target page of the target APP, obtain skin change information, and wait for skin change broadcast notification;
[0102] The skin-changing module is used to receive the skin-changing broadcast notification from the target APP, obtain the skin-changing information from the target page of the target APP, and perform the skin-changing;
[0103] The information delay module is used to delay the target page of the target APP from obtaining the skinning information according to the non-foreground state of the target page of the target APP;
[0104] The information acquisition module is used to instantly obtain skinning information and perform skinning on the target page of the target APP according to the foreground status of the target page of the target APP.
[0105] It is worth noting that although this system only discloses the APP initialization module, notification waiting module, skin-changing module, information delay module, and information acquisition module, it does not mean that this device is limited to the above-mentioned basic functional modules. On the contrary, what the present invention wants to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the existing technology to form an infinite number of embodiments or technical solutions. In other words, this system is open rather than closed. Just because this embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the above-mentioned basic functional modules.
[0106] FIG3 is a schematic diagram of a mainstream skinning framework according to a specific embodiment of the present invention.
[0107] FIG4 is a schematic diagram of delayed page skinning according to a specific embodiment of the present invention.
[0108] FIG5 is a schematic diagram of a judgment page in the foreground according to a specific embodiment of the present invention.
[0109] FIG6 is a schematic diagram of a foreground and background skinning process according to a specific embodiment of the present invention.
[0110] In a specific embodiment, as shown in FIG3 , the skinning framework process is mainly divided into three parts: when the App is started, when the page is started, and when the skinning broadcast arrives.
[0111] When the App starts, a child thread is started to copy the built-in skin package resources to the agreed designated directory D; wait for the skin package to be copied, read the current theme attribute P, and then parse the skin resource package named P in the D directory to construct the resource object M.
[0112] When the page starts, the control factory object F in the layout parser is replaced through Hook; when parsing the layout, the native controls are converted into controls that support skinning through F; these controls are collected, added to the control pool SVP, and skinning notifications are listened for.
[0113] When the skin change broadcast comes, read the current theme attribute P, then parse the skin resource package named P in the D directory and build the resource object M; the control pool in each page performs its own resource replacement operations through M, such as background color, picture, text color and other styles.
[0114] Since resource access by resource object M is essentially a disk IO operation, the IO performance of most car computers is far inferior to that of mobile phones. Based on this bottleneck, these mainstream solutions have two problems that affect performance.
[0115] For example, from the system's perspective, every time a new app is launched, regardless of whether it is in the foreground or not, whenever a skin change broadcast comes, an IO operation will be performed to read resources and update the style, even though most apps in the foreground cannot see it. Therefore, most processes do not need to perform IO operations at this time;
[0116] For example, from the perspective of a single process, each time a new page is started, a corresponding skinning control pool needs to be built. Whenever a skinning broadcast comes, regardless of whether the page is in the foreground, an IO operation will be performed to read the resource skinning, and at this time, only the foreground page needs to be skinned.
[0117] In scenarios where multiple processes and multiple pages are already running, a single skinning broadcast can cause a squeeze on system IO resources, leading to skinning lags. Lazy loading is used to delay skinning for background processes and pages at appropriate times, avoiding IO and CPU resource squeezes and skinning lags.
[0118] In another specific embodiment, as shown in Figure 4, building on the previous specific embodiment, the app initiates a background task to read the theme attributes, parse the skin package to obtain resources, replace the default resource resolution object, and then notify the skinnable control collection. This collection is constructed and implemented by, for example, parsing the page layout file at page startup. During the parsing process, native Android controls are converted into skinnable controls defined by the framework and added to the collection. When the background task is completed, the skinnable control collection receives a notification and obtains the updated resource style from the resource resolution object.
[0119] In the main process above, the solution adds delayed skinning logic for background pages and background processes to avoid lag caused by IO and CPU usage spikes.
[0120] Whether it's a background page or a delayed skinning of a background process, it's all based on the Android system's Activity lifecycle mechanism. An Activity can be thought of as a page, and each time it's opened, closed, or switched to the background, it receives corresponding lifecycle notifications.
[0121] For example, for page A in a certain process, the skinning process during the entire life cycle includes: when page A starts, it parses the page layout file, replaces the native controls with skinnable controls, and collects them into a collection V. If the skin package has been loaded, when building the control, it will still take the resources from the resource object in the skin package for rendering; then build the skinnable control collection and add it to the global observer set P; when the page switches to the foreground, update the current foreground page CurPage = A, and when the skinning notification comes, it will traverse all open pages. If the page is the current foreground page A, the controls in V will be skinned directly; if not, the page needs to be skinned after returning to the foreground page; when the page comes from the background, the skinning notification comes, and the delayed skinning flag F = true is first marked. When returning to the foreground, if this flag is true, it means that the page needs to be skinned, and the skinning is executed.
[0122] Based on the mainstream skin-changing process, the logic of delayed skin-changing of single-process background pages is added to avoid issuing skin-changing instructions to all pages and reduce the size of a single skin-changing control set.
[0123] In another specific embodiment, as shown in FIG5 , from the perspective of the system, the objects to be considered are multiple running processes, and how to determine whether it is a background process is also achieved through global page life cycle monitoring.
[0124] Each process maintains a foreground page counter and a foreground mark. onActivityStarted indicates that a page returns to the foreground, and onActivityStopped indicates that a page returns to the background. When a page comes to the foreground, the page count is increased by 1, and when it returns to the background, the count is reduced by 1. When the count is 0, it means that all pages have returned to the background. At this time, the process has no page in the foreground and is marked as a background process. For apps with permanent floating window UI (such as SystemBar App), they are considered to be always in the foreground.
[0125] In another specific embodiment, as shown in FIG6 , from the perspective of the skinning framework, the processing object is each process, and only the foreground page of the foreground process needs to be skinned.
[0126] When a reskin command is issued, because it's a background process, all its pages are marked as waiting for a reskin before reskinning. The reskinning process for the page that returns to the foreground begins. For the foreground process, the following tasks are performed: the foreground pages of that process are immediately reskinned; the background pages of that process are marked as delayed reskinning, so they won't be notified of the reskinning until they return to the foreground. Regardless of whether the process is foreground or background, the reskinning process for a page returning to the foreground corresponds to the reskinning process in the lifecycle.
[0127] FIG7 is a block diagram of an electronic device structure of a method for switching screens on a vehicle computer provided by one or more embodiments of the present invention.
[0128] As shown in FIG7 , the present application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0129] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of a method for switching screens of a vehicle computer.
[0130] The present application also provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a method for switching screens on a vehicle computer.
[0131] The present application also provides a vehicle, comprising:
[0132] Electronic device, used to implement the steps of the method for switching screens of vehicle computers;
[0133] A processor, wherein the processor runs a program, and when the program runs, the steps of the method for switching the screen of the vehicle computer are executed based on the data output by the electronic device;
[0134] The storage medium is used to store a program, and when the program is running, it executes the steps of the vehicle screen switching method for the data output from the electronic device.
[0135] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0136] The electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control electronic devices through processes, such as the Linux operating system, the Unix operating system, the Android operating system, the iOS operating system, or the Windows operating system. In the embodiments of the present invention, the electronic device can be a handheld device such as a smartphone or a tablet computer, or an electronic device such as a desktop computer or a portable computer, which is not particularly limited in the embodiments of the present invention.
[0137] The execution subject of the electronic device control in the embodiment of the present invention can be an electronic device, or a functional module in the electronic device that can call a program and execute the program. The electronic device can obtain the firmware corresponding to the storage medium. The firmware corresponding to the storage medium is provided by the supplier. The firmware corresponding to different storage media can be the same or different, and is not limited here. After the electronic device obtains the firmware corresponding to the storage medium, it can write the firmware corresponding to the storage medium into the storage medium, specifically, burn the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology and will not be described in detail in the embodiment of the present invention.
[0138] The electronic device can also obtain a reset command corresponding to the storage medium. The reset command corresponding to the storage medium is provided by the supplier. The reset commands corresponding to different storage media can be the same or different, and are not limited here.
[0139] In this case, the storage medium of the electronic device is a storage medium in which the corresponding firmware is written. The electronic device can respond to the reset command corresponding to the storage medium in which the corresponding firmware is written, thereby resetting the storage medium in which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented in the existing technology and will not be described in detail in the embodiments of the present invention.
[0140] For the convenience of description, the above devices are described as various units and modules according to their functions. Of course, when implementing this application, the functions of each unit and module can be implemented in the same or multiple software and / or hardware.
[0141] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art in the art to which the present invention pertains. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with those in the context of the prior art and, unless specifically defined, will not be interpreted in an idealized or overly formal sense.
[0142] For simplicity of description, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because certain steps can be performed in other orders or simultaneously according to the embodiments of the present invention. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0143] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for switching screens of a vehicle computer, characterized in that: The method for switching screens of a vehicle computer includes: The target APP is started and the skinning information is initialized; According to the target APP being started and skin change information initialization being completed, the target page of the target APP being started, skin change information being obtained, and skin change broadcast notification being waited for; According to the target APP receiving the skin-changing broadcast notification, the target page of the target APP obtains the skin-changing information and performs the skin-changing; Among them, according to the non-foreground state of the target page of the target APP, the target page of the target APP is delayed to obtain the skin change information; according to the foreground state of the target page of the target APP, the target page of the target APP immediately obtains the skin change information and changes the skin.
2. The method for switching screens of a vehicle computer according to claim 1, characterized in that: The target APP starts and completes the skinning information initialization including: After the App is started, background tasks are started, including reading theme attributes, parsing skin packages to obtain resources, replacing default resource parsing objects, and notifying the skin-changing control collection; The skin-changing control set includes parsing a page layout file when the target page of the target APP is started, converting native Android controls into skinnable controls defined by the framework during the parsing process, and adding them to the skin-changing control set; According to the completion of the background task and the receipt of the skinning broadcast notification by the skinning control set, the resource update style is obtained from the resource parsing object.
3. The method for switching screens of a vehicle computer according to claim 2, characterized in that: According to the target APP receiving the skin-changing broadcast notification, the target page of the target APP obtains the skin-changing information, and the skin-changing includes: According to the target APP receiving the skin-changing broadcast notification, traverse all the target pages of the target APP to determine whether it is the current foreground page in the foreground state; If it is the current foreground page, the target page of the target APP is immediately skinned according to the skinning control set; If it is not the current foreground page, the target page of the target APP is marked with a delay mark; A delay mark is marked according to the target page of the target APP, and after the target page of the target APP is switched to the foreground and the target APP receives a skin-changing broadcast notification, the skin is changed according to the skin-changing control set.
4. The method for switching screens of a vehicle computer according to claim 3, characterized in that: The current front page includes: According to each process of the target APP, a page counter and a foreground mark are preset; When the target page of the target APP is promoted to the foreground, the page counter count is increased by 1, and when it is demoted to the background, the page counter count is decreased by 1; According to the target page of the target APP having the largest page count, a foreground mark is marked as the current foreground page.
5. The method for switching screens of a vehicle computer according to claim 4, characterized in that: The current front page includes: According to each process of the target APP, a floating window mark is preset; A floating window mark is marked according to the target page of the target APP, and the skin is changed immediately according to the skin change broadcast notification and the skin change control set.
6. The method for switching screens of a vehicle computer according to claim 5, characterized in that: Also includes: Generate a floating window page according to the target page of the target APP marked with a floating window mark; According to the coincidence of pixel coordinates between the floating window page and the current foreground page, the skinning area is divided; According to the divided skinning area, the floating window page and the current foreground page are skinned immediately according to the skinning broadcast notification and the skinning control set.
7. A device for switching screens on a vehicle, characterized in that: The vehicle screen switching device comprises: APP initialization module, used to start the target APP and complete the skinning information initialization; A notification waiting module is used to start and complete the skin change information initialization according to the target APP, start the target page of the target APP, obtain the skin change information, and wait for the skin change broadcast notification; A skin changing module, configured to obtain skin changing information and perform skin changing on the target page of the target APP according to the target APP receiving the skin changing broadcast notification; An information delay module, used for delaying the target page of the target APP to obtain skinning information according to the non-foreground state of the target page of the target APP; The information acquisition module is used for the target page of the target APP to instantly obtain the skinning information and perform skinning according to the foreground state of the target page of the target APP.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the method for switching screens of a vehicle computer as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: include: It stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the method for switching screens of a vehicle computer as described in any one of claims 1 to 6.
10. A vehicle, characterized in that: include: An electronic device, used to implement the steps of the method for switching screens of a vehicle computer according to any one of claims 1 to 6; A processor, wherein the processor runs a program, and when the program runs, data outputted from the electronic device executes the steps of the method for switching screens of a vehicle computer according to any one of claims 1 to 6; A storage medium is used to store a program, and when the program is running, it executes the steps of the method for switching screens of a vehicle computer according to any one of claims 1 to 6 for data output from an electronic device.
Citation Information
Patent Citations
Systems and methods for management of background application events
CN103918320A
Method for globally setting day / night theme, Android system and APP application
CN105306696A
Inactivity handling of devices with delay-tolerant traffic
CN107710810A
Theme scene switching method and device for vehicle-mounted terminal
CN110308961A
Theme switching method and device of application program, electronic equipment and storage medium
CN110471738A