Method for shielding touch event and electronic equipment

文档序号:1382582 发布日期:2020-08-14 浏览:9次 中文

阅读说明:本技术 一种屏蔽触摸事件的方法及电子设备 (Method for shielding touch event and electronic equipment ) 是由 黄德志 童碧峰 陈浩 于 2018-09-21 设计创作,主要内容包括:本申请实施例提供了一种屏蔽触摸事件的方法及电子设备,涉及电子技术领域,能够减少误触的发生。具体方案为:若电子设备确定处于亮屏状态,电子设备的距离传感器被遮挡,以及电子设备为倒立姿态,则电子设备屏蔽触摸事件。本申请实施例用于减少误触。(The embodiment of the application provides a method for shielding a touch event and electronic equipment, relates to the technical field of electronics, and can reduce the occurrence of false touch. The specific scheme is as follows: if the electronic equipment determines that the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, the electronic equipment shields the touch event. The embodiment of the application is used for reducing the false touch.)

A method of masking touch events, comprising:

if the electronic equipment is determined to be in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, the electronic equipment shields a touch event.

The method of claim 1, wherein if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is occluded, and the electronic device is in an inverted posture, then the electronic device masks the touch event, comprising:

the electronic equipment periodically determines whether the electronic equipment is in a bright screen state, whether a distance sensor of the electronic equipment is shielded, and whether the electronic equipment is in an inverted posture.

The method of claim 1, wherein if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is occluded, and the electronic device is in an inverted posture, then the electronic device masks the touch event, comprising:

after receiving a first interrupt event, a second interrupt event or a third interrupt event, the electronic equipment determines whether the electronic equipment is in a bright screen state, whether a distance sensor of the electronic equipment is shielded, and whether the electronic equipment is in an inverted posture;

if the electronic equipment determines that the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, shielding a touch event by the electronic equipment;

the first interrupt event is used for reporting that the touch screen is switched from a screen-off state to a screen-on state; the second interruption event is used for reporting that the distance sensor is switched from being shielded to being shielded from being shielded; and the third interrupt event is used for reporting that the electronic equipment is switched from the non-inverted posture to the inverted posture.

The method of claim 3, wherein the electronic device determining whether the electronic device is in a bright screen state, whether a distance sensor of the electronic device is obscured, and whether the electronic device is in an inverted posture after receiving the first interrupt event, the second interrupt event, or the third interrupt event comprises:

after the electronic equipment receives the first interrupt event, determining that the electronic equipment is in a bright screen state;

the electronic equipment starts a distance sensor and an attitude sensor, and the attitude sensor is used for detecting the attitude of the electronic equipment;

the electronic device determines whether the distance sensor is occluded and whether the electronic device is in an inverted posture.

The method of claim 4, wherein after the electronic device turns on a distance sensor and a gesture sensor, the method further comprises:

if the electronic equipment receives another first interrupt event and the electronic equipment determines that the electronic equipment is in a screen extinguishing state according to the other first interrupt event, the electronic equipment closes the distance sensor and the attitude sensor.

The method of any of claims 1-5, wherein after the electronic device masks a touch event, the method further comprises:

if the electronic equipment is in a bright screen state, the distance sensor is shielded, the electronic equipment is converted from the inverted posture into the non-inverted posture, and the duration time of the non-inverted posture of the electronic equipment is less than or equal to a first preset value, the electronic equipment keeps shielding the touch event.

The method of any of claims 1-5, wherein the electronic device determining whether the inverted posture is an inverted posture comprises:

within a preset time length before the current time, if the time length of the electronic equipment in the inverted posture is larger than a second preset value, determining the electronic equipment in the inverted posture;

or, within a preset time period before the current time, if the time period of the electronic equipment in the non-inverted posture is less than or equal to a third preset value, determining that the electronic equipment is in the inverted posture.

The method of any one of claims 1-7, wherein the electronic device masks a touch event if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is occluded, and the electronic device is in an inverted posture, comprising:

if the electronic equipment is determined to be in a bright screen state, the distance sensor of the electronic equipment is shielded, the electronic equipment is in an inverted posture, and the electronic equipment is in a vertical screen display state, the electronic equipment shields touch events.

An electronic device comprising a touch screen, memory, one or more processors, and one or more programs; wherein the one or more programs are stored in the memory; wherein the one or more processors, when executing the one or more programs, cause the electronic device to implement the method of masking touch events of any of claims 1-8.

A computer program product comprising instructions for causing an electronic device to carry out the method of masking touch events according to any one of claims 1 to 8 when the computer program product is run on the electronic device.

A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to implement the method of masking touch events of any of claims 1-8.

1页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于NVMe的数据写入方法、装置及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类