Method and electronic device for managing application execution

By judging and handling functional conflicts in electronic devices, it solves the problem of failure caused by conflicts between control functions such as healthy use of mobile phones and other functions, achieves better management and restriction effects, and improves user experience.

CN117555658BActive Publication Date: 2024-10-11HONOR DEVICE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In electronic devices, when control functions such as healthy use of mobile phones conflict with other functions, the control functions may become ineffective, unable to effectively limit the use of applications, and affect the user experience.

Method used

By determining whether there are conflicting functions in electronic devices, and actively turning off or not responding to conflicting functions, conflicts between functions can be avoided, such as caching the status information of conflicting functions for subsequent automatic switching, closing the setting entrance of conflicting functions, and ensuring the safety of management and control functions. effectiveness.

Benefits of technology

It improves the user experience, ensures the management and restriction of control functions, and avoids the failure of control functions caused by functional conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117555658B_ABST
    Figure CN117555658B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and electronic device for managing application operation, the method is executed by the electronic device, including: when the first function of the electronic device is turned on, determining whether the second function is turned on, wherein the first function is used to manage the application operation in the electronic device, and the operation priority corresponding to the second function is greater than the operation priority corresponding to the first function; if the second function is turned on, then the second function is turned off, or, when receiving the operation of the user triggering the first application in the electronic device to execute the second function, but the electronic device determines that the first application is not allowed to execute the second function, it does not respond to the execution of the second function; if the second function is not turned on, then the setting entrance of the second function in the electronic device is closed. This method can enable the control function of the electronic device to better realize the management and restriction functions, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a method for managing application execution and an electronic device. Background Art

[0002] With the continuous development of electronic devices, electronic devices (such as mobile phones, tablet computers, etc.) can realize more and more functions and carry more and more information. In order to better manage and use electronic devices, there are currently control functions such as healthy use of mobile phones, which can set the phone usage time, application usage restrictions and usage time, phone mode, etc.

[0003] However, research has found that when control functions such as healthy use of mobile phones are turned on, if other conflicting functions are also turned on, functions such as healthy use of mobile phones may become ineffective, and applications that should be restricted cannot be restricted, affecting the user experience. Summary of the invention

[0004] The present application provides a method for managing application execution and an electronic device, which can enable the control function of the electronic device to better implement management and restriction functions and improve user experience.

[0005] In a first aspect, the present application provides a method for managing application execution, which is executed by an electronic device, comprising: when a first function of the electronic device is turned on, determining whether a second function is turned on, wherein the first function is used to manage application execution in the electronic device, and the execution priority corresponding to the second function is greater than the execution priority corresponding to the first function; if the second function is turned on, turning off the second function, or, when receiving an operation in which a user triggers a first application in the electronic device to execute the second function, but the electronic device determines that the first application is not allowed to execute the second function, not responding to the execution of the second function; if the second function is not turned on, closing the setting entrance of the second function in the electronic device.

[0006] Among them, the electronic device can enable multiple functions to provide users with a rich experience. However, due to the different operating priorities between the functions, there may be a problem of operating conflicts between the functions. Based on this, when the first function of the electronic device is turned on, the application can determine whether the second function is turned on. If the second function is turned on, in order to avoid the conflict between the first function and the second function, the electronic device can actively turn off the second function, or, when the user triggers the first application to execute the second function, the first application is not allowed to execute the second function. If the second function is not turned on, the electronic device can actively close the setting entrance of the second function so that the user can no longer turn on the second function.

[0007] The above-mentioned first function is used to manage the operation of applications in electronic devices, for example, the mobile phone function can be used for health. The operation priority corresponding to the second function is greater than the operation priority corresponding to the first function, that is, the operation of the second function may render the first function invalid, for example, the second function is a screen lock function. Therefore, the electronic device can temporarily shut down or not respond to the function that conflicts with the first function by adopting the above-mentioned technical solution, so that the control function of the electronic device can better realize the management and restriction function.

[0008] Optionally, the electronic device may receive a user's activation operation on the first function to trigger activation of the first function.

[0009] Optionally, the electronic device may obtain status information of the second function to determine whether the second function is turned on, for example, by obtaining the status information of the second function from a database.

[0010] In combination with the first aspect, in some implementations of the first aspect, before shutting down the second function, the method further includes: caching activation status information of the second function.

[0011] Among them, if the electronic device actively turns off the second function, if the first function in the electronic device is also turned off afterwards, in order to ensure that the user can continue to use the second function, the electronic device needs to restore the original on state of the second function. Therefore, before turning off the second function, the electronic device can also cache the on state information of the second function. Optionally, the electronic device can apply for a buffer from the memory to store the on state information of the second function, or a new database can be created to cache the on state information of the second function. As a result, the electronic device can automatically switch between the first function and the second function later, further improving the user experience.

[0012] In combination with the first aspect, in some implementations of the first aspect, in the case of shutting down the second function, the method further includes: shutting down a setting entry for the second function in the electronic device.

[0013] Among them, when the electronic device turns off the second function, in order to prevent the user from actively turning on the second function again, the electronic device can also close the setting entrance of the second function in the electronic device, so that the user can no longer turn on the screen fixing function, further avoiding the conflict between the second function and the first function.

[0014] In combination with the first aspect, in some implementations of the first aspect, in the case of closing the setting entrance of the second function in the electronic device, the method further includes: canceling the display of the interface for setting the second function.

[0015] Optionally, the electronic device may set an opening entry in the setting interface, such as setting a switch control, for the user to turn on the second function. Then, if the electronic device closes the setting entry for the second function, the interface for setting the second function may also be cancelled. For example, the electronic device may set the switch control to an inoperable state, or hide the switch control, etc.

[0016] In combination with the first aspect, in some implementations of the first aspect, after the second function is turned off, if a turn-off operation for the first function is received and the cached status information of the second function is turn-on status information, the method further includes: turning on the second function, and turning on the setting entry for the second function in the electronic device.

[0017] After the electronic device turns off the second function, the user may subsequently trigger the first function to be turned off. Therefore, if the electronic device receives the user's turn-off operation on the first function, and the cached state information of the second function is the on state information, the electronic device needs to restart the second function to maintain the original operating state. Specifically, the electronic device can turn on the second function and the setting entrance of the second function at the same time. In this way, the electronic device can automatically switch between the first function and the second function to improve the user experience.

[0018] In combination with the first aspect, in some implementations of the first aspect, if the second function is turned on, a first control is displayed on the first interface of the electronic device, and the first control is a control that triggers the execution of the second function, then when the second function is turned off, the above method also includes: canceling the display of the first control on the first interface.

[0019] Typically, when the second function is turned on, a first control may be displayed on the first interface of the electronic device, and the first control may be used to trigger the execution of the second function. Therefore, if the electronic device turns off the second function, the first control may be canceled from the first interface to prevent the user from touching the first control again.

[0020] Optionally, when the second function is a screen pinning function, the first interface may be a recent taskbar interface, and the first control may be a screen pinning control on the recent taskbar interface.

[0021] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned receiving an operation of a user triggering a first application in an electronic device to execute a second function includes: receiving a trigger operation of a first control by a user on a first interface, the first interface including a task interface of the first application, and the first control being located on the task interface of the first application.

[0022] Among them, it can be known from the above description that when the electronic device turns on the first function, if the second function is also turned on, then when the user triggers the first application in the electronic device to execute the second function, but the electronic device determines that the first application is not allowed to execute the second function, the electronic device may not respond to execute the second function. In this step, the electronic device can receive the user's triggering operation on the first control on the first interface to trigger the first application to execute the second function. At this time, the first control can be located on the task interface of the first application. The electronic device can determine the current task identifier through the triggering operation on the first control, and then determine the corresponding application identifier, that is, the first application. The first application here can be any executable application installed in the electronic device.

[0023] Then, the electronic device determines that the first application is not allowed to execute the second function, which may include: determining that the first application is not allowed to execute the second function according to the operation mode of the electronic device and / or the usage status of the first application.

[0024] Since the purpose of this application is to ensure that the control function can better realize the management and restriction effects, therefore, if the electronic device is in restriction mode or the first application is currently in a restricted use state, etc., the first application is not allowed to execute the second function.

[0025] Specifically, the above-mentioned determination that the first application is not allowed to execute the second function based on the operating mode of the electronic device and / or the usage status of the first application includes: if the operating mode of the electronic device is the first mode, and the usage status of the first application is the restricted use status, then determining that the first application is not allowed to execute the second function, the first mode represents that all applications in the electronic device have the authority to run, and the restricted use status represents the state in which the first application is not allowed to be used because the operating time has reached the limit time.

[0026] Among them, the electronic device can first determine whether the current electronic device is in the first mode. If it is in the first mode, it can then determine whether the usage status of the first application is a restricted usage status. If the usage status of the first application is a restricted usage status, the electronic device does not allow the first application to execute the second function, thereby realizing the management and operation of the first application.

[0027] It is understood that if the current electronic device is in the first mode and the usage state of the first application is not a restricted usage state, the electronic device may allow the first application to execute the second function. Thus, the electronic device may flexibly manage the first application according to its usage state.

[0028] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned determination that the first application is not allowed to execute the second function based on the operating mode of the electronic device and / or the usage status of the first application includes: if the operating status of the electronic device is the second mode, determining that the first application is not allowed to execute the second function, the second mode indicating that some applications in the electronic device do not have permission to run.

[0029] Wherein, when the current electronic device is not in the first mode, if the electronic device is in the second mode, the electronic device does not allow the first application to execute the second function.

[0030] Optionally, the first mode may be a parent mode, and the second mode may be a child mode, that is, the second function is not allowed to be executed in the child mode, so as to guide children to use the electronic device in a good manner.

[0031] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned electronic device determines that the first application is not allowed to execute the second function, including: if the application identifier of the first application is stored in the first storage space, then determining that the first application is not allowed to execute the second function, the first storage space stores the identifier of the application that is not allowed to be used because the running time has reached the limit time.

[0032] In this implementation, when the electronic device manages the running time of the first application, if the running time of an application reaches the limit time, the identification of the application can be stored in the first storage space, for example, the first storage space is a database. Then the electronic device can also determine whether the application identification of the first application is stored in the first storage space. If it is stored in the first storage space, the first application is not allowed to execute the second function, thereby achieving the management and operation of the first application.

[0033] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned electronic device determines that the first application is not allowed to execute the second function, including: if the application identifier of the first application is not stored in the first storage space, but the operating state of the electronic device is the second mode, then it is determined that the first application is not allowed to execute the second function.

[0034] In this implementation, when the first application is not in a restricted use state (i.e., the application identifier of the first application is not stored in the first storage space), the electronic device can further determine whether the current electronic device is in a second mode (such as child mode). If it is in the second mode, the first application is not allowed to execute the second function, so as to more accurately manage and control the first application.

[0035] In combination with the first aspect, in some implementations of the first aspect, when there is no response to executing the second function, the method further includes: displaying a prompt message that does not allow the execution of the second function.

[0036] If the electronic device does not respond to the execution of the second function, that is, the first application is not allowed to execute the second function, the electronic device may also display a prompt message that does not allow the execution of the second function. For example, a message "The current application is in restricted use, and the screen fixation function is not allowed to be enabled temporarily" may be displayed to remind the user why the execution of the second function is not allowed at present, thereby further improving the user's experience.

[0037] In a second aspect, the present application provides a device, which is included in an electronic device, and the device has the function of implementing the electronic device behavior in the above-mentioned first aspect and the possible implementation of the above-mentioned first aspect. The function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a receiving module or unit, a processing module or unit, etc.

[0038] In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other so that the electronic device executes any one of the methods in the technical solution of the first aspect.

[0039] In a fourth aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof.

[0040] Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.

[0041] Further optionally, the chip also includes a communication interface.

[0042] In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods in the technical solution of the first aspect.

[0043] In a sixth aspect, the present application provides a computer program product, the computer program product comprising: a computer program code, when the computer program code runs on an electronic device, the electronic device executes any one of the methods in the technical solution of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a schematic diagram of a setting interface for a healthy use of a mobile phone function provided in an embodiment of the present application;

[0045] Figure 2 This is another example of a setting interface for healthy use of mobile phone functions provided in an embodiment of the present application;

[0046] Figure 3This is another example of a setting interface for healthy use of mobile phone functions provided in an embodiment of the present application;

[0047] Figure 4 This is a schematic diagram of an operating interface of a healthy use of a mobile phone function provided in an embodiment of the present application;

[0048] Figure 5 This is a schematic diagram of a setting interface of a screen fixing function provided in an embodiment of the present application;

[0049] Figure 6 This is a schematic diagram of an operation interface of a screen fixing function provided in an embodiment of the present application;

[0050] Figure 7 This is a schematic diagram of an interface for a conflict between a healthy use of a mobile phone function and a screen fixed function provided in an embodiment of the present application;

[0051] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0052] Fig. 9 is a software structure block diagram of an electronic device provided in an embodiment of the present application;

[0053] Fig.10 This is a flowchart of a method for managing application execution provided by an embodiment of the present application;

[0054] Fig.11 This is a schematic diagram of an interface for canceling a fixed control on a display screen provided in an embodiment of the present application;

[0055] Fig.12 This is a schematic diagram of an interface for setting up a function of turning off the screen fixation function provided in an embodiment of the present application;

[0056] Fig.13 is a flowchart of another method for managing application execution provided by an embodiment of the present application;

[0057] Fig.14 is a schematic diagram of a process for determining a first result provided in an embodiment of the present application;

[0058] Fig.15 This is a schematic diagram of a prompt interface for not allowing the screen fixation function to be enabled, provided in an embodiment of the present application;

[0059] Fig.16 This is a flowchart of another method for managing application execution provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. 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 this article 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.

[0061] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.

[0062] With the continuous development of electronic devices, the functions they can realize and the information they can carry are increasing. For example, electronic devices such as mobile phones and tablets can already realize online games, business office, watching videos and other functions. However, in order to better manage and use electronic devices and avoid excessive use, there are currently control functions such as healthy use of mobile phones, which can set mobile phone usage time, application usage restrictions and usage time, mobile phone mode, etc., to manage the operation of devices and applications.

[0063] For example, Figure 1 As shown, taking the electronic device as a mobile phone as an example, the setting interface of the electronic device includes a healthy use of mobile phone control 11. When the user clicks the healthy use of mobile phone control 11, the electronic device can jump to the healthy use of mobile phone setting interface. The healthy use of mobile phone setting interface includes usage statistics of the electronic device, such as how long the electronic device has been used and the usage time of each application, and also includes various setting controls.

[0064] For each setting control, such as Figure 1 As shown in , the setting interface of healthy use of mobile phone includes an available time control 12, which can be used to set the total time of screen usage per day. If the user clicks on the available time control 12, the electronic device can jump to Figure 2The available time setting interface shown. In the available time setting, the user can set the available time, including but not limited to setting it separately for weekdays and weekends. Exemplarily, if the user clicks on the weekday control 21, the electronic device can jump to the interface for editing the available time, on which the user can edit the name, repetition method, and daily available time separately, and click the completion control 22 after the editing is completed. If the user no longer needs to set the available time on weekdays, the user can select the delete control 23 on the interface for editing the available time, which means that the control rules for limiting the usage time on weekdays can be deleted. In addition, the user can also modify the available time according to his or her needs. Figure 2 Add the available time on the available time setting interface, that is, personalize the control rules for limiting the usage time.

[0065] Continue to see Figure 1 The healthy use of the mobile phone setting interface also includes an application limit control 13, which can be used to set a time limit for the application. If the user clicks on the application limit control 13, the electronic device can jump to Figure 3 The application quota setting interface shown in the figure. On the application quota setting interface, users can set quotas for different applications separately, such as Figure 3 As shown, the user can click on any application icon, for example, if the user clicks on the map application icon 31, the electronic device can pop up a limit setting box for the map application, and the limit setting box includes setting controls for different restriction methods. For example, if the user does not need to set a limit for the map application, the user can click on the always allowed switch control 32 to set it to always allow the use of the map application; if the user needs to prohibit the use of the map application (that is, the map application cannot be run at any time), the user can click on the prohibition switch control 33 to set it to prohibit the use of the map application; if the user needs to set a limit for the map application, the user can click on the time-limited switch control 34 and set the limit time in the time list below, for example, set it to 1 hour, that is, only 1 hour of use of the map application is allowed every day.

[0066] On the setting interface for healthy use of the mobile phone, in addition to the above-mentioned available time control 12 and application limit control 13, it can also include, for example, an inactivity time control, a remote guardian control, etc., the functions of which are not described in detail in the embodiments of this application.

[0067] It is understandable that if the user has made the above settings on the electronic device, for example, setting the total time of using the electronic device to 6 hours per day, or setting the time allowed to use a certain application to 1 hour per day, then after the set time is reached, the electronic device will pop up a prompt interface indicating that the usage time has been used up and no further use is allowed. For example, in the scenario where the time limit for the map application is set to 1 hour, the prompt interface displayed by the electronic device is as follows: Figure 4 As shown, under the title of "Healthy use of mobile phone", it shows "Today's available time has been used up, and the 'Map' application is not available." Figure 4 On the prompt interface, if the user clicks the "Got it" control 41 below, the electronic device will exit the current interface and return to the desktop interface; if the user really needs to use the map application again, the user can click the delayed use control 42 and select the corresponding delay rule in the current application delayed use setting box that pops up.

[0068] When the healthy mobile phone usage function is turned on in an electronic device, the healthy mobile phone usage application (or module) in the electronic device will record the running time of the electronic device or application. When the running time reaches the set time, the healthy mobile phone usage application will start to display the above Figure 4 The prompt interface shown.

[0069] In other scenarios, if the electronic device has a child mode, if parents allow their children to use the electronic device for learning, in order to prevent the children from using the electronic device for entertainment, the electronic device can be set to child mode. In this mode, applications such as games and videos cannot be run.

[0070] Generally speaking, the original intention of users to set up the healthy use of mobile phone function is to regulate and self-discipline the use of mobile phones, or to guide children to use electronic devices reasonably. This requires that electronic devices can accurately execute the healthy use of mobile phone function to better manage the operation of applications. However, the study found that when the healthy use of mobile phone function is turned on, if other conflicting functions are also turned on, the healthy use of mobile phone function may become ineffective and fail to restrict the applications that should be restricted.

[0071] Optionally, other conflicting functions include but are not limited to the screen pinning function. Taking the screen pinning function as an example, the screen pinning function is a function of the Android system. If the electronic device turns on the screen pinning function and pins the display screen of a certain application, the user can only use the pinned application and cannot use other applications until the user cancels the pinning of the display screen of the application.

[0072] For example, Figure 5As shown, the path for the electronic device to enable the screen fixation function may include: on the setting interface of the electronic device, in addition to the above-mentioned healthy use of mobile phone controls, a security control 51 may also be included. When the user clicks the security control 51, the electronic device may jump to the security setting interface. On the security setting interface, the user can make various security settings for the electronic device, such as emergency warning notifications, password safes, payment protection centers and other security settings; in addition, the security setting interface also includes more security settings controls 52. When the user clicks more security settings controls 52, the electronic device may jump to more security settings interfaces. On the more security settings interface, the user can make security settings such as device manager, encryption and credentials, installation of external source applications, etc. for the electronic device, and can also set the screen fixation. When the user clicks the screen fixation control 53, the electronic device may jump to the screen fixation setting interface, and the screen fixation setting interface includes a screen fixation switch control 54. If the user clicks the switch control 54, the screen fixation function can be turned on. Optionally, for further security, the screen pinning setting interface may also include a control 55 requiring verification of a lock screen password before canceling screen pinning, that is, the user needs to enter a lock screen password when canceling the display screen of a fixed application to prevent malicious use of the electronic device.

[0073] When the user clicks the switch control 54 to turn on the screen pinning function, if the user operates the electronic device to enter the recent taskbar interface, for example, by sliding upward from the bottom of the display screen of the electronic device to enter the recent taskbar interface, the fixed screen control will be displayed on the application list in the recent taskbar interface. Figure 6 As shown, the fixed screen control 61 on the recent taskbar interface is displayed at the bottom of the first application in the application list. If the user slides the application list left or right, the fixed screen control 61 will follow the sliding operation and be displayed at the bottom of the application currently displayed in the middle. When the user clicks the fixed screen control 61 at the bottom of an application, the electronic device can switch to display the running interface of the application and pop up a prompt message that the screen has been fixed. Figure 6 Assuming that the user clicks on the fixed screen control 61 at the bottom of the email application, the electronic device switches to display the running interface of the email application and displays a prompt box 62 to prompt the user that the current screen has been fixed.

[0074] Among them, after the electronic device turns on the screen fixing function and receives the user's screen fixing operation on application A, the activity manager service (AMS) in the electronic device can respond to the screen fixing operation to display the running interface of application A, and then the AMS can intercept related operations such as switching display interfaces input by the user to ensure that the current screen is in a fixed state.

[0075] Through research, it is found that when the above-mentioned healthy mobile phone use function and the screen fixation function are turned on at the same time, assuming that the limit time for using application B is set to 1 hour in the healthy mobile phone use function, then when running application B, after 1 hour, the electronic device will display the above-mentioned Figure 4 However, if the user operates the electronic device to enter the recent taskbar interface and clicks the fixed screen control on application B in the recent taskbar interface, application B can continue to run and use, that is, the healthy use of mobile phone function is invalid at this time, and application B is no longer controlled. For example, Figure 7 As shown, assuming that application B is a video application, when the time limit is reached, the electronic device prompts "Today's available time has been used up, and the 'Video' application cannot be used". At this time, the user operates the electronic device to enter the recent taskbar interface and clicks the fixed screen control 61 at the bottom of the video application. Then the electronic device can continue to run the video application, and the healthy use of mobile phone function fails. The reason is that the operation priority of AMS is higher than that of the healthy use of mobile phone application. If the two are running at the same time, the electronic device will respond to the operation requirements of AMS first, which will cause the healthy use of mobile phone function to fail.

[0076] In view of this, an embodiment of the present application provides a method for managing application running, which can cache the activation status of functions such as screen fixing when turning on management functions such as healthy use of mobile phones, and turn off functions such as screen fixing and function entrances, so that users can no longer turn on functions such as screen fixing, or determine whether the system allows this function when fixing the screen of an application. If this function is not allowed, the screen cannot be fixed, so as to resolve the conflict between the management function and functions such as screen fixing, so that the management function can better realize the management and restriction functions and improve the user experience.

[0077] The method for managing application execution provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA) and other electronic devices on which application programs (APP) can be installed. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0078] For example, Figure 81 is a schematic diagram of the structure of an example of an electronic device 100 provided in an embodiment of the present application. Taking the electronic device 100 as a mobile phone as an example, 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.

[0079] 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 memory, 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.

[0080] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0081] 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.

[0082] 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, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0083] 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.

[0084] 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.

[0085] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0086] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0087] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch 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.

[0088] It is to be understood that the structure illustrated in the embodiment of the present application 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 split 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.

[0089] 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. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0090] Fig. 9 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role 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, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages, such as the Android application package (Android application package, APK).

[0091] like Fig. 9 As shown, the application package may include camera, gallery, call, map, WLAN, Bluetooth, video, short message, setting and other applications, and may also include a system user interface (SystemUI) and a system control module. For example, the system control module may be a healthy use of the mobile phone module.

[0092] Among them, the settings APK (or settings module) allows users to set different functions, such as the settings for the healthy use of mobile phone functions and the screen fixation function mentioned above. The system control module is used to manage the use of electronic devices or applications with control functions turned on, such as managing the running time of applications. SystemUI is a set of UI components for system-level information display and interaction provided by the system to users. It can realize the display and interaction of content such as the lock screen, status bar, bottom navigation bar, and recent taskbar interface; for example, the above Figure 6 The interactive operation of users selecting applications from the recent taskbar interface for screen pinning is implemented through SystemUI.

[0093] In the embodiment of the present application, the setting module can also record the on or off status information of different functions to the database, and the system control module can also cache the on or off status information of different functions, and send different broadcasts according to different needs. The setting module can also receive different broadcasts to perform operations indicated by different broadcasts.

[0094] 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.

[0095] like Fig. 9 As shown, the application framework layer may include AMS, window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0096] Among them, AMS is a core component in the Android operating system. It is the manager of Android applications and is responsible for managing the application life cycle, task stack, switching between processes and activities, etc. AMS plays a vital role in the Android system, ensuring that applications can run correctly and interact with users. Task stack management refers to the mechanism for organizing and managing the activities of applications in the Android system. Each task stack corresponds to an application or a group of related activities. When a user starts a new activity of an application, the system adds the task to which the activity belongs to a task stack. Therefore, a task stack stores multiple tasks, each of which can correspond to an identifier, such as a task ID (taskid), and each task also corresponds to application information.

[0097] In an embodiment of the present application, after SystemUI receives a touch operation input by the user, it can also send a message to AMS, instructing AMS to request the system management and control module through an interface to query whether a response to the touch operation is allowed, etc.

[0098] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to applications. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for the electronic device 100. The resource manager provides various resources for applications. The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. 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 a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.

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

[0100] 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.

[0101] 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.

[0102] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0103] 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.

[0104] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0105] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 8 and Fig. 9 Taking the electronic device with the structure shown as an example, the method for managing application running provided by the embodiment of the present application is specifically explained in combination with the accompanying drawings and application scenarios.

[0106] Taking the above-mentioned healthy use of mobile phone function and screen fixation function as an example, when the healthy use of mobile phone function is turned on, the electronic device may have two situations, the first is that the screen fixation function is turned on, and the second is that the screen fixation function is not turned on. In the first case, if the screen fixation function is turned on, if you want to avoid the conflict between the healthy use of mobile phone function and the screen fixation function, the embodiment of the present application provides two solutions, one of which is that the electronic device actively turns off the screen fixation function at this time (see the following Fig.10 The other is that when a user triggers an application to perform screen fixation, the electronic device determines whether to allow the application to perform screen fixation (see the following Fig.13 and Fig.16 In the second case, if the screen fixation function is not enabled, the electronic device can actively close the setting entry of the screen fixation function (see the following Fig.10 The user can no longer enable the screen fixation function. The following two situations are described in detail.

[0107] Fig.10 is a timing interaction diagram of a method for managing application execution provided in an embodiment of the present application, which is applied to the above Fig. 9 The software structure shown describes a scenario in which the screen fixation function is turned off when the control function is turned on, that is, the two functions cannot be turned on at the same time. The method includes:

[0108] S11, when the system control module receives the operation to start the first function (first operation), it determines whether the second function is turned on. If the second function is turned on, S12 is executed; if the second function is not turned on, S14 is executed.

[0109] The first function start operation (hereinafter referred to as the first operation) may be the above Figure 2 or Figure 3 The operation of turning on the healthy use of mobile phone function may also be the operation of turning on or switching to the child mode, or the operation of turning on the healthy use of mobile phone function and turning on or switching to the child mode at the same time, that is, turning on the control function of the electronic device (which may be referred to as the first function). Optionally, the first function may also be a mobile device management (MDM) function, a lock control function, etc.

[0110] The system control module may receive a first operation input by a user, and determine whether the second function is turned on when receiving the first operation. Optionally, the second function may be a screen fixing function, and the operation priority corresponding to the second function is greater than the operation priority corresponding to the first function.

[0111] Optionally, the system control module can obtain the status information of the second function, for example, obtain the status information of the second function from a database, and then determine whether the second function is enabled according to the status information of the second function. Exemplarily, the value of the lock_to_app_enabled field in the database can be used to represent the status information of the second function, and the system control function can obtain the value of the lock_to_app_enabled field by calling the function Settings.System.getInt(context.getContentResolver(), "lock_to_app_enabled"). Exemplarily, if the value of the lock_to_app_enabled field is 1, it indicates that the second function is enabled, and if the value of the lock_to_app_enabled field is 0, it indicates that the second function is disabled.

[0112] In addition, the above Figure 5 From the process of turning on the screen fixing function shown, it can be seen that the user can turn on or off the screen fixing function (i.e., the second function) by setting the path, then the setting module (or setting APK) can write the turned-on status information of the second function into the database after the user turns on the second function, or write the turned-off status information of the second function into the database after the user turns off the second function.

[0113] S12, the system control module caches the activation status information of the second function, and sends a first broadcast.

[0114] If the second function is enabled, the system control module may cache the enabled state information of the second function. Optionally, the system control module may apply for a buffer from the memory to store the enabled state information of the second function, or may create a new database to cache the enabled state information of the second function.

[0115] At the same time, the system control module also needs to send a first broadcast (sendBroadcast), and the first broadcast is used to instruct to turn off the second function and turn off the setting entry of the second function. Optionally, the first broadcast can carry a first instruction, and the first instruction is used to instruct to turn off the second function and turn off the setting entry of the second function. Exemplarily, the first broadcast can be a broadcast of the LOCK_TO_APP_ALL_DISABLE type.

[0116] S13, the setting module receives the first broadcast, turns off the second function and turns off the setting entry of the second function.

[0117] It can be understood that if the setting module is to execute the instructions corresponding to the first broadcast, then the setting module needs to have the ability to receive (or monitor) the first broadcast, and the setting module can register a broadcast receiver in advance. For example, a receiver for broadcasts related to the screen fixing function, such as ScreenLockReceiver, can be registered.

[0118] Therefore, the setting module can receive the first broadcast sent by the above-mentioned system control module, and parse the first broadcast to execute the corresponding instructions. Since the first broadcast is used to instruct to turn off the second function and turn off the setting entry of the second function, the setting module can execute to turn off the second function and turn off the setting entry of the second function. Exemplarily, the setting module has different broadcast processing logics. If a broadcast of the LOCK_TO_APP_ALL_DISABLE type is received, the second function and the setting entry of the second function are turned off.

[0119] Taking the second function as the screen fixing function as an example, the above Figure 6 It can be seen that when the screen pinning function is turned on, the fixed screen control 61 will be displayed on the recent taskbar interface. After the setting module turns off the screen pinning function, the electronic device no longer displays the fixed screen control 61 on the recent taskbar interface. For example, the display effect of the recent taskbar interface after the setting module turns off the screen pinning function is as follows: Fig.11 As shown, that is, the fixed screen control is not displayed, then the user can no longer operate the screen fixed function, thereby avoiding the conflict between the second function and the first function corresponding to the above-mentioned first operation.

[0120] Then from the above Figure 5 It can be seen that the setting entry of the screen fixation function includes a switch control 54. To prevent the user from triggering the screen fixation function again, the setting module can also close the setting entry of the screen fixation function. Optionally, if the setting entry of the screen fixation function is to be closed, the setting module can set the switch control 54 to an inoperable state, or hide the switch control 54. For example, Fig.12 As shown in (a), it is a schematic diagram of setting the switch control 54 to an inoperable state, that is, the switch control 54 is set to gray and inoperable; Fig.12 As shown in (b), it is a schematic diagram of hiding the display switch control 54, that is, not displaying the switch control 54. As a result, the user can no longer turn on the screen fixation function, further avoiding the conflict between the second function and the first function corresponding to the above-mentioned first operation.

[0121] It can also be understood that in order to avoid the problem of other modules (or APK) also receiving the first broadcast and abusing permissions, the above-mentioned system control module can also set permissions for the broadcast when sending the first broadcast, so that only the setting module receives and responds to the first broadcast. Exemplarily, the system control module can set permissions for the first broadcast through the context.sendBroadcast function.

[0122] In some other embodiments, the first broadcast may be used only to instruct to turn off the second function. For example, the first broadcast may be a LOCK_TO_APP_DISABLE type broadcast. Then, after receiving the first broadcast, the setting module only turns off the second function, that is, executes the broadcast processing logic for the LOCK_TO_APP_DISABLE type.

[0123] S14, the system management and control module sends a second broadcast.

[0124] Among them, if the second function is not turned on, the system control module can send a second broadcast (sendBroadcast), and the second broadcast is used to indicate the setting entry for closing the second function. Optionally, the second broadcast can carry a second instruction, and the second instruction is used to indicate the setting entry for closing the second function. That is to say, when the second function is not turned on, in order to prevent the user from turning on the second function again, the system control module actively indicates to turn off the setting entry for the second function, so that the user can no longer turn on the screen fixation function. Exemplarily, the second broadcast can be a broadcast of the LOCK_TO_APP_SET_DISABLE type.

[0125] Optionally, if the second function is not enabled, the system control module may also cache the shutdown status information of the second function.

[0126] S15, the setting module receives the second broadcast and closes the setting entrance of the second function.

[0127] The setting module can receive the second broadcast sent by the above-mentioned system control module, and parse the second broadcast to execute the corresponding instructions. Since the second broadcast is used to instruct to close the setting entry of the second function, the setting module can execute to close the setting entry of the second function. Exemplarily, the setting module has different broadcast processing logic. If a broadcast of the LOCK_TO_APP_SET_DISABLE type is received, the setting entry of the second function is closed. Taking the second function as the screen fixing function as an example, the schematic diagram of the setting module closing the setting entry of the second function can be seen in the above Fig.12 , I will not go into details here.

[0128] S16, when the system control module receives the closing operation (second operation) of the first function, it determines whether the cached status information of the second function is the opening status information. If it is the opening status information, execute S17; if it is not the opening status information, execute S19.

[0129] The first function closing operation (which may be referred to as the second operation) may be an operation to close the healthy use of mobile phone function (such as the above Figure 3 You can also set the app to always be allowed to be used in the child mode, or you can turn off the healthy use of the phone function and exit the child mode at the same time, that is, turn off the control function of the electronic device (the first function).

[0130] The system control module can receive the second operation input by the user, and when receiving the second operation, determine whether the second function was previously in the on state. It can be understood that if the second function was previously in the on state, the second function needs to be restarted to maintain the original operating state. Optionally, the system control module can determine whether the second function was previously in the on state based on the cached status information of the second function, so as to further determine whether the second function needs to be restarted. Since the system control module caches the on state information of the second function when the second function is turned on, if the currently cached information is the on state information of the second function, the following step S17 is executed.

[0131] S17, the system control module sends a third broadcast.

[0132] Among them, when the cached status information of the second function is the enabled status information, because the setting module in the above S13 has closed the second function and the setting entry of the second function, the system control module can send a third broadcast (sendBroadcast), and the third broadcast is used to indicate the activation of the second function and the setting entry of the second function. Optionally, the third broadcast can carry a third instruction, and the third instruction is used to indicate the activation of the second function and the setting entry of the second function. Exemplarily, the third broadcast can be a broadcast of the LOCK_TO_APP_ALL_ENABLE type.

[0133] Optionally, after the system control module sends the third broadcast, the cached record of the status information of the second function may also be cleared.

[0134] S18, the setting module receives the third broadcast, and enables the second function and the setting entry of the second function.

[0135] The setting module can receive the third broadcast sent by the above-mentioned system control module, and parse the third broadcast to execute the corresponding instructions. Since the third broadcast is used to instruct to turn on the second function and turn on the setting entry of the second function, the setting module can execute to turn on the second function and turn on the setting entry of the second function. Exemplarily, if the setting module receives a broadcast of the LOCK_TO_APP_ALL_ENABLE type, it executes to turn on the second function and turn on the setting entry of the second function.

[0136] It can be understood that after the setting module turns on the second function and turns on the setting entry of the second function, the interface of the electronic device can be restored to the above Figure 5 and Figure 6 The interface shown.

[0137] In other embodiments, when the first broadcast is only used to instruct to turn off the second function, the third broadcast may also be only used to instruct to turn on the second function. Then, after receiving the third broadcast, the setting module only executes to turn on the second function. Exemplarily, the third broadcast may be a broadcast of the LOCK_TO_APP_ENABLE type, and the corresponding setting module only executes the broadcast processing logic for the LOCK_TO_APP_ENABLE type.

[0138] S19, the system control module sends a fourth broadcast.

[0139] Among them, when the cached status information of the second function is not the enabled status information, because the setting module in the above S15 has closed the setting entry of the second function, the system control module can send a fourth broadcast (sendBroadcast), and the fourth broadcast is used to indicate the setting entry of the second function. Optionally, the fourth broadcast can carry a fourth instruction, and the fourth instruction is used to indicate the setting entry of the second function. Exemplarily, the fourth broadcast can be a broadcast of the LOCK_TO_APP_SET_ENABLE type.

[0140] S20, the setting module receives the fourth broadcast and opens the setting entrance of the second function.

[0141] The setting module may receive the fourth broadcast sent by the system control module, and parse the fourth broadcast to execute the corresponding instruction. Since the fourth broadcast is used to indicate the setting entry for opening the second function, the setting module may execute the setting entry for opening the second function. Exemplarily, if the setting module receives a broadcast of the LOCK_TO_APP_SET_ENABLE type, the setting entry for opening the second function is executed.

[0142] The above-mentioned method for managing application operation can determine whether a conflicting function has been turned on when the electronic device turns on the function of controlling the application. If a conflicting function has been turned on, the conflicting function and the setting entrance will be closed to avoid the operation conflict between the two, ensuring that the control function can better realize the management and restriction functions, and automatically restore the normal operation of the conflicting function when the function of controlling the application is turned off.

[0143] Fig.13 is a timing interaction diagram of another method for managing application execution provided by an embodiment of the present application, which is applied to the above Fig. 9 The software structure shown describes a scenario in which when the control function and the screen fixation function are enabled at the same time, if the screen fixation of the application is triggered, it is determined whether the screen fixation is allowed. The method includes:

[0144] S21, when SystemUI receives the third operation of the user, it sends the first information to AMS.

[0145] The third operation may be an operation that triggers the first application to execute the second function, for example, the Figure 6 The touch operation on the fixed screen control 61 in the recent taskbar interface triggers the screen fixing of the first application. At this time, SystemUI can send the first information to AMS to instruct AMS to determine whether to allow the screen fixing of the first application.

[0146] Optionally, the first information may carry a task identifier, such as a task ID (taskid), and SystemUI may call an AMS interface to send the first information to the AMS. Exemplarily, the AMS interface may be startSystemLockTaskMode (taskid).

[0147] S22: The AMS determines a first application identifier according to the first information.

[0148] It can be understood that, since each task corresponds to information about an application program, the AMS can determine the corresponding first application identifier based on the task identifier carried in the first information. Optionally, the task identifier and the application identifier can be associated and stored in a database, and the AMS can search for the corresponding first application identifier from the database based on the task identifier carried in the first information. Optionally, the first application identifier can be an application package name (packageName), and the AMS can also obtain the corresponding task task based on the task identifier, and obtain the application package name based on the getpackageName() function.

[0149] S23, the AMS requests the system control module to query the first result based on the first application identifier.

[0150] Among them, the first result is used to represent whether the first application is allowed to execute the second function. When AMS requests the system control module to query the first result, the first application identifier can be sent to the system control module, and the system control module determines whether the first application is allowed to execute the second function, for example, whether the first application is allowed to fix the screen.

[0151] Optionally, when the first application identifier is an application package name, the AMS may query the system management and control module for the first result through the allowStartScreenPinning (int pid, String packageName) interface.

[0152] S24, the system control module determines a first result based on the first application identifier.

[0153] Since the purpose of the embodiment of the present application is to ensure that the control function can better achieve management and restriction, it can be understood that if the first application is currently in a restricted use state, for example, the usage time of the first application has reached the limit time and is not allowed to continue to run and use, it should not be allowed to execute the second function. Therefore, if it is to be determined whether the first application is allowed to execute the second function, the system control module can judge according to the current operation mode of the electronic device and / or the restricted use state of the first application.

[0154] Alternatively, if Fig.14 As shown, the process of the system control module determining the first result based on the first application identifier may include:

[0155] S241, determining whether the current electronic device is in the first mode, if it is the first mode, executing S242, if it is not the first mode, executing S245.

[0156] The first mode may be a parent mode, and all applications in the electronic device have permission to run, that is, a normal operation mode. Optionally, after the user sets the operation mode of the electronic device, the electronic device may save the operation mode information, and the system control module may query the current operation mode of the electronic device to determine whether it is the first mode.

[0157] S242, judging whether the first application is in a restricted use state according to the first application identifier, if it is in a restricted use state, executing S243, if it is not in a restricted use state, executing S244.

[0158] S243, determining the first value as the first result.

[0159] S244, determining that the second value is the first result.

[0160] Among them, the above Figure 4As can be seen from the scenario shown, if the total running time of the electronic device reaches the set time, or the running time of an application reaches the set time, the electronic device will be restricted, and the corresponding application will enter the restricted use state. It can be understood that if the total running time of the electronic device reaches the set time, all applications in the electronic device (except for applications that are set to always be allowed to be used) will enter the restricted use state, and if the running time of an application reaches the set time, the application will enter the restricted use state.

[0161] Optionally, the application in the restricted use state may be stored in a database or list, in which the corresponding application identifier is stored. The system control module may query the database or list based on the first application identifier to determine whether the first application is in the restricted use state.

[0162] If the first application is in a restricted use state, the system control module may determine the first value as the first result, for example, the first value is 1, and the first application is not allowed to execute the second function in the restricted use state. If the first application is not in a restricted use state, the system control module may determine the second value as the first result, for example, the second value is -1, and the first application may be allowed to execute the second function when it is not in a restricted use state.

[0163] S245, determining whether the current electronic device is in the second mode, if it is in the second mode, executing S246, if not, executing S247.

[0164] S246, determining that the third value is the first result.

[0165] S247, determine that the fourth value is the first result.

[0166] Among them, the second mode can be a child mode, and some applications in the electronic device do not have permission to run, that is, a restricted operating mode. If the electronic device is in the second mode, the system control module can determine the third value as the first result, for example, the third value is 2, and the first application is not allowed to execute the second function in the second mode. If the electronic device is not in the second mode, the system control module can determine the fourth value as the first result, for example, the fourth value is 3. Optionally, when the electronic device is not in the second mode, it can be other modes such as stranger visitor mode. At this time, the first application may not be allowed to execute the second function, or it can be set according to the actual scenario.

[0167] It can be understood that the expression of the above-mentioned first value, second value, third value and fourth value is not limited to numerical form, but can also be other data types, for example, the first value is restricted_mode, the third value is child_mode, etc., and the embodiment of the present application does not limit this.

[0168] S25, the system management and control module returns the first result to the AMS.

[0169] S26, AMS sends the first result to SystemUI.

[0170] That is, the system management and control module can send the first result to SystemUI via AMS, so that SystemUI performs different processing logics according to different results.

[0171] S27, SystemUI performs corresponding processing operations according to the first result.

[0172] Since the first result indicates whether the first application is allowed to execute the second function, when the first application is allowed to execute the second function, SystemUI can display the interface of the first application executing the second function. For example, when the second function is a screen fixing function, SystemUI displays the interface as described above. Figure 6 When the first application is not allowed to execute the second function, SystemUI can return to the desktop and display a prompt interface to prompt the user that the second function is not currently allowed to execute. For example, when the second function is a screen-fixed function and the first result is a first value, SystemUI displays the following Fig.15 The prompt interface shown displays the message "The current application is in restricted use, and the screen fixing function is not allowed to be enabled for the time being"; or when the first result is the third value, displays the message "The screen fixing function is not allowed to be enabled in child mode".

[0173] In the above-mentioned method for managing application operation, when triggering the execution of the second function of the first application, the electronic device can determine whether the first application is currently allowed to execute the second function. If the first application is not allowed to execute the second function, a prompt will be given to the user to avoid operation conflicts between different functions and ensure that the control function can better realize the management and restriction functions.

[0174] Fig.16 This is another example of a timing interaction diagram of a method for managing application execution provided by an embodiment of the present application, which is applied to the above Fig. 9 The software structure shown also describes a scenario in which when the control function and the screen fixation function are enabled at the same time, if the screen fixation of the application is triggered, it is determined whether the screen fixation is allowed. The method includes:

[0175] S31, when SystemUI receives the third operation of the user, it sends the first information to AMS.

[0176] The third operation may be an operation that triggers the first application to execute the second function, for example, the Figure 6The touch operation on the fixed screen control 61 in the recent taskbar interface triggers the screen fixing of the first application. At this time, SystemUI can send the first information to AMS to instruct AMS to determine whether to allow the screen fixing of the first application.

[0177] S32: The AMS determines a first application identifier according to the first information.

[0178] It can be understood that, since each task corresponds to information about an application program, the AMS can determine the corresponding first application identifier based on the task identifier carried in the first information. Optionally, the task identifier and the application identifier can be associated and stored in a database, and the AMS can search for the corresponding first application identifier from the database based on the task identifier carried in the first information. Optionally, the first application identifier can be an application package name (packageName), and the AMS can also obtain the corresponding task task based on the task identifier, and obtain the application package name based on the getpackageName() function.

[0179] S33, the AMS queries a second result from the database based on the first application identifier.

[0180] The database may store identifications of applications entering a restricted use state. For example, if the first application identification exists in the database, the second result may be Y. If the first application identification does not exist in the database, the second result may be N.

[0181] Optionally, the content stored in the database can be written by the system control module. If the total running time of the electronic device reaches the set time, or the running time of an application reaches the set time, the electronic device will be restricted, and the corresponding application will enter the restricted use state. The system control module can write the corresponding application identifier into the database for AMS to query. Optionally, AMS can obtain the second result from the database by monitoring, and can also call the provider to query the second result. The provider here can be used as a way to share data between applications, and provide the stored data to visitors in the form of a data table, etc.

[0182] S34, the AMS determines whether the first application is in a restricted use state according to the second result, and executes S35 if it is in a restricted use state, and executes S37 if it is not in a restricted use state.

[0183] It can be understood that if the second result indicates that the first application identifier exists in the above database, it means that the first application is in a restricted use state; if the second result indicates that the first application identifier does not exist in the above database, it means that the first application is not in a restricted use state.

[0184] S35, AMS sends a second message to SystemUI.

[0185] When the first application is in a restricted use state, the first application is not allowed to execute the second function. The second message sent by AMS to SystemUI is used to instruct SystemUI to give a prompt, such as a prompt that "the current application is in restricted use, and the screen pinning function is not allowed to be enabled for the time being."

[0186] S36, SystemUI displays the first prompt interface according to the second message.

[0187] For example, the first prompt interface can refer to the above Fig.15 , to prompt the user that the second function is not currently allowed to be executed.

[0188] S37, the AMS determines whether the current electronic device is in the second mode, and if so, executes S38, and if not, executes S40.

[0189] That is to say, when the first application is not in a restricted use state, the AMS further determines whether the current electronic device is in the second mode (such as children's mode) to more accurately control the first application.

[0190] S38, AMS sends a third message to SystemUI.

[0191] S39, SystemUI displays a second prompt interface according to the third message.

[0192] When the electronic device is in the second mode, the first application is not allowed to execute the second function, and the third message sent by the AMS to the SystemUI is used to instruct the SystemUI to give a prompt, for example, a prompt of "the screen fixing function is not allowed to be enabled in the child mode".

[0193] S40: The AMS starts the second function for the first application.

[0194] That is, when the first application is not in a restricted use state and the electronic device is not in the second mode, the first application should be allowed to execute the second function. For example, the screen of the first application can be fixed, and the AMS can start the second function for the first application.

[0195] In the above-mentioned method for managing application operation, when triggering the execution of the second function of the first application, the electronic device can determine whether the first application is currently allowed to execute the second function. If the first application is not allowed to execute the second function, a prompt will be given to the user to avoid operation conflicts between different functions and ensure that the control function can better realize the management and restriction functions.

[0196] From the above description, it can be seen that the reason for the conflict between the healthy use of mobile phone function and the screen fixation function in the related technology is that the running priority of AMS is higher than that of the healthy use of mobile phone application. If the two are running at the same time, the electronic device will give priority to responding to the running requirements of AMS, resulting in the failure of the healthy use of mobile phone function. In other embodiments, if the user turns on the healthy use of mobile phone function and the screen fixation function on the electronic device at the same time, the electronic device can also temporarily increase the running priority of the healthy use of mobile phone application to ensure that the healthy use of mobile phone function is executed first, so that the control function can better realize the management and restriction functions.

[0197] The above describes in detail an example of a method for managing application operation provided by an embodiment of the present application. It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.

[0198] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each function can be divided into various functional modules, such as a detection unit, a processing unit, a display unit, etc., or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0199] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0200] The electronic device provided in this embodiment is used to execute the above-mentioned method for managing the running of applications, and thus can achieve the same effect as the above-mentioned implementation method.

[0201] In the case of an integrated unit, the electronic device may further include a processing module, a storage module and a communication module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device to execute stored program codes and data, etc. The communication module may be used to support the electronic device to communicate with other devices.

[0202] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.

[0203] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 8 Device of the structure shown.

[0204] The embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor executes the method for managing the operation of an application in any of the above embodiments. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0205] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the method for managing the operation of an application in the above-mentioned embodiment.

[0206] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the method of managing the operation of the application in the above-mentioned method embodiments.

[0207] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.

[0208] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0209] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0210] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for managing application execution, the method being executed by an electronic device, characterized in that: The method comprises: When a first function of the electronic device is turned on, determining whether a second function is turned on, wherein the first function is used to manage the running of applications in the electronic device, and the running priority corresponding to the second function is greater than the running priority corresponding to the first function; If the second function is already turned on, turning off the second function, or, when receiving an operation of a user triggering the first application in the electronic device to execute the second function, but the electronic device determines that the first application is not allowed to execute the second function, not responding to the execution of the second function; If the second function is not enabled, closing the setting entry of the second function in the electronic device; The electronic device determines that the first application is not allowed to execute the second function, including: If the operation mode of the electronic device is the first mode, and the usage status of the first application is the restricted use status, it is determined that the first application is not allowed to execute the second function, the first mode indicates that all applications in the electronic device have the authority to run, and the restricted use status indicates that the first application is not allowed to be used because the running time has reached the limit time.

2. The method according to claim 1, characterized in that Before shutting down the second function, the method further includes: Cache the activation status information of the second function.

3. The method according to claim 2, characterized in that In the case of shutting down the second function, the method further includes: Close the setting entrance of the second function in the electronic device.

4. The method according to any one of claims 1 to 3, characterized in that After the second function is turned off, if a turn-off operation for the first function is received and the cached state information of the second function is turn-on state information, the method further includes: Enable the second function, and enable the setting entry of the second function in the electronic device.

5. The method according to any one of claims 1 to 4, characterized in that If the second function is turned on, a first control is displayed on the first interface of the electronic device, and the first control is a control for triggering the execution of the second function. In the case of turning off the second function, the method further includes: The first control is canceled from being displayed on the first interface.

6. The method according to claim 5, characterized in that The receiving an operation of a user triggering the first application in the electronic device to execute the second function includes: A triggering operation of the user on the first control is received on the first interface, the first interface includes a task interface of the first application, and the first control is located on the task interface of the first application.

7. The method according to claim 6, characterized in that The first interface is the recent taskbar interface.

8. The method according to claim 1, characterized in that: The electronic device determines that the first application is not allowed to execute the second function, further comprising: If the running state of the electronic device is a second mode, it is determined that the first application is not allowed to execute the second function, and the second mode indicates that some applications in the electronic device have no permission to run.

9. The method according to claim 1, characterized in that: The electronic device determines that the first application is not allowed to execute the second function, further comprising: If the application identifier of the first application is stored in a first storage space, it is determined that the first application is not allowed to execute the second function, and the first storage space stores the identifier of an application that is not allowed to be used because the running time reaches a limit time.

10. The method according to claim 1, characterized in that The electronic device determines that the first application is not allowed to execute the second function, further comprising: If the application identifier of the first application is not stored in the first storage space, but the operating state of the electronic device is the second mode, it is determined that the first application is not allowed to execute the second function.

11. The method according to any one of claims 1 to 10, characterized in that In the case where the second function is not executed in response, the method further comprises: A prompt message is displayed indicating that the second function is not allowed to be executed.

12. The method according to any one of claims 1 to 11, characterized in that In the case of closing the setting entry of the second function in the electronic device, the method further includes: The interface for setting the second function is canceled.

13. The method according to any one of claims 1 to 12, characterized in that The first function is the healthy use of mobile phone function.

14. The method according to any one of claims 1 to 13, characterized in that The second function is a screen fixing function.

15. An electronic device, characterized in that: include: one or more processors; one or more memories; The memory stores one or more programs, and when the one or more programs are executed by the processor, the electronic device executes the method according to any one of claims 1 to 14.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Functional state control method and related device

    CN107534932A

  • Application management method and device, storage medium and electronic equipment

    CN111026456A

  • Application notification management method and electronic equipment

    CN111638971A

  • Mobile terminal control method and device, mobile terminal and storage medium

    CN111752632A

  • Multi-task interface management method and electronic equipment

    CN112748972A