Function disabling method and device, storage medium and program product
By displaying shortcut function switches in the game application interface, users can disable the air gesture function, which solves the problem of accidental triggering in game scenarios and improves the user experience.
Patent Information
- Application Number
- CN202410420800.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2025-10-21
AI Technical Summary
In gaming scenarios, electronic devices may misdetect users' air gestures, leading to disruptions in the user experience. Examples include the false triggering of air gesture, eye-tracking, and gesture navigation functions.
The game application interface displays a toggle switch for quick functions. Users can use this switch to control whether to disable the air gesture function. After detecting user input in the game scene, the corresponding message is discarded or destroyed to prevent the function from being executed.
This effectively prevents shortcut functions from being accidentally triggered in game scenarios, reduces user interference, and improves the stability and reliability of the game experience.
Smart Images

Figure CN120825543A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and in particular to a function disabling method, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] Mobile phones and other electronic devices are equipped with shortcut functions. These functions can be understood as functions that allow users to quickly control electronic devices to perform certain tasks through certain operations, or functions that allow users to control electronic devices to perform certain tasks through simple and convenient operations. Examples include air gesture functions, eye tracking functions, and gesture navigation functions.
[0003] In some scenarios, after the shortcut function is turned on, the electronic device automatically executes the shortcut function based on the user's operation, but this may go against the user's true intention.
[0004] For example, in a game scenario, when a user is manipulating the screen, he or others may accidentally input an air gesture, but the original intention is not to control the electronic device to perform the air gesture function. The electronic device performs the air gesture function based on the air gesture input by the user himself or others, which will interfere with the user.
[0005] For another example: in a gaming scenario, the electronic device detects a banner notification, and the user happens to be looking at the area of the banner notification. The electronic device mistakenly thinks that the user wants to read the banner notification, and expands the banner notification based on the eye tracking function, which also causes interference to the user.
[0006] For another example, in a game scenario, the user mistakenly inputs an operation of the gesture navigation function. The electronic device responds to the operation and executes the gesture navigation function, which also causes interference to the user. Summary of the Invention
[0007] The present application provides a function disabling method, electronic device, computer-readable storage medium and computer program product, the purpose of which is to avoid interference to users caused by the execution of shortcut functions after they are enabled in some scenarios.
[0008] In order to achieve the above objectives, this application provides the following technical solutions:
[0009] A first aspect of the present application provides a function disabling method applied to an electronic device, comprising: when a game application is running, displaying a switch for a first function on the interface of the game application, where the first function is a shortcut function, wherein when a user inputs an operation corresponding to the first function, the electronic device executes the service corresponding to the first function; in response to the user turning on the switch for the first function, prohibiting the execution of the service corresponding to the first function when the user inputs the operation corresponding to the first function.
[0010] It can be seen that: in the game scenario, the interface of the game application displays the switch of the shortcut function. After the user turns on the switch, the user inputs the operation corresponding to the shortcut function, and the electronic device will also prohibit the execution of the business corresponding to the shortcut function. This can avoid interference to the user in the game scenario when the shortcut function is turned on and the business is executed based on the operation corresponding to the shortcut function input by the user.
[0011] In some possible implementations, the first function includes: an intelligent assistance function, where the intelligent assistance function refers to an operation in which a user input does not contact the display screen to control the electronic device to perform a service.
[0012] In some possible implementations, intelligent assistance functions include air gesture functions and eye tracking functions.
[0013] In some possible implementations, the first function includes a gesture navigation function.
[0014] In some possible implementations, prohibiting the execution of the business corresponding to the first function includes: obtaining a message corresponding to the first function, the message corresponding to the first function being generated when it is detected that the user inputs an operation corresponding to the first function; and discarding or destroying the message corresponding to the first function when it is detected that the switch of the first function is in the on state.
[0015] The switch for the first function displayed on the interface of the game application is used to control whether the first function is disabled or not in the game scene. Based on this, when the switch for the first function is on, it is detected that the user has input an operation corresponding to the first function, a message corresponding to the first function is generated, and by discarding or destroying the message corresponding to the first function, the first function can be disabled in the game scene to avoid interference with the user. In some embodiments, the method for detecting that the switch for the first function is on can be: detecting that the user has disabled the first function in the game scene in a setting item recorded in the settings application. This setting item is different from the setting item corresponding to the switch of the settings application for the first function.
[0016] In some possible implementations, in response to a user turning on a switch for the first function, and before prohibiting execution of the service corresponding to the first function when the user inputs an operation corresponding to the first function, the method further includes: determining that a system-level switch for the first function is turned on, wherein the system-level switch for the first function is displayed on a settings application interface. The system-level switch for the first function is a system-wide control switch, and the user can use this system-level switch to control execution or non-execution of the first function in any scenario of the electronic device, not limited to gaming scenarios.
[0017] In some possible implementations, the system further includes: when the system-level switch for the first function is off, the switch corresponding to the first function is on or off, and when the user inputs an operation corresponding to the first function, the electronic device is prohibited from executing the service corresponding to the first function. Because the system-level switch for the first function is off, the electronic device does not execute the first function. Therefore, when the switch corresponding to the first function is on or off, and the user inputs an operation corresponding to the first function, the electronic device does not execute the service corresponding to the first function.
[0018] In some possible implementations, prohibiting execution of the service corresponding to the first function includes prohibiting detection of whether the user inputs an operation corresponding to the first function. When the system-level switch corresponding to the first function is turned off, the electronic device does not detect whether the user inputs the operation corresponding to the first function, and therefore does not execute the service corresponding to the first function based on the detection result.
[0019] In some possible implementations, when a game application is running, a switch for a first function is displayed on the interface of the game application, including: when the game application is running, a first interface is displayed on the upper layer of the interface of the game application, and the first interface includes a switch; in response to a user clicking the switch, a second interface is displayed on the upper layer of the interface of the game application, and the second interface includes the switch for the first function.
[0020] In some possible implementations, when the game application is running, the switch of the first function is displayed on the interface of the game application, including: when the game application is running, a third interface is displayed on the upper layer of the interface of the game application, and the third interface includes the switch of the first function.
[0021] In some possible implementations, the method further includes: displaying a first motion effect on a third interface in response to a user turning on a switch of the first function.
[0022] The second aspect of the present application provides an electronic device, comprising: a memory for storing computer programs or computer instructions; a processor for executing the computer programs or computer instructions stored in the memory, so that the electronic device executes the function disabling method provided by the first aspect and any one of its embodiments.
[0023] A third aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement the function disabling method provided in the first aspect and any one of its embodiments.
[0024] A fourth aspect of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the function disabling method provided in the first aspect and any one of its embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is an example diagram of the entrance to the air gesture function disclosed in the embodiment of the present application;
[0026] Figure 2 A diagram showing an electronic device disclosed in an embodiment of the present application responding to an air gesture input by a user;
[0027] Figure 3 Another example diagram of the entrance to the air gesture function disclosed in the embodiment of the present application;
[0028] Figure 4 Another example diagram of the entrance to the air gesture function disclosed in the embodiment of the present application;
[0029] Figure 5 A schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application;
[0030] Figure 6 A software framework diagram of the electronic device disclosed in the embodiments of this application;
[0031] Figure 7 This is an interactive diagram of the method for disabling the air gesture function in a game scenario disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.
[0033] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0034] The "multiple" involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first" and "second" are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or order.
[0035] Before introducing the embodiments of this application, we first explain some of the terms or concepts involved in the embodiments of this application. It should be understood that this application does not specifically limit the naming of the following terms. The following terms may have other names. The renamed terms still meet the following relevant term explanations.
[0036] 1. Air gesture function, which means that users can input some gestures without touching the display screen of the electronic device to control the electronic device to perform some actions. Exemplarily, the air gesture function includes at least air sliding screen and air screenshot. Air sliding screen means that the user's palm is 20-40 cm away from the display screen, and the palm is facing the screen for a while. After the hand icon appears on the display screen, the screen can be swiped downward by waving the wrist, and the screen can be swiped upward by waving the wrist. Air screenshot means that the user's palm is 20-40 cm away from the display screen, and the palm is facing the screen for a while. After the hand icon appears on the display screen, grab and make a fist to take a screenshot.
[0037] 2. The eye tracking function, also known as the eye movement function or the eye movement banner notification expansion function, can be understood as the electronic device tracking the location of the user's gaze point, and determining whether to expand the banner notification and / or open the application corresponding to the banner notification by tracking the location of the gaze point.
[0038] 3. Gesture navigation function is a shortcut method for users to switch pages. For example, gesture navigation includes: the user swipes inward from the left or right edge of the screen, and the electronic device returns to the previous level; the user swipes up from the bottom edge of the screen, and the electronic device returns to the desktop; the user swipes up from the bottom edge of the screen and pauses, and the electronic device enters the multitasking management interface; the user swipes horizontally along the bottom edge of the screen, and the electronic device quickly switches applications, etc.
[0039] Mobile phones and other electronic devices are equipped with a switch for the air gesture function, and users can turn the air gesture function on or off by operating the switch. Figure 1 Showing an access point for the Air Gestures feature. The Air Gestures feature can be turned on and off in the Settings app.
[0040] like Figure 1 As shown in (a), the smart assistant option of the setting application of the electronic device is configured with an air gesture option 101. The user can click on the air gesture option 101, and the electronic device will display the setting interface of the air gesture function. Figure 1 As shown in (b). The setting interface of the air gesture function includes: switches for various types of air gesture functions, for example, Figure 1 Middle (b) shows the switch 102 for sliding the screen across the air and the switch 103 for taking a screenshot across the air, both of which are in the on state. The user can turn on or off the sliding screen function by clicking on the switch 102, and the user can also turn on or off the screenshot function by clicking on the switch 103.
[0041] The following combination Figure 2 , introduces how users can take screenshots through the air screenshot function. Figure 2 As shown, the electronic device is turned on and running, and the display screen is usually in the bright screen state. The user wants to complete the air screenshot, that is, to take a screenshot without touching the display screen. Based on this, after the user clicks 103 to turn on the air screenshot function, the user places the palm facing the display screen. After the palm stays for a while, the display screen will display a hand icon to indicate that the user can perform air gesture operations. The user grabs and makes a fist, and the electronic device senses the user's grabbing and making a fist through the camera to complete the screenshot.
[0042] Similarly, after the user turns on the air sliding screen function by clicking 102, the user can also place the palm of the hand facing the display screen and wait for the display screen to display the hand icon. After the display screen displays the hand icon, the user can wave the wrist downward to slide the screen interface downward, and the user can wave the wrist upward to slide the screen interface upward.
[0043] During the actual operation of the air gesture function, the inventors discovered some scenarios where users mistakenly input air gestures. For example, in a gaming scenario, an electronic device is running a game application, the display screen displays the game interface, and the user inputs game operations in the game interface. Gestures input by others or the user themselves, such as grabbing, making a fist, and swiping upwards, can cause the electronic device to mistakenly believe that the user is performing an air gesture operation and respond, such as taking a screenshot or sliding the interface, affecting the gaming experience.
[0044] Based on this, an embodiment of the present application provides a technical solution, in which a game manager application of an electronic device is configured with a switch, which is used to disable the air gesture function in a game scene.
[0045] The first way to understand disabling the air gesture function in a gaming scenario is that the switch for the air gesture function configured in the settings app is the master switch for the air gesture function, which is used to control the camera of the electronic device to capture images, perceive the user input of an air gesture through the camera's image, and respond to the air gesture to execute its corresponding function. When the switch for the air gesture configured in the settings app is turned on, the switch configured in the Game Manager app is only used to implement gaming scenarios. When the electronic device perceives the user input of an air gesture through the image captured by the camera, it is prohibited to respond to the air gesture and its corresponding function is not executed.
[0046] The second way to understand disabling air gestures in gaming scenarios is that the switch configured in the Game Manager app is equivalent to the switch for the air gesture function configured in the Settings app. They are two entrances to the air gesture function and are also used to control the electronic device's camera to capture images, perceive the user's input air gestures through the camera's images, and respond to the air gestures to perform their corresponding functions. Of course, turning on the switch configured in the Game Manager app controls the electronic device to not perform the air gesture function, that is, it does not detect the user's air gestures and does not respond to air gestures.
[0047] The following content is introduced using the first understanding as an example. In the first understanding, although the user disables the air gesture function in the game scene, the electronic device will still detect whether the gesture input by the user is an air gesture, which will consume a certain amount of power, but the inventors found that its power consumption is not high. In addition, by setting a switch in the game manager application to only control whether to prohibit responding to air gestures in the game scene, it also has the advantage of higher stability in the execution of the air gesture function, and is not prone to erroneous execution.
[0048] A game manager can be thought of as an application on an electronic device. When a game application is launched on the electronic device, the game manager launches simultaneously. The game manager's interface can be displayed on top of the game application's interface. The interface may include multiple switches, controls, and options for user operation, assisting users in disabling certain functions of the electronic device while playing games.
[0049] In some embodiments, the switch for the air gesture function can be set on the main interface of the game manager application.
[0050] For example, Figure 3 The following figure shows the interface of the Game Manager application showing the air gesture switch. Figure 3As shown in (a), a game application of the electronic device is started, and the game manager is started synchronously. After the game manager application is started, the interface of the game application displays a floating window 301 of the game manager application, which is used to provide user operations to display the main interface of the game manager application. The user slides the floating window 301 on the interface of the game application, and the electronic device is as shown in FIG. Figure 3 As shown in (b), the main interface 302 of the game manager application is displayed on the game application interface. The main interface 302 of the game manager application includes multiple controls, such as a switch 303 for the air gesture function. The switch 303 for the air gesture function includes an icon 304 and air gesture text 305. For simplicity of illustration, the icon 304 is replaced by a square box. Of course, the switch 303 for the air gesture function may also include only the icon 304 or only the air gesture text 305, without specific limitations.
[0051] In some embodiments, the switch 303 of the air gesture function is in the on state, and the user can click the switch 303 of the air gesture function to enable the air gesture function in the game scene. The switch 303 of the air gesture function is in the off state, and the user can also control the disabling of the air gesture function in the game scene by clicking the switch 303 of the air gesture function. That is, when the switch 303 of the air gesture function is in the on state, the air gesture function is disabled in the game scene; when the switch 303 of the air gesture function is in the off state, the air gesture function is not disabled in the game scene.
[0052] In some embodiments, the switch 303 for the air gesture function can be associated with the switch for the air gesture function in the settings app. If the switch for the air gesture function in the settings app is turned on, the switch 303 for the air gesture function is displayed as off. In the figure, the switch is shown in white when it is on and in black when it is off. Similarly, if the switch for the air gesture function in the settings app is turned off, the switch 303 for the air gesture function is displayed as on.
[0053] When the switch for air gestures in the settings application is in the off state, when the user turns on or off the switch 303 for the air gesture function, the electronic device does not call the camera to capture images to detect the air gesture, but only displays the switch 303 in the on or off state on the main interface 302. It can be understood that: when the switch for air gestures in the settings application is in the off state, when the user turns on or off the switch 303, it is ineffective in controlling the operation of the air gesture function of the electronic device.
[0054] When the switch of the air gesture function of the setting application is turned on, the user can turn on the switch 303 of the air gesture function to disable the air gesture function in the game scene. This disabling can be understood as the electronic device sensing the user input air gesture through the image captured by the camera, but not executing the function corresponding to the air gesture. Of course, when the user turns off the switch 303 of the air gesture function, in the game scene, the electronic device will also detect the air gesture input by the user, and execute the function corresponding to the air gesture when the air gesture is detected.
[0055] Figure 3 The switch 303 of the displayed air gesture function is a fixed switch of the main interface 302, that is, when the main interface 302 is displayed, the switch 303 is synchronously displayed on the main interface 302. In other embodiments, the switch 303 of the air gesture function can also be a switch that can be displayed or not displayed on the main interface 302, referred to as a dynamic switch. Normally, when the switch of the air gesture function of the setting application is turned on, the main interface 302 displays the switch 303 and appears to be in the off state; when the switch of the air gesture function of the setting application is turned off, the main interface 302 does not display the switch 303.
[0056] In some embodiments, the electronic device records the on / off state of the switch 303 for the air gesture function. Furthermore, after the user operates the switch 303 on the main interface 302 to adjust the on / off state of the switch 303, the adjusted on / off state of the switch 303 will be retained the next time the user runs a game application and calls up the main interface 302.
[0057] In some embodiments, when a user turns on or off the switch 303 of the air gesture function, an animation may also be presented, which may be reflected by a change in the icon 304. Of course, when a user turns on or off the switch 303 of the air gesture function, no animation may be presented.
[0058] In other embodiments, the switch for the air gesture function can be set in a sub-interface or a secondary interface of the main interface of the game manager application. For example, it can be set in the expanded interface of the anti-mistouch switch displayed on the main interface.
[0059] like Figure 4 As shown in (a), the main interface 302 of the game manager includes an anti-accidental touch switch 306, including an icon 307 and an anti-accidental touch text 308. The figure shows the switch with the anti-accidental touch function turned on. When the user clicks the anti-accidental touch switch 306, the electronic device displays an expanded interface 309 of the anti-accidental touch switch 306, as shown in FIG. Figure 4 As shown in (b), the expanded interface 309 includes: a switch 310 for preventing the air gesture function and a text introduction 311. The switch 310 for preventing the air gesture function is shown in the figure in an on state.
[0060] Similar to the above, the switch 310 for preventing the air gesture function can be associated with the switch for setting the air gesture function of the application. Moreover, if the switch for setting the air gesture function of the application is off, turning on or off the switch 310 by the user will not be effective in controlling the air gesture function of the electronic device.
[0061] When the switch for air gestures in the settings application is turned on, the user can turn on the switch 310310 to prevent the air gesture function to disable the air gesture function in the game scene. When the user turns off the switch 310 for the air gesture function, the electronic device will still detect the air gesture input by the user in the game scene and execute the function corresponding to the air gesture when the air gesture is detected. When the switch 310 to prevent the air gesture function is turned off, the switch is grayed out.
[0062] Figure 4 The switch 310 for preventing the air gesture function shown is a fixed switch of the main interface 302. Of course, the switch 310 can also be a dynamic switch. For details, see the above content.
[0063] The electronic device records the on / off state of the switch 310 for preventing the air gesture function. Furthermore, when the user operates the switch 310 on the main interface 302 to adjust the on / off state of the switch 310, the adjusted on / off state of the switch 310 will be retained the next time the user runs a game application and calls up the main interface 302.
[0064] In some embodiments, the icon 307 of the anti-accidental touch switch may be linked to an animation, which is presented as the anti-accidental touch switch is turned on and off. Figure 4 (a) shows that the anti-accidental touch switch is in the on state, that is, the multiple switches displayed on the display interface of the anti-accidental touch switch are all in the on state. The multiple switches displayed on the display interface of the anti-accidental touch switch are turned off, and the anti-accidental touch switch is in the off state. The icon 307 is gray and the diagonal line is not displayed. Figure 3 As shown in (c).
[0065] The above describes two ways to enable or disable the air gesture feature in the Game Manager interface. The following describes how to enable or disable the air gesture feature in a game using a module in an electronic device and how to disable it in a game.
[0066] The electronic devices provided in the embodiments of the present application may include: mobile phones, tablet computers, personal digital assistants (PDAs), desktop computers, laptop computers, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, and wearable devices, etc.
[0067] Take mobile phones as an example. Figure 5 This is an example of the composition of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 500 may include a processor 510, an internal memory 520, a camera 530, a display screen 540, a mobile communication module 550, a wireless communication module 560, and a sensor module 570, etc.
[0068] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 500. In other embodiments, the electronic device 500 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0069] The processor 510 may include one or more processing units. For example, the processor 510 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a smart sensor hub, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0070] Processor 510 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 510 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 510. If processor 510 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of processor 510, and thus improves system efficiency.
[0071] The internal memory 520 can be used to store computer executable program code, which includes instructions. The processor 510 executes various functional applications and data processing of the electronic device 500 by running the instructions stored in the internal memory 520. In some embodiments, the internal memory 520 stores program code for executing the operation of the switch of the air gesture function configured by the user in the game management application, and controlling the disabling of the air gesture function in the game scene.
[0072] The electronic device implements display functions through a GPU, display screen 540, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 540 and the application processor. The GPU performs mathematical and geometric calculations for image rendering.
[0073] Display screen 540 is used to display images, video interfaces, and the like. Display screen 540 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device can include one or N display screens 540, where N is a positive integer greater than one.
[0074] The wireless communication function of the electronic device 500 can be implemented through the antenna 1, the antenna 2, the mobile communication module 510, the wireless communication module 560, the modem processor and the baseband processor.
[0075] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 500 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network.
[0076] Mobile communication module 550 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for electronic device 500. Mobile communication module 550 can include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. Mobile communication module 550 can receive electromagnetic waves from antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. Mobile communication module 510 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via antenna 1.
[0077] The wireless communication module 560 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 500. The wireless communication module 560 can be one or more devices that integrate at least one communication processing module. The wireless communication module 560 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 510. The wireless communication module 550 can also receive the signal to be sent from the processor 510, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0078] In the sensor module 570, the pressure sensor 570A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 570A can be provided on the display screen 540. There are many types of pressure sensors 570A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device comprising at least two parallel plates having a conductive material. When a force acts on the pressure sensor 570A, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 540, the electronic device detects the intensity of the touch operation based on the pressure sensor 570A. The electronic device can also calculate the position of the touch based on the detection signal of the pressure sensor 570A.
[0079] Touch sensor 570B, also known as a "touch-sensitive device," can be provided on display screen 540. Touch sensor 570B and display screen 540 form a touch screen, also known as a "touch screen." Touch sensor 570B is configured to detect touch operations applied to or near the touch sensor. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 540.
[0080] In addition, an operating system runs on the above components, such as the iOS operating system, the Android operating system, and the Windows operating system. Application programs can be installed and run on the operating system.
[0081] Figure 6 It is a software structure block diagram of the electronic device according to an embodiment of the present application.
[0082] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0083] The application layer can include a series of application packages. Figure 6 As shown, the application package may include applications such as camera, gallery, game manager, settings, and some native or third-party game applications.
[0084] 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. In some embodiments of the present application, such as Figure 6 As shown, the application framework layer can include game assistants, perception middleware, and air gesture services, etc.
[0085] The game assistant is used to detect whether the current scene is a game, start the game manager in the game scene, and destroy the game manager when exiting the game scene.
[0086] The perception center is used to detect user input gestures.
[0087] The air gesture service is used to respond to user input of air gestures and complete the corresponding functions of the air gestures, such as completing screenshots, sliding the screen up and down, etc. Air gestures can also be intercepted.
[0088] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0089] The core library consists of two parts: one containing the Java language's callable functions and the other the Android core library. The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0090] The system library can include multiple functional modules. The kernel layer is the layer between hardware and software.
[0091] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.
[0092] In order to make the technical solution of this application clearer and easier to understand, the method for disabling the air gesture function of the embodiment of this application is introduced below in conjunction with the accompanying drawings. In the method for disabling the air gesture function introduced in the embodiment of this application, it is assumed that the switch of the air gesture function of the application is set to the on state.
[0093] See also Figure 7 An interactive diagram of a method for disabling an air gesture function is shown, the method comprising:
[0094] S701. The game manager registers the game application with the game assistant.
[0095] When an electronic device boots up, the System Server starts managing and sending a power-on broadcast message. This broadcast message launches Game Manager and registers the game app with the Game Assistant. Once Game Manager completes registration with the Game Assistant, it exits. Launching Game Manager can be understood as controlling / invoking it. For similar content, refer to this explanation below.
[0096] In some embodiments, the game manager registers the game application with the game assistant by sending a list of game applications to the game assistant, wherein the applications included in the list are game applications. In some embodiments, the list may include the package name of the game application, and the package name indicates that the application is a game application.
[0097] S702: The game assistant detects whether the game application is running.
[0098] After the game assistant registers the game application through the game manager, it can clearly identify the applications that belong to the game application.
[0099] Following the user's operation of the electronic device, such as switching the application to run, the game assistant can detect whether the electronic device is running a game application. In some embodiments, the application framework layer includes: an application management service (ActivityManagerService, AMS, which is used to identify the application to which the interface running on the electronic device belongs. The AMS sends the recognition result to the game assistant, and the recognition result can indicate the package name of the application running on the electronic device. For example, the recognition result includes the package name of the application running on the electronic device. The game assistant can screen whether the package name of the application running on the electronic device exists in the list. If it exists, it means that the electronic device is running a game application, otherwise it means that the game application is not running.
[0100] When the game assistant detects that the game application is running, step S703 is executed.
[0101] S703: The game assistant launches the game manager.
[0102] In some embodiments, the game assistant determines that the electronic device is running a game application, and then launches the game manager to run it.
[0103] When the game manager is running, the game application interface will be displayed on the upper layer. Figure 3 The floating window 301 shown in (a) of FIG. The game manager can also receive the user's input of the operation of sliding the floating window 301, and display the following on the upper layer of the game application interface: Figure 3 The main interface 302 shown in (b) or Figure 4 The main interface 302 shown in (a).
[0104] In other embodiments, the user operates the electronic device to switch the game application to a non-game application, that is, to exit the currently executing game application. The game assistant can determine through the AMS that the application currently running on the electronic device is a non-game application, and can also destroy the game manager, that is, control the game manager to exit.
[0105] S704. The game manager responds to the user operation and sets the user's preference on whether to disable air gestures in the game scene in the settings application.
[0106] After the main interface of the game manager is displayed, the switch 303 of the air gesture function is as follows: Figure 3 (b) shows the enabled state, turn off the air gesture function in the game scene, or as shown in Figure 4 In the manner of display, the expansion interface 309 for preventing accidental touch is displayed, and the switch 310 for preventing the air gesture function is turned on. Figure 4 In the status shown in (b), the air gesture function in the game scene is turned off.
[0107] When the game manager receives a user input requesting to disable the air gesture function in a game scenario, it can set a user preference in the settings app to disable air gestures in the game scenario. Of course, when the game manager receives a user input requesting to enable the air gesture function in a game scenario, it can set a user preference in the settings app to not disable air gestures in the game scenario. For example, the user's preference for disabling or not disabling air gestures in the game scenario can be written into a setting item (referred to as setting item A) in the settings app.
[0108] It should be noted that the settings application itself includes a switch for the air gesture function, that is, the settings application also records the user's preference for turning the air gesture function on and off based on the user's operation of the switch for the air gesture function. For example, the preference is also written into a setting item (called setting item B), which is different from setting item A mentioned in the previous paragraph.
[0109] Setting the application to record the user's preference for turning the air gesture function on and off can be understood as the system-wide user preference setting. That is, after the switch of the air gesture function of the setting application is turned on, the electronic device will detect whether the user inputs an air gesture in any scenario. If an air gesture is detected, the function corresponding to the air gesture will be executed.
[0110] Setting the app to record a user's preference for disabling or not disabling air gestures in gaming scenarios can be understood as limiting this to gaming scenarios. After a user inputs an operation to disable the air gesture function, the electronic device, operating in a gaming scenario, detects that the user has input an air gesture, and does not perform the corresponding function.
[0111] S705. The perception center detects whether the user has input an air gesture.
[0112] As assumed above, the switch of the air gesture function of the setting application is turned on, and the electronic device can detect whether the user has input an air gesture. In some embodiments, the perception middle platform detects the user's input operation through the hardware such as the camera of the electronic device to detect whether the user has input an air gesture. Of course, the air gesture proposed in this article should refer to the specific air gesture proposed in the air gesture function, such as waving the wrist down or up, grabbing and making a fist.
[0113] Among them, when the perception center detects that the user has input an air gesture, step S706 is executed.
[0114] S706. The perception center reports the air gesture to the air gesture service.
[0115] The perception center reports the air gesture to the air gesture service, which can be understood as reporting a message or an air gesture event. The message or event indicates that the user has input an air gesture, and can also indicate the type of air gesture input by the user.
[0116] In some embodiments, step S705 and step S706 can be understood as being executed asynchronously with steps S703 and S704, and there is no restriction on the execution order.
[0117] S707. The air gesture service detects user settings from the settings application.
[0118] After receiving the air gesture reported by the perception center, the air gesture service can detect the user preference settings recorded in the settings application. In some embodiments, the user preferences recorded in setting item B of the settings application are detected.
[0119] In some embodiments, the air gesture service may detect user settings by sending a request to a settings application.
[0120] S708. The settings application returns the user settings to the air gesture service.
[0121] In response to the air gesture service detecting the user settings from the settings app, the settings app returns the user settings to the air gesture service. In some embodiments, the settings app returns the user preferences recorded for setting item B to the air gesture service.
[0122] S709. When the air gesture service determines that the user has set it to disabled, it intercepts the air gesture.
[0123] The Air Gesture Service intercepts air gestures reported by the Perception Center based on the user's preference to disable air gestures in gaming scenarios, as returned by the Settings app. This means intercepting an air gesture reported by the Perception Center destroys or discards the gesture, meaning it destroys or discards the message or event reported by the Perception Center.
[0124] In an embodiment of the present application, a switch is configured in the game manager to disable the air gesture function in the game scene. After the switch is turned on by the user, when the electronic device detects the game scene, it can prohibit the execution of the air gesture function input by the user, thereby avoiding the interference caused to the user by the electronic device automatically executing the air gesture function.
[0125] It should be noted that the air gesture service receives the user settings returned by the settings application as follows: the user's preference not to disable the air gesture function in the game scene. The air gesture service can perform the air gesture function by itself or in combination with other modules based on the air gesture reported by the perception center, such as completing screenshots or sliding the interface up and down.
[0126] It should also be noted that when the switch of the air gesture included in the settings application is in the off state, the setting item B of the settings application records the user's preference for turning the air gesture function on and off as off. Based on this, the electronic device will not detect whether the user has input an air gesture, which can be understood as: the perception middle platform will not detect whether the user has input an air gesture through the hardware such as the camera of the electronic device. In this case, the air gesture service will not receive the air gesture message or event reported by the perception middle platform, and the air gesture service obtains the user setting through steps S707 and S708: when the user's preference to disable the air gesture function in the game scene, the air gesture service cannot intercept the air gesture through step S709.
[0127] While researching how to configure a switch in Game Manager to disable the air gesture feature during gaming, the inventors discovered that similar electronic device features could also be disabled in certain scenarios. In other words, the technical approach to disabling air gestures could also be applied to other electronic device features, including eye tracking and gesture navigation. Eye tracking and air gestures can be considered intelligent assistance features, meaning they allow users to control electronic devices without touching the screen.
[0128] About eye tracking
[0129] The settings application of the electronic device may include a switch for the eye tracking function. When the user turns on the switch for the eye tracking function, the electronic device can start eye tracking. In some scenarios of the electronic device, the switch for the eye tracking function is turned on, and the electronic device displays a banner notification in a pop-up window. The electronic device automatically starts tracking the human eye, and displays the banner notification when the human eye is looking at the position of the horizontal screen notification. However, the user's eyes may be looking at other content in the area where the banner notification is located, and they may not have the intention of opening the banner notification. This will cause trouble to the user and affect the user experience. For example, in a game scenario, the user may be looking at the area where the banner notification is located, and may be paying attention to the game content and does not want to check the content of the banner notification. In this case, the electronic device displaying the banner notification will cause trouble to the user.
[0130] Based on this, the game manager of the electronic device can also configure the switch of the eye tracking function. When the user turns on the switch of the eye tracking function, the electronic device will disable the eye tracking function in the game scene.
[0131] Among them, the first understanding of disabling the eye tracking function in the game scene can be: the switch of the eye tracking function configured in the settings application is the master switch of the eye tracking function, which is used to control the electronic device to track the position of the user's gaze point, and when the user's gaze point is in the area of the banner notification, expand the banner notification and / or open the application corresponding to the banner notification. In the scenario where the switch of the air gesture configured in the settings application is turned on, the switch configured by the game manager application is only used to implement in the game scene, when the position of the user's gaze point tracked by the electronic device is in the area of the banner notification, prohibiting the execution of expanding the banner notification and / or opening the application corresponding to the banner notification.
[0132] A second way to understand disabling eye tracking in gaming scenarios is that the switch configured in the Game Manager app is equivalent to the switch for the eye tracking function configured in the Settings app, and they are two different entrances to the eye tracking function. The switch configured in the Game Manager app is also used to control the electronic device to track the user's gaze position, and when the user's gaze position is in the banner notification area, expand the banner notification and / or open the corresponding application of the banner notification. When the switch configured in the Game Manager app is turned on, the electronic device does not detect the user's gaze position, nor does it respond to the action of the electronic device tracking the user's gaze position in the banner notification area, and the expansion of the banner notification and / or the opening of the corresponding application of the banner notification are prohibited.
[0133] To configure the eye tracking function in Game Manager, please refer to Figure 3 and its corresponding embodiment contents, or refer to Figure 4 The contents of the corresponding embodiments will not be further described here.
[0134] Method for disabling eye tracking function of electronic devices in game scenes, and Figure 7 The display method is similar, please refer to . The difference is:
[0135] The perception middle station is replaced by other modules of the application framework layer, or it can also be the perception middle station module, which is used to detect the user's gaze position and determine whether the gaze position is in the area of the banner notification. Correspondingly, step S705 can be adjusted to have other modules or the perception middle station to detect the user's gaze position and determine whether the gaze position is in the area of the banner notification. When other modules or the perception middle station detect that the user's gaze position is in the area of the banner notification, the eye movement event is reported to the eye tracking service, which is a module of the application framework layer.
[0136] The eye tracking service determines through steps S707 and S708 that the user's preference for the eye tracking function in the game scene recorded by the setting application is: when disabled, the eye movement event is intercepted, that is, the eye movement event is destroyed or discarded.
[0137] The inventors have also discovered that disabling the air gesture function isn't limited to gaming scenarios; the aforementioned technical approach can be applied to other scenarios. Similarly, disabling the eye tracking function isn't limited to gaming scenarios; the aforementioned technical approach can be applied to other scenarios.
[0138] About gesture navigation
[0139] Currently, electronic devices don't typically have a separate on / off switch for gesture navigation in their settings. This means it's enabled by default. Similar to air gestures and eye tracking, gesture navigation can be automatically activated against user intent in some scenarios, impacting the user experience. This includes gaming scenarios.
[0140] Based on this, the game manager of the electronic device can also configure a switch for the gesture navigation function. When the user turns on the switch for the gesture navigation function, the electronic device will disable the gesture navigation function in the game scene.
[0141] Among them, the first understanding of disabling the gesture navigation function in the game scene can be: when the electronic device detects that the user inputs an operation corresponding to the gesture navigation function, the function corresponding to the gesture navigation function is prohibited from being executed, for example: when the electronic device detects that the user slides inward from the left or right edge of the screen, the electronic device finds that this is a game scene, the electronic device is prohibited from returning to the previous layer; or when the electronic device detects that the user slides up from the bottom edge of the screen, the electronic device finds that this is a game scene, it is prohibited from returning to the desktop; or when the electronic device detects that the user slides up from the bottom edge of the screen and pauses, the electronic device finds that this is a game scene, it is prohibited from entering the multitasking management interface; or when the electronic device detects that the user slides horizontally along the bottom edge of the screen, the electronic device finds that this is a game scene, it is prohibited from quickly switching applications.
[0142] The second understanding of disabling the gesture navigation function in the game scene can be: when the electronic device detects that the current scene is a game, it prohibits detecting the operations corresponding to the gesture navigation function input by the user, and prohibits executing the functions corresponding to the gesture navigation function.
[0143] For information on how to configure the gesture navigation function in Game Manager, please refer to Figure 3 and its corresponding embodiment contents, or refer to Figure 4 The contents of the corresponding embodiments will not be further described here.
[0144] Method for disabling gesture navigation function of electronic device in game scene, and Figure 7 The display method is similar, please refer to . The difference is:
[0145] The perception middle platform is replaced by other modules of the application framework layer, or it can also be the perception middle platform module, which is used to detect whether the user has entered the operation corresponding to the gesture navigation function. Correspondingly, step S705 can be adjusted to have other modules or the perception middle platform to detect whether the user has entered the operation corresponding to the gesture navigation function, and when it is determined that the user has entered the operation corresponding to the gesture navigation function, the gesture navigation event is reported to the gesture navigation service, which is a module of the application framework layer.
[0146] The gesture navigation service determines through steps S707 and S708 that if the user's preference for the gesture navigation function in the game scene recorded by the setting application is disabled, the gesture navigation event is intercepted, that is, the gesture navigation event is destroyed or discarded.
[0147] The inventors also discovered that the scenarios for disabling gesture navigation events are not limited to gaming scenarios, and the above-mentioned technical ideas can also be used in other scenarios to disable gesture navigation events.
[0148] Another embodiment of the present application further provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or processor executes one or more steps in any of the above methods.
[0149] The computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0150] Another embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer or processor, causes the computer or processor to execute one or more steps in any of the above methods.
[0151] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for disabling a function, characterized in that: Applied to electronic equipment, the method includes: When the game application is running, a switch for a first function is displayed on the interface of the game application, where the first function is a shortcut function, and when a user inputs an operation corresponding to the first function, the electronic device executes the service corresponding to the first function; In response to a user turning on a switch of the first function, when the user inputs an operation corresponding to the first function, execution of a service corresponding to the first function is prohibited.
2. The method according to claim 1, characterized in that The first function includes: an intelligent assistance function, where the intelligent assistance function refers to a function in which a user inputs an operation without contacting the display screen to control an electronic device to perform a service.
3. The method according to claim 2, characterized in that The intelligent assistance functions include air gesture function and eye tracking function.
4. The method according to any one of claims 1 to 3, characterized in that The first function includes a gesture navigation function.
5. The method according to any one of claims 1 to 4, characterized in that The prohibition of executing the service corresponding to the first function includes: Obtaining a message corresponding to a first function, where the message corresponding to the first function is generated when a user input of an operation corresponding to the first function is detected; If it is detected that the switch of the first function is in the on state, the message corresponding to the first function is discarded or destroyed.
6. The method according to claim 2 or 3, characterized in that Before prohibiting execution of the service corresponding to the first function in response to the user turning on the switch of the first function and when the user inputs the operation corresponding to the first function, the method further includes: Determine that a system-level switch for the first function is turned on, and display the system-level switch for the first function on an interface of a settings application.
7. The method according to claim 6, characterized in that Also includes: When the system-level switch of the first function is in the off state, the switch corresponding to the first function is in the on state or the off state, and when the user inputs the operation corresponding to the first function, the service corresponding to the first function is prohibited from being executed.
8. The method according to claim 7, characterized in that The prohibition of executing the service corresponding to the first function includes: It is prohibited to detect whether the user inputs the operation corresponding to the first function.
9. The method according to any one of claims 1 to 8, characterized in that The step of displaying the switch of the first function on the interface of the game application while the game application is running includes: When the game application is running, displaying a first interface on an upper layer of the interface of the game application, wherein the first interface includes a switch; In response to a user clicking operation on the switch, a second interface is displayed on an upper layer of the interface of the game application, where the second interface includes a switch for the first function.
10. The method according to any one of claims 1 to 8, characterized in that The step of displaying the switch of the first function on the interface of the game application while the game application is running includes: When the game application is running, a third interface is displayed on the upper layer of the interface of the game application, and the third interface includes a switch for the first function.
11. The method according to claim 10, characterized in that Also includes: In response to the user turning on the switch of the first function, a first motion effect is displayed on the third interface.
12. An electronic device, characterized in that: include: Memory for storing computer programs or computer instructions; A processor, configured to execute a computer program or computer instruction stored in the memory, so that the electronic device executes the function disabling method according to any one of claims 1 to 11.
13. A computer storage medium, characterized in that Used to store a computer program, which, when executed, is used to implement the function disabling method according to any one of claims 1 to 11.
14. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the function disabling method according to any one of claims 1 to 11.