Display device and homepage replacement method

By adding the HOME attribute and direct launch mode attribute to the home application in Android TV, the problem of the inability to automatically replace the home page in the existing technology is solved, realizing automatic replacement on a large number of devices, saving time and labor costs.

CN116156259BActive Publication Date: 2025-12-05HISENSE VISUAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211741416.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-12-05
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

When replacing the homepage with a third-party application in an Android TV, existing technologies require recompiling the ROM or using OTA. Furthermore, it cannot be automatically launched under Android's direct boot aware mechanism, and the default homepage needs to be manually selected, making the replacement of a large number of machines cumbersome and increasing manpower and time costs.

Method used

By adding a homepage (HOME) attribute to the homepage application during the scanning of Android installation packages (APKs) in the data partition and setting the direct launch mode attribute to true, the system automatically identifies and launches applications that meet the criteria as the homepage application, thus achieving automatic replacement.

Benefits of technology

It automatically replaces the homepage for a large number of devices without requiring manual operation from the user, saving time and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116156259B_ABST
    Figure CN116156259B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a display device and a homepage replacement method, and relate to the technical field of data processing. The display device comprises a controller configured to: during scanning of an Android installation package APK in a data partition, if it is determined that the replacement of a homepage function is enabled and a homepage application is configured, then in the case that the homepage application is scanned, adding a homepage HOME attribute to the homepage application, setting a value of a preset variable to a first preset value, and deleting the HOME attribute of other applications except the homepage application; after the scanning of the APK of the data partition is completed, if it is determined that the homepage application is configured, then setting a value of a direct start mode attribute of the homepage application to true; after the scanning of all APKs is completed, if the value of the preset variable is the first preset value, then starting the application with the HOME attribute and the value of the direct start mode attribute being true as the homepage application. The embodiments of the present application are used to solve the problem of complicated operations when a large number of machine homepages need to be replaced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology. More specifically, it relates to a display device and a homepage replacement method. Background Technology

[0002] Currently, replacing the homepage of an Android TV with a third-party app's homepage can only be done by recompiling the ROM and flashing it, or using Over-the-Air (OTA) technology. Furthermore, under Android's direct boot mode, manually installed homepage apps cannot launch until the device has finished booting, and a default homepage must be manually selected (because installing a third-party homepage results in two homepages, requiring a default selection). While this manual operation is convenient for a small number of devices, replacing a large number of devices necessitates manually configuring each one, which is tedious and increases both manpower and time costs. Summary of the Invention

[0003] An exemplary embodiment of this application provides a display device and a homepage replacement method to solve the problem of cumbersome operation when replacing a large number of machine homepages, saving time and labor costs.

[0004] The technical solutions provided in this application are as follows:

[0005] In a first aspect, embodiments of this application provide a display device, including:

[0006] The controller is configured as follows:

[0007] During the process of scanning the Android installation package APK in the data partition, if it is determined that the homepage replacement function is enabled and the homepage application is configured, then when the homepage application is scanned, the homepage HOME attribute is added to the homepage application, the value of the preset variable is set to the first preset value, and the HOME attribute of other applications other than the homepage application is deleted.

[0008] After completing the scan of the APKs in the data partition, if it is determined that a home page application is configured, the value of the direct launch mode attribute of the home page application is set to true.

[0009] After completing the scan of all APKs, determine whether the value of the preset variable is the first preset value;

[0010] If the value of the preset variable is the first preset value, then the application with the HOME attribute and the value of the direct launch mode attribute being true will be launched as the home application.

[0011] Secondly, embodiments of this application provide a homepage replacement method, including:

[0012] During the process of scanning the Android installation package APK in the data partition, if it is determined that the homepage replacement function is enabled and the homepage application is configured, then when the homepage application is scanned, the homepage HOME attribute is added to the homepage application, the value of the preset variable is set to the first preset value, and the HOME attribute of other applications other than the homepage application is deleted.

[0013] After completing the scan of the APKs in the data partition, if it is determined that a home page application is configured, the value of the direct launch mode attribute of the home page application is set to true.

[0014] After completing the scan of all APKs, determine whether the value of the preset variable is the first preset value;

[0015] If the value of the preset variable is the first preset value, then the application with the HOME attribute and the value of the direct launch mode attribute being true will be launched as the home application.

[0016] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the homepage replacement method described in any embodiment of the first aspect.

[0017] Fourthly, the present invention provides a computer program product that, when run on a computer, causes the computer to implement the homepage replacement method described in the second aspect or any embodiment of the second aspect.

[0018] As can be seen from the above technical solutions, the display device and homepage replacement method provided in this application embodiment, during the process of scanning the Android installation package APK in the data partition by the controller, if it is determined that the homepage replacement function is enabled and a homepage application is configured, then when the homepage application is scanned, a homepage HOME attribute is added to the homepage application, the value of a preset variable is set to a first preset value, and the HOME attribute of other applications besides the homepage application is deleted; after completing the scanning of the APK in the data partition, if it is determined that a homepage application is configured, the value of the direct boot mode attribute (direct Boot Aware) of the homepage application is set to true; after completing the scanning of all APKs, it is determined whether the value of the preset variable is the first preset value; if the value of the preset variable is the first preset value, then the application with the HOME attribute and the value of the direct boot mode attribute being true is launched as the homepage application. Compared to existing technologies, replacing the homepage of an Android TV with a third-party homepage requires recompiling the ROM and flashing it or OTA updates. Furthermore, under Android's direct bootAware mechanism, manually installed homepage applications cannot be launched before booting, and a default homepage must be manually selected. The technical solution provided in this application sets the HOME attribute and the direct boot Aware attribute of the homepage application. Depending on whether the value of the preset variable is the first preset value, the controller can automatically replace the homepage application with an application that has both a HOME attribute and a true direct boot Aware attribute value during the scanning process. Therefore, this embodiment can automatically complete the homepage replacement, eliminating the need for manual operation by the user when a large number of devices need homepage replacement, saving time and labor costs. Attached Figure Description

[0019] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0020] Figure 1 A scenario architecture diagram of the homepage replacement method provided in an embodiment of the present invention is shown;

[0021] Figure 2 A hardware configuration block diagram of the control device provided in an embodiment of the present invention is shown;

[0022] Figure 3 A hardware configuration block diagram of a display device provided in an embodiment of the present invention is shown;

[0023] Figure 4 This diagram illustrates the software configuration in a display device according to an embodiment of the present invention.

[0024] Figure 5 The illustration shows a scenario diagram of a homepage replacement method provided by an embodiment of the present invention;

[0025] Figure 6 The following is a flowchart illustrating the steps of another homepage replacement method provided by an embodiment of the present invention;

[0026] Figure 7 The following is a flowchart illustrating the steps of a homepage replacement method provided by an embodiment of the present invention;

[0027] Figure 8 The following is a flowchart illustrating the steps of another homepage replacement method provided by an embodiment of the present invention;

[0028] Figure 9 The following is a flowchart illustrating the steps of another homepage replacement method provided by an embodiment of the present invention;

[0029] Figure 10 The following is a flowchart illustrating the steps of another homepage replacement method provided by an embodiment of the present invention;

[0030] Figure 11 The following is a flowchart illustrating the steps of another homepage replacement method provided by an embodiment of the present invention;

[0031] Figure 12 The following is a flowchart illustrating the steps of another homepage replacement method provided by an embodiment of the present invention;

[0032] Figure 13 The flowchart of another homepage replacement method provided by an embodiment of the present invention is shown. Detailed Implementation

[0033] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.

[0034] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0035] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0036] Figure 1 This is a schematic diagram of the scenario architecture for the control method of the display device provided in an embodiment of this application. Figure 1 As shown, the scenario architecture provided in this application embodiment includes: a control device 100, a display device 200, and a server 300.

[0037] The display device provided in this application embodiment can have various implementation forms. For example, the display device can be a television, a smart speaker refrigerator with display function, a curtain with display function, a personal computer (PC), a laser projection device, a monitor, an electronic bulletin board, a wearable device, an in-vehicle device, an electronic table, etc.

[0038] In some embodiments, the control device 100 may be a remote control. Communication between the remote control and the display device includes infrared protocol communication, Bluetooth protocol communication, and other short-range communication methods, controlling the display device wirelessly or via wired means. Users can control the display device by inputting user commands through buttons on the remote control, voice input, control panel input, etc.

[0039] In some embodiments, the control device 100 may be a terminal device. For example, a terminal device may be a mobile terminal such as a mobile phone, tablet computer, computer, or laptop computer.

[0040] In some embodiments, the display device may also be controlled in a manner other than a control device. For example, the user's selection operation may be received directly through a user selection receiving module configured inside the display device.

[0041] In some embodiments, the display device can also communicate with the server 300 to obtain relevant media resources from the server 300. The display device may communicate with the server via a local area network (LAN) or a wireless local area network (WLAN). The server 300 can provide media resource services and various content and interactive features to the display device. The server 300 can be a cluster or multiple clusters, and may include one or more types of servers.

[0042] Figure 2 An example is shown Figure 1A block diagram of the configuration of the control device 100 in the illustrated embodiment. (See diagram below.) Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user interface 140, a memory, and a power supply. The control device 100 can receive operation commands input by the user, convert the operation commands into commands that the display device can recognize and respond to, and forward the operation commands or commands obtained by converting voice commands to the display device, thus acting as an intermediary for interaction between the user and the display device.

[0043] like Figure 3 The display device includes at least one of a tuner 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280.

[0044] In some embodiments, controller 250 includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first to an nth interface for input / output.

[0045] The display 260 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals from the controller output, and a user control UI interface for displaying video content, image content, menu control interface, and user control UI interface.

[0046] The display 260 can be an LCD display, an OLED display, or a projection display, and can also be a projection device and a projection screen.

[0047] The communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The display device can establish the transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.

[0048] The user interface can be used to receive control signals input by the user through the control device 100 (such as an infrared remote control) or by touch or gesture.

[0049] Detector 230 is used to collect signals from the external environment or to interact with the external environment. For example, detector 230 includes a light receiver, a sensor for collecting ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to collect external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.

[0050] The external device interface 240 may include, but is not limited to, one or more of the following: High Definition Multimedia Interface (HDMI), analog or high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. It may also be a composite input / output interface formed by multiple interfaces mentioned above.

[0051] The tuner / demodulator 210 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.

[0052] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0053] The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device. For example, in response to receiving a user command to select a UI object to display on the monitor 260, the controller 250 can perform operations related to the object selected by the user command.

[0054] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM (random access memory), ROM (read-only memory), a first to an nth interface for input / output, a communication bus, etc.

[0055] Users can input commands through a graphical user interface (GUI) displayed on the monitor 260, and the user interface receives the user input commands through the GUI. Alternatively, users can input commands by entering specific sounds or gestures, and the user interface receives the user input commands by recognizing the sounds or gestures through sensors.

[0056] A "user interface" is the medium through which an application or operating system interacts and exchanges information with the user. It converts information from its internal form to a form that the user can accept. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0057] In some embodiments, the display device controller 250 is configured to, during the scanning of Android installation packages (APKs) in a data partition, if it is determined that the homepage replacement function is enabled and a homepage application is configured, add a homepage HOME attribute to the homepage application if the homepage application is detected, set the value of a preset variable to a first preset value, and delete the HOME attribute of other applications besides the homepage application; after completing the scanning of APKs in the data partition, if it is determined that a homepage application is configured, set the value of the direct launch mode attribute of the homepage application to true; after completing the scanning of all APKs, determine whether the value of the preset variable is the first preset value; if the value of the preset variable is the first preset value, launch the application with the HOME attribute and the value of the direct launch mode attribute being true as the homepage application.

[0058] In some embodiments, the controller 250 is specifically configured to determine whether the value of the "Support Homepage Replacement Functionality" attribute is 1 before the intent parsing tool in the installation package management service scans the application list; if yes, then the homepage replacement functionality is enabled; if no, then the homepage replacement functionality is disabled.

[0059] In some embodiments, the controller 250 is further configured to, upon determining that the homepage replacement function is disabled, invoke the intent parsing tool to scan the application list to determine whether the application corresponding to the APK in the data partition has the HOME attribute, and to set the value of the direct launch mode attribute of the application corresponding to the APK in the data partition to false.

[0060] In some embodiments, the controller 250 is further configured to determine whether the home application installation package name attribute has a value; if yes, it is determined that a home application is configured; if no, it is determined that a home application is not configured.

[0061] In some embodiments, the controller 250 is further configured to, if it is determined that no home application is configured, invoke the intent parsing tool to scan the application list to determine whether the application corresponding to the APK in the data partition has the HOME attribute, and to set the value of the direct launch mode attribute of the application corresponding to the APK in the data partition to false.

[0062] In some embodiments, the controller 250 is further configured to, upon detecting the home application, add a home HOME attribute to the home application, set the value of sHasThirdHOME to true, and delete the HOME attribute of other applications besides the home application.

[0063] In some embodiments, the controller 250 is further configured to restore the HOME attribute of the application whose HOME attribute has been deleted if the value of the preset variable is not the first preset value.

[0064] In some embodiments, the controller 250 is further configured to, when the business management service launches the homepage, search for and return the installation package information of an application with a HOME attribute and a direct launch mode attribute value that is true based on the scan results of the installation package management service; and launch the application corresponding to the installation package information so as to launch the application with a HOME attribute and a direct launch mode attribute value that is true as the homepage application.

[0065] In some embodiments, the controller 250 is also configured to scan APKs in the system partition and the vendor partition before scanning APKs in the data partition.

[0066] See Figure 4 In some embodiments, the operating system of the display device is divided into two parts: the application layer and the native layer. The application layer is the application layer (referred to as the "application layer"). The native layer, from top to bottom, consists of the native application framework layer (referred to as the "framework layer"), the Android runtime and system library layer (referred to as the "system runtime library layer"), and the kernel layer.

[0067] In some embodiments, at least one application runs in the application layer. These applications may be Windows programs, system settings programs, or clock programs that come with the operating system; they may also be applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the examples above.

[0068] The framework layer provides application programming interfaces (APIs) and a programming framework for applications. The application framework layer includes predefined functions. It acts as a central processing unit, determining the actions taken by applications within the application layer. Through the API, applications can access system resources and obtain system services during execution.

[0069] like Figure 4 As shown, the application framework layer in this embodiment includes managers, content providers, etc., wherein the managers include at least one of the following modules: ActivityManager, which interacts with all activities running in the system; LocationManager, which provides access to system location services for system services or applications; PackageManager, which retrieves various information related to applications currently installed on the device; NotificationManager, which controls the display and clearing of notification messages; and WindowManager, which manages icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.

[0070] In some embodiments, the Activity Manager manages the lifecycle of individual applications and common navigation and back functions, such as controlling application exit, opening, and back actions. The Window Manager manages all window programs, such as obtaining the screen size, determining if a status bar is present, locking the screen, capturing the screen, and controlling display window changes (e.g., shrinking the display window, shaking the display, distorting the display, etc.).

[0071] In some embodiments, the system runtime library layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system runs the C / C++ libraries contained in the system runtime library layer to implement the functions that the framework layer needs to perform.

[0072] In some embodiments, the kernel layer is a layer between hardware and software. For example... Figure 4 As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver.

[0073] Figure 5An exemplary diagram illustrates the overall framework of an Android device booting up a homepage application in the prior art, the framework including:

[0074] The Apps layer includes various applications, such as browsers, desktop launchers, email, and other applications.

[0075] Java layer: This includes the System Server process, which is one of the core components of the Android system. Most of the services provided by Android reside in this process. There are more than sixty common processes running in the System Server, such as Package Manager Service and ActivityManager Service.

[0076] C++ layer: Includes some local services and some linked libraries, such as local services like media servers, which can be implemented through the C++ language to interact with underlying hardware drivers.

[0077] Kernel Layer: The kernel layer is the core of most operating systems, consisting of the parts that manage memory, files, peripherals, and system resources. The kernel typically runs processes and provides inter-process communication. The kernel layer is used for event scheduling and synchronization, inter-process communication (message passing), memory management, and process management.

[0078] Loader layer: This includes the Boot ROM process executing the bootloader and the BootLoader process initializing hardware devices.

[0079] Combination Figure 5 , refer to Figure 6 As shown, based on Figure 5 The steps for launching the homepage application include the following S601 to S606:

[0080] S601. Load the bootloader into RAM and execute the bootloader.

[0081] The boot chip code will start executing from the Boot Rom.

[0082] S602, Start Kernel.

[0083] S603, Start the Init process and enter user space.

[0084] After the S603 completes the Kernel startup, it starts the Init process to enter user space, signifying that the device has entered Android. Following the Init process, the Android system performs a series of initialization steps.

[0085] S604. Start the Zygote process, initialize the Android virtual machine, and create Android system service processes.

[0086] The Init process performs a series of initialization actions after startup. The Zygote process is a very important daemon service in Android, responsible for incubating other Android processes. The most significant role of the Zygote process is as a Socket server, receiving process creation requests from all directions. The creation of all application processes in Android is initiated by an application process requesting the SystemServer process through Binder. The SystemServer process then sends a Socket message to the Zygote process, which is responsible for creating all processes. Zygote is the entry point to the Android Java world, and all Android Java processes are created by Zygote.

[0087] S605, Start the system service process.

[0088] S606, Start core services.

[0089] Among them, the most important core services are the Package Manager Service and the Activity Manager Service. Once these core services have started and initialized, the home page can be launched. After the system Ready event is triggered in the Activity Manager Service, the start HOME On All Displays event in the Activity Task Manager Service will be called to launch the home page. The home page application launched here is the application that has the "Android.intent.category.HOME" attribute configured in Android Manifest.xml.

[0090] It should be noted that the Android system relies on the Package Manager Service to determine whether multiple applications contain the HOME attribute. The Package Manager Service obtains the HOME attribute of the current application using the resolve Intent method. Here, it searches for applications that have already been scanned based on the HOME attribute. If an application that meets the HOME attribute is found, it will also check whether it has the direct boot mode attribute. If so, it returns the application package information and then launches the home page.

[0091] In some embodiments, in the prior art, after the core service is started in S606 as described above, the scanning process of the Android installation package APK during the boot phase of the Android device includes the following steps 1 to 3:

[0092] Step 1: After booting up, the System Server process starts the PackageManager Service and begins scanning for Android APK installation packages.

[0093] The aforementioned Package Manager Service can be divided into two steps:

[0094] 1. Scan the Apps (system pre-installed applications) under the system / vendor / product / odm / oem partition.

[0095] 2. Scan the Apps folder under the data partition (applications installed by the user after booting up).

[0096] Step 2: The Package Manager Service scans all APK packages under the above partitions and parses the packages in the scanned directory using the Parallel Package Parser. This process calls the Parsed Intent InfoUtils utility class to parse the Android Manifest.xml file in the APK package.

[0097] This also includes parsing the application's Intent. For example, if the "Android.intent.category.HOME" attribute exists, it indicates that this is a Launcher application. The Launcher application is the desktop launcher in the Android system. The Package Manager Service will store all the scan results for other services to query.

[0098] Step 3: After the scan is complete, the apply Policy method in the Package Manager Service will be executed. In this process, pre-installed applications and non-pre-installed applications will be distinguished. For non-pre-installed applications (i.e., applications installed under data / app), their direct boot mode attribute will be forcibly set to false.

[0099] In some embodiments, the direct boot aware attribute appeared in Android 7.0 and is used when the Android device has booted up normally but the user has not yet unlocked the device. By default, applications do not run in "direct boot" mode. For Android TVs, in this mode, no applications other than the home screen are allowed to start before the system has finished booting. If you want to start other applications, you need to set the value of the direct boot aware attribute to true in the Android manifest (a software file, part of the Android manifest.xml file, which provides important information in simple Android applications and can run the code of any application). For example, you can directly add the code android:direct boot aware = true to the Android manifest code. Moreover, only system-installed applications can be used. If a non-installed third-party application carries this attribute, it will have no effect because the system will force the value of the direct boot aware attribute of non-installed applications to false during the data scanning process.

[0100] In summary, under normal circumstances, for the homepage application to boot up and enter the homepage, it needs to meet the following three conditions:

[0101] Condition 1: The homepage is a pre-installed application (the reason for this is that non-pre-installed applications will have their direct boot mode attribute removed).

[0102] Condition 2: The home application has a built-in HOME attribute.

[0103] Condition 3: The home application has the direct boot aware attribute, that is, the value of the direct boot aware attribute of the home application is true.

[0104] Based on the existing homepage replacement methods described above Figure 7 An exemplary flowchart of the homepage replacement method provided in an embodiment of this application is shown, such as... Figure 7 As shown, the homepage replacement method provided in this application includes the following steps:

[0105] In some embodiments, during the scanning of Android installation packages (APKs) in the data partition, if it is determined that the homepage replacement function is enabled and a homepage application is configured, then if the homepage application is detected, the following steps S701 to S704 are executed:

[0106] S701. Add a HOME attribute to the home application, set the value of the preset variable to a first preset value, and delete the HOME attribute of other applications besides the home application.

[0107] In some embodiments, the APK is an Android application package. An Android application package (APK) is an application package file format used by the Android operating system for distributing and installing mobile applications and middleware. For the code of an Android application to run on an Android device, it must first be compiled and then packaged into a file that can be recognized and run by the Android system. This file format that can be recognized and run by the Android system is the "APK".

[0108] The HOME attribute specifies the first page displayed after entering the application, defining the interface shown when the application is opened. A preset variable with a first preset value indicates that the home application exists in the system.

[0109] In some embodiments, after the homepage replacement function is enabled, a homepage HOME attribute is added to the homepage application to which the homepage is to be replaced, and the HOME attribute of other applications besides the homepage application is deleted. The system will then determine whether an application has a HOME attribute, laying the foundation for launching the target homepage application in the future.

[0110] Before scanning the APKs in the data partition in S701 above, it is also necessary to scan the APKs in the system partition and the vendor partition.

[0111] In some embodiments, Android typically has a Data partition, used to store APKs; a System partition, which stores the Android system and system applications, used for flashing ROMs; a vendor partition containing custom applications and library files from the developer; a Catch partition, used for cache files; and an SD Card partition, used for mounting SD cards.

[0112] S702. After completing the scanning of the APK in the data partition, if it is determined that a home application is configured, the value of the direct launch mode attribute of the home application is set to true.

[0113] In some embodiments, setting the value of the direct boot aware attribute of the home application to true means that when a user starts a device containing the home application, the home application will start directly without any user intervention.

[0114] S703. After completing the scan of all APKs, determine whether the value of the preset variable is the first preset value.

[0115] In some embodiments, the value of the preset variable being the first preset value can indicate that the homepage application exists in the system after scanning, and the value of the preset variable not being the first preset value indicates that the homepage application was not found during scanning.

[0116] S704. If the value of the preset variable is the first preset value, then the application with the HOME attribute and the value of the direct launch mode attribute being true will be launched as the home application.

[0117] In some embodiments, if the value of the preset variable is the first preset value, indicating that the system has the home application, then the application with the HOME attribute and the value of the direct launch mode attribute being true will be launched as the home application.

[0118] As can be seen from the above technical solutions, the display device and homepage replacement method provided in this application embodiment, during the process of scanning the Android installation package APK in the data partition by the controller, if it is determined that the homepage replacement function is enabled and a homepage application is configured, then when the homepage application is scanned, a homepage HOME attribute is added to the homepage application, the value of a preset variable is set to a first preset value, and the HOME attribute of other applications besides the homepage application is deleted; after completing the scanning of the APK in the data partition, if it is determined that a homepage application is configured, the value of the direct boot mode attribute (direct Boot Aware) of the homepage application is set to true; after completing the scanning of all APKs, it is determined whether the value of the preset variable is the first preset value; if the value of the preset variable is the first preset value, then the application with the HOME attribute and the value of the direct boot mode attribute being true is launched as the homepage application. Compared to existing technologies, replacing the homepage of an Android TV with a third-party homepage requires recompiling the ROM and flashing it or OTA updates. Furthermore, under Android's direct boot aware mechanism, manually installed homepage applications cannot be launched before booting, and a default homepage must be manually selected. The technical solution provided in this application, by setting the HOME attribute and the value of the direct boot aware attribute of the homepage application, can automatically replace the homepage application with an application that has both a HOME attribute and a true direct boot aware attribute value during the controller scanning process, depending on whether the value of the preset variable is the first preset value. Therefore, this embodiment can automatically complete the homepage replacement, eliminating the need for manual operation by the user when a large number of devices need to have their homepages replaced, saving time and labor costs.

[0119] As an extension and refinement of the above embodiments, before executing S501, it is necessary to confirm that the homepage replacement function is enabled and the homepage application is configured during the scanning of the Android installation package APK in the data partition. Only after the homepage application is detected can S701 to S704 be executed. Figure 8 As shown, the methods to determine whether the homepage replacement function is enabled include:

[0120] Before calling the ParsedIntent Info Utils in the Package Manager Service to scan the application manifest (Android Manifest.xml), perform the following steps:

[0121] S801. Determine if the value of the attribute supporting the homepage replacement function is 1.

[0122] In some embodiments, the value of the homepage replacement feature property (persist.sys.support_3rd_HOME) indicates whether homepage replacement is enabled or disabled.

[0123] S802. If yes, then confirm that the homepage replacement function is enabled.

[0124] In some embodiments, if the value of the homepage replacement feature property (persist.sys.support_3rd_HOME) is 1, then the homepage replacement feature is enabled.

[0125] S803. If not, confirm that the homepage replacement function is disabled.

[0126] In some embodiments, if the value of the homepage replacement feature property (persist.sys.support_3rd_HOME) is not 1, then the homepage replacement feature is determined to be disabled.

[0127] In some embodiments, after S803 (if not, determine that the homepage replacement function is disabled), the system enters the normal Android device boot-up APK scanning process, referring to... Figure 9 As shown, when it is determined that the homepage replacement function is disabled, the method for replacing the homepage includes the following S804 and S805:

[0128] S804. Call the intent parsing tool to scan the application list to determine whether the application corresponding to the APK in the data partition has the HOME attribute.

[0129] In some embodiments, the intent parsing tool (Parallel Package Parser) can handle multi-threaded tasks, parsing multiple APK files simultaneously through parallel processing.

[0130] S805. Set the value of the direct launch mode attribute of the application corresponding to the APK in the data partition to false.

[0131] In some embodiments, the applications corresponding to the APK in the data partition are non-pre-installed applications, i.e., all third-party applications of the Android device. Since it has been determined that the homepage replacement function is turned off, there is no need to directly launch any third-party application. Therefore, the value of the attribute of the application corresponding to the APK in the data partition being a non-pre-installed application directly launched is set to false.

[0132] As an extension and refinement of the above embodiments, before executing S701, it is necessary to confirm that the homepage replacement function is enabled and the homepage application is configured during the scanning of the Android installation package APK in the data partition. Only after the homepage application is detected can S701 to S704 be executed. (Refer to...) Figure 10 As shown, methods for determining whether a homepage application is configured include:

[0133] S1001. Determine if the homepage application installation package name attribute has a value.

[0134] In some embodiments, the home application package name attribute (persist.sys.3rd_packagename) indicates whether the current Android device is configured to replace the original home application with the home application to which the current application belongs.

[0135] S1002. If yes, then the homepage application is configured.

[0136] In some embodiments, the home application package name attribute (persist.sys.3rd_package name) has a value, indicating that the current Android device is equipped with a home application that needs to be replaced with the one to which the current application belongs.

[0137] S1003. If not, then the homepage application is not configured.

[0138] In some embodiments, the home application package name attribute (persist.sys.3rd_package name) has no value, indicating that the current Android device does not have a home application that needs to be replaced with the home application to which the current application belongs.

[0139] In some embodiments, after S1003 (if not, determine that the homepage application is not configured), the system enters the normal scanning process, referring to... Figure 11 As shown, when it is determined that the homepage application is not configured, the method for replacing the homepage includes the following S1004 and S1005:

[0140] S1004. Call the intent parsing tool to scan the application list to determine whether the application corresponding to the APK in the data partition has the HOME attribute.

[0141] In some embodiments, the intent parsing tool (Parallel Package Parser) can handle multi-threaded tasks, parsing multiple APK files simultaneously through parallel processing.

[0142] S1005. Set the value of the direct launch mode attribute of the application corresponding to the APK in the data partition to false.

[0143] In some embodiments, the applications corresponding to the APK in the data partition are non-pre-installed applications, i.e., all third-party applications of the Android device. Since it has been determined that no home application is configured, there is no home application that needs to be replaced, and there is no need to directly launch any third-party application. Therefore, the value of the attribute of the application corresponding to the APK in the data partition being a non-pre-installed application directly launched is set to false.

[0144] As an extension and refinement of the above embodiments, Figure 12 An exemplary flowchart of the homepage replacement method provided in an embodiment of this application is shown, such as... Figure 12 As shown, the homepage replacement method provided in this application includes the following steps:

[0145] S1201. Add a HOME attribute to the home application, set the value of the preset variable to a first preset value, and delete the HOME attribute of other applications besides the home application.

[0146] The preset variable is denoted as sHasThirdHome, and the value of sHasThirdHome is set to a first preset value, which is true.

[0147] S1202. After completing the scanning of the APK in the data partition, if it is determined that a home application is configured, the value of the direct launch mode attribute of the home application is set to true.

[0148] S1203. After completing the scan of all APKs, determine whether the value of the preset variable is the first preset value.

[0149] S1204. If the value of the preset variable is the first preset value, then the application with the HOME attribute and the value of the direct launch mode attribute being true will be launched as the home application.

[0150] In S1204 above, launching an application with the HOME attribute and a direct launch mode attribute value of true as the home application further includes steps A and B:

[0151] Step A: When the ActivityManagerService launches the homepage, it searches for and returns the installation package information of applications with the HOME attribute and the Direct Launch Mode attribute set to true based on the scan results of the Installation Package Management Service.

[0152] Step B: Launch the application corresponding to the installation package information, and launch the application with the HOME attribute and the direct launch mode attribute value being true as the home application.

[0153] S1205. If the value of the preset variable is not the first preset value, then restore the HOME attribute of the application whose HOME attribute has been deleted.

[0154] In some embodiments, if the value of the preset variable is not the first preset value, it means that no home application was found after APK scanning. In this case, it is necessary to restore the HOME attribute of other applications that originally had the HOME attribute to avoid not being able to find the home page after booting up.

[0155] In conjunction with all the above embodiments, refer to Figure 13 The diagram shown is an overall flowchart of the homepage replacement method provided in this application. The homepage replacement method includes the following steps:

[0156] S1301. Load the bootloader into RAM and execute the bootloader.

[0157] S1302, Start Kernel.

[0158] S1303, Start the Init process and enter user space.

[0159] S1304. Start the Zygote process, initialize the Android virtual machine, and create the Android system service process.

[0160] S1305, Start the system service process.

[0161] S1306. Start core services: installation package management service and business management service.

[0162] S1307, Scan the system partition and vendor partition for APKs.

[0163] S1308, Scan the Android installation package APK in the data partition.

[0164] S1309. Determine whether the value of the attribute supporting the homepage replacement function is 1.

[0165] In S1309 above, if the value of the homepage replacement function attribute (persist.sys.support_3rd_HOME) is not 1, then S1310 is executed as follows; if the value of the homepage replacement function attribute (persist.sys.support_3rd_HOME) is 1, then S1311 and S1312 are executed as follows:

[0166] S1310, Confirm that the homepage replacement function is disabled.

[0167] In addition to the above S1310 (confirming that the homepage replacement function is turned off), the following S1312 and S1314 also need to be executed.

[0168] S1311. Confirm that the homepage replacement function is enabled.

[0169] S1312. Determine if the homepage application installation package name attribute has a value.

[0170] In S1312 above, if the home application installation package name attribute (persist.sys.3rd_packagename) has no value, then S1313 to S1315 are executed as follows:

[0171] S1313, Confirmed that the application homepage is not configured.

[0172] S1314. Call the intent parsing tool to scan the application list to determine whether the application corresponding to the APK in the data partition has the HOME attribute.

[0173] S1315. Set the value of the direct launch mode attribute of the application corresponding to the APK in the data partition to false.

[0174] After S1317 is completed, S1322 to S1324 need to be executed.

[0175] If the homepage application package name attribute (persist.sys.3rd_packagename) has a value, then execute S1316 and S1318 as follows:

[0176] S1316. If so, confirm that the application homepage is not configured.

[0177] S1317. Add a HOME attribute to the home application, set the value of the preset variable to a first preset value, and delete the HOME attribute of other applications besides the home application.

[0178] S1318. Complete the scanning of the APK in the data partition.

[0179] S1319. Set the value of the direct boot mode attribute (direct boot Aware) of the home application to true.

[0180] S1320, Complete scanning of all APKs.

[0181] S1321. Determine whether the value of the preset variable is the first preset value.

[0182] S1322. If so, when the ActivityManagerService starts the home page, it searches for and returns the installation package information of the application with the HOME attribute and the value of the direct launch mode attribute being true, based on the scan results of the installation package management service.

[0183] S1323. Start the application corresponding to the installation package information, and start the application with the HOME attribute and the value of the direct launch mode attribute being true as the home application.

[0184] S1324. If the HOME attribute of the application that deleted the HOME attribute is not restored.

[0185] In some embodiments, this application provides a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the homepage replacement method described in any of the above embodiments.

[0186] In some embodiments, this application provides a computer program product that, when run on a computer, causes the computer to implement the homepage replacement method described in the second aspect or any embodiment of the second aspect.

[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0188] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.

Claims

1. A display device, characterized in that, Comprising: a controller configured to: in scanning an Android package APK in a data partition, if it is determined that a home page function replacement is enabled and a home page application is configured, then in a case that the home page application is scanned, adding a home page HOME attribute for the home page application, setting a value of a preset variable to a first preset value, and deleting a HOME attribute of other applications except the home page application; the HOME attribute is used to specify a first page displayed after entering the home page application; after the scanning of the APK of the data partition is completed, if it is determined that the home page application is configured, then setting a value of a direct start mode attribute of the home page application to true; after the scanning of all APKs is completed, judging whether the value of the preset variable is the first preset value; if the value of the preset variable is the first preset value, then starting the application with the HOME attribute and the value of the direct start mode attribute being true as the home page application; the value of the preset variable being the first preset value indicates that the home page application exists after the scanning, and the value of the preset variable not being the first preset value indicates that the home page application is not found during the scanning.

2. The display device of claim 1, wherein, the controller is specifically configured to: before calling an intent analysis tool to scan an application list in a package management service, judging whether a value of a home page function replacement support attribute is 1; if yes, then it is determined that the home page function replacement is enabled; if no, then it is determined that the home page function replacement is disabled.

3. The display device of claim 2, wherein, the controller is further configured to: in a case that it is determined that the home page function replacement is disabled, calling the intent analysis tool to scan the application list to determine whether an application corresponding to an APK in the data partition has the HOME attribute, and setting a value of a direct start mode attribute of the application corresponding to the APK in the data partition to false.

4. The display device of claim 1, wherein, the controller is specifically configured to: judging whether a home page application package name attribute has a value; if yes, then it is determined that the home page application is configured; if no, then it is determined that the home page application is not configured.

5. The display device of claim 4, wherein, the controller is further configured to: in a case that it is determined that the home page application is not configured, calling the intent analysis tool to scan the application list to determine whether an application corresponding to an APK in the data partition has the HOME attribute, and setting a value of a direct start mode attribute of the application corresponding to the APK in the data partition to false.

6. The display device of claim 1, wherein, the controller is specifically configured to: in a case that the home page application is scanned, adding a home page HOME attribute for the home page application, setting a value of sHasThirdHome to true, and deleting a HOME attribute of other applications except the home page application.

7. The display device of claim 1, wherein, the controller is further configured to: if the value of the preset variable is not the first preset value, then restoring the HOME attribute of the application whose HOME attribute is deleted.

8. The display device of claim 1, wherein, the controller is specifically configured to: when a home page is started by a service management service, searching and returning package information of the application with the HOME attribute and the value of the direct start mode attribute being true according to a scanning result of a package management service. Start the application corresponding to the installation package information to start the application with the HOME attribute and the value of the direct start mode attribute as true as a home application.

9. The display device of claim 1, wherein, The controller is further configured to: scan APKs in a system partition and a vendor partition before scanning APKs in the data partition.

10. A home page replacement method characterized by comprising: comprise: during scanning of an Android installation package APK in a data partition, if it is determined that the replacement home function is enabled and a home application is configured, then in a case where the home application is scanned, a home HOME attribute is added to the home application, a value of a preset variable is set to a first preset value, and the HOME attribute of other applications except the home application is deleted; the HOME attribute is used to specify a first page displayed after entering the home application; after the scanning of APKs in the data partition is completed, if it is determined that the home application is configured, then a value of a direct start mode attribute of the home application is set to true; after the scanning of all APKs is completed, it is determined whether the value of the preset variable is the first preset value; if the value of the preset variable is the first preset value, then an application with the HOME attribute and the value of the direct start mode attribute as true is started as the home application; the value of the preset variable being the first preset value indicates that the home application exists in the system after scanning, and the value of the preset variable not being the first preset value indicates that the home application is not found during scanning.

Citation Information

Patent Citations

  • Smart television starting method and smart television starting device

    CN105245954A

  • Content display method and display equipment

    CN112135180A