WO2020056778A1 - Method for shielding touch event, and electronic device - Google Patents

Method for shielding touch event, and electronic device Download PDF

Info

Publication number
WO2020056778A1
WO2020056778A1 PCT/CN2018/107128 CN2018107128W WO2020056778A1 WO 2020056778 A1 WO2020056778 A1 WO 2020056778A1 CN 2018107128 W CN2018107128 W CN 2018107128W WO 2020056778 A1 WO2020056778 A1 WO 2020056778A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
inverted posture
distance sensor
touch
blocked
Prior art date
Application number
PCT/CN2018/107128
Other languages
French (fr)
Chinese (zh)
Inventor
黄德志
童碧峰
陈浩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/107128 priority Critical patent/WO2020056778A1/en
Priority to CN201880085335.4A priority patent/CN111542802A/en
Publication of WO2020056778A1 publication Critical patent/WO2020056778A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Definitions

  • the embodiments of the present application relate to the field of electronic technology, and in particular, to a method for shielding a touch event and an electronic device.
  • the embodiments of the present application provide a method and an electronic device for shielding a touch event, which can reduce the occurrence of false touches.
  • the technical solution of the present application provides a method for shielding a touch event, including: if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event .
  • the three conditions can indicate that the electronic device is currently in the pocket, and thus can shield the touch event, thereby reducing the occurrence of false touch .
  • the electronic device shields the touch event, including: the electronic device periodically determines whether the electronic device is In the bright screen state, whether the distance sensor of the electronic device is blocked, and whether the electronic device is in an inverted posture.
  • the electronic device can periodically determine whether the above three conditions are met, so as to determine whether the electronic device is in a pocket.
  • the electronic device if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event, including: the electronic device receives the first interrupt After the event, the second interruption event, or the third interruption event, it is determined whether the electronic device is in a bright screen state, whether the distance sensor of the electronic device is blocked, and whether the electronic device is in an inverted posture. If the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event.
  • the first interrupt event is used to report that the touch screen is switched from the off-screen state to the bright screen state; the second interrupt event is used to report that the distance sensor is switched from unblocked to blocked; the third interrupt event is used to report the electronic device.
  • the non-inverted posture is switched to the inverted posture.
  • the electronic device may determine whether the above three conditions are satisfied.
  • the first interrupt event is used to report that the touch screen is switched from the off-screen state to the bright state (the first interrupt event may be referred to as interrupt event 1), or the first interrupt event is used to report a touch
  • the screen control is switched from a bright screen state to an off screen state (the first interruption event may be referred to as an interruption event 2).
  • the second interrupt event is used to report that the distance sensor is switched from unblocked to blocked (the first interrupt event may be referred to as interrupt event 3), or the second interrupt event is used to report that the distance sensor is switched from blocked to unblocked ( This first interrupt event may be referred to as interrupt event 4).
  • the third interrupt event is used to report that the electronic device is switched from a non-inverted posture to an inverted posture (the first interrupt event may be referred to as an interrupt event 5), or the third interrupt event is used to report that the electronic device is switched from an inverted posture to a non-inverted posture ( This first interrupt event may be referred to as interrupt event 6).
  • the electronic device may determine whether the above three conditions are satisfied after receiving any one of the interrupt events 1 to 6.
  • the electronic device determines whether the electronic device is in a bright screen state, whether the distance sensor of the electronic device is blocked, and the electronic device Whether the device is in an inverted posture includes: the electronic device determines that the electronic device is in a bright screen state after receiving the first interruption event; the electronic device turns on a distance sensor and a posture sensor, and the posture sensor is used to detect the electronic device's posture; the electronic device determines the distance Whether the sensor is obstructed, and whether the electronic device is in an inverted posture.
  • the electronic device can turn off the distance sensor and the attitude sensor when the screen is off, and turn on the distance sensor and the attitude sensor when the screen is bright, so that the power consumption of the electronic device can be saved.
  • the method further includes: if the electronic device receives another first interrupt event, and the electronic device determines that the screen is turned off according to the other first interrupt event State, the electronic device turns off the distance sensor and the attitude sensor.
  • the electronic device before the electronic device switches from the bright screen state to the off screen state, the electronic device meets the condition of the bright screen state.
  • the electronic device can determine whether the other two conditions are satisfied through the distance sensor and the attitude sensor, and then determine the cycle. Whether to block touch events or work properly.
  • the method further includes: if the electronic device is in a bright screen state, the distance sensor is blocked, the electronic device is converted from an inverted posture to a non-inverted posture, and the electronic device is If the duration of the non-inverted gesture is less than or equal to the first preset value, the electronic device remains shielded from the touch event.
  • the electronic device shields the touch event, if the electronic device is in a bright screen state and the distance sensor is blocked, if the electronic device has an inverted posture temporarily switched to a non-inverted posture, and then quickly returns to the inverted posture, then the electronic The device does not unblock the touch event when the electronic device is temporarily switched to a non-inverted posture, thereby avoiding frequently blocking and unblocking the touch event, and saving power consumption of the mobile phone.
  • determining whether the electronic device is in an inverted posture includes: within a preset time period before the current time, if the electronic device is in an inverted posture for a length greater than a second preset value, the electronic device determines the inverted posture Or, within a preset time period before the current time, if the time length of the electronic device in the non-inverted posture is less than or equal to a third preset value, the electronic device determines the inverted posture.
  • the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is temporarily switched to an inverted state; but within a preset time period before the current time, if the electronic device The duration of the inverted posture is greater than the second preset value, or the duration of the non-inverted posture of the electronic device is less than the third preset value, that is, the electronic device is the inverted posture most of the time within the third preset duration before the current time. , The electronic device can keep blocking the touch event without canceling the touch blocking event immediately, thus avoiding frequently blocking and unblocking the touch event, and reducing the power consumption of the mobile phone.
  • the electronic device if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event, including: if the electronic device is determined to be in a bright screen state If the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical display state, the electronic device shields the touch event.
  • the user's hand may cover the distance sensor, the electronic device is in a bright state, and the electronic device is in an inverted posture
  • the electronic device is not in a vertical screen display state but a horizontal screen display state, so the electronic device does not block the touch event, but keeps working normally, so that the user can play games or watch videos normally.
  • the technical solution of the present application provides a device for shielding a touch event.
  • the device is included in an electronic device, and the device has the behavior of the electronic device in any one of the foregoing first aspects and possible implementations of the first aspect.
  • the functions can be realized by hardware, and the corresponding software can also be implemented by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above functions. For example, an input module or unit, a display module or unit, a processing module or unit, and the like.
  • an embodiment of the present application provides an electronic device including one or more processors and one or more memories.
  • the one or more memories are coupled to one or more processors.
  • the one or more memories are used to store computer program code.
  • the computer program code includes computer instructions.
  • the electronic device executes the instructions. The method for shielding a touch event in any possible implementation of the foregoing first aspect.
  • an embodiment of the present application provides a computer storage medium including computer instructions, and when the computer instructions are run on an electronic device, the electronic device is caused to perform the shielding of a touch event in any of the possible implementations of the first aspect. method.
  • an embodiment of the present application provides a computer program product.
  • the computer program product runs on a computer
  • the electronic device is caused to execute a method for shielding a touch event in any of the possible implementations of the first aspect.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application.
  • FIG. 3 is a flowchart of a method for shielding a touch event according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of a handheld electronic device according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another handheld electronic device according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an inverted posture according to an embodiment of the present application.
  • FIG. 7 is a flowchart of another method for shielding a touch event according to an embodiment of the present application.
  • FIG. 8 is a flowchart of another method for shielding a touch event according to an embodiment of the present application.
  • FIG. 9 is a flowchart of another method for shielding a touch event according to an embodiment of the present application.
  • FIG. 10 is a flowchart of another method for shielding a touch event according to an embodiment of the present application.
  • FIG. 11 is a flowchart of another method for shielding a touch event according to an embodiment of the present application.
  • FIG. 12 is a correspondence diagram between a posture and time of an electronic device according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a horizontal screen display provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a vertical screen display provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of a game playing scenario according to an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the touch screen of the electronic device is prone to mis-touch due to contact with clothing or other objects in the pocket.
  • the technical solution provided in the embodiment of the present application can reduce the occurrence of false touch by shielding the touch event when it is determined that the electronic device is located in the pocket.
  • a mobile phone in the bright screen state may open the camera or flashlight application due to clothing or other objects in the pocket touching the camera, flashlight, and other shortcut keys on the touch screen, resulting in a false touch; for example, in the bright screen state
  • Mobile phones may lock fingerprints or patterns due to clothing or other objects in the pocket touching the fingerprint or pattern drawing area on the touch screen; for example, a mobile phone with a bright screen may be affected by clothing
  • the track of the touch screen or other objects in the pocket touching the preset track is the same as the preset track (for example, the track of “C”), so that the application corresponding to the preset track (for example, the phone call application) is opened, resulting in a false touch.
  • the mobile phone that the user puts in his pocket is often in a bright screen state, which makes it easy to accidentally touch it.
  • the user forgets to turn off the touch screen before putting the mobile phone in the pocket, and puts the mobile phone in the bright screen state directly into the pocket.
  • the user puts the screen-lost mobile phone in his pocket, but the mobile phone receives an incoming call, a message in the pocket, or the screen brightens due to an alarm prompt or the user accidentally touches the power button.
  • the technical solution provided in the embodiments of the present application can reduce the occurrence of false touches by shielding touch events when the electronic device is in a pocket in a bright screen state.
  • the method for shielding touch events provided in the embodiments of the present application can be applied to mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, notebook computers, and super mobiles.
  • AR augmented reality
  • VR virtual reality
  • UMPC personal computer
  • PDA personal digital assistant
  • the embodiment of the present application does not place any restrictions on the specific type of the electronic device.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100.
  • 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 charge management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display 194, and Subscriber identification module (SIM) card interface 195 and the like.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer parts than shown, or some parts may be combined, or some parts may be split, or different parts may be arranged.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image, signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units may be independent devices or integrated in one or more processors.
  • the controller may be a nerve center and a command center of the electronic device 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching and executing instructions.
  • the processor 110 may further include a memory for storing instructions and data.
  • 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 used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit (inter-integrated circuit, sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver receiver / transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input / output (GPIO) interface, subscriber identity module (SIM) interface, and / Or universal serial bus (universal serial bus, USB) interface.
  • I2C integrated circuit
  • I2S integrated circuit
  • PCM pulse code modulation
  • UART universal asynchronous transceiver receiver / transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input / output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be respectively coupled to a touch sensor 180K, a charger, a flash, a camera 193, and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to implement a function of receiving a call through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing, and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement the function of receiving calls through a Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus may be a two-way communication bus. It converts the data to be transferred between serial and parallel communications.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with a Bluetooth module in the wireless communication module 160 through a UART interface to implement a Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to implement a function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display 194, the camera 193, and the like.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like.
  • CSI camera serial interface
  • DSI display serial interface
  • the processor 110 and the camera 193 communicate through a CSI interface to implement a shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to implement a display function of the electronic device 100.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones and play audio through headphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiments of the present application is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. While the charge management module 140 is charging the battery 142, the power management module 141 can also provide power to the electronic device.
  • the power management module 141 is used to connect the battery 142, the charge management module 140 and the processor 110.
  • the power management module 141 receives inputs from the battery 142 and / or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, number of battery cycles, battery health (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charge management module 140 may be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, and a baseband processor.
  • the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals.
  • Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization.
  • antenna 1 can be multiplexed into a diversity antenna for a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G / 3G / 4G / 5G and the like applied on the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 150 may receive the electromagnetic wave by the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic wave, and transmit it to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is configured to modulate a low-frequency baseband signal to be transmitted into a high-frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be a separate device.
  • the modem processor may be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 may provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites applied to the electronic device 100. Wireless communication solutions such as global navigation system, GNSS, frequency modulation (FM), near field communication (NFC), and infrared technology (infrared, IR).
  • the wireless communication module 160 may be one or more devices that integrate at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it into electromagnetic wave radiation through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies can include global mobile communication systems (GSM), general packet radio services (GPRS), code division multiple access (code division multiple access, CDMA), and broadband code division Multiple access (wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC, FM , And / or IR technology.
  • GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), crizot navigation system (BDS), quasi-zenith satellite system (quasi-zenith satellite system (QZSS) and / or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Bertdou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing and is connected to the display 194 and an 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.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can use 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 (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active matrix organic light emitting diode active-matrix organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • emitting diodes AMOLED
  • flexible light-emitting diodes FLEDs
  • Miniled MicroLed
  • Micro-oLed quantum dot light emitting diodes
  • QLEDs quantum dot light emitting diodes
  • the electronic device 100 may include one or N display screens 194, where N is a positive integer
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP processes the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and the light is transmitted to the light receiving element of the camera through the lens. The light signal is converted into an electrical signal, and the light receiving element of the camera passes the electrical signal to the ISP for processing, which is converted into an image visible to the naked eye. ISP can also optimize the image's noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, an ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • An object generates an optical image through a lens and projects it onto a photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs digital image signals to the DSP for processing.
  • DSP converts digital image signals into image signals in standard RGB, YUV and other formats.
  • the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform a Fourier transform on the frequency point energy and the like.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture expert groups (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture expert groups
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can quickly process input information and continuously learn by itself.
  • the NPU can realize applications such as intelligent recognition of the electronic device 100, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend 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. For example, save music, videos and other files on an external memory card.
  • the internal memory 121 may be used to store computer executable program code, and the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area may store an operating system, at least one application required by a function (such as a sound playback function, an image playback function, etc.) and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • 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 magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
  • UFS universal flash memory
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the audio module 170 is configured to convert digital audio information into an analog audio signal and output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
  • the speaker 170A also called a "horn" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as the "handset" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or a voice message, it can answer the voice by holding the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound through the mouth near the microphone 170C, and input a sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, in addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 100 may further be provided with three, four, or more microphones 170C to achieve sound signal collection, noise reduction, identification of sound sources, and directional recording.
  • the headset interface 170D is used to connect a wired headset.
  • the headphone interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular communication industry association (United States of America, CTIA) standard interface.
  • OMTP open mobile electronic device platform
  • CTIA cellular communication industry association
  • the pressure sensor 180A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be disposed on the display screen 194.
  • the capacitive pressure sensor may be at least two parallel plates having a conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity lower than the first pressure threshold is applied to the short message application icon, an instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction for creating a short message is executed.
  • the gyro sensor 180B may be used to determine a movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, the x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the angle of the electronic device 100 shake, and calculates the distance that the lens module needs to compensate according to the angle, so that the lens cancels the shake of the electronic device 100 through the backward movement to achieve image stabilization.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the barometric pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C, and assists in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
  • the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the opened and closed state of the holster or the opened and closed state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to recognize the posture of electronic devices, and is used in applications such as switching between horizontal and vertical screens, and pedometers.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light through a light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from a nearby object. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficiently reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100.
  • the electronic device 100 may use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the touch screen to save power.
  • the proximity light sensor 180G can also be used in holster mode, and the pocket mode automatically unlocks and locks the screen. It can be understood that the proximity light sensor 180G can also be used as a distance sensor 180F.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • Ambient light sensor 180L can also be used to automatically adjust white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 may use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photographing, fingerprint answering an incoming call, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 performs a performance reduction of a processor located near the temperature sensor 180J so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid the abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 when the temperature is lower than another threshold, performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the touch sensor 180K is also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also referred to as a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation 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.
  • a visual output related to the touch operation may be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire a vibration signal of a human voice oscillating bone mass.
  • Bone conduction sensor 180M can also contact the human pulse and receive blood pressure beating signals.
  • the bone conduction sensor 180M may also be disposed in the earphone and combined into a bone conduction earphone.
  • the audio module 170 may analyze the voice signal based on the vibration signal of the oscillating bone mass obtained by the bone conduction sensor 180M to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • the keys 190 include a power-on key, a volume key, and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 may receive a key input, and generate a key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 may generate a vibration alert.
  • the motor 191 can be used for vibration alert for incoming calls, and can also be used for touch vibration feedback.
  • the touch operation applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting or removing the SIM card interface 195.
  • the electronic device 100 may support one or N SIM card interfaces, and N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple SIM cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different.
  • the SIM card interface 195 may also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through a SIM card to implement functions such as calling and data communication.
  • the electronic device 100 uses an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • 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 with a layered architecture as an example, and exemplifies a software structure of the electronic device 100.
  • FIG. 2 is a software structural block diagram of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, each of which has a clear role and division of labor.
  • the layers communicate with each other through a software interface.
  • the Android system is divided into four layers, which are an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer from top to bottom.
  • the application layer can include a series of application packages.
  • the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS and other applications.
  • the application framework layer provides an application programming interface (API) and a programming framework for applications at the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, and more.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can consist of one or more views.
  • the display interface including the SMS notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide a communication function of the electronic device 100. For example, management of call status (including connection, hang up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages that can disappear automatically after a short stay without user interaction.
  • the notification manager is used to inform download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system 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.
  • text messages are displayed in the status bar, sounds are emitted, electronic equipment vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that the Java language needs to call, and the other is the Android core library.
  • 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.
  • Virtual machines are used to perform object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (media manager), media library (Media library), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL) and so on.
  • surface manager media manager
  • media library Media library
  • Three-dimensional graphics processing library for example: OpenGL ES
  • 2D graphics engine for example: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports a variety of commonly used audio and video formats for playback and recording, as well as still 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, compositing, and layer processing.
  • the 2D graphics engine is a graphics engine for 2D graphics.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the workflow of the software and hardware of the electronic device 100 is exemplarily described in conjunction with a scene in which a camera is started to take a photo in response to an operation of a user touching a camera icon.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level.
  • the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch and click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures a still image or a video.
  • an embodiment of the present application provides a method for shielding a touch event.
  • the method may include:
  • the electronic device If the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event.
  • the shielding condition may include that the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture.
  • the electronic device is in an inverted posture, which means that the head (or top) of the electronic device faces downward.
  • the head 401 of the electronic device refers to the side where the earpiece (or receiver) 402 of the electronic device is located
  • the bottom 403 of the electronic device refers to the side where the microphone (or microphone) 404 is located.
  • the head 401 and the bottom 403 of the electronic device are located on opposite sides of the electronic device.
  • the electronic device further includes a distance sensor 405, which can be located on the head 401 side of the electronic device or on the bottom 403 side of the electronic device.
  • the touch screen 406 of the electronic device is used to display a graphical user interface (GUI).
  • GUI graphical user interface
  • the GUI currently displayed on the electronic device includes icons of multiple applications, names of multiple applications, weather widgets, and a status bar.
  • the head 401 of the electronic device faces upward. From the perspective of the user, the picture direction of the application icon and the text direction of the application name are positive. .
  • the electronic device is usually put into the pocket with the head down.
  • the distance sensor on the electronic device is blocked by the pocket. Therefore, when the distance sensor on the electronic device is blocked and the head of the electronic device is facing down, it can indicate that the electronic device is put in the pocket.
  • the distance sensor when the electronic device is in the bright screen state, the distance sensor is blocked, and the electronic device's head is facing down, it can indicate that the electronic device is in the bright screen state in the pocket, so the touch event can be shielded and the occurrence of false touch can be reduced. If the three conditions that the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture are not satisfied, the touch event is not shielded, and the electronic device keeps working normally.
  • the distance sensor may include an optical distance sensor, an infrared distance sensor, or an ultrasonic distance sensor.
  • an infrared distance sensor is taken as an example to explain the process of determining that the distance sensor is blocked.
  • the infrared sensor may specifically be the above-mentioned proximity light sensor.
  • the infrared distance sensor may include an infrared transmitting tube and an infrared receiving tube. When the infrared light emitted by the transmitting tube is reflected by the object and received by the receiving tube, the object may be determined according to the transmitting time and the receiving time.
  • the distance from the infrared distance sensor if the distance is less than or equal to a preset threshold, it can indicate that the distance between the infrared distance sensor and an object is close, and the infrared distance sensor is blocked; if the distance is greater than the preset threshold, it can indicate The distance between the infrared distance sensor and an object is relatively short, and the infrared distance sensor is not blocked; when the receiving tube cannot receive the infrared light emitted by the transmitting tube, it can be shown that the infrared distance sensor is far from the object, and the infrared distance sensor is not blocked.
  • the head of the electronic device faces downwards, which refers to a ray 601 pointing from the bottom of the electronic device to the head of the electronic device and parallel to the side of the electronic device.
  • the angle 603 with the direction of gravity 602 is less than or equal to a preset Angle value.
  • the preset angle value is less than 90 °, and the specific value can be set according to actual needs. For example, the preset angle value can be 20 °. If the angle 603 between the ray 601 and the direction of gravity 602 is greater than a preset angle value, the electronic device does not have the head down, and the electronic device has a non-inverted attitude.
  • the electronic device may determine the direction of the head of the electronic device according to at least one of sensors such as a gravity sensor, an acceleration sensor, and a gyroscope, thereby determining whether the electronic device is in an inverted posture.
  • the electronic device shielding the touch event means that the electronic device turns off the touch function of the touch screen and does not respond to the touch event of the touch screen.
  • shielding the touch event by the electronic device in step 300 may include: the electronic device turns off a function of detecting a touch signal, that is, the electronic device does not detect the touch signal, and therefore does not generate a touch event, and does not respond to the touch event. .
  • shielding the touch event by the electronic device in step 300 may include: after detecting the touch signal, the electronic device interrupts the response processing to the touch event corresponding to the touch signal.
  • the touch screen of the electronic device does not generate a touch event after detecting a touch signal, and does not report the touch event to an upper application window, and thus does not respond to the touch event.
  • a touch event is generated according to the touch signal, and the touch event is redirected to a preset upper-layer application window for processing, thereby intercepting the touch event through the preset upper-layer application window. Interrupts the original processing of touch events.
  • the reminder application window uses a sound "dididi" to remind the user that the touch is currently blocked, in which state the electronic device will not respond to touch events; or, the reminder application window uses sound "Blocked touch” to remind the user that the touch event is currently blocked; or, the reminder application window can alert the user that the touch event has been blocked by means of vibration; or, the reminder application window can be displayed on the screen (always on display, In the AOD) state, a small pop-up window displayed in the local area is used to prompt the user that the touch has been blocked.
  • shielding the touch event by the electronic device in step 300 may include: the electronic device turns off a function of detecting a touch signal, and turns off or locks the screen after a first preset period of time; or the electronic device detects a touch After the signal is sent, the processing of responding to the touch event corresponding to the touch signal is interrupted, and the screen is turned off or the screen is locked after the first preset time period elapses.
  • the shielding of the touch event by the electronic device in step 300 may include: turning off or locking the screen of the electronic device to shield the touch event of the touch screen.
  • a user puts an electronic device in a bright screen state into a pocket and wants to continue using the electronic device later. For example, when a user is using a mobile phone while a bus is coming, the user puts the mobile phone in a bright screen state into his pocket, pulls out the bus card, and swipes the card. After the card is swiped, the user takes out the mobile phone and continues to use it.
  • the duration that the three conditions of the bright screen state, the distance sensor is blocked, and the inverted posture are simultaneously greater than or equal to the second preset duration (for example, 5s), it may indicate that the user may not want to use the electronic device for the time being. The device is ready, and the electronic device can shield the touch event. In the case where the duration of the three conditions is less than the second preset duration, the user may use the electronic device immediately, so the electronic device can not touch the touch event and keep normal. jobs.
  • the electronic device will block the touch event only after determining that the three conditions of the bright screen state, the distance sensor is blocked, and the inverted posture are met.
  • the embodiment of the present application does not limit the sequence in which the electronic device determines whether each of the three conditions is satisfied. For example, the electronic device may first determine whether it is a bright screen state, and then determine whether the distance sensor is blocked and whether it is in an inverted posture; for another example, the electronic device may first determine whether the distance sensor is blocked, and then determine whether it is a bright screen. Status and whether it is an inverted posture. After the electronic device has shielded the touch event, if the electronic device determines that these three conditions are not currently met, the electronic device can resume normal operation. Alternatively, after the electronic device has shielded the touch event, if the electronic device determines that the three conditions are not currently met, the electronic device cancels the shielded touch event, and resumes normal work.
  • the above step 300 may specifically include:
  • the electronic device determines whether it is in a bright screen state.
  • step 702 If it is in the bright screen state, the electronic device executes step 702; if it is not in the bright screen state, the electronic device executes step 703.
  • the electronic device determines whether the distance sensor of the electronic device is blocked.
  • step 703 is performed; if it is blocked, step 704 is performed.
  • the electronic device determines whether it is an inverted posture.
  • step 705 is performed; if it is not the inverted posture, step 703 is performed.
  • the electronic device shields the touch event.
  • the distance sensor and the attitude sensor may remain on, and the electronic device may periodically perform the steps 701-705 (for example, the period may be 20s), that is, periodically detect whether the electronic device is in a bright screen state, Whether the distance sensor is obstructed, and whether it is in an inverted posture.
  • the attitude sensor may be used to detect the attitude of the electronic device, for example, the angle between the ray 601 and the direction of gravity 602 may be detected, so as to detect whether the electronic device is in an inverted attitude.
  • the attitude sensor may be one or more of a gravity sensor, a gyroscope, or an acceleration sensor.
  • step 701 if the electronic device determines in step 701 that the electronic device is not in a bright screen state (for example, the electronic device is in a screen-off state (the screen-off state may include an AOD state)), the electronic device performs step 703, That is, the normal operation is maintained, and step 701 is performed again after the next detection cycle arrives.
  • the electronic device determines that the screen is in a bright screen state and determines that the distance sensor is not blocked in step 704
  • the electronic device executes step 703 and waits for the next detection period to execute step 701 again.
  • step 703 In the current detection cycle, if the electronic device determines that it is in a bright screen state and the distance sensor is blocked, and the electronic device is not in an inverted posture, the electronic device executes step 703 and waits for the next detection cycle to perform step 701 again. In the current detection cycle, if the electronic device determines that it is in a bright screen state and the distance sensor is blocked, and the electronic device is in an inverted posture, the electronic device executes step 705 and waits for the next detection cycle to execute step 701 again. After step 705 (shielding touch event), if the electronic device executes step 703 again, step 703 is specifically to cancel the shielding touch event, so as to resume normal work. After unblocking the touch event, if the electronic device performs step 703 again, step 703 keeps the electronic device working normally.
  • the memory of the electronic device may store a state for indicating the touch screen of the electronic device (for example, a bright screen state or an off screen state), a state of the distance sensor (for example, blocked or unblocked), and an attitude of the electronic device. (Such as an inverted posture, a non-inverted posture, or an angle at which the electronic device is currently inclined with respect to the direction of gravity, etc.).
  • a state for indicating the touch screen of the electronic device for example, a bright screen state or an off screen state
  • a state of the distance sensor for example, blocked or unblocked
  • an attitude of the electronic device for example, a state of the distance sensor (for example, blocked or unblocked)
  • an inverted posture a non-inverted posture, or an angle at which the electronic device is currently inclined with respect to the direction of gravity, etc.
  • the electronic device can determine the electronic device by querying these data, information, or parameters Whether the screen is bright, whether the distance sensor is blocked, and whether it is in an inverted posture.
  • the electronic device may periodically detect whether the electronic device is in a bright screen state, whether the distance sensor is blocked, and whether it is in an inverted posture. If it is determined that the electronic device is not in a bright screen state, the distance sensor is not blocked, or is not in an inverted posture, the electronic device cancels shielding of the touch event, and then returns to step 701 described above.
  • the method may include:
  • the electronic device determines whether it is in a bright screen state.
  • step 707 If it is in the bright screen state, the electronic device executes step 707; if it is not in the bright screen state, the electronic device executes step 708.
  • the electronic device determines whether the distance sensor is blocked.
  • step 709 If the distance sensor is blocked, the electronic device executes step 709, and if the distance sensor is not blocked, the electronic device executes step 708.
  • step 708 the electronic device may continue to perform the above step 701 after the next inspection period arrives.
  • the electronic device determines whether it is an inverted posture.
  • step 705 the electronic device continues to perform step 705 to keep the touch event masked, and continues to perform step 706 after the next detection period arrives; if it is not the inverted gesture, the electronic device executes step 708 to cancel the masked touch event.
  • the electronic device may also first determine whether it is an inverted posture, then determine whether the distance sensor is blocked, and then determine whether it is a bright screen state.
  • the method may include:
  • the electronic device determines whether it is an inverted posture.
  • step 902 If it is the inverted posture, the electronic device executes step 902; if it is not the inverted posture, the electronic device executes step 903.
  • the electronic device determines whether the distance sensor is blocked.
  • step 903 is performed; if blocked, step 904 is performed.
  • the electronic device determines whether it is in a bright screen state.
  • step 905 is performed; if it is not in a bright screen state, step 903 is performed.
  • the electronic device shields the touch event.
  • the electronic device is determined to be bright. After the screen state, it is necessary to continue to determine whether the distance sensor is blocked and whether it is in an inverted posture. However, it is rare that the electronic device is in an inverted posture (for example, the electronic device is put into a pocket, or the user walks normally with the electronic device in hand). Generally, after it is determined in step 901 that the distance sensor is not blocked, it will not continue to determine whether it is an inverted posture and a bright screen state in the current cycle. Therefore, compared with the method shown in FIG. 7 or FIG. 8, the method shown in FIG. 9 can save power consumption of the electronic device.
  • the electronic device may also first determine whether it is an inverted posture, then determine whether it is a bright screen state, and then determine whether the distance sensor is blocked, which will not be described here.
  • the electronic device may first determine whether the distance sensor is blocked, then determine whether it is an inverted posture, and then determine whether it is a bright screen state.
  • the method may include:
  • the electronic device determines whether the distance sensor is blocked.
  • step 1002 If the distance sensor is blocked, the electronic device executes step 1002, and if the distance sensor is not blocked, the electronic device executes step 1003.
  • the electronic device determines whether it is in an inverted posture.
  • step 1003 is performed; if it is the inverted posture, step 1004 is performed.
  • the electronic device determines whether it is in a bright screen state.
  • step 1005 If it is in the bright screen state, go to step 1005; if it is not in the bright screen state, go to step 1003.
  • the electronic device shields the touch event.
  • the distance sensor of the electronic device is rarely blocked (for example, the electronic device is put in a pocket or the distance sensor is blocked by the face when making a call), so the electronic device usually determines that the distance sensor is not blocked in step 1001. So that it will not continue to determine whether it is an inverted posture and a bright screen state in the current detection cycle. Therefore, compared with the method shown in FIG. 7 or FIG. 8, the method shown in steps 1001-1005 can save power consumption of the electronic device.
  • the electronic device may also first determine whether the distance sensor is blocked, then determine whether it is a bright screen state, and then determine whether it is an inverted posture, which will not be described here.
  • the electronic device when the electronic device is in the off state, the electronic device may turn off the distance sensor and the attitude sensor for detecting whether the electronic device is in an inverted posture; in the bright state, the electronic device may turn on the distance sensor and the attitude.
  • the sensor is used to determine whether the distance sensor is blocked and whether the electronic device is in an inverted posture, so that a method similar to that shown in any one of FIGS. 7-10 is performed periodically.
  • the electronic device can also turn the distance sensor and attitude sensor on or off during the execution of the method. In this way, the distance sensor and attitude sensor are not always on, which can save power consumption of the electronic device.
  • the electronic device executes the method shown in FIG. 7 as an example.
  • the electronic device does not periodically determine whether the three conditions are a bright screen state, whether the distance sensor is blocked, and whether it is an inverted posture, but determines whether to meet the three conditions after receiving an interruption event.
  • the interrupt event may include a first interrupt event, a second interrupt event, or a third interrupt event corresponding to the three conditions, respectively.
  • the first interrupt event is used to report a change in the bright state of the touch screen; the second interrupt event is used to report whether the distance sensor is blocked; the third interrupt event is used to report a change in the posture of the electronic device.
  • the first interruption event may be an interruption event of the touchscreen power-on or touchscreen power-down reported by the power management module of the touchscreen. If the touchscreen is powered on, the electronic device switches to the bright screen state. When the control screen is powered off, the electronic device switches to the off state.
  • the second interruption event may be an interruption event reported when the distance sensor is switched from unblocked to blocked; according to the second interruption event, the electronic device may determine that the distance sensor is blocked.
  • the second interruption event may be an interruption event reported when the distance sensor is changed from occluded to unblocked; according to the second interruption event, the electronic device may determine that the distance sensor is not blocked.
  • the third interruption event may be an interruption event reported when the posture sensor detects that the electronic device changes from an inverted posture to a non-inverted posture; according to the third interruption event, the electronic device may determine the non-inverted posture.
  • the third interruption event may be an interruption event reported when the posture sensor detects that the electronic device changes from a non-inverted posture to an inverted posture; according to the third interruption event, the electronic device may determine the inverted posture.
  • the distance sensor and the attitude sensor remain on, and the electronic device determines whether the three conditions in the shielding condition are satisfied at the same time after detecting any of the first interruption event, the second interruption event, or the third interruption event. Conditions to determine whether to block touch events.
  • the first interrupt event includes an interrupt event 1 or an interrupt event 2.
  • Interrupt event 1 is used to report that the touch screen is switched from the off-screen state to the bright screen state, such as an interrupt event when the touch screen is powered on.
  • the electronic device may determine that the screen is currently in the bright state according to the interrupt event 1.
  • Interrupt event 2 is used to report that the touch screen is switched from the bright screen state to the off screen state, such as an interrupt event when the touch screen is powered off.
  • the electronic device may determine that the screen is currently off according to the interrupt event 2.
  • the second interrupt event includes an interrupt event 3 or an interrupt event 4.
  • Interrupt event 3 is used to report that the distance sensor is switched from unblocked to blocked. The electronic device may determine that the distance sensor is blocked according to the interrupt event 3.
  • Interrupt event 4 is used to report that the distance sensor is switched from blocked to unblocked.
  • the electronic device may determine that the distance sensor is not blocked according to the interrupt event 4.
  • the third interrupt event includes an interrupt event 5 or an interrupt event 6.
  • the interruption event 5 is used to report that the electronic device is switched from a non-inverted posture to an inverted posture.
  • the electronic device may determine that the current posture is the inverted posture according to the interruption event 5.
  • Interrupt event 6 is used to report that the electronic device is switched from an inverted posture to a non-inverted posture.
  • the electronic device may determine that it is currently in a non-inverted state according to the interrupt event 6. After receiving any interrupt event from interrupt event 1 to interrupt event 6, the electronic device determines whether the above three conditions of the mask condition are satisfied at the same time, thereby determining whether to shield the touch event.
  • the electronic device may determine whether to satisfy the above three conditions of the mask condition at the same time, thereby determining whether to shield the touch event.
  • the first identifier, the second identifier, and the third identifier may be stored on the electronic device.
  • the first identifier is used to identify whether the electronic device is currently in a bright screen state, and the electronic device may update the first identifier according to the received first interruption event, so that the first identifier can identify in real time whether the electronic device is currently in a bright or off screen state.
  • the electronic device detects an interruption event 1
  • the first identifier is set to the first state to indicate a bright screen state
  • the first identifier is set to a second state to be expressed as Off screen.
  • the second identifier is used to identify whether the distance sensor is blocked, and the electronic device may update the first identifier according to the detected second interruption event, so that the first identifier can identify whether the distance sensor is currently blocked or not in real time. For example, if the electronic device detects an interruption event 3, it sets the second identifier to the first state to indicate that the distance sensor is blocked; if the electronic device detects the interruption event 4, it sets the second flag to the second state to indicate the distance The sensor is not blocked.
  • the third identifier is used to identify whether the electronic device is in an inverted posture, and the electronic device may update the third identifier according to the detected third interruption event, so that the third identifier can identify the electronic device in an inverted posture or a non-inverted posture in real time. For example, if the electronic device detects an interruption event 5, it sets the third flag to the first state to indicate the inverted posture; if the electronic device detects the interruption event 6, it sets the third flag to the second state to indicate the non- Handstand posture.
  • the first identifier, the second identifier, and the third identifier are in a preset state.
  • the first identifier preset state is a first state used to indicate a bright screen state
  • the second identifier preset state is a second state used to indicate that the distance sensor is not blocked
  • the third identifier preset state This is the second state for representing a non-inverted posture.
  • the electronic device after the electronic device is powered on, the electronic device initializes the first identifier, the second identifier, and the third identifier. Specifically, after being turned on, the electronic device can detect whether the screen is currently bright and initialize the first identifier according to the detection result; the electronic device can detect whether the distance sensor is blocked and initialize the second identifier according to the detection result; the electronic device can also Detect whether it is an inverted posture, and initialize a third identifier according to the detection result.
  • the electronic device may determine whether the screen is in a bright state according to the first interruption event, and determine whether the distance sensor is blocked and whether the electronic device is in an inverted posture. This determines whether touch events are blocked. Specifically, if the electronic device determines that it is a bright screen state according to the first interruption event, the first identifier is updated so that the first identifier indicates the bright screen state; and then, the electronic device reads the saved second identifier and the third identifier so as to The second identification determines whether the distance sensor is blocked, and determines whether the electronic device is in an inverted posture according to the third identification.
  • the electronic device may determine whether it is a bright screen state in step 701 according to the first interruption event, and then perform steps 702-705 to determine whether the distance sensor is blocked, and then determine whether it is an inverted posture, thereby Determines whether to block touch events.
  • the electronic device may determine whether the screen is bright in step 701 or step 706 according to the first interruption event, and then perform other steps to determine whether the distance sensor is blocked, and then determine whether it is an inverted posture. To determine whether to block or unblock touch events.
  • the electronic device may determine whether the distance sensor is blocked according to the second interruption event, and determine whether it is a bright screen state and whether the electronic device is in an inverted posture. To determine whether to block touch events. Specifically, if the electronic device determines that the distance sensor is blocked according to the second interruption event, the electronic device may update the second identifier so that the second identifier indicates that the distance sensor is blocked. Then, the electronic device reads the saved first identifier and the third identifier to determine whether it is a bright screen state according to the first identifier, and determines whether the electronic device is in an inverted posture according to the third identifier.
  • the electronic device may determine whether the distance sensor is blocked in step 901 according to the second interruption event, and then perform steps 902-905 to determine whether it is an inverted posture and then determine whether it is a bright screen state, thereby Determines whether to block touch events. It can be understood that after the electronic device determines whether the distance sensor is blocked according to the second interruption event, it can also first determine whether it is a bright screen state, and then determine whether it is an inverted posture.
  • the electronic device may determine whether it is an inverted posture according to the third interruption event, update the third identifier, and determine whether it is a bright screen according to the first identifier and the second identifier. The state and whether the distance sensor is blocked, so as to determine whether the touch event is blocked, will not be repeated here.
  • FIGS. 7-10 can be executed when any one of the interrupt events 1 to 6 is received, or when any of the interrupt events 1, 3, and 5 is received.
  • the electronic device when the electronic device receives the first interruption event and the electronic device determines that the screen is in a bright state according to the first interruption event, the electronic device may turn on the distance sensor and the attitude sensor, and then determine whether the distance sensor is cycled. Obstruction and whether the electronic device is in an inverted posture. If the distance sensor is blocked and is in an inverted posture, the electronic device shields the touch event; if the distance sensor is not blocked or is not in an inverted posture, the electronic device works normally or cancels the touch event.
  • the electronic device When the electronic device receives another first interrupt event, and the electronic device determines that it is not a bright screen state according to the first interrupt event, whether the electronic device ends the cycle distance sensor is blocked and whether the electronic device is in an inverted posture, the electronic device works normally, And the electronic device turns off the distance sensor and the attitude sensor to save power consumption of the electronic device.
  • the electronic device may determine whether the distance sensor is blocked according to the second interruption event, and then Then determine whether it is an inverted posture; if the electronic device receives a third interruption event, the electronic device determines whether it is an inverted posture according to the third interruption event, and then determines whether the distance sensor is blocked. Understandably, in the process of the electronic device cyclically determining whether the distance sensor is blocked and whether the electronic device is in an inverted posture, it may be determined whether the distance sensor is blocked and an inverted state according to the trigger of the second interruption event or the third interruption event.
  • the interrupt event 3 when the interrupt event 3 is received, it is determined that the distance sensor is blocked, and the third flag is read to determine whether the terminal is in an inverted state; or when the interrupt event 5 is received, it is determined that the interrupt is an inverted state, and the second flag is read to determine the distance. Whether the sensor is blocked.
  • the first interrupt event includes interrupt event 1 or interrupt event 2
  • the second interrupt event includes interrupt event 3 or interrupt event 4
  • the third interrupt event includes interrupt event 5 or interrupt event 6.
  • the first interrupt event is interrupt event 1
  • the second interrupt event is interrupt event 3
  • the third interrupt event is interrupt event 5.
  • the electronic device stores the first identifier, the second identifier, and the third identifier.
  • step 1102 is performed to enable the distance sensor and the attitude sensor.
  • the electronic device updates the first identifier according to the first interruption event.
  • the electronic device executes steps 1103-1108 cyclically until the electronic device receives another first interruption event (in step 1109), and determines that the electronic device is off-screen according to the first interruption event, then the electronic device performs step 1110 , Turn off the distance sensor and attitude sensor, and the electronic device works normally.
  • the electronic device may execute the processes shown in steps 1103-1106. And, the electronic device determines whether to update the second identifier according to the second interruption event and the saved second identifier. Specifically, if it is determined in step 1103 that the distance sensor is not blocked, the electronic device executes step 1105 to maintain normal operation; if it is determined in step 1103 that the distance sensor is blocked, the electronic device executes step 1104 to determine whether it is an inverted posture. In step 1104, the electronic device may read the saved third identifier, and determine whether the electronic device is in an inverted posture according to the third identifier.
  • step 1104 If it is determined in step 1104 that it is not an inverted posture, the electronic device executes step 1105 to maintain normal work; if it is determined in step 1104 that it is an inverted posture, the electronic device performs step 1106 to shield the touch event.
  • step 1102 if the electronic device receives the third interruption event, the processes shown in step 1107, step 1108, step 1105, and step 1106 may be performed, and details are not described herein.
  • the method may further include: if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is converted from an inverted posture to a non-inverted posture. And the duration of the non-inverted posture of the electronic device is less than or equal to the first preset value, the electronic device remains shielded from the touch event; if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is converted from the inverted posture Is a non-inverted posture, and the duration of the non-inverted posture of the electronic device is greater than the first preset value, the electronic device cancels shielding of the touch event.
  • the first preset value is relatively small, and may be specifically set according to actual needs, for example, it may be 2s.
  • the electronic device may start a timer to perform the duration of the non-inverted posture. Timing, thereby determining the magnitude relationship between the duration of the non-inverted posture and the first preset value, and then determining whether to keep the masking event or unmasking the touch event.
  • the electronic device shields the touch event, if the electronic device is in a bright screen state and the distance sensor is blocked, if the electronic device has an inverted posture temporarily switched to a non-inverted posture, and then quickly returns to the inverted posture, Then, the electronic device does not cancel the touch event when the electronic device is temporarily switched to the non-inverted posture, so that the touch event can be prevented from being frequently blocked and unscreened, and the power consumption of the mobile phone can be saved.
  • the mobile phone is in the wristband of the user's arm, during the user's walking or running, the posture of the mobile phone in the wristband changes in real time as the arm is shaken.
  • the mobile phone is usually in an inverted posture, and it is in a non-inverted state only for a moment, that is, the mobile phone only switches for a short period of time after switching from the inverted posture to the non-inverted posture. Value) and then return to the inverted posture.
  • the electronic device can shield the touch event; when the mobile phone is in the bright screen state, the distance of the mobile phone.
  • the sensor is blocked and the phone is temporarily in an inverted posture (that is, the duration of the phone's non-inverted posture is less than the first preset value)
  • the mobile phone can remain shielded from touch events, thereby avoiding movement processes such as walking or running. Frequently block and unblock touch events in the mobile phone to reduce the power consumption of the phone.
  • the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is converted from an inverted posture to a non-inverted posture, the electronic device is based on the duration of the non-inverted posture
  • the scheme for determining whether to keep or unblock the touch event can be applied not only to the embodiment corresponding to FIG. 7 but also to other embodiments, for example, the embodiment corresponding to any one of FIGS. 8 to 11, which will not be repeated here. .
  • the above step 704 may be replaced by: the electronic device determines whether the time during which the electronic device is in an inverted posture is greater than the second preset value within a third preset time period before the current time. If yes, go to step 705; if no, go to step 703.
  • the above step 704 may be replaced by: the electronic device determines that, within a third preset time period before the current time, the time during which the electronic device is in the non-inverted posture is less than or equal to the third preset value. If yes, go to step 705; if no, go to step 703.
  • the second preset value may be larger, the third preset value may be smaller, and the third preset value is smaller than the second preset value.
  • the electronic device shields the touch event or keeps blocking the touch event.
  • the electronic device can store in real time whether the posture of the electronic device is an inverted posture or a non-inverted posture through the memory. After the electronic device receives the interruption event of the posture sensor, the electronic device can query the memory before the current time. The posture of the electronic device within the three preset time periods, so as to count the length of time when the electronic device is in the inverted posture or the time period when the electronic device is in the non-inverted posture during the third preset time period, and further determine the length of the electronic device in the inverted posture and the second preset Value relationship, or determining the relationship between the length of time when the electronic device is in a non-inverted posture and the third preset value, so as to further determine whether to keep blocking or unblocking the touch event.
  • the third preset duration may be 30s
  • the second preset value may be 25s
  • the third preset value may be 5s.
  • the electronic device after the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is temporarily switched to an inverted state; but within a third preset time period before the current time If the duration of the electronic device in the inverted posture is greater than the second preset value, or the duration of the electronic device in the non-inverted posture is less than the third preset value, that is, most of the time within the third preset duration of the electronic device before the current time Inside is an inverted posture, the electronic device can keep the touch event blocked without canceling the touch event immediately, thus avoiding the frequent blocking and unblocking of the touch event, and reducing the power consumption of the mobile phone.
  • the mobile phone is in the pocket of the user.
  • the mobile phone shakes in the pocket, and the posture of the mobile phone is dynamically changed, but most of the time the mobile phone is still in an inverted posture.
  • the mobile phone is in a bright screen state, the distance sensor of the mobile phone is blocked, and the mobile phone is in an inverted posture most of the time within the third preset time period before the current moment, the mobile phone blocks the touch event or keeps the touch event blocked.
  • the mobile phone during the time period t1, the mobile phone is in an inverted posture, and the touch event is shielded; during the time period t2, the electronic device is in a non-inverted posture, and during the time period t2, the mobile phone is in accordance with Time is an inverted gesture, so the phone will continue to block touch events at the current moment without unblocking touch events. In this way, it is possible to avoid frequent blocking and unblocking of touch events while the user is going up the stairs, and save power consumption of the mobile phone.
  • the above step 300 may specifically include: when the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical screen display state, the electronic device shields the touch. event.
  • the specific processing procedure is similar to the method flow shown in FIG. 7 to FIG. 11, except that in this embodiment, the “shielding condition” includes an “electronic device in a vertical screen display state” on the basis of the above three conditions. A condition. Similar to the method flow shown in FIGS. 7-10, the electronic device can periodically detect whether the electronic device meets the bright screen state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical screen display state.
  • the electronic device may also determine whether to meet the four conditions after receiving an interrupt event corresponding to any one of the four conditions, thereby determining whether to shield the touch event, which is not described herein.
  • the horizontal screen display is usually displayed in a full screen state.
  • a schematic view of the horizontal screen display can be referred to FIG. 13; the vertical screen display can be a full screen state or a non-full screen state, and a schematic view of the vertical screen display can be referred to FIG. 14.
  • the electronic device if the electronic device is in the bright screen state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in the vertical screen display state, the electronic device shields the touch event; if the electronic device is in the bright screen state, In the state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a horizontal screen display state, the electronic device does not shield the touch event, and the electronic device works normally.
  • the user's hand may cover the distance sensor, the electronic device is in a bright screen state, and the electronic device is in an inverted posture.
  • the electronic device is not in a vertical screen display state but a horizontal screen display state. Therefore, the electronic device does not block the touch event, but keeps working normally, so that the user can play games or watch videos normally.
  • the electronic device includes hardware and / or software modules corresponding to performing each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is performed by hardware or computer software-driven hardware depends on the specific application of the technical solution and design constraints. 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 be beyond the scope of the present application.
  • the electronic device may be divided into functional modules according to the foregoing method example.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules may be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 16 shows a possible composition diagram of the electronic device 1600 involved in the foregoing embodiment.
  • the electronic device 1600 may include a shielding unit 1601, a determination unit 1602, and a processing unit 1603.
  • the shielding unit 1601 may be used to support the electronic device 1600 to perform the above steps 300, 705, 905, 1005, 1106, etc., and / or other processes for the techniques described herein.
  • the determination unit 1602 may be used to support the electronic device 1600 to perform the above steps 701, 702, 704, 706, 707, 709, 901, 902, 902, 904, 1001, 1002, 1004, and 1101. , Step 1103, step 1104, step 1107, step 1108, step 1109, etc., and / or other processes for the techniques described herein.
  • the processing unit 1603 may be used to support the electronic device 1600 to perform the above steps 703, 708, 903, 1003, 1102, 1105, 1110, etc., and / or other processes for the technology described herein.
  • the electronic device 1600 provided in this embodiment is configured to perform the foregoing method for shielding a touch event, and therefore can achieve the same effect as the foregoing implementation method.
  • the electronic device 1600 may 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 1600.
  • the processing module may be used to support the electronic device 1600 to perform the steps performed by the shielding unit 1601, the determining unit 1602, and the processing unit 1603.
  • the storage module may be used to support the electronic device 1600 to store the first identification, the second identification, the third identification, and the like, as well as to store program code and data.
  • the communication module can be used to support communication between the electronic device 1600 and other devices.
  • the processing module may be a processor or a controller. It may implement or execute various exemplary logical blocks, modules, and circuits described in connection with the present disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination including one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on.
  • the memory module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the electronic device involved in this embodiment may be an electronic device having a structure shown in FIG. 1 and FIG. 2.
  • An embodiment of the present application further provides a computer storage medium.
  • the computer storage medium stores computer instructions.
  • the computer instructions When the computer instructions are run on the electronic device, the electronic device is caused to execute the foregoing related method steps to implement the touch shielding in the foregoing embodiment. Event method.
  • An embodiment of the present application further provides a computer program product, when the computer program product is run on a computer, the computer is caused to execute the foregoing related steps, so as to implement the method for shielding a touch event performed by the electronic device in the foregoing embodiment.
  • an embodiment of the present application further provides a device.
  • the device may specifically be a chip, a component, or a module.
  • the device may include a connected processor and a memory.
  • the memory is used to store a computer to execute instructions.
  • the processor may execute computer execution instructions stored in the memory, so that the chip executes the method for shielding a touch event performed by the electronic device in the foregoing method embodiments.
  • the electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the corresponding ones provided above. The beneficial effects in the method are not repeated here.
  • the term “when” can be interpreted to mean “if " or “after” or “in response to determining " or “in response to detecting ".
  • the phrases “when determined " or “if detected (the stated condition or event)” can be interpreted to mean “if determined " or “response to a determination " or “on detection (Statement or event stated) “or” in response to detection (statement or event stated) ".
  • the disclosed apparatus and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of modules or units is only a logical function division.
  • multiple units or components may be combined or It can be integrated into another device, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit can be stored in a readable storage medium if it is implemented as a software functional unit and sold or used as an independent product.
  • the technical solution of the embodiments of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution may be embodied in the form of a software product that is stored in a storage medium.
  • the instructions include a number of instructions for causing a device (which can be a single-chip microcomputer, a chip, or the like) or a processor to execute all or part of the steps of the methods in the embodiments of the present application.
  • the foregoing storage medium includes: a U disk, 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.

Abstract

Provided are a method for shielding a touch event, and an electronic device, which relate to the technical field of electronics, and can reduce the occurrence of mis-touch. The specific solution is: if it is determined that an electronic device is in a screen-on state, a distance sensor of the electronic device is blocked, and the electronic device is in an upside-down position, then the electronic device shielding a touch event. The embodiments of the present application are used for reducing mis-touch.

Description

一种屏蔽触摸事件的方法及电子设备Method and electronic equipment for shielding touch event 技术领域Technical field
本申请实施例涉及电子技术领域,尤其涉及一种屏蔽触摸事件的方法及电子设备。The embodiments of the present application relate to the field of electronic technology, and in particular, to a method for shielding a touch event and an electronic device.
背景技术Background technique
为了提供更好的显示效果并方便用户操作,手机等移动电子设备的触控屏的屏占比越来越大,用于接收用户的触摸操作的面积也越来越大。In order to provide better display effects and facilitate user operations, the touch screen ratio of mobile electronic devices such as mobile phones is becoming larger and larger, and the area for receiving user touch operations is also increasing.
越来越大的触控屏使得用户很容易在不经意间产生误触。例如,当用户将手机放入口袋中时,手机触控屏由于在口袋中接触到衣物或其他物体而容易产生误触。Increasingly large touch screens make it easy for users to accidentally make accidental touches. For example, when a user puts a mobile phone in a pocket, the touch screen of the mobile phone is prone to false touch due to contact with clothing or other objects in the pocket.
发明内容Summary of the Invention
本申请实施例提供一种屏蔽触摸事件的方法及电子设备,能够减少误触的发生。The embodiments of the present application provide a method and an electronic device for shielding a touch event, which can reduce the occurrence of false touches.
为达到上述目的,本申请技术方案采用如下技术方案:In order to achieve the above purpose, the technical solution of this application uses the following technical solutions:
第一方面,本申请技术方案提供了一种屏蔽触摸事件的方法,包括:若电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态,则电子设备屏蔽触摸事件。In a first aspect, the technical solution of the present application provides a method for shielding a touch event, including: if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event .
当电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,且电子设备为倒立姿态这三个条件时,可以表明电子设备当前处于口袋中,因而可以屏蔽触摸事件,从而减少误触的发生。When the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the three conditions can indicate that the electronic device is currently in the pocket, and thus can shield the touch event, thereby reducing the occurrence of false touch .
在一种可能的实现中,若电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态,则电子设备屏蔽触摸事件,包括:电子设备周期性的确定电子设备是否处于亮屏状态,电子设备的距离传感器是否被遮挡,以及电子设备是否为倒立姿态。In a possible implementation, if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event, including: the electronic device periodically determines whether the electronic device is In the bright screen state, whether the distance sensor of the electronic device is blocked, and whether the electronic device is in an inverted posture.
也就是说,电子设备可以周期性地判断是否满足以上这三个条件,从而来确定电子设备是否在口袋中。That is, the electronic device can periodically determine whether the above three conditions are met, so as to determine whether the electronic device is in a pocket.
在另一种可能的实现中,若电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态,则电子设备屏蔽触摸事件,包括:电子设备在接收到第一中断事件、第二中断事件或第三中断事件后,确定电子设备是否处于亮屏状态,电子设备的距离传感器是否被遮挡,以及电子设备是否为倒立姿态。若电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态,则电子设备屏蔽触摸事件。其中,第一中断事件用于上报触控屏由熄屏状态切换为亮屏状态;第二中断事件用于上报距离传感器由未被遮挡切换为被遮挡;第三中断事件用于上报电子设备由非倒立姿态切换为倒立姿态。In another possible implementation, if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event, including: the electronic device receives the first interrupt After the event, the second interruption event, or the third interruption event, it is determined whether the electronic device is in a bright screen state, whether the distance sensor of the electronic device is blocked, and whether the electronic device is in an inverted posture. If the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event. The first interrupt event is used to report that the touch screen is switched from the off-screen state to the bright screen state; the second interrupt event is used to report that the distance sensor is switched from unblocked to blocked; the third interrupt event is used to report the electronic device. The non-inverted posture is switched to the inverted posture.
在该方案中,电子设备可以在接收到第一中断事件至第三中断事件中的任意一个中断事件后,确定是否满足上述三个条件。In this solution, after receiving any one of the first interrupt event to the third interrupt event, the electronic device may determine whether the above three conditions are satisfied.
在一种可能的实现中,第一中断事件用于上报触控屏由熄屏状态切换为亮屏状态(该第一中断事件可以称为中断事件1),或者第一中断事件用于上报触控屏由亮屏状态切换为熄屏状态(该第一中断事件可以称为中断事件2)。第二中断事件用于上 报距离传感器由未被遮挡切换为被遮挡(该第一中断事件可以称为中断事件3),或者第二中断事件用于上报距离传感器由被遮挡切换为未被遮挡(该第一中断事件可以称为中断事件4)。第三中断事件用于上报电子设备由非倒立姿态切换为倒立姿态(该第一中断事件可以称为中断事件5),或者第三中断事件用于上报电子设备由倒立姿态切换为非倒立姿态(该第一中断事件可以称为中断事件6)。In a possible implementation, the first interrupt event is used to report that the touch screen is switched from the off-screen state to the bright state (the first interrupt event may be referred to as interrupt event 1), or the first interrupt event is used to report a touch The screen control is switched from a bright screen state to an off screen state (the first interruption event may be referred to as an interruption event 2). The second interrupt event is used to report that the distance sensor is switched from unblocked to blocked (the first interrupt event may be referred to as interrupt event 3), or the second interrupt event is used to report that the distance sensor is switched from blocked to unblocked ( This first interrupt event may be referred to as interrupt event 4). The third interrupt event is used to report that the electronic device is switched from a non-inverted posture to an inverted posture (the first interrupt event may be referred to as an interrupt event 5), or the third interrupt event is used to report that the electronic device is switched from an inverted posture to a non-inverted posture ( This first interrupt event may be referred to as interrupt event 6).
也就是说,电子设备可以在接收到中断事件1至中断事件6中的任意一个中断事件后,确定是否满足上述三个条件。That is, the electronic device may determine whether the above three conditions are satisfied after receiving any one of the interrupt events 1 to 6.
在另一种可能的实现中,电子设备在接收到第一中断事件、第二中断事件或第三中断事件后,确定电子设备是否处于亮屏状态,电子设备的距离传感器是否被遮挡,以及电子设备是否为倒立姿态,包括:电子设备在接收到第一中断事件后,确定电子设备处于亮屏状态;电子设备开启距离传感器和姿态传感器,姿态传感器用于检测电子设备的姿态;电子设备确定距离传感器是否被遮挡,以及电子设备是否为倒立姿态。In another possible implementation, after receiving the first interrupt event, the second interrupt event, or the third interrupt event, the electronic device determines whether the electronic device is in a bright screen state, whether the distance sensor of the electronic device is blocked, and the electronic device Whether the device is in an inverted posture includes: the electronic device determines that the electronic device is in a bright screen state after receiving the first interruption event; the electronic device turns on a distance sensor and a posture sensor, and the posture sensor is used to detect the electronic device's posture; the electronic device determines the distance Whether the sensor is obstructed, and whether the electronic device is in an inverted posture.
在该方案中,电子设备可以在熄屏状态下关闭距离传感器和姿态传感器,在亮屏状态下再开启距离传感器和姿态传感器,因而可以节省电子设备的功耗。In this solution, the electronic device can turn off the distance sensor and the attitude sensor when the screen is off, and turn on the distance sensor and the attitude sensor when the screen is bright, so that the power consumption of the electronic device can be saved.
在另一种可能的实现中,在电子设备开启距离传感器和姿态传感器后,方法还包括:若电子设备接收到另一第一中断事件,且电子设备根据另一第一中断事件确定为熄屏状态,则电子设备关闭距离传感器和姿态传感器。In another possible implementation, after the electronic device turns on the distance sensor and the attitude sensor, the method further includes: if the electronic device receives another first interrupt event, and the electronic device determines that the screen is turned off according to the other first interrupt event State, the electronic device turns off the distance sensor and the attitude sensor.
也就是说,在电子设备由亮屏状态切换为熄屏状态之前,电子设备满足为亮屏状态这一条件,电子设备可以通过距离传感器和姿态传感器循环确定是否满足其他两个条件,从而循环确定是屏蔽触摸事件还是正常工作。That is to say, before the electronic device switches from the bright screen state to the off screen state, the electronic device meets the condition of the bright screen state. The electronic device can determine whether the other two conditions are satisfied through the distance sensor and the attitude sensor, and then determine the cycle. Whether to block touch events or work properly.
在另一种可能的实现中,在电子设备屏蔽触摸事件之后,该方法还包括:若电子设备处于亮屏状态,距离传感器被遮挡,电子设备由倒立姿态转换为非倒立姿态,且电子设备为非倒立姿态的持续时间小于或者等于第一预设值,则电子设备保持屏蔽触摸事件。In another possible implementation, after the electronic device shields the touch event, the method further includes: if the electronic device is in a bright screen state, the distance sensor is blocked, the electronic device is converted from an inverted posture to a non-inverted posture, and the electronic device is If the duration of the non-inverted gesture is less than or equal to the first preset value, the electronic device remains shielded from the touch event.
这样,在电子设备屏蔽触摸事件之后,在电子设备处于亮屏状态且距离传感器被遮挡的情况下,若电子设备有倒立姿态暂时切换到了非倒立姿态,而后又很快回到了倒立姿态,那么电子设备不会在电子设备暂时切换到非倒立姿态时取消屏蔽触摸事件,从而可以避免频繁地屏蔽和取消屏蔽触摸事件,节省手机的功耗。In this way, after the electronic device shields the touch event, if the electronic device is in a bright screen state and the distance sensor is blocked, if the electronic device has an inverted posture temporarily switched to a non-inverted posture, and then quickly returns to the inverted posture, then the electronic The device does not unblock the touch event when the electronic device is temporarily switched to a non-inverted posture, thereby avoiding frequently blocking and unblocking the touch event, and saving power consumption of the mobile phone.
在另一种可能的实现中,电子设备确定是否为倒立姿态包括:在当前时刻之前的预设时长内,若电子设备为倒立姿态的时长大于第二预设值,则电子设备确定为倒立姿态;或者,在当前时刻之前的预设时长内,若电子设备为非倒立姿态的时长小于或者等于第三预设值,则电子设备确定为倒立姿态。In another possible implementation, determining whether the electronic device is in an inverted posture includes: within a preset time period before the current time, if the electronic device is in an inverted posture for a length greater than a second preset value, the electronic device determines the inverted posture Or, within a preset time period before the current time, if the time length of the electronic device in the non-inverted posture is less than or equal to a third preset value, the electronic device determines the inverted posture.
这样,在电子设备屏蔽触摸事件之后,若电子设备处于亮屏状态,电子设备的距离传感器被遮挡,电子设备暂时性地切换为倒立状态;但在当前时刻之前的预设时长内,若电子设备为倒立姿态的时长大于第二预设值,或者电子设备为非倒立姿态的时长小于第三预设值,即电子设备在当前时刻之前的第三预设时长内的大多数时间内为倒立姿态,则电子设备可以保持屏蔽触摸事件,而不会立即取消触摸屏蔽事件,因而可以避免频繁地屏蔽和取消屏蔽触摸事件,降低手机的功耗。In this way, after the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is temporarily switched to an inverted state; but within a preset time period before the current time, if the electronic device The duration of the inverted posture is greater than the second preset value, or the duration of the non-inverted posture of the electronic device is less than the third preset value, that is, the electronic device is the inverted posture most of the time within the third preset duration before the current time. , The electronic device can keep blocking the touch event without canceling the touch blocking event immediately, thus avoiding frequently blocking and unblocking the touch event, and reducing the power consumption of the mobile phone.
在另一种可能的实现中,若电子设备确定处于亮屏状态,电子设备的距离传感器 被遮挡,以及电子设备为倒立姿态,则电子设备屏蔽触摸事件,包括:若电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,电子设备为倒立姿态,以及电子设备为竖屏显示状态,则电子设备屏蔽触摸事件。In another possible implementation, if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event, including: if the electronic device is determined to be in a bright screen state If the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical display state, the electronic device shields the touch event.
这样,在一些场景下,比如在用户侧躺着用手机横屏打游戏或横屏看视频的场景下,用户的手可能会遮挡到距离传感器,电子设备处于亮屏状态,且电子设备为倒立姿态,但电子设备不是竖屏显示状态而是横屏显示状态,因而电子设备不会屏蔽触摸事件,而是保持正常工作,以使得用户能够正常打游戏或看视频。In this way, in some scenarios, such as when the user is lying on the side with a mobile phone playing games horizontally or watching videos in a horizontal screen, the user's hand may cover the distance sensor, the electronic device is in a bright state, and the electronic device is in an inverted posture However, the electronic device is not in a vertical screen display state but a horizontal screen display state, so the electronic device does not block the touch event, but keeps working normally, so that the user can play games or watch videos normally.
第二方面,本申请技术方案提供了一种屏蔽触摸事件的装置,该装置包含在电子设备中,该装置具有实现上述第一方面及第一方面的可能实现方式中任一方法中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,输入模块或单元、显示模块或单元、处理模块或单元等。In a second aspect, the technical solution of the present application provides a device for shielding a touch event. The device is included in an electronic device, and the device has the behavior of the electronic device in any one of the foregoing first aspects and possible implementations of the first aspect. Functions. The functions can be realized by hardware, and the corresponding software can also be implemented by hardware. The hardware or software includes one or more modules or units corresponding to the above functions. For example, an input module or unit, a display module or unit, a processing module or unit, and the like.
第三方面,本申请实施例提供了一种电子设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述第一方面任一项可能的实现中的屏蔽触摸事件的方法。In a third aspect, an embodiment of the present application provides an electronic device including one or more processors and one or more memories. The one or more memories are coupled to one or more processors. The one or more memories are used to store computer program code. The computer program code includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the instructions. The method for shielding a touch event in any possible implementation of the foregoing first aspect.
第四方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面任一项可能的实现中的屏蔽触摸事件的方法。According to a fourth aspect, an embodiment of the present application provides a computer storage medium including computer instructions, and when the computer instructions are run on an electronic device, the electronic device is caused to perform the shielding of a touch event in any of the possible implementations of the first aspect. method.
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得电子设备执行上述第一方面任一项可能的实现中的屏蔽触摸事件的方法。In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the electronic device is caused to execute a method for shielding a touch event in any of the possible implementations of the first aspect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种电子设备的硬件结构示意图;FIG. 1 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application; FIG.
图2为本申请实施例提供的一种电子设备的软件结构示意图;2 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
图3为本申请实施例提供的一种屏蔽触摸事件的方法流程图;3 is a flowchart of a method for shielding a touch event according to an embodiment of the present application;
图4为本申请实施例提供的一种手持电子设备的示意图;4 is a schematic diagram of a handheld electronic device according to an embodiment of the present application;
图5为本申请实施例提供的另一种手持电子设备的示意图;5 is a schematic diagram of another handheld electronic device according to an embodiment of the present application;
图6为本申请实施例提供的一种倒立姿态示意图;6 is a schematic diagram of an inverted posture according to an embodiment of the present application;
图7为本申请实施例提供的另一种屏蔽触摸事件的方法流程图;7 is a flowchart of another method for shielding a touch event according to an embodiment of the present application;
图8为本申请实施例提供的另一种屏蔽触摸事件的方法流程图;8 is a flowchart of another method for shielding a touch event according to an embodiment of the present application;
图9为本申请实施例提供的另一种屏蔽触摸事件的方法流程图;9 is a flowchart of another method for shielding a touch event according to an embodiment of the present application;
图10为本申请实施例提供的另一种屏蔽触摸事件的方法流程图;10 is a flowchart of another method for shielding a touch event according to an embodiment of the present application;
图11为本申请实施例提供的另一种屏蔽触摸事件的方法流程图;11 is a flowchart of another method for shielding a touch event according to an embodiment of the present application;
图12为本申请实施例提供的一种电子设备的姿态与时间的对应关系图;FIG. 12 is a correspondence diagram between a posture and time of an electronic device according to an embodiment of the present application; FIG.
图13为本申请实施例提供的一种横屏显示示意图;13 is a schematic diagram of a horizontal screen display provided by an embodiment of the present application;
图14为本申请实施例提供的一种竖屏显示示意图;14 is a schematic diagram of a vertical screen display provided by an embodiment of the present application;
图15为本申请实施例提供的一种打游戏的场景示意图;FIG. 15 is a schematic diagram of a game playing scenario according to an embodiment of the present application; FIG.
图16为本申请实施例提供的一种电子设备的结构示意图。FIG. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式detailed description
当用户将手机等电子设备放入口袋中时,电子设备的触控屏由于在口袋中接触到衣物或其他物体而容易产生误触。本申请实施例提供的技术方案可以在确定电子设备位于口袋中时,通过屏蔽触摸事件来降低误触的发生。When a user puts an electronic device such as a mobile phone in a pocket, the touch screen of the electronic device is prone to mis-touch due to contact with clothing or other objects in the pocket. The technical solution provided in the embodiment of the present application can reduce the occurrence of false touch by shielding the touch event when it is determined that the electronic device is located in the pocket.
尤其地,当用户将手机等电子设备放入口袋时,若手机等电子设备处于亮屏状态,则手机更容易产生误触。例如,亮屏状态下的手机可能会由于衣物或口袋中的其他物体接触到触控屏上的相机、手电筒等快捷键而打开相机或手电筒应用,从而产生误触;再例如,亮屏状态下的手机可能会由于衣物或口袋中的其他物体接触到触控屏上的指纹或图案绘制区域而使得指纹或图案绘制错误,从而锁住手机;再例如,亮屏状态下的手机可能会由于衣物或口袋中的其他物体接触到触控屏的轨迹与预设轨迹(例如“C”的轨迹)相同,从而打开预设轨迹对应的应用(例如电话call应用),导致产生误触。In particular, when a user puts an electronic device such as a mobile phone in a pocket, if the electronic device such as a mobile phone is in a bright screen state, the mobile phone is more likely to have a false touch. For example, a mobile phone in the bright screen state may open the camera or flashlight application due to clothing or other objects in the pocket touching the camera, flashlight, and other shortcut keys on the touch screen, resulting in a false touch; for example, in the bright screen state Mobile phones may lock fingerprints or patterns due to clothing or other objects in the pocket touching the fingerprint or pattern drawing area on the touch screen; for example, a mobile phone with a bright screen may be affected by clothing The track of the touch screen or other objects in the pocket touching the preset track is the same as the preset track (for example, the track of “C”), so that the application corresponding to the preset track (for example, the phone call application) is opened, resulting in a false touch.
在实际生活中,用户放入口袋中的手机也常常会处于亮屏状态,从而很容易发生误触。例如,用户在将手机放入口袋之前忘记熄灭触摸屏,而将亮屏状态下的手机直接放入了口袋。再例如,用户将熄屏后的手机放入口袋,但手机在口袋中接收到来电、消息或者由于闹钟提示或者用户不小心触碰到电源键等原因导致亮屏。In real life, the mobile phone that the user puts in his pocket is often in a bright screen state, which makes it easy to accidentally touch it. For example, the user forgets to turn off the touch screen before putting the mobile phone in the pocket, and puts the mobile phone in the bright screen state directly into the pocket. For another example, the user puts the screen-lost mobile phone in his pocket, but the mobile phone receives an incoming call, a message in the pocket, or the screen brightens due to an alarm prompt or the user accidentally touches the power button.
本申请实施例提供的技术方案可以在电子设备于亮屏状态下处于口袋中时,通过屏蔽触摸事件来降低误触的发生。The technical solution provided in the embodiments of the present application can reduce the occurrence of false touches by shielding touch events when the electronic device is in a pocket in a bright screen state.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise stated, "/" represents or means, for example, A / B may represent A or B; "and / or" herein is only a description of an associated object The association relationship indicates that there can be three types of relationships, for example, A and / or B can indicate: there are three cases where A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” means two or more than two.
本申请实施例提供的屏蔽触摸事件的方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,本申请实施例对电子设备的具体类型不作任何限制。The method for shielding touch events provided in the embodiments of the present application can be applied to mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, notebook computers, and super mobiles. On an electronic device such as a personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like, the embodiment of the present application does not place any restrictions on the specific type of the electronic device.
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。For example, FIG. 1 shows a schematic structural diagram of an electronic device 100. 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 charge management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display 194, and Subscriber identification module (SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。 在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can 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 parts than shown, or some parts may be combined, or some parts may be split, or different parts may be arranged. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。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 processing unit (GPU), and an image signal processor. (image, signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural-network processing unit (NPU) Wait. Among them, different processing units may be independent devices or integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be a nerve center and a command center of the electronic device 100. The controller can generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may further include 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 used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit (inter-integrated circuit, sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver receiver / transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input / output (GPIO) interface, subscriber identity module (SIM) interface, and / Or universal serial bus (universal serial bus, USB) interface.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may be respectively coupled to a touch sensor 180K, a charger, a flash, a camera 193, and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to implement a function of receiving a call through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement the function of receiving calls through a Bluetooth headset. Both I2S interface and PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接 口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus for asynchronous communication. The bus may be a two-way communication bus. It converts the data to be transferred between serial and parallel communications. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with a Bluetooth module in the wireless communication module 160 through a UART interface to implement a Bluetooth function. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to implement a function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display 194, the camera 193, and the like. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement a shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through a DSI interface to implement a display function of the electronic device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones and play audio through headphones. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. While the charge management module 140 is charging the battery 142, the power management module 141 can also provide power to the electronic device.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charge management module 140 and the processor 110. The power management module 141 receives inputs from the battery 142 and / or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, number of battery cycles, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, and a baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed into a diversity antenna for a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波, 并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a wireless communication solution including 2G / 3G / 4G / 5G and the like applied on the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave by the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic wave, and transmit it to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic wave radiation through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 may provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites applied to the electronic device 100. Wireless communication solutions such as global navigation system, GNSS, frequency modulation (FM), near field communication (NFC), and infrared technology (infrared, IR). The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it into electromagnetic wave radiation through the antenna 2.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. Wireless communication technologies can include global mobile communication systems (GSM), general packet radio services (GPRS), code division multiple access (code division multiple access, CDMA), and broadband code division Multiple access (wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC, FM , And / or IR technology. GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation system (BDS), quasi-zenith satellite system (quasi-zenith satellite system (QZSS) and / or satellite-based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing and is connected to the display 194 and an 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.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED), Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can use 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 (active-matrix organic light-emitting diode). emitting diodes (AMOLED), flexible light-emitting diodes (FLEDs), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLEDs), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP processes the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and the light is transmitted to the light receiving element of the camera through the lens. The light signal is converted into an electrical signal, and the light receiving element of the camera passes the electrical signal to the ISP for processing, which is converted into an image visible to the naked eye. ISP can also optimize the image's noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, an ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs digital image signals to the DSP for processing. DSP converts digital image signals into image signals in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform a Fourier transform on the frequency point energy and the like.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture expert groups (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of a biological neural network, such as the transfer mode between neurons in the human brain, the NPU can quickly process input information and continuously learn by itself. The NPU can realize applications such as intelligent recognition of the electronic device 100, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend 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. For example, save music, videos and other files on an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, at least one application required by a function (such as a sound playback function, an image playback function, etc.) and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100. 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 magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C, 耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is configured to convert digital audio information into an analog audio signal and output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as the "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, it can answer the voice by holding the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound through the mouth near the microphone 170C, and input a sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, in addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 100 may further be provided with three, four, or more microphones 170C to achieve sound signal collection, noise reduction, identification of sound sources, and directional recording.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The headset interface 170D is used to connect a wired headset. The headphone interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular communication industry association (United States of America, CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. The capacitive pressure sensor may be at least two parallel plates having a conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation is performed on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity lower than the first pressure threshold is applied to the short message application icon, an instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction for creating a short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine a movement posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, the x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shake, and calculates the distance that the lens module needs to compensate according to the angle, so that the lens cancels the shake of the electronic device 100 through the backward movement to achieve image stabilization. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C, and assists in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖 皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the opened and closed state of the holster or the opened and closed state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to recognize the posture of electronic devices, and is used in applications such as switching between horizontal and vertical screens, and pedometers.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭触摸屏达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。可以理解的是,接近光传感器180G也可以作为一种距离传感器180F。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light through a light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from a nearby object. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficiently reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100. The electronic device 100 may use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the touch screen to save power. The proximity light sensor 180G can also be used in holster mode, and the pocket mode automatically unlocks and locks the screen. It can be understood that the proximity light sensor 180G can also be used as a distance sensor 180F.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. Ambient light sensor 180L can also be used to automatically adjust white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 may use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photographing, fingerprint answering an incoming call, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 performs a performance reduction of a processor located near the temperature sensor 180J so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid the abnormal shutdown of the electronic device 100 caused by the low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also referred to as a "touch screen". The touch sensor 180K is used to detect a touch operation 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. A visual output related to the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的 振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire a vibration signal of a human voice oscillating bone mass. Bone conduction sensor 180M can also contact the human pulse and receive blood pressure beating signals. In some embodiments, the bone conduction sensor 180M may also be disposed in the earphone and combined into a bone conduction earphone. The audio module 170 may analyze the voice signal based on the vibration signal of the oscillating bone mass obtained by the bone conduction sensor 180M to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 may receive a key input, and generate a key signal input related to user settings and function control of the electronic device 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 may generate a vibration alert. The motor 191 can be used for vibration alert for incoming calls, and can also be used for touch vibration feedback. For example, the touch operation applied to different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 may support one or N SIM card interfaces, and N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple SIM cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through a SIM card to implement functions such as calling and data communication. In some embodiments, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。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 with a layered architecture as an example, and exemplifies a software structure of the electronic device 100.
图2是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。FIG. 2 is a software structural block diagram of the electronic device 100 according to the embodiment of the present application. The layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, which are an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer from top to bottom. The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS and other applications.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and a programming framework for applications at the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take a screenshot, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, and more.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, and so on. The view system can be used to build applications. The display interface can consist of one or more views. For example, the display interface including the SMS notification icon may include a view that displays text and a view that displays pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide a communication function of the electronic device 100. For example, management of call status (including connection, hang up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages that can disappear automatically after a short stay without user interaction. For example, the notification manager is used to inform download completion, message reminders, etc. The notification manager can also be a notification that appears in the status bar at the top of the system 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. For example, text messages are displayed in the status bar, sounds are emitted, electronic equipment vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library contains two parts: one is the functional functions that the Java language needs to call, and the other is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。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. Virtual machines are used to perform object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules. For example: surface manager (media manager), media library (Media library), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL) and so on.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports a variety of commonly used audio and video formats for playback and recording, as well as still 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, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。The 2D graphics engine is a graphics engine for 2D graphics.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least a display driver, a camera driver, an audio driver, and a sensor driver.
下面结合响应于用户触摸相机图标的操作启动相机进行拍照的场景,示例性说明电子设备100软件以及硬件的工作流程。In the following, the workflow of the software and hardware of the electronic device 100 is exemplarily described in conjunction with a scene in which a camera is started to take a photo in response to an operation of a user touching a camera icon.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into raw input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level. The application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch and click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. The camera 193 captures a still image or a video.
以下将以具体图1所示硬件结构和图2所示软件结构的手机为电子设备100为例, 对本申请实施例提供的技术方案进行阐述。The technical solution provided in the embodiment of the present application will be described below by taking the mobile phone with the hardware structure shown in FIG. 1 and the software structure shown in FIG. 2 as the electronic device 100 as an example.
参见图3,本申请实施例提供一种屏蔽触摸事件的方法,该方法可以包括:Referring to FIG. 3, an embodiment of the present application provides a method for shielding a touch event. The method may include:
300、若电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态,则电子设备屏蔽触摸事件。300. If the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event.
也就是说,若电子设备满足屏蔽条件,则电子设备可以屏蔽触摸事件。其中,该屏蔽条件可以包括电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态。That is, if the electronic device meets the shielding condition, the electronic device can shield the touch event. The shielding condition may include that the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture.
其中,电子设备为倒立姿态是指电子设备的头部(或称顶部)朝下。如图4所示,电子设备的头部401是指电子设备的听筒(或称受话器)402所在的一侧,电子设备的底部403是指送话器(或称话筒)404所在的一侧,电子设备的头部401和底部403位于电子设备相互对立的两侧。电子设备上还包括距离传感器405,该距离传感器可以位于电子设备的头部401那一侧,也可以位于电子设备的底部403那一侧。电子设备的触摸屏406上用于显示图形用户界面(graphical user interface,GUI)。如图4所示,电子设备当前显示的GUI上包括多个应用程序的图标、多个应用程序的名称、天气widget以及状态栏等。Wherein, the electronic device is in an inverted posture, which means that the head (or top) of the electronic device faces downward. As shown in FIG. 4, the head 401 of the electronic device refers to the side where the earpiece (or receiver) 402 of the electronic device is located, and the bottom 403 of the electronic device refers to the side where the microphone (or microphone) 404 is located. The head 401 and the bottom 403 of the electronic device are located on opposite sides of the electronic device. The electronic device further includes a distance sensor 405, which can be located on the head 401 side of the electronic device or on the bottom 403 side of the electronic device. The touch screen 406 of the electronic device is used to display a graphical user interface (GUI). As shown in FIG. 4, the GUI currently displayed on the electronic device includes icons of multiple applications, names of multiple applications, weather widgets, and a status bar.
一般地,用户使用电子设备时,如图4所示,电子设备的头部401朝上,从用户的观看角度来说,应用程序的图标的图片方向和应用程序的名称的文字方向是正向的。用户在使用完电子设备之后,参见图5,通常顺手将电子设备头朝下放入口袋中。并且,当电子设备被放入口袋时,电子设备上的距离传感器会被口袋遮挡。因而,当电子设备上的距离传感器被遮挡,且电子设备的头部朝下时,可以表明电子设备被放入了口袋。因此,当电子设备处于亮屏状态下,距离传感器被遮挡,且电子设备的头部朝下时,可以表明电子设备在口袋中处于亮屏状态,因而可以屏蔽触摸事件,降低误触的发生。若不满足电子设备处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态这三个条件,则不屏蔽触摸事件,电子设备保持正常工作。Generally, when a user uses an electronic device, as shown in FIG. 4, the head 401 of the electronic device faces upward. From the perspective of the user, the picture direction of the application icon and the text direction of the application name are positive. . After the user finishes using the electronic device, referring to FIG. 5, the electronic device is usually put into the pocket with the head down. Moreover, when the electronic device is put into the pocket, the distance sensor on the electronic device is blocked by the pocket. Therefore, when the distance sensor on the electronic device is blocked and the head of the electronic device is facing down, it can indicate that the electronic device is put in the pocket. Therefore, when the electronic device is in the bright screen state, the distance sensor is blocked, and the electronic device's head is facing down, it can indicate that the electronic device is in the bright screen state in the pocket, so the touch event can be shielded and the occurrence of false touch can be reduced. If the three conditions that the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture are not satisfied, the touch event is not shielded, and the electronic device keeps working normally.
其中,距离传感器可以包括光学距离传感器、红外距离传感器或超声波距离传感器等多种。此处以红外距离传感器为例,来说明确定距离传感器被遮挡的过程。该红外传感器具体可以是上述接近光传感器,该红外距离传感器可以包括红外线发射管和红外线接收管,当发射管发出的红外线经物体反射后被接收管接收时,可以根据发射时间与接收时间确定物体与红外距离传感器之间的距离;若该距离小于或者等于预设阈值,则可以表明红外距离传感器与某物体的距离较近,红外距离传感器被遮挡;若该距离大于预设阈值,则可以表明红外距离传感器与某物体的距离较近,红外距离传感器未被遮挡;当接收管接收不到发射管发射的红外线时,可以表明红外距离传感器距离物体较远,红外距离传感器未被遮挡。The distance sensor may include an optical distance sensor, an infrared distance sensor, or an ultrasonic distance sensor. Here, an infrared distance sensor is taken as an example to explain the process of determining that the distance sensor is blocked. The infrared sensor may specifically be the above-mentioned proximity light sensor. The infrared distance sensor may include an infrared transmitting tube and an infrared receiving tube. When the infrared light emitted by the transmitting tube is reflected by the object and received by the receiving tube, the object may be determined according to the transmitting time and the receiving time. The distance from the infrared distance sensor; if the distance is less than or equal to a preset threshold, it can indicate that the distance between the infrared distance sensor and an object is close, and the infrared distance sensor is blocked; if the distance is greater than the preset threshold, it can indicate The distance between the infrared distance sensor and an object is relatively short, and the infrared distance sensor is not blocked; when the receiving tube cannot receive the infrared light emitted by the transmitting tube, it can be shown that the infrared distance sensor is far from the object, and the infrared distance sensor is not blocked.
参见图6,电子设备的头部朝下是指,从电子设备的底部指向电子设备的头部且与电子设备的侧边平行的射线601,与重力方向602的夹角603小于或者等于预设角度值。其中,该预设角度值小于90°,具体数值可以根据实际需要进行设定,例如该预设角度值可以为20°。若射线601,与重力方向602的夹角603大于预设角度值,则电子设备不是头部朝下,电子设备为非倒立姿态。具体的,电子设备可以根据重力传感器、加速度传感器、陀螺仪等传感器中的至少一个来确定电子设备头部的方向,从 而确定电子设备是否为倒立姿态。Referring to FIG. 6, the head of the electronic device faces downwards, which refers to a ray 601 pointing from the bottom of the electronic device to the head of the electronic device and parallel to the side of the electronic device. The angle 603 with the direction of gravity 602 is less than or equal to a preset Angle value. The preset angle value is less than 90 °, and the specific value can be set according to actual needs. For example, the preset angle value can be 20 °. If the angle 603 between the ray 601 and the direction of gravity 602 is greater than a preset angle value, the electronic device does not have the head down, and the electronic device has a non-inverted attitude. Specifically, the electronic device may determine the direction of the head of the electronic device according to at least one of sensors such as a gravity sensor, an acceleration sensor, and a gyroscope, thereby determining whether the electronic device is in an inverted posture.
其中,电子设备屏蔽触摸事件是指电子设备关闭触摸屏的触控功能,不响应触摸屏的触摸事件。Among them, the electronic device shielding the touch event means that the electronic device turns off the touch function of the touch screen and does not respond to the touch event of the touch screen.
在一些实施例中,电子设备在步骤300中屏蔽触摸事件可以包括:电子设备关闭检测触摸信号的功能,即电子设备不会检测到触摸信号,因而也不会生成触摸事件,不会响应触摸事件。In some embodiments, shielding the touch event by the electronic device in step 300 may include: the electronic device turns off a function of detecting a touch signal, that is, the electronic device does not detect the touch signal, and therefore does not generate a touch event, and does not respond to the touch event. .
在其他一些实施例中,电子设备在步骤300中屏蔽触摸事件可以包括:电子设备在检测到触摸信号后,中断对触摸信号对应的触摸事件的响应处理。例如,电子设备的触摸屏在检测到触摸信号后,不生成触摸事件,不向上层应用窗口上报该触摸事件,从而不会响应该触摸事件。又例如,电子设备的触摸屏在检测到触摸信号后,根据该触摸信号生成触摸事件,将触摸事件重定向到一个预设的上层应用窗口进行处理,从而通过预设的上层应用窗口拦截触摸事件,中断对触摸事件的原有处理。In some other embodiments, shielding the touch event by the electronic device in step 300 may include: after detecting the touch signal, the electronic device interrupts the response processing to the touch event corresponding to the touch signal. For example, the touch screen of the electronic device does not generate a touch event after detecting a touch signal, and does not report the touch event to an upper application window, and thus does not respond to the touch event. As another example, after the touch screen of the electronic device detects a touch signal, a touch event is generated according to the touch signal, and the touch event is redirected to a preset upper-layer application window for processing, thereby intercepting the touch event through the preset upper-layer application window. Interrupts the original processing of touch events.
示例性的,当电子设备处于亮屏状态下,电子设备的距离传感器被遮挡,且电子设备为倒立姿态时,若电子设备的触摸屏检测到触摸事件,则电子设备将该触摸事件上报给预设的提示应用窗口,该提示应用窗口通过声音“滴滴滴”来提示用户当前在已屏蔽触控的状态下,在该状态下,电子设备不会响应触摸事件;或者,该提示应用窗口通过声音“已屏蔽触控”来提示用户当前已屏蔽触摸事件;或者,该提示应用窗口可以通过振动的方式来提示用户已屏蔽触摸事件;或者,该提示应用窗口可以在熄屏显示(always on display,AOD)状态下通过局部区域显示的小弹窗来提示用户“已屏蔽触控”。Exemplarily, when the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, and if the touch event is detected by the touch screen of the electronic device, the electronic device reports the touch event to a preset The reminder application window uses a sound "dididi" to remind the user that the touch is currently blocked, in which state the electronic device will not respond to touch events; or, the reminder application window uses sound "Blocked touch" to remind the user that the touch event is currently blocked; or, the reminder application window can alert the user that the touch event has been blocked by means of vibration; or, the reminder application window can be displayed on the screen (always on display, In the AOD) state, a small pop-up window displayed in the local area is used to prompt the user that the touch has been blocked.
在其他一些实施例中,电子设备在步骤300中屏蔽触摸事件可以包括:电子设备关闭检测触摸信号的功能,在经过第一预设时长后熄屏或锁屏;或者,电子设备在检测到触摸信号后,中断对触摸信号对应的触摸事件的响应处理,在经过第一预设时长后熄屏或锁屏。In some other embodiments, shielding the touch event by the electronic device in step 300 may include: the electronic device turns off a function of detecting a touch signal, and turns off or locks the screen after a first preset period of time; or the electronic device detects a touch After the signal is sent, the processing of responding to the touch event corresponding to the touch signal is interrupted, and the screen is turned off or the screen is locked after the first preset time period elapses.
在其他一些实施例中,电子设备在步骤300中屏蔽触摸事件可以包括:电子设备熄屏或锁屏,以屏蔽触摸屏的触摸事件。In some other embodiments, the shielding of the touch event by the electronic device in step 300 may include: turning off or locking the screen of the electronic device to shield the touch event of the touch screen.
很多情况下,用户将亮屏状态的电子设备放入口袋后,想稍后继续使用该电子设备。例如,用户正在使用手机时公交车来了,用户将亮屏状态的手机放入口袋,掏出公交卡刷卡,刷卡完成后,用户掏出手机继续使用。在一些实施例中,当亮屏状态、距离传感器被遮挡、倒立姿态这三个条件同时满足的持续时间大于或者等于第二预设时长(例如5s)时,可以表明用户可能暂时不想再使用电子设备了,电子设备可以屏蔽触摸事件;在这三个条件同时满足的持续时间小于第二预设时长的情况下,用户可能马上还要使用电子设备,因而电子设备可以不屏蔽触摸事件,保持正常工作。In many cases, a user puts an electronic device in a bright screen state into a pocket and wants to continue using the electronic device later. For example, when a user is using a mobile phone while a bus is coming, the user puts the mobile phone in a bright screen state into his pocket, pulls out the bus card, and swipes the card. After the card is swiped, the user takes out the mobile phone and continues to use it. In some embodiments, when the duration that the three conditions of the bright screen state, the distance sensor is blocked, and the inverted posture are simultaneously greater than or equal to the second preset duration (for example, 5s), it may indicate that the user may not want to use the electronic device for the time being. The device is ready, and the electronic device can shield the touch event. In the case where the duration of the three conditions is less than the second preset duration, the user may use the electronic device immediately, so the electronic device can not touch the touch event and keep normal. jobs.
在上述步骤300中,电子设备在确定满足亮屏状态、距离传感器被遮挡、倒立姿态这三个条件后,才会屏蔽触摸事件。本申请实施例对电子设备确定是否满足这三个条件中的每个条件的先后顺序不作限定。例如,电子设备可以先确定是否为亮屏状态,然后再确定是否满足距离传感器被遮挡以及是否为倒立姿态;再例如,电子设备可以先确定是否满足距离传感器被遮挡,而后再确定是否为亮屏状态以及是否为倒立姿态。在电子设备已屏蔽触摸事件之后,若电子设备确定当前不满足这三个条件,则电子设 备可以恢复正常工作。或者,在电子设备已屏蔽触摸事件之后,若电子设备确定当前不满足这三个条件,则电子设备取消屏蔽触摸事件,从而恢复正常工作。In the above step 300, the electronic device will block the touch event only after determining that the three conditions of the bright screen state, the distance sensor is blocked, and the inverted posture are met. The embodiment of the present application does not limit the sequence in which the electronic device determines whether each of the three conditions is satisfied. For example, the electronic device may first determine whether it is a bright screen state, and then determine whether the distance sensor is blocked and whether it is in an inverted posture; for another example, the electronic device may first determine whether the distance sensor is blocked, and then determine whether it is a bright screen. Status and whether it is an inverted posture. After the electronic device has shielded the touch event, if the electronic device determines that these three conditions are not currently met, the electronic device can resume normal operation. Alternatively, after the electronic device has shielded the touch event, if the electronic device determines that the three conditions are not currently met, the electronic device cancels the shielded touch event, and resumes normal work.
例如,参见图7,上述步骤300具体可以包括:For example, referring to FIG. 7, the above step 300 may specifically include:
701、电子设备确定是否处于亮屏状态。701. The electronic device determines whether it is in a bright screen state.
若处于亮屏状态,则电子设备执行步骤702,若不处于亮屏状态,则电子设备执行步骤703。If it is in the bright screen state, the electronic device executes step 702; if it is not in the bright screen state, the electronic device executes step 703.
702、电子设备确定电子设备的距离传感器是否被遮挡。702. The electronic device determines whether the distance sensor of the electronic device is blocked.
若未被遮挡,则执行步骤703;若被遮挡,则执行步骤704。If it is not blocked, step 703 is performed; if it is blocked, step 704 is performed.
703、电子设备正常工作。703. The electronic equipment works normally.
704、电子设备确定是否为倒立姿态。704. The electronic device determines whether it is an inverted posture.
若为倒立姿态,则执行步骤705;若不是倒立姿态,则执行步骤703。If it is the inverted posture, step 705 is performed; if it is not the inverted posture, step 703 is performed.
705、电子设备屏蔽触摸事件。705. The electronic device shields the touch event.
在一些实施例中,距离传感器和姿态传感器可以保持开启,电子设备可以周期性地(例如该周期可以为20s)循环执行上述步骤701-705,即周期性地检测电子设备是否处于亮屏状态,距离传感器是否被遮挡,以及是否为倒立姿态。其中,姿态传感器可以用于检测电子设备的姿态,例如可以检测上述射线601与重力方向602之间的夹角,从而检测电子设备是否为倒立姿态。比如,姿态传感器可以为重力传感器、陀螺仪或加速度传感器中的一种或多种。具体的,在当前检测周期内,若电子设备在步骤701中确定电子设备不处于亮屏状态(例如电子设备处于熄屏状态(熄屏状态可以包括AOD状态)),则电子设备执行步骤703,即保持正常工作,并等待下一个检测周期到来后再次执行步骤701。在当前检测周期内,若电子设备确定处于亮屏状态且在步骤704中确定距离传感器未被遮挡,则电子设备执行步骤703,并等待下一个检测周期到来后再次执行步骤701。在当前检测周期内,若电子设备确定处于亮屏状态且距离传感器被遮挡,且电子设备不是倒立姿态,则电子设备执行步骤703,并等待下一个检测周期到来后再次执行步骤701。在当前检测周期内,若电子设备确定处于亮屏状态且距离传感器被遮挡,且电子设备是倒立姿态,则电子设备执行步骤705,并等待下一个检测周期到来后再次执行步骤701。在步骤705(屏蔽触摸事件)之后,若电子设备再次执行步骤703,则步骤703具体为取消屏蔽触摸事件,从而恢复正常工作。在取消屏蔽触摸事件之后,若电子设备再次执行步骤703,则步骤703为电子设备保持正常工作。In some embodiments, the distance sensor and the attitude sensor may remain on, and the electronic device may periodically perform the steps 701-705 (for example, the period may be 20s), that is, periodically detect whether the electronic device is in a bright screen state, Whether the distance sensor is obstructed, and whether it is in an inverted posture. The attitude sensor may be used to detect the attitude of the electronic device, for example, the angle between the ray 601 and the direction of gravity 602 may be detected, so as to detect whether the electronic device is in an inverted attitude. For example, the attitude sensor may be one or more of a gravity sensor, a gyroscope, or an acceleration sensor. Specifically, during the current detection cycle, if the electronic device determines in step 701 that the electronic device is not in a bright screen state (for example, the electronic device is in a screen-off state (the screen-off state may include an AOD state)), the electronic device performs step 703, That is, the normal operation is maintained, and step 701 is performed again after the next detection cycle arrives. In the current detection period, if the electronic device determines that the screen is in a bright screen state and determines that the distance sensor is not blocked in step 704, the electronic device executes step 703 and waits for the next detection period to execute step 701 again. In the current detection cycle, if the electronic device determines that it is in a bright screen state and the distance sensor is blocked, and the electronic device is not in an inverted posture, the electronic device executes step 703 and waits for the next detection cycle to perform step 701 again. In the current detection cycle, if the electronic device determines that it is in a bright screen state and the distance sensor is blocked, and the electronic device is in an inverted posture, the electronic device executes step 705 and waits for the next detection cycle to execute step 701 again. After step 705 (shielding touch event), if the electronic device executes step 703 again, step 703 is specifically to cancel the shielding touch event, so as to resume normal work. After unblocking the touch event, if the electronic device performs step 703 again, step 703 keeps the electronic device working normally.
具体的,电子设备的存储器中可以保存有用于表示电子设备触控屏的状态(例如亮屏状态或熄屏状态),距离传感器的状态(例如被遮挡或未被遮挡),以及电子设备的姿态(例如倒立姿态、非倒立姿态或电子设备当前相对于重力方向倾斜的角度等)的相关数据、信息或参数。当电子设备的触控屏的状态、距离传感器的状态或电子设备的姿态发生变化时,这些数据、信息或参数也会相应的发生变化;电子设备通过查询这些数据、信息或参数可以确定电子设备是否为亮屏状态、距离传感器是否被遮挡以及是否为倒立姿态。Specifically, the memory of the electronic device may store a state for indicating the touch screen of the electronic device (for example, a bright screen state or an off screen state), a state of the distance sensor (for example, blocked or unblocked), and an attitude of the electronic device. (Such as an inverted posture, a non-inverted posture, or an angle at which the electronic device is currently inclined with respect to the direction of gravity, etc.). When the state of the touch screen of the electronic device, the state of the distance sensor, or the posture of the electronic device changes, these data, information, or parameters also change accordingly; the electronic device can determine the electronic device by querying these data, information, or parameters Whether the screen is bright, whether the distance sensor is blocked, and whether it is in an inverted posture.
在另一些实施例中,在上述步骤705中电子设备屏蔽触摸事件之后,电子设备可以周期性地检测电子设备是否处于亮屏状态,距离传感器是否被遮挡以及是否为倒立 姿态。若电子设备确定不处于亮屏状态,距离传感器未被遮挡,或不为倒立姿态,则电子设备取消屏蔽触摸事件,而后回到上述步骤701。具体的,参见图8,在步骤705之后,该方法可以包括:In other embodiments, after the electronic device shields the touch event in step 705, the electronic device may periodically detect whether the electronic device is in a bright screen state, whether the distance sensor is blocked, and whether it is in an inverted posture. If it is determined that the electronic device is not in a bright screen state, the distance sensor is not blocked, or is not in an inverted posture, the electronic device cancels shielding of the touch event, and then returns to step 701 described above. Specifically, referring to FIG. 8, after step 705, the method may include:
706、电子设备确定是否处于亮屏状态。706. The electronic device determines whether it is in a bright screen state.
若处于亮屏状态,则电子设备执行步骤707;若不处于亮屏状态,则电子设备执行步骤708。If it is in the bright screen state, the electronic device executes step 707; if it is not in the bright screen state, the electronic device executes step 708.
707、电子设备确定距离传感器是否被遮挡。707. The electronic device determines whether the distance sensor is blocked.
若距离传感器被遮挡,则电子设备执行步骤709,若距离传感器未被遮挡,则电子设备执行步骤708。If the distance sensor is blocked, the electronic device executes step 709, and if the distance sensor is not blocked, the electronic device executes step 708.
708、电子设备取消屏蔽触摸事件。708: The electronic device unblocks the touch event.
在步骤708之后,电子设备可以在下一个检周期到来后继续执行上述步骤701。After step 708, the electronic device may continue to perform the above step 701 after the next inspection period arrives.
709、电子设备确定是否为倒立姿态。709. The electronic device determines whether it is an inverted posture.
若为倒立姿态,则电子设备继续执行步骤705,保持屏蔽触摸事件,并在下一个检测周期到来后继续执行步骤706;若不是倒立姿态,则电子设备执行步骤708,以取消屏蔽触摸事件。If it is the inverted gesture, the electronic device continues to perform step 705 to keep the touch event masked, and continues to perform step 706 after the next detection period arrives; if it is not the inverted gesture, the electronic device executes step 708 to cancel the masked touch event.
又例如,与图7或图8所示的方法类似,电子设备也可以先确定是否为倒立姿态,再确定距离传感器是否被遮挡,而后确定是否为亮屏状态。For another example, similar to the method shown in FIG. 7 or FIG. 8, the electronic device may also first determine whether it is an inverted posture, then determine whether the distance sensor is blocked, and then determine whether it is a bright screen state.
示例性的,与图7所示的先确定是否为亮屏状态的方法类似,当电子设备先确定是否为倒立姿态时,参见图9,该方法可以包括:Exemplarily, similar to the method of first determining whether the screen is bright, as shown in FIG. 7, when the electronic device first determines whether it is an inverted posture, referring to FIG. 9, the method may include:
901、电子设备确定是否为倒立姿态。901. The electronic device determines whether it is an inverted posture.
若为倒立姿态,则电子设备执行步骤902;若不是倒立姿态,则电子设备执行步骤903。If it is the inverted posture, the electronic device executes step 902; if it is not the inverted posture, the electronic device executes step 903.
902、电子设备确定距离传感器是否被遮挡。902. The electronic device determines whether the distance sensor is blocked.
若未被遮挡,则执行步骤903;若被遮挡,则执行步骤904。If not blocked, step 903 is performed; if blocked, step 904 is performed.
903、电子设备正常工作。903. The electronic equipment works normally.
904、电子设备确定是否处于亮屏状态。904. The electronic device determines whether it is in a bright screen state.
若处于亮屏状态,则执行步骤905;若不处于亮屏状态,则执行步骤903。If it is in a bright screen state, step 905 is performed; if it is not in a bright screen state, step 903 is performed.
905、电子设备屏蔽触摸事件。905. The electronic device shields the touch event.
一般地,由于电子设备处于亮屏状态的情形较多(例如,用户在正常使用电子设备时,电子设备处于亮屏状态),因而在图7或图8所示方法中,电子设备在确定亮屏状态后,需要继续确定距离传感器是否被遮挡以及是否为倒立姿态;而电子设备为倒立姿态的情形较少(例如电子设备被放入口袋,或者用户手持电子设备正常走路等),因而电子设备通常在步骤901中确定距离传感器未被遮挡之后,就不会在当前周期内继续判断是否为倒立姿态以及是否为亮屏状态。因此,与图7或图8所示方法相比,图9所示的方法能够节省电子设备的功耗。Generally, because the electronic device is in a bright screen state (for example, when the user uses the electronic device normally, the electronic device is in a bright screen state), in the method shown in FIG. 7 or FIG. 8, the electronic device is determined to be bright. After the screen state, it is necessary to continue to determine whether the distance sensor is blocked and whether it is in an inverted posture. However, it is rare that the electronic device is in an inverted posture (for example, the electronic device is put into a pocket, or the user walks normally with the electronic device in hand). Generally, after it is determined in step 901 that the distance sensor is not blocked, it will not continue to determine whether it is an inverted posture and a bright screen state in the current cycle. Therefore, compared with the method shown in FIG. 7 or FIG. 8, the method shown in FIG. 9 can save power consumption of the electronic device.
可以理解的是,电子设备也可以先确定是否为倒立姿态,再确定是否为亮屏状态,而后确定距离传感器是否被遮挡,此处不予赘述。It can be understood that the electronic device may also first determine whether it is an inverted posture, then determine whether it is a bright screen state, and then determine whether the distance sensor is blocked, which will not be described here.
又例如,与图7或图8所示的方法类似,电子设备可以先确定距离传感器是否被遮挡,再确定是否为倒立姿态,而后确定是否为亮屏状态。For another example, similar to the method shown in FIG. 7 or FIG. 8, the electronic device may first determine whether the distance sensor is blocked, then determine whether it is an inverted posture, and then determine whether it is a bright screen state.
示例性的,与图7所示的先确定是否为亮屏状态的方法类似,当电子设备先确定距离传感器是否被遮挡时,参见图10,该方法可以包括:Exemplarily, similar to the method of first determining whether the screen is bright as shown in FIG. 7, when the electronic device first determines whether the distance sensor is blocked, referring to FIG. 10, the method may include:
1001、电子设备确定距离传感器是否被遮挡。1001. The electronic device determines whether the distance sensor is blocked.
若距离传感器被遮挡,则电子设备执行步骤1002,若距离传感器未被遮挡,则电子设备执行步骤1003。If the distance sensor is blocked, the electronic device executes step 1002, and if the distance sensor is not blocked, the electronic device executes step 1003.
1002、电子设备确定是否为倒立姿态。1002. The electronic device determines whether it is in an inverted posture.
若不是倒立姿态,则执行步骤1003;若是倒立姿态,则执行步骤1004。If it is not the inverted posture, step 1003 is performed; if it is the inverted posture, step 1004 is performed.
1003、电子设备正常工作。1003. The electronic equipment works normally.
1004、电子设备确定是否处于亮屏状态。1004. The electronic device determines whether it is in a bright screen state.
若处于亮屏状态,则执行步骤1005;若不处于亮屏状态,则执行步骤1003。If it is in the bright screen state, go to step 1005; if it is not in the bright screen state, go to step 1003.
1005、电子设备屏蔽触摸事件。1005. The electronic device shields the touch event.
一般地,而电子设备的距离传感器被遮挡的情形较少(例如电子设备被放入口袋或者打电话时距离传感器被脸部遮挡等),因而电子设备通常在步骤1001中确定距离传感器未被遮挡,从而不会在当前检测周期内继续判断是否为倒立姿态以及是否为亮屏状态。因此,与图7或图8所示方法相比,步骤1001-1005所示的方法能够节省电子设备的功耗。Generally, the distance sensor of the electronic device is rarely blocked (for example, the electronic device is put in a pocket or the distance sensor is blocked by the face when making a call), so the electronic device usually determines that the distance sensor is not blocked in step 1001. So that it will not continue to determine whether it is an inverted posture and a bright screen state in the current detection cycle. Therefore, compared with the method shown in FIG. 7 or FIG. 8, the method shown in steps 1001-1005 can save power consumption of the electronic device.
可以理解的是,电子设备也可以先确定距离传感器是否被遮挡,再确定是否为亮屏状态,而后确定是否为倒立姿态,此处不予赘述。It can be understood that the electronic device may also first determine whether the distance sensor is blocked, then determine whether it is a bright screen state, and then determine whether it is an inverted posture, which will not be described here.
在另一些实施例中,在电子设备为熄屏状态时,电子设备可以关闭距离传感器和用于检测电子设备是否为倒立姿态的姿态传感器;在亮屏状态下,电子设备可以开启距离传感器和姿态传感器,以确定距离传感器是否被遮挡以及电子设备是否为倒立姿态,从而周期性地执行类似于图7-图10中任一种所示的方法。不同之处在于,电子设备还可以在执行该方法的过程中开启或关闭距离传感器和姿态传感器,这样,距离传感器和姿态传感器不是常开状态,可以节省电子设备的功耗。具体的,以电子设备执行图7所示的方法为例,在当前检测周期内,若电子设备在步骤701中确定电子设备不处于亮屏状态(例如电子设备处于熄屏状态或AOD状态),则执行步骤703,保持正常工作,并等待下一个检测周期到来后再次执行步骤701;在当前检测周期内,若电子设备确定处于亮屏状态,则可以开启距离传感器并执行步骤702,以确定距离传感器是否被遮挡;若确定距离传感器未被遮挡,则执行步骤703,并关闭距离传感器,并等待下一个检测周期到来后再次执行步骤701;若确定距离传感器被遮挡,则开启姿态传感器并执行步骤704,以根据姿态传感器确定是否为倒立姿态;若为倒立姿态,则执行步骤705,屏蔽触摸事件并关闭姿态传感器和距离传感器,并等待下一个检测周期到来后再次执行步骤701;若不是倒立姿态,则执行步骤703保持正常工作,并关闭姿态传感器,并等待下一个检测周期到来后再次执行步骤701。In other embodiments, when the electronic device is in the off state, the electronic device may turn off the distance sensor and the attitude sensor for detecting whether the electronic device is in an inverted posture; in the bright state, the electronic device may turn on the distance sensor and the attitude. The sensor is used to determine whether the distance sensor is blocked and whether the electronic device is in an inverted posture, so that a method similar to that shown in any one of FIGS. 7-10 is performed periodically. The difference is that the electronic device can also turn the distance sensor and attitude sensor on or off during the execution of the method. In this way, the distance sensor and attitude sensor are not always on, which can save power consumption of the electronic device. Specifically, the electronic device executes the method shown in FIG. 7 as an example. In the current detection period, if the electronic device determines in step 701 that the electronic device is not in a bright screen state (for example, the electronic device is in a screen off state or an AOD state) Then step 703 is performed to keep normal work, and then step 701 is performed again after the next detection period arrives; if the electronic device determines that the screen is in a bright state during the current detection period, the distance sensor can be turned on and step 702 is performed to determine the distance Whether the sensor is blocked; if it is determined that the distance sensor is not blocked, go to step 703, and turn off the distance sensor, and wait for the next detection period to perform step 701 again; if it is determined that the distance sensor is blocked, turn on the attitude sensor and perform steps 704 to determine whether it is an inverted posture according to the posture sensor; if it is an inverted posture, execute step 705, shield the touch event and turn off the posture sensor and the distance sensor, and then perform step 701 again after the next detection cycle arrives; if it is not the inverted posture , Then execute step 703 to keep normal work, and close Attitude sensor, and waits for the next step again a detection cycle 701 soon.
在另一些实施例中,电子设备并不是周期性地确定是否为亮屏状态、距离传感器是否被遮挡以及是否为倒立姿态这三个条件,而是在接收到中断事件后再确定是否满足这三个条件。该中断事件可以包括这三个条件分别对应的第一中断事件、第二中断事件或第三中断事件。其中,第一中断事件用于上报触控屏的亮屏状态发生变化;第二中断事件用于上报距离传感器是否被遮挡;第三中断事件用于上报电子设备的姿态 发生变化。In other embodiments, the electronic device does not periodically determine whether the three conditions are a bright screen state, whether the distance sensor is blocked, and whether it is an inverted posture, but determines whether to meet the three conditions after receiving an interruption event. Conditions. The interrupt event may include a first interrupt event, a second interrupt event, or a third interrupt event corresponding to the three conditions, respectively. The first interrupt event is used to report a change in the bright state of the touch screen; the second interrupt event is used to report whether the distance sensor is blocked; the third interrupt event is used to report a change in the posture of the electronic device.
例如,第一中断事件可以为触控屏的电源管理模块上报的触控屏上电或触控屏下电的中断事件,若触控屏上电,则电子设备切换为亮屏状态;若触控屏下电,则电子设备切换为熄屏状态。第二中断事件可以为距离传感器由未被遮挡切换为遮挡时上报的中断事件;根据该第二中断事件,电子设备可以确定距离传感器被遮挡。或者,第二中断事件可以为距离传感器由遮挡转换为未被遮挡时上报的中断事件;根据该第二中断事件,电子设备可以确定距离传感器未被遮挡。第三中断事件可以为姿态传感器检测到电子设备由倒立姿态换为非倒立姿态时上报的中断事件;根据该第三中断事件,电子设备可以确定为非倒立姿态。或者,第三中断事件可以为姿态传感器检测到电子设备由非倒立姿态换为倒立姿态时上报的中断事件;根据该第三中断事件,电子设备可以确定为倒立姿态。For example, the first interruption event may be an interruption event of the touchscreen power-on or touchscreen power-down reported by the power management module of the touchscreen. If the touchscreen is powered on, the electronic device switches to the bright screen state. When the control screen is powered off, the electronic device switches to the off state. The second interruption event may be an interruption event reported when the distance sensor is switched from unblocked to blocked; according to the second interruption event, the electronic device may determine that the distance sensor is blocked. Alternatively, the second interruption event may be an interruption event reported when the distance sensor is changed from occluded to unblocked; according to the second interruption event, the electronic device may determine that the distance sensor is not blocked. The third interruption event may be an interruption event reported when the posture sensor detects that the electronic device changes from an inverted posture to a non-inverted posture; according to the third interruption event, the electronic device may determine the non-inverted posture. Alternatively, the third interruption event may be an interruption event reported when the posture sensor detects that the electronic device changes from a non-inverted posture to an inverted posture; according to the third interruption event, the electronic device may determine the inverted posture.
在一种方案中,距离传感器和姿态传感器保持开启,电子设备在检测到第一中断事件、第二中断事件或第三中断事件中的任意中断事件后,确定是否同时满足屏蔽条件中的上述三个条件,从而确定是否屏蔽触摸事件。In one solution, the distance sensor and the attitude sensor remain on, and the electronic device determines whether the three conditions in the shielding condition are satisfied at the same time after detecting any of the first interruption event, the second interruption event, or the third interruption event. Conditions to determine whether to block touch events.
在一些实施例中,上述第一中断事件包括中断事件1或中断事件2。中断事件1用于上报触控屏由熄屏状态切换为亮屏状态,例如触控屏上电的中断事件。电子设备根据中断事件1可以确定当前为亮屏状态。中断事件2用于上报触控屏由亮屏状态切换为熄屏状态,例如触控屏下电的中断事件。电子设备根据中断事件2可以确定当前为熄屏状态。上述第二中断事件包括中断事件3或中断事件4。中断事件3用于上报距离传感器由未被遮挡切换为被遮挡。电子设备根据中断事件3可以确定距离传感器被遮挡。中断事件4用于上报距离传感器由被遮挡切换为未被遮挡。电子设备根据中断事件4可以确定距离传感器未被遮挡。上述第三中断事件包括中断事件5或中断事件6。中断事件5用于上报电子设备由非倒立姿态切换为倒立姿态,电子设备根据中断事件5可以确定当前为倒立姿态。中断事件6用于上报电子设备由倒立姿态切换为非倒立姿态。电子设备根据中断事件6可以确定当前为非倒立状态。电子设备在收到中断事件1至中断事件6中的任意中断事件后,确定是否同时满足屏蔽条件中的上述三个条件,从而确定是否屏蔽触摸事件。In some embodiments, the first interrupt event includes an interrupt event 1 or an interrupt event 2. Interrupt event 1 is used to report that the touch screen is switched from the off-screen state to the bright screen state, such as an interrupt event when the touch screen is powered on. The electronic device may determine that the screen is currently in the bright state according to the interrupt event 1. Interrupt event 2 is used to report that the touch screen is switched from the bright screen state to the off screen state, such as an interrupt event when the touch screen is powered off. The electronic device may determine that the screen is currently off according to the interrupt event 2. The second interrupt event includes an interrupt event 3 or an interrupt event 4. Interrupt event 3 is used to report that the distance sensor is switched from unblocked to blocked. The electronic device may determine that the distance sensor is blocked according to the interrupt event 3. Interrupt event 4 is used to report that the distance sensor is switched from blocked to unblocked. The electronic device may determine that the distance sensor is not blocked according to the interrupt event 4. The third interrupt event includes an interrupt event 5 or an interrupt event 6. The interruption event 5 is used to report that the electronic device is switched from a non-inverted posture to an inverted posture. The electronic device may determine that the current posture is the inverted posture according to the interruption event 5. Interrupt event 6 is used to report that the electronic device is switched from an inverted posture to a non-inverted posture. The electronic device may determine that it is currently in a non-inverted state according to the interrupt event 6. After receiving any interrupt event from interrupt event 1 to interrupt event 6, the electronic device determines whether the above three conditions of the mask condition are satisfied at the same time, thereby determining whether to shield the touch event.
在一些实施例中,电子设备可以在收到中断事件1、中断事件3或中断事件5中的任意中断事件后,确定是否同时满足屏蔽条件中的上述三个条件,从而确定是否屏蔽触摸事件。In some embodiments, after receiving any of the interrupt events 1, interrupt event 3, or interrupt event 5, the electronic device may determine whether to satisfy the above three conditions of the mask condition at the same time, thereby determining whether to shield the touch event.
具体的,电子设备上可以保存有第一标识、第二标识和第三标识。第一标识用于标识电子设备当前是否处于亮屏状态,电子设备可以根据收到的第一中断事件更新第一标识,以使得第一标识能够实时标识电子设备当前是亮屏状态还是熄屏状态。例如,若电子设备检测到中断事件1,则将第一标识设置为第一状态以表示为亮屏状态;若电子设备检测到中断事件2,则将第一标识设置为第二状态以表示为熄屏状态。第二标识用于标识距离传感器是否被遮挡,电子设备可以根据检测到的第二中断事件更新第一标识,以使得第一标识能够实时标识距离传感器当前是否被遮挡。例如,若电子设备检测到中断事件3,则将第二标识设置为第一状态以表示距离传感器被遮挡;若电子设备检测到中断事件4,则将第二标识设置为第二状态以表示距离传感器未被遮 挡。第三标识用于标识电子设备是否为倒立姿态,电子设备可以根据检测到的第三中断事件更新第三标识,以使得第三标识能够实时标识电子设备当前为倒立姿态还是非倒立姿态。例如,若电子设备检测到中断事件5,则将第三标识设置为第一状态以表示为倒立姿态;若电子设备检测到中断事件6,则将第三标识设置为第二状态以表示为非倒立姿态。Specifically, the first identifier, the second identifier, and the third identifier may be stored on the electronic device. The first identifier is used to identify whether the electronic device is currently in a bright screen state, and the electronic device may update the first identifier according to the received first interruption event, so that the first identifier can identify in real time whether the electronic device is currently in a bright or off screen state. . For example, if the electronic device detects an interruption event 1, the first identifier is set to the first state to indicate a bright screen state; if the electronic device detects the interruption event 2, the first identifier is set to a second state to be expressed as Off screen. The second identifier is used to identify whether the distance sensor is blocked, and the electronic device may update the first identifier according to the detected second interruption event, so that the first identifier can identify whether the distance sensor is currently blocked or not in real time. For example, if the electronic device detects an interruption event 3, it sets the second identifier to the first state to indicate that the distance sensor is blocked; if the electronic device detects the interruption event 4, it sets the second flag to the second state to indicate the distance The sensor is not blocked. The third identifier is used to identify whether the electronic device is in an inverted posture, and the electronic device may update the third identifier according to the detected third interruption event, so that the third identifier can identify the electronic device in an inverted posture or a non-inverted posture in real time. For example, if the electronic device detects an interruption event 5, it sets the third flag to the first state to indicate the inverted posture; if the electronic device detects the interruption event 6, it sets the third flag to the second state to indicate the non- Handstand posture.
在一种情况下,在电子设备开机后,第一标识、第二标识和第三标识为预设的状态。例如,第一标识预设的状态是用于表示为亮屏状态的第一状态,第二标识预设的状态是用于表示距离传感器未被遮挡的第二状态,第三标识预设的状态是用于表示为非倒立姿态的第二状态。电子设备在收到第一中断事件、第二中断事件或第三中断事件后,对第一标识、第二标识或第三标识进行更新。In one case, after the electronic device is powered on, the first identifier, the second identifier, and the third identifier are in a preset state. For example, the first identifier preset state is a first state used to indicate a bright screen state, the second identifier preset state is a second state used to indicate that the distance sensor is not blocked, and the third identifier preset state This is the second state for representing a non-inverted posture. After receiving the first interrupt event, the second interrupt event, or the third interrupt event, the electronic device updates the first identifier, the second identifier, or the third identifier.
在另一种情况下,在电子设备开机后,电子设备对第一标识、第二标识和第三标识进行初始化。具体的,在开机后,电子设备可以检测当前是否为亮屏状态,并根据检测结果初始化第一标识;电子设备可以检测距离传感器是否被遮挡,并根据检测结果初始化第二标识;电子设备还可以检测是否为倒立姿态,并根据检测结果初始化第三标识。In another case, after the electronic device is powered on, the electronic device initializes the first identifier, the second identifier, and the third identifier. Specifically, after being turned on, the electronic device can detect whether the screen is currently bright and initialize the first identifier according to the detection result; the electronic device can detect whether the distance sensor is blocked and initialize the second identifier according to the detection result; the electronic device can also Detect whether it is an inverted posture, and initialize a third identifier according to the detection result.
例如,在该种方案中,若电子设备接收到第一中断事件,则电子设备可以根据该第一中断事件确定是否为亮屏状态,并确定距离传感器是否被遮挡以及电子设备是否为倒立姿态,从而确定是否屏蔽触摸事件。具体的,若电子设备根据第一中断事件确定为亮屏状态,更新第一标识以使得第一标识表示亮屏状态;而后,电子设备读取保存的第二标识和第三标识,以根据第二标识确定距离传感器是否被遮挡,并根据第三标识确定电子设备是否为倒立姿态。For example, in this solution, if the electronic device receives the first interruption event, the electronic device may determine whether the screen is in a bright state according to the first interruption event, and determine whether the distance sensor is blocked and whether the electronic device is in an inverted posture. This determines whether touch events are blocked. Specifically, if the electronic device determines that it is a bright screen state according to the first interruption event, the first identifier is updated so that the first identifier indicates the bright screen state; and then, the electronic device reads the saved second identifier and the third identifier so as to The second identification determines whether the distance sensor is blocked, and determines whether the electronic device is in an inverted posture according to the third identification.
示例性的,参见图7,电子设备可以根据第一中断事件在步骤701中确定是否为亮屏状态,而后执行步骤702-705,以确定距离传感器是否被遮挡,而后确定是否为倒立姿态,从而确定是否屏蔽触摸事件。再示例性的,参见图8,电子设备可以根据第一中断事件在步骤701或步骤706中确定是否为亮屏状态,而后执行其他步骤,以确定距离传感器是否被遮挡,而后确定是否为倒立姿态,从而确定是否屏蔽触摸事件或取消屏蔽触摸事件。Exemplarily, referring to FIG. 7, the electronic device may determine whether it is a bright screen state in step 701 according to the first interruption event, and then perform steps 702-705 to determine whether the distance sensor is blocked, and then determine whether it is an inverted posture, thereby Determines whether to block touch events. For another example, referring to FIG. 8, the electronic device may determine whether the screen is bright in step 701 or step 706 according to the first interruption event, and then perform other steps to determine whether the distance sensor is blocked, and then determine whether it is an inverted posture. To determine whether to block or unblock touch events.
再例如,在该种方案中,若电子设备接收到第二中断事件,则电子设备可以根据该第二中断事件确定距离传感器是否被遮挡,并确定是否为亮屏状态以及电子设备是否为倒立姿态,从而确定是否屏蔽触摸事件。具体的,若电子设备根据第二中断事件确定距离传感器被遮挡,电子设备可以更新第二标识以使得第二标识表示距离传感器被遮挡。而后,电子设备读取保存的第一标识和第三标识,以根据第一标识确定是否为亮屏状态,并根据第三标识确定电子设备是否为倒立姿态。As another example, in this solution, if the electronic device receives a second interruption event, the electronic device may determine whether the distance sensor is blocked according to the second interruption event, and determine whether it is a bright screen state and whether the electronic device is in an inverted posture. To determine whether to block touch events. Specifically, if the electronic device determines that the distance sensor is blocked according to the second interruption event, the electronic device may update the second identifier so that the second identifier indicates that the distance sensor is blocked. Then, the electronic device reads the saved first identifier and the third identifier to determine whether it is a bright screen state according to the first identifier, and determines whether the electronic device is in an inverted posture according to the third identifier.
示例性的,参见图9,电子设备可以根据第二中断事件在步骤901中确定距离传感器是否被遮挡,而后执行步骤902-905,以确定是否为倒立姿态,而后确定是否为亮屏状态,从而确定是否屏蔽触摸事件。可以理解的是,电子设备根据第二中断事件确定距离传感器是否被遮挡之后,还可以先确定是否为亮屏状态,而后再确定是否为倒立姿态。Exemplarily, referring to FIG. 9, the electronic device may determine whether the distance sensor is blocked in step 901 according to the second interruption event, and then perform steps 902-905 to determine whether it is an inverted posture and then determine whether it is a bright screen state, thereby Determines whether to block touch events. It can be understood that after the electronic device determines whether the distance sensor is blocked according to the second interruption event, it can also first determine whether it is a bright screen state, and then determine whether it is an inverted posture.
类似的,若电子设备接收到第三中断事件,则电子设备可以根据该第三中断事件 确定是否为倒立姿态,对第三标识进行更新,并根据第一标识和第二标识确定是否为亮屏状态以及距离传感器是否被遮挡,从而确定是否屏蔽触摸事件,此处不予赘述。Similarly, if the electronic device receives a third interruption event, the electronic device may determine whether it is an inverted posture according to the third interruption event, update the third identifier, and determine whether it is a bright screen according to the first identifier and the second identifier. The state and whether the distance sensor is blocked, so as to determine whether the touch event is blocked, will not be repeated here.
上述图7-10的流程可以在收到中断事件1-中断事件6中任一个中断事件时执行,或者在收到中断事件1,3,5中任一个中断事件时执行。The above-mentioned processes of FIGS. 7-10 can be executed when any one of the interrupt events 1 to 6 is received, or when any of the interrupt events 1, 3, and 5 is received.
在另一种方案中,当电子设备接收到第一中断事件,且电子设备根据该第一中断事件确定为亮屏状态时,电子设备可以开启距离传感器和姿态传感器,而后循环确定距离传感器是否被遮挡以及电子设备是否为倒立姿态。若距离传感器被遮挡且为倒立姿态,则电子设备屏蔽触摸事件;若距离传感器未被遮挡或不是倒立姿态,则电子设备正常工作或取消屏蔽触摸事件。当电子设备接收到另一个第一中断事件,且电子设备根据该第一中断事件确定不是亮屏状态时,电子设备结束循环距离传感器是否被遮挡以及电子设备是否为倒立姿态,电子设备正常工作,且电子设备关闭距离传感器和姿态传感器,以节省电子设备的功耗。其中,在电子设备循环确定距离传感器是否被遮挡以及电子设备是否为倒立姿态的过程中,若电子设备接收到第二中断事件,则电子设备可以根据第二中断事件确定距离传感器是否被遮挡,而后再确定是否为倒立姿态;若电子设备接收到第三中断事件,则电子设备根据第三中断事件确定是否为倒立姿态,而后再确定距离传感器是否被遮挡。可以理解地,在电子设备循环确定距离传感器是否被遮挡以及电子设备是否为倒立姿态的过程中可以是根据第二中断事件或第三中断事件的触发,判断距离传感器是否被遮挡以及是否倒立状态。例如当收到中断事件3时,确定出距离传感器被遮挡,读取第三标识判断终端是否是倒立状态;或者收到中断事件5时,确定出中断是倒立状态,读取第二标识判断距离传感器是否被遮挡。In another solution, when the electronic device receives the first interruption event and the electronic device determines that the screen is in a bright state according to the first interruption event, the electronic device may turn on the distance sensor and the attitude sensor, and then determine whether the distance sensor is cycled. Obstruction and whether the electronic device is in an inverted posture. If the distance sensor is blocked and is in an inverted posture, the electronic device shields the touch event; if the distance sensor is not blocked or is not in an inverted posture, the electronic device works normally or cancels the touch event. When the electronic device receives another first interrupt event, and the electronic device determines that it is not a bright screen state according to the first interrupt event, whether the electronic device ends the cycle distance sensor is blocked and whether the electronic device is in an inverted posture, the electronic device works normally, And the electronic device turns off the distance sensor and the attitude sensor to save power consumption of the electronic device. In the process of the electronic device cyclically determining whether the distance sensor is blocked and whether the electronic device is in an inverted posture, if the electronic device receives a second interruption event, the electronic device may determine whether the distance sensor is blocked according to the second interruption event, and then Then determine whether it is an inverted posture; if the electronic device receives a third interruption event, the electronic device determines whether it is an inverted posture according to the third interruption event, and then determines whether the distance sensor is blocked. Understandably, in the process of the electronic device cyclically determining whether the distance sensor is blocked and whether the electronic device is in an inverted posture, it may be determined whether the distance sensor is blocked and an inverted state according to the trigger of the second interruption event or the third interruption event. For example, when the interrupt event 3 is received, it is determined that the distance sensor is blocked, and the third flag is read to determine whether the terminal is in an inverted state; or when the interrupt event 5 is received, it is determined that the interrupt is an inverted state, and the second flag is read to determine the distance. Whether the sensor is blocked.
在一些实施例中,第一中断事件包括中断事件1或中断事件2,第二中断事件包括中断事件3或中断事件4,第三中断事件包括中断事件5或中断事件6。In some embodiments, the first interrupt event includes interrupt event 1 or interrupt event 2, the second interrupt event includes interrupt event 3 or interrupt event 4, and the third interrupt event includes interrupt event 5 or interrupt event 6.
在另一些实施例中,第一中断事件为中断事件1,第二中断事件为中断事件3,第三中断事件为中断事件5。In other embodiments, the first interrupt event is interrupt event 1, the second interrupt event is interrupt event 3, and the third interrupt event is interrupt event 5.
具体的,电子设备上保存有上述第一标识、第二标识和第三标识。参见图11,若电子设备在步骤1101中根据第一中断事件确定为亮屏状态,则执行步骤1102,以开启距离传感器和姿态传感器。并且,电子设备根据该第一中断事件更新该第一标识。而后,电子设备循环执行步骤1103-1108,直至电子设备接收到另一个第一中断事件(在步骤1109中),且根据该第一中断事件确定电子设备为熄屏状态,则电子设备执行步骤1110,关闭距离传感器和姿态传感器,电子设备正常工作。其中,在步骤1102之后,若电子设备接收到第二中断事件,则可以执行步骤1103-1106所示的过程。并且,电子设备根据该第二中断事件和保存的第二标识确定是否更新该第二标识。具体的,若步骤1103中确定距离传感器未被遮挡,则电子设备执行步骤1105,保持正常工作;若步骤1103中确定距离传感器被遮挡,则电子设备执行步骤1104,以确定是否为倒立姿态。在步骤1104中,电子设备可以读取保存的第三标识,并根据第三标识确定电子设备是否为倒立姿态。若步骤1104中确定不是倒立姿态,则电子设备执行步骤1105,保持正常工作;若步骤1104中确定是倒立姿态,则电子设备执行步骤1106,以屏蔽触摸事件。或者,在步骤1102之后,若电子设备接收到第三中断事件,则可以执行步 骤1107、步骤1108、步骤1105以及步骤1106所示的过程,此处不予赘述。Specifically, the electronic device stores the first identifier, the second identifier, and the third identifier. Referring to FIG. 11, if the electronic device determines that the screen is bright according to the first interruption event in step 1101, step 1102 is performed to enable the distance sensor and the attitude sensor. And, the electronic device updates the first identifier according to the first interruption event. Then, the electronic device executes steps 1103-1108 cyclically until the electronic device receives another first interruption event (in step 1109), and determines that the electronic device is off-screen according to the first interruption event, then the electronic device performs step 1110 , Turn off the distance sensor and attitude sensor, and the electronic device works normally. Wherein, after step 1102, if the electronic device receives a second interrupt event, the electronic device may execute the processes shown in steps 1103-1106. And, the electronic device determines whether to update the second identifier according to the second interruption event and the saved second identifier. Specifically, if it is determined in step 1103 that the distance sensor is not blocked, the electronic device executes step 1105 to maintain normal operation; if it is determined in step 1103 that the distance sensor is blocked, the electronic device executes step 1104 to determine whether it is an inverted posture. In step 1104, the electronic device may read the saved third identifier, and determine whether the electronic device is in an inverted posture according to the third identifier. If it is determined in step 1104 that it is not an inverted posture, the electronic device executes step 1105 to maintain normal work; if it is determined in step 1104 that it is an inverted posture, the electronic device performs step 1106 to shield the touch event. Alternatively, after step 1102, if the electronic device receives the third interruption event, the processes shown in step 1107, step 1108, step 1105, and step 1106 may be performed, and details are not described herein.
在另一些实施例中,以图7为例,在步骤705之后,该方法还可以包括:若电子设备处于亮屏状态,电子设备的距离传感器被遮挡,电子设备由倒立姿态转换为非倒立姿态,且电子设备为非倒立姿态的持续时间小于或者等于第一预设值,则电子设备保持屏蔽触摸事件;若电子设备处于亮屏状态,电子设备的距离传感器被遮挡,电子设备由倒立姿态转换为非倒立姿态,且电子设备为非倒立姿态的持续时间大于第一预设值,则电子设备取消屏蔽触摸事件。其中,该第一预设值较小,具体可以根据实际需要设置,例如可以是2s。在一种具体实现中,在步骤701-705之后,当电子设备根据姿态传感器的中断事件确定电子设备由倒立姿态切换为非倒立姿态时,电子设备可以启动计时器对非倒立姿态的持续时间进行计时,从而确定非倒立姿态的持续时间与第一预设值的大小关系,进而确定是保持屏蔽还是取消屏蔽触摸事件。In other embodiments, taking FIG. 7 as an example, after step 705, the method may further include: if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is converted from an inverted posture to a non-inverted posture. And the duration of the non-inverted posture of the electronic device is less than or equal to the first preset value, the electronic device remains shielded from the touch event; if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is converted from the inverted posture Is a non-inverted posture, and the duration of the non-inverted posture of the electronic device is greater than the first preset value, the electronic device cancels shielding of the touch event. The first preset value is relatively small, and may be specifically set according to actual needs, for example, it may be 2s. In a specific implementation, after steps 701-705, when the electronic device determines that the electronic device is switched from an inverted posture to a non-inverted posture according to an interrupt event of the posture sensor, the electronic device may start a timer to perform the duration of the non-inverted posture. Timing, thereby determining the magnitude relationship between the duration of the non-inverted posture and the first preset value, and then determining whether to keep the masking event or unmasking the touch event.
也就是说,在电子设备屏蔽触摸事件之后,在电子设备处于亮屏状态且距离传感器被遮挡的情况下,若电子设备有倒立姿态暂时切换到了非倒立姿态,而后又很快回到了倒立姿态,那么电子设备不会在电子设备暂时切换到非倒立姿态时取消屏蔽触摸事件,从而可以避免频繁地屏蔽和取消屏蔽触摸事件,节省手机的功耗。That is, after the electronic device shields the touch event, if the electronic device is in a bright screen state and the distance sensor is blocked, if the electronic device has an inverted posture temporarily switched to a non-inverted posture, and then quickly returns to the inverted posture, Then, the electronic device does not cancel the touch event when the electronic device is temporarily switched to the non-inverted posture, so that the touch event can be prevented from being frequently blocked and unscreened, and the power consumption of the mobile phone can be saved.
示例性的,若手机在用户手臂上的腕包内,在用户走路或跑步的过程中,随着手臂的甩动,腕包内手机的姿态是实时变化的。但在用户甩动手臂的过程中,手机通常是倒立姿态,仅在一瞬间是非倒立状态,即手机由倒立姿态切换到非倒立姿态后仅持续了较短的时长(该时长小于第一预设值)之后又回到倒立姿态。因而,在用户走路或跑步的过程中,在手机处于亮屏状态,手机的距离传感器被遮挡,手机为倒立姿态的情况下,电子设备可以屏蔽触摸事件;在手机处于亮屏状态,手机的距离传感器被遮挡,手机短暂性地为倒立姿态(即手机为非倒立姿态的持续时长小于第一预设值)的情况下,手机可以保持屏蔽触摸事件,从而可以避免在用户走路或跑步等运动过程中频繁地屏蔽和取消屏蔽触摸事件,降低手机的功耗。Exemplarily, if the mobile phone is in the wristband of the user's arm, during the user's walking or running, the posture of the mobile phone in the wristband changes in real time as the arm is shaken. However, when the user shakes his or her arm, the mobile phone is usually in an inverted posture, and it is in a non-inverted state only for a moment, that is, the mobile phone only switches for a short period of time after switching from the inverted posture to the non-inverted posture. Value) and then return to the inverted posture. Therefore, during the user walking or running, when the mobile phone is in the bright screen state, the distance sensor of the mobile phone is blocked, and the mobile phone is in an inverted posture, the electronic device can shield the touch event; when the mobile phone is in the bright screen state, the distance of the mobile phone When the sensor is blocked and the phone is temporarily in an inverted posture (that is, the duration of the phone's non-inverted posture is less than the first preset value), the mobile phone can remain shielded from touch events, thereby avoiding movement processes such as walking or running. Frequently block and unblock touch events in the mobile phone to reduce the power consumption of the phone.
需要注意的是,在电子设备屏蔽触摸事件之后,若电子设备处于亮屏状态,电子设备的距离传感器被遮挡,电子设备由倒立姿态转换为非倒立姿态,则电子设备根据非倒立姿态的持续时间确定保持或取消屏蔽触摸事件的方案,不仅可以适用于图7所对应的实施例,还可以适用于其他实施例,例如图8-图11中任一个所对应的实施例,此处不予赘述。It should be noted that after the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is converted from an inverted posture to a non-inverted posture, the electronic device is based on the duration of the non-inverted posture The scheme for determining whether to keep or unblock the touch event can be applied not only to the embodiment corresponding to FIG. 7 but also to other embodiments, for example, the embodiment corresponding to any one of FIGS. 8 to 11, which will not be repeated here. .
在另一些实施例中,上述步骤704可以替换为:电子设备确定在当前时刻之前的第三预设时长内,电子设备为倒立姿态的时长是否大于第二预设值。若是,则执行步骤705;若否,则执行步骤703。或者,上述步骤704可以替换为:电子设备确定在当前时刻之前的第三预设时长内,电子设备为非倒立姿态的时长小于或者等于第三预设值。若是,则执行步骤705;若否,则执行步骤703。其中,第二预设值可以较大,第三预设值可以较小,第三预设值小于第二预设值。即,若电子设备处于亮屏状态;电子设备的距离传感器被遮挡;且在当前时刻之前的第三预设时长内,电子设备为倒立姿态的时长大于第二预设值或电子设备为非倒立姿态的时长小于第三预设值,则电子设备屏蔽触摸事件或保持屏蔽触摸事件。In other embodiments, the above step 704 may be replaced by: the electronic device determines whether the time during which the electronic device is in an inverted posture is greater than the second preset value within a third preset time period before the current time. If yes, go to step 705; if no, go to step 703. Alternatively, the above step 704 may be replaced by: the electronic device determines that, within a third preset time period before the current time, the time during which the electronic device is in the non-inverted posture is less than or equal to the third preset value. If yes, go to step 705; if no, go to step 703. The second preset value may be larger, the third preset value may be smaller, and the third preset value is smaller than the second preset value. That is, if the electronic device is in a bright screen state; the distance sensor of the electronic device is blocked; and within a third preset time period before the current time, the time during which the electronic device is in an inverted posture is greater than the second preset value or the electronic device is non-inverted If the duration of the gesture is less than the third preset value, the electronic device shields the touch event or keeps blocking the touch event.
在一种具体实现中,电子设备可以通过存储器实时存储电子设备的姿态是倒立姿 态还是非倒立姿态,在电子设备接收到姿态传感器的中断事件后,电子设备可以从存储器中查询当前时刻之前的第三预设时长内电子设备的姿态,从而统计该第三预设时长内电子设备为倒立姿态的时长或者电子设备为非倒立姿态的时长,进而确定电子设备为倒立姿态的时长与第二预设值大小关系,或者确定电子设备为非倒立姿态的时长与第三预设值的大小关系,从而进而确定是保持屏蔽还是取消屏蔽触摸事件。例如,第三预设时长可以为30s,第二预设值可以为25s,第三预设值可以为5s。In a specific implementation, the electronic device can store in real time whether the posture of the electronic device is an inverted posture or a non-inverted posture through the memory. After the electronic device receives the interruption event of the posture sensor, the electronic device can query the memory before the current time. The posture of the electronic device within the three preset time periods, so as to count the length of time when the electronic device is in the inverted posture or the time period when the electronic device is in the non-inverted posture during the third preset time period, and further determine the length of the electronic device in the inverted posture and the second preset Value relationship, or determining the relationship between the length of time when the electronic device is in a non-inverted posture and the third preset value, so as to further determine whether to keep blocking or unblocking the touch event. For example, the third preset duration may be 30s, the second preset value may be 25s, and the third preset value may be 5s.
也就是说,在电子设备屏蔽触摸事件之后,若电子设备处于亮屏状态,电子设备的距离传感器被遮挡,电子设备暂时性地切换为倒立状态;但在当前时刻之前的第三预设时长内,若电子设备为倒立姿态的时长大于第二预设值,或者电子设备为非倒立姿态的时长小于第三预设值,即电子设备在当前时刻之前的第三预设时长内的大多数时间内为倒立姿态,则电子设备可以保持屏蔽触摸事件,而不会立即取消触摸屏蔽事件,因而可以避免频繁地屏蔽和取消屏蔽触摸事件,降低手机的功耗。That is, after the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is temporarily switched to an inverted state; but within a third preset time period before the current time If the duration of the electronic device in the inverted posture is greater than the second preset value, or the duration of the electronic device in the non-inverted posture is less than the third preset value, that is, most of the time within the third preset duration of the electronic device before the current time Inside is an inverted posture, the electronic device can keep the touch event blocked without canceling the touch event immediately, thus avoiding the frequent blocking and unblocking of the touch event, and reducing the power consumption of the mobile phone.
示例性的,手机在用户的口袋内,在用户上楼梯时,手机在口袋内晃动,手机的姿态是动态变化的,但是大多数时间手机仍是倒立姿态。在手机处于亮屏状态,手机的距离传感器被遮挡,手机在当前时刻之前的第三预设时长内的大多数时间为倒立姿态时,手机屏蔽触摸事件或保持屏蔽触摸事件。参见图12,在t1时间段内,手机为倒立姿态,屏蔽触摸事件;在t2时间段内,电子设备为非倒立姿态,手机在t2时间段内根据之前的第三预设时长内的大多数时间为倒立姿态,因而手机在当前时刻继续屏蔽触摸事件,而不会取消屏蔽触摸事件。这样,可以在用户上楼梯的过程中避免频繁地屏蔽和取消屏蔽触摸事件,节省手机的功耗。Exemplarily, the mobile phone is in the pocket of the user. When the user goes up the stairs, the mobile phone shakes in the pocket, and the posture of the mobile phone is dynamically changed, but most of the time the mobile phone is still in an inverted posture. When the mobile phone is in a bright screen state, the distance sensor of the mobile phone is blocked, and the mobile phone is in an inverted posture most of the time within the third preset time period before the current moment, the mobile phone blocks the touch event or keeps the touch event blocked. Referring to FIG. 12, during the time period t1, the mobile phone is in an inverted posture, and the touch event is shielded; during the time period t2, the electronic device is in a non-inverted posture, and during the time period t2, the mobile phone is in accordance with Time is an inverted gesture, so the phone will continue to block touch events at the current moment without unblocking touch events. In this way, it is possible to avoid frequent blocking and unblocking of touch events while the user is going up the stairs, and save power consumption of the mobile phone.
在另一些实施例中,上述步骤300具体可以包括:当电子设备处于亮屏状态,电子设备的距离传感器被遮挡,电子设备为倒立姿态,且电子设备为竖屏显示状态时,电子设备屏蔽触摸事件。具体处理过程与图7-图11所示的方法流程类似,不同之处在于,在该实施例中,屏蔽条件在包括上述三个条件的基础上增加了“电子设备为竖屏显示状态”这一条件。与图7-图10所示方法流程类似,电子设备可以周期性地检测电子设备是否满足亮屏状态,电子设备的距离传感器被遮挡,电子设备为倒立姿态,以及电子设备为竖屏显示状态这四个条件,并在满足这四个条件时屏蔽触摸事件;若不满足这四个条件中的任意一个,且电子设备当前未屏蔽触摸事件,则电子设备保持正常工作;若不满足这四个条件中的任意一个,且电子设备当前已屏蔽触摸事件,则电子设备取消屏蔽触摸事件,恢复正常工作。电子设备还可以在接收到这四个条件中的任意条件对应的中断事件后,确定是否满足这四个条件,从而确定是否屏蔽触摸事件,此处不予赘述。In other embodiments, the above step 300 may specifically include: when the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical screen display state, the electronic device shields the touch. event. The specific processing procedure is similar to the method flow shown in FIG. 7 to FIG. 11, except that in this embodiment, the “shielding condition” includes an “electronic device in a vertical screen display state” on the basis of the above three conditions. A condition. Similar to the method flow shown in FIGS. 7-10, the electronic device can periodically detect whether the electronic device meets the bright screen state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical screen display state. Four conditions, and the touch event is shielded when these four conditions are met; if any one of these four conditions is not met, and the electronic device is not currently blocking the touch event, the electronic device keeps working normally; if these four conditions are not met Any one of the conditions and the electronic device has currently blocked the touch event, the electronic device cancels the touch event and resumes normal work. The electronic device may also determine whether to meet the four conditions after receiving an interrupt event corresponding to any one of the four conditions, thereby determining whether to shield the touch event, which is not described herein.
其中,横屏显示通常是在全屏状态下显示的,横屏显示的示意图可以参见图13;竖屏显示可以是全屏状态也可以是非全屏状态,竖屏显示的示意图可以参见图14。Among them, the horizontal screen display is usually displayed in a full screen state. A schematic view of the horizontal screen display can be referred to FIG. 13; the vertical screen display can be a full screen state or a non-full screen state, and a schematic view of the vertical screen display can be referred to FIG. 14.
在该方案中,若电子设备处于亮屏状态下,电子设备的距离传感器被遮挡,电子设备为倒立姿态,且电子设备为竖屏显示状态时,电子设备屏蔽触摸事件;若电子设备处于亮屏状态下,电子设备的距离传感器被遮挡,电子设备为倒立姿态,且电子设备为横屏显示状态,则电子设备不屏蔽触摸事件,电子设备正常工作。这样,在图15所示的用户侧躺着用手机横屏打游戏或横屏看视频的场景下,用户的手可能会遮挡到 距离传感器,电子设备处于亮屏状态,且电子设备为倒立姿态,但电子设备不是竖屏显示状态而是横屏显示状态,因而电子设备不会屏蔽触摸事件,而是保持正常工作,以使得用户能够正常打游戏或看视频。In this solution, if the electronic device is in the bright screen state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in the vertical screen display state, the electronic device shields the touch event; if the electronic device is in the bright screen state, In the state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a horizontal screen display state, the electronic device does not shield the touch event, and the electronic device works normally. In this way, in a scenario where a user plays a game horizontally or watches a video horizontally on a mobile phone as shown in FIG. 15, the user's hand may cover the distance sensor, the electronic device is in a bright screen state, and the electronic device is in an inverted posture. However, the electronic device is not in a vertical screen display state but a horizontal screen display state. Therefore, the electronic device does not block the touch event, but keeps working normally, so that the user can play games or watch videos normally.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to implement the foregoing functions, the electronic device includes hardware and / or software modules corresponding to performing each function. With reference to the example algorithm steps 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 certain function is performed by hardware or computer software-driven hardware depends on the specific application of the technical solution and design constraints. 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 be beyond the scope of the present application.
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the electronic device may be divided into functional modules according to the foregoing method example. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
在采用对应各个功能划分各个功能模块的情况下,图16示出了上述实施例中涉及的电子设备1600的一种可能的组成示意图,如图16所示,该电子设备1600可以包括:屏蔽单元1601、确定单元1602和处理单元1603。In a case where each functional module is divided according to each function, FIG. 16 shows a possible composition diagram of the electronic device 1600 involved in the foregoing embodiment. As shown in FIG. 16, the electronic device 1600 may include a shielding unit 1601, a determination unit 1602, and a processing unit 1603.
在一些实施例中,屏蔽单元1601可以用于支持电子设备1600执行上述步骤300、步骤705、步骤905、步骤1005、步骤1106等,和/或用于本文所描述的技术的其他过程。In some embodiments, the shielding unit 1601 may be used to support the electronic device 1600 to perform the above steps 300, 705, 905, 1005, 1106, etc., and / or other processes for the techniques described herein.
确定单元1602可以用于支持电子设备1600执行上述步骤701、步骤702、步骤704、步骤706、步骤707、步骤709、步骤901、步骤902、步骤904、步骤1001、步骤1002、步骤1004、步骤1101、步骤1103、步骤1104、步骤1107、步骤1108、步骤1109等,和/或用于本文所描述的技术的其他过程。The determination unit 1602 may be used to support the electronic device 1600 to perform the above steps 701, 702, 704, 706, 707, 709, 901, 902, 902, 904, 1001, 1002, 1004, and 1101. , Step 1103, step 1104, step 1107, step 1108, step 1109, etc., and / or other processes for the techniques described herein.
处理单元1603可以用于支持电子设备1600执行上述步骤703、步骤708、步骤903、步骤1003、步骤1102、步骤1105、步骤1110等,和/或用于本文所描述的技术的其他过程。The processing unit 1603 may be used to support the electronic device 1600 to perform the above steps 703, 708, 903, 1003, 1102, 1105, 1110, etc., and / or other processes for the technology described herein.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of each step involved in the foregoing method embodiments can be referred to the functional description of the corresponding functional module, and will not be repeated here.
本实施例提供的电子设备1600,用于执行上述屏蔽触摸事件的方法,因此可以达到与上述实现方法相同的效果。The electronic device 1600 provided in this embodiment is configured to perform the foregoing method for shielding a touch event, and therefore can achieve the same effect as the foregoing implementation method.
在采用集成的单元的情况下,电子设备1600可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备1600的动作进行控制管理,例如,可以用于支持电子设备1600执行上述屏蔽单元1601、确定单元1602和处理单元1603执行的步骤。存储模块可以用于支持电子设备1600存储第一标识、第二标识、第三标识等,以及存储程序代码和数据等。通信模块,可以用于支持电子设备1600与其他设备的通信。In the case where an integrated unit is adopted, the electronic device 1600 may 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 1600. For example, the processing module may be used to support the electronic device 1600 to perform the steps performed by the shielding unit 1601, the determining unit 1602, and the processing unit 1603. The storage module may be used to support the electronic device 1600 to store the first identification, the second identification, the third identification, and the like, as well as to store program code and data. The communication module can be used to support communication between the electronic device 1600 and other devices.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙 芯片、Wi-Fi芯片等与其他电子设备交互的设备。The processing module may be a processor or a controller. It may implement or execute various exemplary logical blocks, modules, and circuits described in connection with the present disclosure. The processor may also be a combination that implements computing functions, such as a combination including one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The memory module may be a memory. The communication module may specifically be a device that interacts with other electronic devices such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备可以为具有图1和图2所示结构的电子设备。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 an electronic device having a structure shown in FIG. 1 and FIG. 2.
本申请的实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的屏蔽触摸事件的方法。An embodiment of the present application further provides a computer storage medium. The computer storage medium stores computer instructions. When the computer instructions are run on the electronic device, the electronic device is caused to execute the foregoing related method steps to implement the touch shielding in the foregoing embodiment. Event method.
本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中电子设备执行的屏蔽触摸事件的方法。An embodiment of the present application further provides a computer program product, when the computer program product is run on a computer, the computer is caused to execute the foregoing related steps, so as to implement the method for shielding a touch event performed by the electronic device in the foregoing embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中电子设备执行的屏蔽触摸事件的方法。In addition, an embodiment of the present application further provides a device. The device may specifically be a chip, a component, or a module. The device may include a connected processor and a memory. The memory is used to store a computer to execute instructions. When the device is running, The processor may execute computer execution instructions stored in the memory, so that the chip executes the method for shielding a touch event performed by the electronic device in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, refer to the corresponding ones provided above. The beneficial effects in the method are not repeated here.
上述实施例中所用,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, the term "when" can be interpreted to mean "if ..." or "after" or "in response to determining ..." or "in response to detecting ...". Similarly, depending on the context, the phrases "when determined ..." or "if detected (the stated condition or event)" can be interpreted to mean "if determined ..." or "response to a determination ..." or "on detection (Statement or event stated) "or" in response to detection (statement or event stated) ".
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of the description, only the above-mentioned division of the functional modules is used as an example. In practical applications, the above-mentioned functions can be assigned by different The function module is completed, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or It can be integrated into another device, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可 以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit can be stored in a readable storage medium if it is implemented as a software functional unit and sold or used as an independent product. Based on such an understanding, the technical solution of the embodiments of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution may be embodied in the form of a software product that is stored in a storage medium. The instructions include a number of instructions for causing a device (which can be a single-chip microcomputer, a chip, or the like) or a processor to execute all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, 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.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above content is only a specific implementation of this application, but the scope of protection of this application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application. Covered within the scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (11)

  1. 一种屏蔽触摸事件的方法,其特征在于,包括:A method for shielding a touch event, comprising:
    若电子设备确定处于亮屏状态,所述电子设备的距离传感器被遮挡,以及所述电子设备为倒立姿态,则所述电子设备屏蔽触摸事件。If the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields a touch event.
  2. 根据权利要求1所述的方法,其特征在于,所述若电子设备确定处于亮屏状态,所述电子设备的距离传感器被遮挡,以及所述电子设备为倒立姿态,则所述电子设备屏蔽触摸事件,包括:The method according to claim 1, wherein if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields touch Events, including:
    所述电子设备周期性的确定所述电子设备是否处于亮屏状态,所述电子设备的距离传感器是否被遮挡,以及所述电子设备是否为倒立姿态。The electronic device periodically determines whether the electronic device is in a bright screen state, whether a distance sensor of the electronic device is blocked, and whether the electronic device is in an inverted posture.
  3. 根据权利要求1所述的方法,其特征在于,所述若电子设备确定处于亮屏状态,所述电子设备的距离传感器被遮挡,以及所述电子设备为倒立姿态,则所述电子设备屏蔽触摸事件,包括:The method according to claim 1, wherein if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields touch Events, including:
    所述电子设备在接收到第一中断事件、第二中断事件或第三中断事件后,确定所述电子设备是否处于亮屏状态,所述电子设备的距离传感器是否被遮挡,以及所述电子设备是否为倒立姿态;After receiving the first interrupt event, the second interrupt event, or the third interrupt event, the electronic device determines whether the electronic device is in a bright screen state, whether the distance sensor of the electronic device is blocked, and the electronic device Whether it is an inverted posture;
    若电子设备确定处于亮屏状态,所述电子设备的距离传感器被遮挡,以及所述电子设备为倒立姿态,则所述电子设备屏蔽触摸事件;If the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields a touch event;
    其中,所述第一中断事件用于上报触控屏由熄屏状态切换为亮屏状态;所述第二中断事件用于上报距离传感器由未被遮挡切换为被遮挡;所述第三中断事件用于上报所述电子设备由非倒立姿态切换为倒立姿态。The first interrupt event is used to report that the touch screen is switched from the off-screen state to the bright screen state; the second interrupt event is used to report that the distance sensor is switched from unblocked to blocked; the third interrupt event It is used to report that the electronic device is switched from a non-inverted posture to an inverted posture.
  4. 根据权利要求3所述的方法,其特征在于,所述电子设备在接收到第一中断事件、第二中断事件或第三中断事件后,确定所述电子设备是否处于亮屏状态,所述电子设备的距离传感器是否被遮挡,以及所述电子设备是否为倒立姿态,包括:The method according to claim 3, wherein after receiving the first interrupt event, the second interrupt event, or the third interrupt event, the electronic device determines whether the electronic device is in a bright screen state, and the electronic device Whether the distance sensor of the device is blocked and whether the electronic device is in an inverted posture include:
    所述电子设备在接收到所述第一中断事件后,确定所述电子设备处于亮屏状态;After receiving the first interrupt event, the electronic device determines that the electronic device is in a bright screen state;
    所述电子设备开启距离传感器和姿态传感器,所述姿态传感器用于检测所述电子设备的姿态;The electronic device turns on a distance sensor and a posture sensor, and the posture sensor is configured to detect the posture of the electronic device;
    所述电子设备确定距离传感器是否被遮挡,以及所述电子设备是否为倒立姿态。The electronic device determines whether the distance sensor is blocked and whether the electronic device is in an inverted posture.
  5. 根据权利要求4所述的方法,其特征在于,在所述电子设备开启距离传感器和姿态传感器后,所述方法还包括:The method according to claim 4, wherein after the electronic device turns on the distance sensor and the attitude sensor, the method further comprises:
    若所述电子设备接收到另一第一中断事件,且所述电子设备根据所述另一第一中断事件确定为熄屏状态,则所述电子设备关闭距离传感器和姿态传感器。If the electronic device receives another first interrupt event, and the electronic device determines that the screen is off according to the another first interrupt event, the electronic device turns off the distance sensor and the attitude sensor.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,在所述电子设备屏蔽触摸事件之后,所述方法还包括:The method according to any one of claims 1-5, wherein after the electronic device shields a touch event, the method further comprises:
    若所述电子设备处于亮屏状态,距离传感器被遮挡,所述电子设备由倒立姿态转换为非倒立姿态,且所述电子设备为非倒立姿态的持续时间小于或者等于第一预设值,则电子设备保持屏蔽触摸事件。If the electronic device is in a bright screen state, the distance sensor is blocked, the electronic device is converted from an inverted posture to a non-inverted posture, and the duration of the electronic device in the non-inverted posture is less than or equal to a first preset value, then The electronic device remains shielded from touch events.
  7. 根据权利要求1-5任一项所述的方法,其特征在于,所述电子设备确定是否为倒立姿态包括:The method according to any one of claims 1-5, wherein determining whether the electronic device is in an inverted posture comprises:
    在当前时刻之前的预设时长内,若所述电子设备为倒立姿态的时长大于第二预设 值,则所述电子设备确定为倒立姿态;Within a preset time period before the current time, if the length of time that the electronic device is in an inverted posture is greater than a second preset value, the electronic device determines the inverted posture;
    或者,在当前时刻之前的预设时长内,若所述电子设备为非倒立姿态的时长小于或者等于第三预设值,则所述电子设备确定为倒立姿态。Alternatively, within a preset time period before the current time, if the time period during which the electronic device is in a non-inverted posture is less than or equal to a third preset value, the electronic device is determined to be an inverted posture.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述若电子设备确定处于亮屏状态,所述电子设备的距离传感器被遮挡,以及所述电子设备为倒立姿态,则所述电子设备屏蔽触摸事件,包括:The method according to any one of claims 1 to 7, wherein if the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, The electronic device shields touch events, including:
    若电子设备确定处于亮屏状态,所述电子设备的距离传感器被遮挡,所述电子设备为倒立姿态,以及所述电子设备为竖屏显示状态,则所述电子设备屏蔽触摸事件。If the electronic device is determined to be in a bright screen state, the distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical screen display state, the electronic device blocks a touch event.
  9. 一种电子设备,包括触摸屏,存储器,一个或多个处理器,以及一个或多个程序;其中所述一个或多个程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个程序时,使得所述电子设备实现如权利要求1-8任一项所述的屏蔽触摸事件的方法。An electronic device includes a touch screen, a memory, one or more processors, and one or more programs; wherein the one or more programs are stored in the memory; characterized in that the one or more When the processor executes the one or more programs, the electronic device enables the electronic device to implement the method for shielding a touch event according to any one of claims 1-8.
  10. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备实现如权利要求1-8任一项所述的屏蔽触摸事件的方法。A computer program product containing instructions, wherein when the computer program product runs on an electronic device, the electronic device implements the method of shielding a touch event according to any one of claims 1-8.
  11. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备实现如权利要求1-8任一项所述的屏蔽触摸事件的方法。A computer-readable storage medium includes instructions, wherein when the instructions are run on an electronic device, the electronic device is enabled to implement the method for shielding a touch event according to any one of claims 1-8.
PCT/CN2018/107128 2018-09-21 2018-09-21 Method for shielding touch event, and electronic device WO2020056778A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/107128 WO2020056778A1 (en) 2018-09-21 2018-09-21 Method for shielding touch event, and electronic device
CN201880085335.4A CN111542802A (en) 2018-09-21 2018-09-21 Method for shielding touch event and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/107128 WO2020056778A1 (en) 2018-09-21 2018-09-21 Method for shielding touch event, and electronic device

Publications (1)

Publication Number Publication Date
WO2020056778A1 true WO2020056778A1 (en) 2020-03-26

Family

ID=69888063

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107128 WO2020056778A1 (en) 2018-09-21 2018-09-21 Method for shielding touch event, and electronic device

Country Status (2)

Country Link
CN (1) CN111542802A (en)
WO (1) WO2020056778A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204075A (en) * 2021-12-01 2023-06-02 荣耀终端有限公司 Method and device for preventing false touch

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016629B (en) * 2021-11-19 2023-06-06 荣耀终端有限公司 Method and device for preventing false touch
CN114578942A (en) * 2022-02-11 2022-06-03 珠海格力电器股份有限公司 Mobile display device control method and device, electronic device and medium
CN115268749B (en) * 2022-07-20 2024-04-09 广州视享科技有限公司 Control method of augmented reality equipment, mobile terminal and shielding prevention system
CN117742475A (en) * 2022-09-14 2024-03-22 华为技术有限公司 Equipment operation control method, electronic equipment and storage medium
CN116521018B (en) * 2023-07-04 2023-10-20 荣耀终端有限公司 False touch prompting method, terminal equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902854A (en) * 2014-03-18 2014-07-02 深圳创维数字技术股份有限公司 Method and terminal for preventing misoperation
CN105573632A (en) * 2015-12-14 2016-05-11 魅族科技(中国)有限公司 Terminal control method and device thereof
CN106383574A (en) * 2016-09-05 2017-02-08 广东欧珀移动通信有限公司 Screen unlocking method and device and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150051B (en) * 2013-02-25 2016-03-02 深圳市汇顶科技股份有限公司 Touch operation response method, system and touch screen terminal
CN105245717A (en) * 2015-10-27 2016-01-13 努比亚技术有限公司 Mobile terminal palm rejection device and method
CN106200878A (en) * 2016-07-19 2016-12-07 深圳市万普拉斯科技有限公司 Fingerprint control method, device and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902854A (en) * 2014-03-18 2014-07-02 深圳创维数字技术股份有限公司 Method and terminal for preventing misoperation
CN105573632A (en) * 2015-12-14 2016-05-11 魅族科技(中国)有限公司 Terminal control method and device thereof
CN106383574A (en) * 2016-09-05 2017-02-08 广东欧珀移动通信有限公司 Screen unlocking method and device and mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204075A (en) * 2021-12-01 2023-06-02 荣耀终端有限公司 Method and device for preventing false touch

Also Published As

Publication number Publication date
CN111542802A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2020119493A1 (en) Response method for touch screen and electronic device
WO2020134869A1 (en) Electronic device operating method and electronic device
CN113645351B (en) Application interface interaction method, electronic device and computer-readable storage medium
WO2020000448A1 (en) Flexible screen display method and terminal
WO2021169337A1 (en) In-screen fingerprint display method and electronic device
WO2020056778A1 (en) Method for shielding touch event, and electronic device
WO2021036770A1 (en) Split-screen processing method and terminal device
CN111543042B (en) Notification message processing method and electronic equipment
CN111258700B (en) Icon management method and intelligent terminal
CN111913750B (en) Application program management method, device and equipment
WO2020073288A1 (en) Method for triggering electronic device to execute function and electronic device
CN112740152B (en) Handwriting pen detection method, handwriting pen detection system and related device
CN113573390B (en) Antenna power adjusting method, terminal device and storage medium
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
CN114077365A (en) Split screen display method and electronic equipment
CN110609650B (en) Application state switching method and terminal equipment
CN110058729B (en) Method and electronic device for adjusting sensitivity of touch detection
CN110737916A (en) Communication terminal and processing method
CN116723384B (en) Process control method, electronic device and readable storage medium
CN116048831B (en) Target signal processing method and electronic equipment
CN113050864B (en) Screen capturing method and related equipment
WO2022042774A1 (en) Profile picture display method and electronic device
CN114449622A (en) Method for calculating Wi-Fi power consumption and electronic equipment
CN116723384A (en) Process control method, electronic device and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18934014

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18934014

Country of ref document: EP

Kind code of ref document: A1