Power-on method and electronic device

The power-on method for electronic devices accelerates boot time by loading basic functions first, then additional functions, enabling faster user interaction.

CN117687708BActive Publication Date: 2024-12-06HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310859463.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2024-12-06
Estimated Expiration
2043-07-12

AI Technical Summary

Technical Problem

Electronic devices take a long time to boot due to the need to load various processes and functions during the boot process.

Method used

A power-on method that involves loading a first type of control for basic functions, displaying a lock screen interface, and prompting a password, followed by loading a second type of control for additional functions after the first control is completed, allowing for faster boot times by delaying the loading of controls that depend on other functions.

Benefits of technology

Reduces boot time and allows users to interact with the device more quickly by displaying a user interface sooner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117687708B_ABST
    Figure CN117687708B_ABST
Patent Text Reader

Abstract

The present application provides a startup method and an electronic device. In the method, the electronic device can classify the controls of the system application. During the startup process of the electronic device, a class of controls with basic functions is loaded before the startup is completed, and then a class of controls with additional functions based on the basic functions is loaded after the startup is completed. In this way, the electronic device can reduce the startup time and speed up the startup speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a power-on method and an electronic device. Background Art

[0002] At present, electronic devices need to load not only various processes but also various functions provided by system applications during the boot process. How to reduce the boot time of electronic devices is an urgent problem to be solved in the art. Summary of the invention

[0003] In a first aspect, an embodiment of the present application provides a power-on method and an electronic device, characterized in that the method comprises: the electronic device is in a shutdown state, and a long press operation on a power button is detected. The electronic device loads a first type of control, and the first type of control is used to implement the basic functions of the electronic device. After the first type of control is loaded, the electronic device has the ability to provide the basic functions implemented by the first type of control. In response to the completion of loading the first type of control, the electronic device displays a first lock screen interface, and the first lock screen interface displays prompt information, and the prompt information is used to prompt the user to enter an unlock password. The electronic device loads a second type of control, and the second type of control is used to implement an additional function based on the basic function. After the second type of control is loaded, the electronic device has the ability to provide the additional function implemented by the second type of control.

[0004] After implementing the method provided in the present application, the boot time can be reduced, and the user can observe that the electronic device displays a user interface more quickly, so that the user can use the electronic device more quickly.

[0005] In combination with the first aspect, in some implementations, after the long press operation on the power button is detected, the method further includes: the electronic device starts a first system application, and the first system application includes SystemUI. The electronic device loads the first type of control specifically includes: the electronic device loads the first type of control through the first system application. The electronic device loads the second type of control specifically includes: the electronic device loads the second type of control through the first system application.

[0006] In combination with the first aspect, in some implementations, after displaying the first lock screen interface, the method further includes: the first lock screen interface includes a password input box, and after the electronic device receives an operation of inputting a password in the password input box, the desktop is displayed. The electronic device receives an operation of sliding down from the top of the desktop and displays a first user interface, the first user interface includes a first control, and the first control belongs to the first category of controls. The electronic device receives a user operation acting on the first control and starts a basic function corresponding to the first control.

[0007] In this way, after the electronic device starts the first control, the function of the first control can be used by operating the first control in the user interface.

[0008] In combination with the first aspect, in some implementations, after the electronic device loads the first type of control, the method further includes: the electronic device, in response to completing the loading of the first type of control, starts a basic function corresponding to a second control, and the second control belongs to the first type of control.

[0009] In some implementations, some first-category controls in the electronic device can be automatically activated without user operation to trigger the activation.

[0010] In combination with the first aspect, in some implementations, after the first user interface is displayed and before the electronic device receives a user operation acting on the first control, the method also includes: the electronic device receives a user operation acting on a third control, and does not start an additional function corresponding to the third control, the third control belongs to the second category of controls, the additional function corresponding to the third control is based on the basic function of the first control, and the first user interface includes the third control.

[0011] In some implementations, if the electronic device does not start the first control with the basic function, the electronic device cannot start the first control with the additional function based on the basic function. For example, if the smart interconnected device is connected via Bluetooth, if the Bluetooth function is not turned on, the electronic device cannot use the function of managing the key smart interconnected device.

[0012] In combination with the first aspect, in some implementations, after the basic function corresponding to the first control is started, the method also includes: the electronic device receives a user operation acting on a third control, and starts an additional function corresponding to the third control based on the basic function of the first control.

[0013] In some implementations, if the electronic device launches a first control having a basic function, the electronic device may launch the first control having an additional function based on the basic function.

[0014] In combination with the first aspect, in some implementations, before the electronic device loads the first type of control, the method also includes: the electronic device identifies the first type of control by a first identifier and identifies the second type of control by a second identifier, the first identifier is used to mark the first type of control, and the second identifier is used to mark the second type of control.

[0015] In some implementations, the first type of control is identified by a value of 0 in the field byte pluginLoadingType of the control, and the second type of control is identified by a value of 1 in the field byte pluginLoadingType of the control.

[0016] In combination with the first aspect, in some implementations, the first category of controls includes: setting controls, editing controls, WLAN controls, Bluetooth controls, sound mode controls, code scanning controls, music controls, brightness adjustment controls, volume adjustment controls, hotspot controls, screenshot controls, eye protection mode controls, automatic rotation controls, and location information controls; the second category of controls includes: interconnected device management controls, speaker function adjustment controls, speaker switch controls, and watch function adjustment controls.

[0017] In combination with the first aspect, in some implementations, before displaying the first lock screen interface, the method also includes: a window management service of the electronic device generates a BOOT_COMPLETED broadcast, and sends the BOOT_COMPLETED broadcast to the first system application.

[0018] In a second aspect, the present application provides an electronic device, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method of the first aspect or any implementation of the first aspect.

[0019] In a third aspect, an embodiment of the present application provides a chip, comprising one or more processors. When the one or more processors execute computer instructions, the electronic device executes the method of the first aspect or any implementation of the first aspect.

[0020] In a fourth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the above-mentioned first aspect or any implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of the power-on process of an electronic device provided in an embodiment of the present application;

[0022] Figure 2A-2B The user interface in SystemUI provided in the embodiment of the present application;

[0023] Figure 3 A flowchart of a method for powering on an electronic device provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of an electronic device architecture provided in an embodiment of the present application;

[0025] Figure 5 A block diagram of the software architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0027] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0028] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0029] The startup process of an electronic device mainly refers to the startup process of a built-in system in the electronic device. Specifically, the startup process of an electronic device may refer to the process from when a central processing unit (CPU) is powered on to when the electronic device displays a lock screen interface.

[0030] Combine the following Figure 1 This section describes the power-on process of electronic devices.

[0031] like Figure 1As shown, the boot process of the electronic device may include but is not limited to: starting the power supply Poweron, loading the boot chip Boot ROM (Read Only Memory), running the boot loader BootLoader, starting the kernel Kernel, starting the initialization init process, starting the fertilized egg Zygote process, starting the system service SystemServer process, and starting SystemUI.

[0032] Here, starting the power supply may refer to the process in which the electronic device responds to the user's power-on operation so that the electronic device CPU is powered on. The power-on operation may refer to the operation of the user long pressing the power button.

[0033] Boot ROM can refer to a section of ROM at a fixed address inside the CPU. The Boot ROM contains the first code executed by the CPU when it is powered on or reset. According to the configuration of certain strap pins or internal fuses, the Boot ROM can decide where to load the next part of the code to be executed and how to verify its correctness or validity. That is, the purpose of loading the Boot ROM can be to instruct the subsequent running of the BootLoader.

[0034] In some implementations, the electronic device can load the Boot ROM after starting the power supply. Specifically, after the electronic device completes the CPU power-on operation, other hardware in the electronic device has not yet been initialized, and only the above-mentioned Boot ROM is readable. The CPU can execute the PBL (Primary Boot Loader) code. Among them, the PBL code can also be used for verification. If the verification fails, the boot fails and the Boot Loader is not run. If the verification passes, the Boot ROM can determine the boot media sequence by mapping the system register to the physical area of ​​the application specific integrated circuit (ASIC). Then the Boot ROM can load the Boot Loader into the internal RAM.

[0035] BootLoader can refer to a program independent of the kernel, which is a piece of code that runs after the CPU is reset and before entering the operating system. Running BootLoader can realize the transition from the hardware startup of the electronic device to the startup of the operating system, and then provide a basic operating environment for the operating system. For example, running BootLoader can initialize the CPU, clock, stack, memory system, etc. Generally speaking, the code of BootLoader is related to factors such as the internal structure and model of the CPU, the configuration of the application system, and the operating system. Therefore, the BootLoader of different electronic devices is not universal.

[0036] In some implementations, after loading the Boot ROM, the electronic device can run the BootLoader. Specifically, first detect and set the external RAM, and after determining that the external RAM is available, load the BootLoader code into the external RAM. Then initialize the file system, memory, network and other information in the external RAM, and load the Kernel into the external RAM. Finally, set the Kernel startup parameters.

[0037] The kernel is mainly used to set up cache, protect memory, schedule lists, load drivers, start kernel daemons, mount root directories, initialize input and output, initialize process tables, and so on.

[0038] In some implementations, the electronic device can start the Kernel after running the BootLoader. Specifically, first the electronic device completes the kernel boot phase, which is generally written in assembly language and can be used to detect whether the kernel matches the hardware of the current electronic device. Then the electronic device can call start_kernel() to enter the kernel boot phase. The relevant code of the kernel boot phase is generally located in kernel / init / main.c. Finally, the electronic device can also call the reset_init function for subsequent initialization. The reset_init function is used to start the kernel thread kernel_init. The kernel_init function will complete the initialization of the driver in the electronic device and call the init_post function. The init_post function can be used to subsequently start the init process of the user space.

[0039] The init process refers to the first process in the user space, and its process number is 1. After the system startup of the electronic device is completed, the init process can be used as a daemon process to monitor other processes in the electronic device. Generally speaking, all processes in electronic devices are directly or indirectly forked (forked) by the init process. The init process is mainly used to: parse and run all init.rc related files, generate corresponding device driver nodes according to the rc file, handle the termination of child processes (signal method), and provide attribute service functions.

[0040] In some implementations, after starting the Kernel, the electronic device can start the init process. Specifically, starting the init process can be divided into the following three steps: Step 1: First, the electronic device can mount the relevant file system. The mounted file system may include but is not limited to tmpfs, devpts, proc, sysfs and selinuxfs. The mounting is mainly performed by mounting the corresponding file system, creating the corresponding file directory through mkdir, and configuring the corresponding access rights. The electronic device can also initialize the log system through InitKernelLogging (argv). Step 2: The electronic device can initialize the property service with the property_init() function, and can also call the StartPropertyService function to start the property service and allocate memory for it to store the property. Step 3: The electronic device loads the system startup script init.rc, parses the script, and starts the relevant services. init.rc is a script written in the initialization language, which mainly contains 5 types of statements: Action, Command, Service, Option and Import. The init.rc file is roughly divided into two parts, one is the "action list" starting with the on keyword, and the other is the "service list" starting with the service keyword. The action list is used to create the required directories and specify permissions for certain specific files, and the service list is used to record some subprocesses that the init process needs to start. Among them, the late-init stage of parsing the configuration of init.rc can be used to start the Zygote process later.

[0041] The Zygote process is the parent process of all JAVA processes in electronic devices and can be called an incubator. The Zygote process is created when the init process starts.

[0042] In some implementations, after starting the init process, the electronic device can start the Zygote process. Specifically, first call the AppRuntime / AndroidRuntime.start method to create a Java virtual machine and register a JNI method for it, then call the ZygoteInit.main method through JNI to enter the Java framework layer from the Native layer. Finally, the SystemServer process can be started through the fork system_server method.

[0043] The SystemServer process is forked from the Zygote process and is the first process hatched by the Zygote process. SystemServer is responsible for starting and managing the entire Java frameWork.

[0044] In some implementations, after starting the Zygote process, the electronic device can start the SystemServer process. Specifically, first, the electronic device can initialize services such as ActivityManagerService (AMS), WindowManagerService (WMS), and PackageManagerService (PMS), and at the same time load the service library of the local system. Then call createSystemContext() to create the system context, create ActivityThread, and start various services. Among them, SystemServer can use startBootstrapServices() to start the boot service, startCoreServices() to start the core service, and startOtherServices() to start other types of services. The above-mentioned boot services may include but are not limited to: installation services Installer, AMS, power management services PowerManagerService, display management services DisplayManagerService, PMS, user management services UserManagerService, etc. The above-mentioned core services may include but are not limited to: lighting services LightsService, battery services BatteryService, application statistics services UsageStatsServtce, web view update services WebViewUpdateService, etc.

[0045] In some implementations, the above-mentioned use of startOtherServices() to start other types of services may include: using the startSystemUI method to start SystemUI. Among them, the process of starting SystemUI may include: initializing SystemUI and registering listening operations through the SystemUIApplication.on.Create() method; then drawing the status bar view and loading related layouts through makeStatusBarView, such as the status bar layout, SIM card layout, quick switch layout, and status icon layout, etc.; finally, loading various components or various controls in SystemUI to complete the process of starting SystemUI. In an embodiment of the present application, loading a control or loading a control function specifically refers to: the electronic device runs the code related to the control, so that the electronic device can provide the function corresponding to the control, and the electronic device can respond to the operation for the control in the subsequent start-up of the function corresponding to the control.

[0046] As a system application, SystemUI can include the user interface of the drop-down panel, the user interface of the notification bar, and the user interface of the shortcut control in the electronic device. SystemUI can be used to display controls such as the notification bar, status bar, and battery level.

[0047] Combine the following Figure 2A-2B Introduce the user interface in SystemUI provided in the embodiment of the present application.

[0048] For example, Figure 2A A user interface 20 is provided for displaying icons of various application programs for the electronic device. The electronic device may respond to the following: Figure 2A The user shown in the figure slides down from the top of the user interface 20, and the display is as follows: Figure 2B The user interface 30 shown. In the embodiment of the present application, the above user interface 20 is only used for exemplary description, and the electronic device can also respond to the operation of sliding down from the top of the screen for other user interfaces, and the type of the user interface 20 is not limited.

[0049] In one possible implementation, the first user interface displayed after the electronic device is turned on may be the user interface 30 or a lock screen interface. The electronic device will display the user interface 30 only after responding to the user inputting a password.

[0050] Figure 2BThe user interface 30 of SystemUI displayed for the electronic device. The user interface 30 may include, but is not limited to: setting controls 301, editing controls 302, WLAN controls 303, Bluetooth controls 304, sound mode controls 305, code scanning controls 306, music controls 307, brightness adjustment controls 308, volume adjustment controls 309, control boxes 310, hotspot controls 311, screenshot controls 312, eye protection mode controls 313, automatic rotation controls 314, location information controls 315, drop-down controls 316, smart interconnection boxes 317, speaker controls 318, speaker switch controls 319, and watch controls 320. In the embodiment of the present application, the layout of the various controls in the user interface 30 is not limited, and the user interface 30 may also include more or fewer controls, which is not limited either.

[0051] Exemplarily, the electronic device can enter the setting application in response to a click operation on the setting control 301. The electronic device can add, delete, or reduce controls in the user interface 30 in response to a click operation on the editing control 302. The electronic device can turn on or off the WLAN function in response to a click operation on the WLAN control 303. The electronic device can turn on or off the Bluetooth function in response to a click operation on the Bluetooth control 304. The electronic device can switch to a ringing mode or a silent mode in response to a click operation on the sound mode control 305 by the user. The electronic device can start the QR code scanning function in response to a click operation on the code scanning control 306 by the user. The electronic device can increase the brightness of the screen in response to the upward sliding operation on the brightness adjustment control 308 by the user; and can decrease the brightness of the screen in response to the downward sliding operation on the brightness adjustment control 308 by the user. The electronic device can increase the media volume in response to the upward sliding operation on the volume adjustment control 309 by the user; and can decrease the media volume in response to the downward sliding operation on the volume adjustment control 309 by the user. The electronic device can turn on or off the hotspot function by a click operation on the hotspot control 311. The electronic device can take a screenshot in response to a user's click operation on the screenshot control 312. The electronic device can turn on or off the eye protection mode in response to a click operation on the eye protection mode control 313. The electronic device can turn on or off the screen automatic rotation function in response to a click operation on the automatic rotation control 314. The electronic device can start or turn off the GPS positioning function in response to a click operation on the location information control 315. The electronic device responds to a click operation on the smart interconnection box 317 to enter the smart interconnection application and can connect to other terminal devices. The electronic device can respond to a click operation on the speaker control 318 to enter the speaker management application, and can perform some setting operations on the speaker, and can also respond to a click operation on the speaker switch control 319 to turn on or off the speaker. The electronic device can respond to a click operation on the watch control 320 to enter the watch management application, and can perform some setting operations on the watch.

[0052] In some implementations, after the electronic device starts the SystemUI process, the SystemServer notifies the AMS service that the SystemUI has been started, and finally the AMS service starts the desktop and sends a BOOT_COMPLETED broadcast. BOOT_COMPLETED is used to indicate that the electronic device has completed booting. In another implementation, the first user interface displayed after the electronic device switches from the off state to the on state can also indicate that the electronic device has completed booting.

[0053] In the embodiment of the present application, the electronic device can divide the controls in SystemUI into two types: one is a local control localplugin, and the other is a remote control RemotePlugin. Among them, localplugin can refer to a component that interacts in this application; RemotePlugin can refer to a control that needs to rely on the functions of other controls to be started before it can realize its functions. For example, RemotePlugin needs to be based on other functions such as WLAN connection, Bluetooth connection, GPS positioning, etc. to realize its own functions. Exemplarily, localplugin may include such as Figure 2B As shown in: setting control 301, editing control 302, WLAN control 303, Bluetooth control 304, sound mode control 305, code scanning control 306, music control 307, brightness adjustment control 308, volume adjustment control 309, hotspot control 311, screenshot control 312, eye protection mode control 313, automatic rotation control 314, location information control 315. RemotePlugin may include: Figure 2B As shown in: smart interconnection box 317, speaker control 318, speaker switch control 319, watch control 320. In the embodiment of the present application, the controls included in the above localplugin and RemotePlugin are only exemplary, and more controls may be included, which is not limited.

[0054] Each control included in the above-mentioned localplugin can realize its own function without relying on the functions provided by other controls. For example, the electronic device can directly respond to the user operation on the brightness adjustment control 308 to adjust the screen brightness. Each control included in the above-mentioned RemotePlugin needs to realize its own function based on the functions provided by other controls. For example, the electronic device can establish a WLAN connection with the speaker. If the WLAN function is not turned on for the electronic device, the electronic device responds to the click operation on the speaker switch control 319 and cannot turn on or off the speaker. And the electronic device can respond to the click operation on the speaker control 318, and after entering the speaker management application, it will display a prompt message that the speaker cannot be connected. In an embodiment of the present application, there can be more division conditions for the above-mentioned localplugin and RemotePlugin, which are not limited. For example, the controls included in the localplugin can meet the basic needs of the user, or / and the RemotePlugin is loaded after the localplugin without affecting the electronic device to realize the function of the localplugin.

[0055] In some implementations, the functions that localplugin can support can be called basic functions, and the functions that RemotePlugin can support can be called additional functions.

[0056] From the above boot process, it can be seen that the electronic device has completed the loading of all controls in SystemUI before the startup desktop sends the BOOT_COMPLETED broadcast. This will cause the electronic device to start slowly.

[0057] In an embodiment of the present application, the electronic device first completes the loading of localplugin in the process of starting SystemUI, and then the electronic device starts the desktop to complete the startup. Finally, after the electronic device is started, it completes the loading of RemotePlugin. This is because the functions of RemotePlugin rely on some control functions in localplugin to be in the started state to be realized, so the loading of RemotePlugin can be performed after the loading of localplugin is completed. In this way, after the electronic device is started, loading some controls in SystemUI can reduce the startup time.

[0058] Combine the following Figure 3 The power-on method provided in the embodiment of the present application is introduced.

[0059] like Figure 3 As shown, the process includes:

[0060] S301, the electronic device starts the first stage.

[0061] The first stage may include: starting the power supply Poweron, loading the Boot ROM, running the BootLoader, starting the kernel Kernel, starting the init process, and starting the Zygote process.

[0062] For a detailed description of the steps involved in the first phase, please refer to Figure 1 The relevant instructions in are not repeated here.

[0063] After the electronic device starts the first stage, it can start the SystemServer process through the fork system_server method.

[0064] S302: The electronic device starts the SystemServer process, and starts the SystemUI in the SystemServer process.

[0065] After the electronic device completes the steps included in the first stage, the SystemServer process can be started. Specifically, the electronic device can start AMS, IMS, PMS, WMS and other services through the SystemServer. The electronic device can start the SystemUI through the startSystemUI method in the SystemServer process. For a detailed introduction to the SystemServer process, please refer to Figure 1 The relevant instructions in are not repeated here.

[0066] S303: The electronic device loads localplugin during the process of starting SystemUI.

[0067] Before loading localplugin during the process of starting SystemUI, the electronic device can also initialize SystemUI, draw the status bar view, load the layout, etc. during the process of starting SystemUI. Figure 1 The relevant description in will not be repeated here.

[0068] In some implementations, after the electronic device initializes the SystemUI, draws the status bar view, and loads the layout, the electronic device can load the localplugin, but for the boot speed of the electronic device, the electronic device has not loaded the RemotePlugin at this moment.

[0069] The premise for an electronic device to load a localplugin is that the electronic device can identify the localplugin. Specifically, the electronic device can mark each control in the SystemUI to distinguish the control type. For example, the electronic device can add a field for marking the control type to each control in the SystemUI, and the field can be named bytepluginLoadingType. The value of byte pluginLoadingType can be 0 or 1. When the value of byte pluginLoadingType of a control in SystemUI is 0, it indicates that the control belongs to localplugin; when the value of byte pluginLoadingType of a control in SystemUI is 1, it indicates that the control belongs to RemotePlugin. Exemplarily, the above-mentioned electronic device loads the localplugin during the process of starting the SystemUI, which is actually loading the control with a bytepluginLoadingType value of 0.

[0070] In some implementations, the identifier in which the value of the byte pluginLoadingType is 0 may be referred to as a first identifier, and the identifier in which the value of the byte pluginLoadingType is 1 may be referred to as a second identifier.

[0071] In some implementations, before the electronic device leaves the factory, the developer of the electronic device has completed the classification process of all controls in the SystemUI, that is, has completed the value-taking operation of the fields for marking the control types of all controls.

[0072] S304. The SystemUI of the electronic device sends a message indicating that the SystemUI startup is complete to the SystemServer process.

[0073] After the electronic device loads the localplugin, the SystemUI of the electronic device can send a message indicating that the startup of the SystemUI is completed to the SystemServer process.

[0074] S305: The electronic device starts the desktop and sends a BOOT_COMPLETED broadcast, and the startup of the electronic device is completed.

[0075] Exemplarily, the startup desktop may refer to displaying the user interface 30 or displaying the lock screen interface.

[0076] After the SystemServer process of the electronic device receives the message sent by SystemUI that the startup of SystemUI is complete, the AMS service can be notified to start the desktop and send a BOOT_COMPLETED broadcast to each process or software module inside the electronic device. Optionally, the AMS service can also play the electronic device startup animation before starting the desktop. The above BOOT_COMPLETED broadcast marks the completion of the electronic device startup. In other words, after the electronic device is started, the user can use the electronic device normally.

[0077] S306: The SystemUI of the electronic device loads RemotePlugin.

[0078] In some implementations, after receiving the BOOT_COMPLETED broadcast, the SystemUI of the electronic device loads the RemotePlugin. As can be seen from the above step S303, illustratively, the above electronic device loads the RemotePlugin after the boot is completed, which actually loads the control with the value of byte pluginLoadingType being 1.

[0079] It is worth noting that loading RemotePlugin after the electronic device is turned on will not affect the user's use of related functions in RemotePlugin. For example, the user wants to make management settings related to the speaker. First, the electronic device responds to the user's click operation on the WLAN control 303 and turns on the WLAN function. In the process of turning on the WLAN function of the electronic device, RemotePlugin is also loaded at the same time. Generally, after the electronic device turns on the WLAN function, the related controls in RemotePlugin that depend on the WLAN function have also been loaded.

[0080] In the embodiment of the present application, the above-mentioned delayed loading of localplugin and RemotePlugin in SystemUI is only an exemplary explanation. Localplugin and RemotePlugin can also be divided in other applications, and the divided localplugin and RemotePlugin can also be delayed loaded during the loading process of other applications. There is no limitation to this.

[0081] It can be seen from the above process method that the electronic device can speed up the booting speed and reduce the booting time through the above method, so that the user can observe the first user interface after booting more quickly.

[0082] In order to better understand the delayed loading method provided in the embodiment of the present application, the electronic device mentioned in the embodiment of the present application is introduced below. Figure 4 A schematic structural diagram of an electronic device 100 is shown.

[0083] The electronic device 100 may be equipped with Or a portable terminal device of other operating systems, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle, a vehicle-mounted device, a smart home device and / or a smart city device, but not limited thereto, the electronic device 100 can also include a laptop computer with a touch-sensitive surface or a touch panel, a desktop computer with a touch-sensitive surface or a touch panel, and other non-portable terminal devices, etc. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.

[0084] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0085] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0086] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0087] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0088] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0089] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0090] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0091] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0092] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0093] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0094] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0095] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0096] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0097] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0098] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0099] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0100] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0101] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0102] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0103] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0104] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0105] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0106] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0107] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0108] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0109] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0110] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0111] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0112] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0113] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0114] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0115] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.

[0116] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0117] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0118] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0119] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0120] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0121] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0122] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0123] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0124] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0125] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0126] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0127] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0128] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0129] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0130] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0131] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0132] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0133] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0134] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0135] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0136] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0137] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0138] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0139] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0140] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0141] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.

[0142] Figure 5 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0143] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0144] The application layer can include a series of application packages.

[0145] like Figure 5 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, short message, etc. The application may also include SystemUI, which is a system application.

[0146] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0147] like Figure 5 As shown, the application framework layer may include a system server SystemServer process, which may include an activity manager AcitivityManager, a window manager WindowManager, a power manager PowerManager, and an input manager InputManager. In addition, the application framework layer may also include a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0148] ActivityManager is used to interact with all running Activities in the system, manage and maintain information related to all running Activities in the system, and provide corresponding interfaces to obtain interaction, management, and maintenance information.

[0149] WindowManager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0150] PowerManager is used to manage and control the power status, restart, sleep state, wake-up, etc. of electronic devices.

[0151] InputManager is used together with the above WindowManager to manage and maintain input events.

[0152] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0153] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0154] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0155] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0156] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0157] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0158] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0159] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0160] The system library may include a media server, which may include an audio manager, AudioFlinger, a media player service, MediaPlayerService, etc. The system library may also include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), etc. The system library may also include a hardware abstraction layer HAL.

[0161] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple common audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.

[0162] Most of the classes in the Framework layer are just "intermediaries" for applications to use library files in the system library. Because the upper-layer applications are written in Java, they need the most direct support of Java interfaces, while the system library supports the operation of another language (such as C++). Therefore, the Framework layer acts as an intermediary between the application layer and the system library. The modules in the Framework layer do not really implement specific functions, or only implement part of the functions, but focus on the core library to complete them. The difference is that the Framework layer is mostly written in Java, while the system library is mostly written in C++.

[0163] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver Display Driver, the camera driver Camera Driver, the audio driver Audio Driver, and the input driver Input Driver.

[0164] Based on the above Figure 5 The following is an introduction to the software architecture shown in the figure, and the boot process provided by this application is introduced below.

[0165] In some implementations, the electronic device runs the BootLoader by loading the Boot ROM.

[0166] After running the BootLoader, the electronic device can start the Kernel. Starting the Kernel specifically includes the following: the electronic device can start various drivers, such as Display Driver, Camera Driver, Audio Driver, Input Driver, etc., through the swapper process (process number 0), and the various drivers can also be used to start the HAL; the electronic device can also obtain the page daemon kthreadd (process number 2) and the init process (process number 1) through swapper, among which kthreadd can replicate the kernel daemon Kernel Daemons, so that the electronic device completes the Kernel startup. Among them, swapper, kthreadd, and Kernel Daemons are all located in the kernel layer.

[0167] After that, the electronic device starts to start the init process. Starting the init process specifically includes the following contents: the electronic device can obtain the local daemon process Naticve Daemons through the init process, and can also initialize various servers and managers. For example, the media server Media Server, the boot animation service bootanim, the service manager ServiceManager, etc. Among them, the Media Server also includes AudioFlinger, the media player service MediaPlayerService, etc. The electronic device can also copy the init process to obtain the Zygote process. Among them, the init process and Naticve Daemons are both located in the system library.

[0168] Then, the electronic device starts to start the Zygote process. Starting the Zygote process specifically includes: the electronic device can start the SystemServer process through the Zygote process using the fork system_server method, and can also load the virtual machine and register the JAVA Native Interface (JNI) method, which is used to realize the communication between JAVA and other languages. Among them, the Zygote process is located between the system library and the application framework layer.

[0169] Then, the electronic device starts to start the SystemServer process. Starting the SystemServer process specifically includes: the electronic device can start various services and managers in the SystemServer process, and the electronic device can also start the SystemUI through the startSystemUI method. Among them, the SystemServer process is located in the application framework layer, and the SystemUI is located in the application layer.

[0170] Next, the electronic device loads the localplugin after SystemUI. After loading is complete, SystemUI starts. SystemUI sends the information that SystemUI starts to the SystemServer process. After the SystemServer process receives the information that SystemUI starts, it starts the desktop and sends a BOOT_COMPLETED broadcast. After SystemUI receives the BOOT_COMPLETED broadcast, it loads RemotePlugin.

[0171] By loading the RemotePlugin in SystemUI after the electronic device is started up, the boot speed can be increased and the boot time can be reduced.

[0172] It should be understood that each step in the above method embodiment provided by the present application can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0173] The present application also provides an electronic device, which may include: a memory and a processor, wherein the memory may be used to store a computer program; and the processor may be used to call the computer program in the memory so that the electronic device executes the method in any one of the above embodiments.

[0174] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method executed by the electronic device in any of the above embodiments.

[0175] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0176] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0177] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0178] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

[0179] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0180] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which enables a computer to execute the method executed by the electronic device in any of the above embodiments when the computer program is executed.

[0181] The present application also provides a computer-readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the electronic device in any of the above embodiments.

[0182] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0183] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk), etc.

[0184] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0185] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. A startup method, characterized in that: The method comprises: The electronic device is in the off state and a long press operation of the power button is detected; The electronic device starts a first system application, where the first system application includes SystemUI; The electronic device loads a first type of control through the first system application, the first type of control is used to implement a basic function of the electronic device, and after the first type of control is loaded, the electronic device has the ability to provide the basic function implemented by the first type of control; In response to the completion of loading the first type of controls, the electronic device displays a first lock screen interface, where the first lock screen interface displays prompt information, where the prompt information is used to prompt the user to enter an unlock password; The electronic device loads a second type of control through the first system application, and the second type of control is used to implement additional functions based on the basic functions. After the second type of control is loaded, the electronic device has the ability to provide the additional functions implemented by the second type of control.

2. The method according to claim 1, characterized in that After displaying the first lock screen interface, the method further includes: The first lock screen interface includes a password input box, After receiving the operation of inputting a password in the password input box, the electronic device displays the desktop; The electronic device receives a sliding operation from the top of the desktop downwards, and displays a first user interface, where the first user interface includes a first control, and the first control belongs to the first category of controls; The electronic device receives a user operation on the first control and starts a basic function corresponding to the first control.

3. The method according to claim 1, characterized in that: After the electronic device loads the first type of controls, the method further includes: In response to completing loading of the first category of controls, the electronic device starts a basic function corresponding to a second control, where the second control belongs to the first category of controls.

4. The method according to claim 2, characterized in that: After displaying the first user interface and before the electronic device receives a user operation acting on the first control, the method further includes: The electronic device receives a user operation acting on a third control and does not start an additional function corresponding to the third control, the third control belongs to the second category of controls, the additional function corresponding to the third control is based on the basic function of the first control, and the first user interface includes the third control.

5. The method according to claim 2, characterized in that: After starting the basic function corresponding to the first control, the method further includes: The electronic device receives a user operation acting on a third control and starts an additional function corresponding to the third control based on a basic function of the first control.

6. The method according to any one of claims 1 to 5, characterized in that Before the electronic device loads the first type of controls, the method further includes: The electronic device identifies the first category of controls by a first identifier and identifies the second category of controls by a second identifier, wherein the first identifier is used to mark the first category of controls and the second identifier is used to mark the second category of controls.

7. The method according to any one of claims 1 to 5, characterized in that The first category of controls includes one or more of the following: setting controls, editing controls, WLAN controls, Bluetooth controls, sound mode controls, code scanning controls, music controls, brightness adjustment controls, volume adjustment controls, hotspot controls, screenshot controls, eye protection mode controls, automatic rotation controls, and location information controls; the second category of controls includes one or more of the following: interconnected device management controls, speaker function adjustment controls, speaker switch controls, and watch function adjustment controls.

8. The method according to any one of claims 1 to 5, characterized in that Before displaying the first lock screen interface, the method further includes: The electronic device generates a BOOT_COMPLETED broadcast through a window management service, and sends the BOOT_COMPLETED broadcast to the first system application.

9. An electronic device, characterized in that: The electronic device includes a memory and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method as described in any one of claims 1-8.

10. A chip, which is applied to electronic equipment, characterized in that: The chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1-8.

11. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 8.