[go: up one dir, main page]

CN106021010A - Processing method and device when proximity sensor is abnormal - Google Patents

Processing method and device when proximity sensor is abnormal Download PDF

Info

Publication number
CN106021010A
CN106021010A CN201610357530.0A CN201610357530A CN106021010A CN 106021010 A CN106021010 A CN 106021010A CN 201610357530 A CN201610357530 A CN 201610357530A CN 106021010 A CN106021010 A CN 106021010A
Authority
CN
China
Prior art keywords
proximity sensor
application program
abnormal
enabling
state
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201610357530.0A
Other languages
Chinese (zh)
Other versions
CN106021010B (en
Inventor
张强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610357530.0A priority Critical patent/CN106021010B/en
Publication of CN106021010A publication Critical patent/CN106021010A/en
Application granted granted Critical
Publication of CN106021010B publication Critical patent/CN106021010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/80Arrangements in the sub-station, i.e. sensing device
    • H04Q2209/86Performing a diagnostic of the sensing device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to a processing method and a processing device for proximity sensor abnormity. The method comprises the following steps: receiving an enabling instruction of the application program to the proximity sensor, and enabling the proximity sensor according to the enabling instruction; if the enabling is abnormal, reporting the far state to the application program; if the enabling is normal, but the state is not reported to the application program within the set time, the far state is reported to the application program. The device comprises: the proximity sensor enabling module is used for receiving an enabling instruction of the application program to the proximity sensor and enabling the proximity sensor according to the enabling instruction; the first far state reporting module is used for reporting the far state to the application program when the enabling exception occurs; and the second far-away state reporting module is used for reporting the far-away state to the application program when the enabling is normal but the state is not reported to the application program within the set time. The method can effectively ensure the normal use of each application when the proximity sensor is abnormal.

Description

接近传感器异常时的处理方法和装置Processing method and device when proximity sensor is abnormal

技术领域technical field

本发明涉及接近传感器技术领域,特别是涉及一种接近传感器异常时的处理方法以及一种接近传感器异常时的处理装置。The invention relates to the technical field of proximity sensors, in particular to a processing method for abnormality of the proximity sensor and a processing device for abnormality of the proximity sensor.

背景技术Background technique

接近传感器已经大量应用在移动终端的各个App(Application,应用程序)中,比如打电话、自动背光、防止误触发、触摸屏的黑屏手势以及指纹控制等。如果接近传感器出现问题,例如,由于手机的跌落导致接近传感器通信有问题,或者静电问题导致通信失败,就会导致接近传感器处于一个错误的状态,而这个状态会引起应用的异常,给用户造成困惑。Proximity sensors have been widely used in various Apps (Applications) of mobile terminals, such as making calls, automatic backlighting, preventing false triggers, black screen gestures on touch screens, and fingerprint control. If there is a problem with the proximity sensor, for example, the proximity sensor has communication problems due to a drop of the mobile phone, or the communication fails due to static electricity, it will cause the proximity sensor to be in a wrong state, and this state will cause abnormalities in the application and confuse the user. .

当某一个App使能接近传感器时,底层驱动在设定时间内就需要上报一个接近或者远离的状态。如果由于某种原因(例如接近传感器的芯片出现通信问题,无法上报数据),应用程序未获取到上报的状态值,那么就会按照上一次获得的状态值来进行处理。例如,应用程序上一次获取的是接近状态,而当接近传感器再次被使能时,底层驱动在设定时间内并没有上报状态,那么应用程序就会以上一次获取的状态(接近状态)来进行操作,因而就会造成应用的异常,例如,来电的时候,刚使能接近传感器,屏幕就会熄灭,或者一直处于防止误触发的界面,或者黑屏手势一直无效,又或者指纹一直无效等等。When a certain App enables the proximity sensor, the underlying driver needs to report a state of proximity or distance within the set time. If for some reason (for example, the chip of the proximity sensor has a communication problem and cannot report data), the application program does not obtain the reported status value, then it will be processed according to the status value obtained last time. For example, the last time the application obtained the proximity state, and when the proximity sensor is enabled again, the underlying driver does not report the state within the set time, then the application will proceed with the state (proximity state) obtained last time. For example, when the proximity sensor is enabled when a call comes in, the screen will go off, or it will always be on the interface to prevent false triggers, or the black screen gesture will always be invalid, or the fingerprint will always be invalid, etc.

发明内容Contents of the invention

基于此,有必要针对上述问题,提供一种接近传感器异常时的处理方法和装置,能够在接近传感器出现异常时保证各个应用的正常操作。Based on this, it is necessary to address the above problems and provide a method and device for processing when the proximity sensor is abnormal, which can ensure the normal operation of each application when the proximity sensor is abnormal.

为了达到上述目的,本发明采取的技术方案如下:In order to achieve the above object, the technical scheme that the present invention takes is as follows:

一种接近传感器异常时的处理方法,包括步骤:A processing method when a proximity sensor is abnormal, comprising steps:

接收应用程序对接近传感器的使能指令,根据所述使能指令对所述接近传感器进行使能;receiving an enabling instruction from the application program for the proximity sensor, and enabling the proximity sensor according to the enabling instruction;

若使能异常,将远离状态上报给所述应用程序;If abnormality is enabled, report the far away state to the application program;

若使能正常,但在设定时间内没有向所述应用程序上报状态,则将远离状态上报给所述应用程序。If it is enabled normally, but the state is not reported to the application program within the set time, the remote state is reported to the application program.

一种接近传感器异常时的处理装置,包括:A processing device when a proximity sensor is abnormal, comprising:

接近传感器使能模块,用于接收应用程序对接近传感器的使能指令,根据所述使能指令对所述接近传感器进行使能;A proximity sensor enabling module, configured to receive an enabling instruction from an application program to the proximity sensor, and enable the proximity sensor according to the enabling instruction;

第一远离状态上报模块,用于在使能异常时,将远离状态上报给所述应用程序;The first remote status reporting module is configured to report the remote status to the application program when an exception is enabled;

第二远离状态上报模块,用于在使能正常,但在设定时间内没有向所述应用程序上报状态时,将远离状态上报给所述应用程序。The second remote status reporting module is configured to report the remote status to the application program when the status is enabled normally but the status is not reported to the application program within a set time.

本发明接近传感器异常时的处理方法和装置,在使能不成功,或者虽然使能成功,但是在设定时间内底层驱动依旧没有上报状态的情况下,即接近传感器出现异常时,上报远离状态,相较于现有技术中在接近传感器异常时底层驱动不上报任何状态的技术方案,本发明能够在接近传感器出现异常时有效保证各个应用的正常使用。The processing method and device for the abnormality of the proximity sensor of the present invention, when the enabling is unsuccessful, or even though the enabling is successful, but the underlying driver still does not report the state within the set time, that is, when the proximity sensor is abnormal, the far away state is reported. Compared with the technical solution in the prior art that the underlying driver does not report any status when the proximity sensor is abnormal, the present invention can effectively ensure the normal use of various applications when the proximity sensor is abnormal.

附图说明Description of drawings

图1为本发明接近传感器异常时的处理方法实施例的流程示意图;1 is a schematic flow diagram of an embodiment of a processing method when a proximity sensor is abnormal in the present invention;

图2为本发明接近传感器异常时的处理装置实施例的结构示意图。FIG. 2 is a schematic structural diagram of an embodiment of the processing device when the proximity sensor is abnormal in the present invention.

具体实施方式detailed description

为更进一步阐述本发明所采取的技术手段及取得的效果,下面结合附图及较佳实施例,对本发明的技术方案,进行清楚和完整的描述。In order to further illustrate the technical means adopted by the present invention and the achieved effects, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and preferred embodiments.

如图1所示,一种接近传感器异常时的处理方法,包括步骤:As shown in Figure 1, a processing method when the proximity sensor is abnormal includes steps:

S110、接收应用程序对接近传感器的使能指令,根据所述使能指令对所述接近传感器进行使能;S110. Receive an enabling instruction of the proximity sensor from the application program, and enable the proximity sensor according to the enabling instruction;

S120、若使能异常,将远离状态上报给所述应用程序;S120. If the abnormality is enabled, report the away status to the application program;

S130、若使能正常,但在设定时间内没有向所述应用程序上报状态,则将远离状态上报给所述应用程序。S130. If the enable is normal, but the status is not reported to the application program within a set time, report the remote status to the application program.

本发明方法可以通过底层驱动的程序实现,一般应用于移动终端。为了更好的理解本发明的实施过程,下面对各个步骤的技术特征进行详细介绍。The method of the present invention can be realized through a program driven by the bottom layer, and is generally applied to a mobile terminal. In order to better understand the implementation process of the present invention, the technical features of each step are introduced in detail below.

在步骤S110中,应用程序包括打电话、自动背光、防止误触发、触摸屏的黑屏手势以及指纹控制等。当接收到某一个App对接近传感器的使能指令时,对接近传感器进行使能。在一个实施例中,根据所述使能指令对所述接近传感器进行上电以及寄存器初始化。In step S110, the application program includes making a phone call, automatic backlight, preventing false triggering, black screen gesture of the touch screen, fingerprint control, and the like. When receiving an enabling instruction from an App for the proximity sensor, enable the proximity sensor. In one embodiment, the proximity sensor is powered on and registers are initialized according to the enabling instruction.

在步骤S120中,对接近传感器进行使能后,会接收到一个反馈值,该反馈值包含使能是否正常的信息,例如,反馈值为0时表示使能异常,反馈值为1时表示使能正常。需要说明的是,上述仅是对反馈值的具体示例,反馈值还可以用其它形式表示使能异常和使能正常,本发明并不对此做出限定。In step S120, after the proximity sensor is enabled, a feedback value will be received, which includes information about whether the enable is normal. For example, when the feedback value is 0, it means that the enable is abnormal; can be normal. It should be noted that the above is only a specific example of the feedback value, and the feedback value may also use other forms to indicate enabling abnormality and enabling normality, which is not limited in the present invention.

根据反馈值确定使能异常时,相较于现有技术中底层驱动不上报状态的方案,本发明将远离状态上报给应用程序,从而保证在接近传感器异常时应用程序的正常使用。When the abnormality is determined according to the feedback value, compared with the solution in the prior art that the underlying driver does not report the status, the present invention reports the far status to the application program, thereby ensuring the normal use of the application program when the proximity sensor is abnormal.

为了避免误判断,即使能异常也有可能是其它原因导致的,并不一定是接近传感器出现问题,在一个实施例中,将远离状态上报给所述应用程序之前,还可以包括步骤:In order to avoid misjudgment, even if there is an abnormality, it may be caused by other reasons, not necessarily a problem with the proximity sensor. In one embodiment, before reporting the far away state to the application, steps may be included:

重新对所述接近传感器进行使能;re-enabling the proximity sensor;

若连续使能异常的次数大于设定值,进入将远离状态上报给所述应用程序的步骤。If the number of consecutively enabled exceptions is greater than the set value, enter the step of reporting the remote state to the application program.

如果使能不正常,底层驱动重新对接近传感器进行使能。设定值可以根据用户的需要进行设置,例如设置为3次。如果连续使能异常的次数大于设定值,将远离状态上报给应用程序。If the enable is abnormal, the underlying driver will re-enable the proximity sensor. The setting value can be set according to the needs of the user, for example, set to 3 times. If the number of consecutive enabled exceptions is greater than the set value, the remote status will be reported to the application program.

为了使用户及时了解是接近传感器出现异常导致的应用异常,并及时对接近传感器进行维修,在一个实施例中,若连续使能异常的次数大于设定值,还可以包括步骤:In order for the user to know in time that the application abnormality is caused by the abnormality of the proximity sensor, and to repair the proximity sensor in time, in one embodiment, if the number of consecutively enabled abnormalities is greater than the set value, steps may also be included:

确定所述接近传感器的硬件存在异常,并显示接近传感器硬件异常的提醒信息。It is determined that the hardware of the proximity sensor is abnormal, and a reminder message that the hardware of the proximity sensor is abnormal is displayed.

在连续使能异常的次数大于设定值时,可以认定是接近传感器的芯片存在硬件问题,则上报远离状态的同时,还同时显示接近传感器硬件异常的提醒信息,通知用户对接近传感器进行维修。显示提醒信息可以通过多种方式实现,例如弹出一个窗口提醒用户接近传感器的硬件异常,或者显示特定符号以提醒用户接近传感器的硬件异常。When the number of consecutive enable exceptions is greater than the set value, it can be determined that there is a hardware problem in the proximity sensor chip. When the remote state is reported, a reminder message of the proximity sensor hardware abnormality is displayed at the same time, and the user is notified to repair the proximity sensor. Displaying the reminder information can be implemented in various ways, for example, popping up a window to remind the user of the hardware abnormality of the proximity sensor, or displaying a specific symbol to remind the user of the hardware abnormality of the proximity sensor.

在步骤S130中,若根据反馈值确定使能正常,则底层驱动在设定时间内就需要上报一个接近或者远离的状态。设定时间一般以开始使能为时间起始点,具体数值可以根据实际需要设定,例如,设定时间设置为200ms(毫秒)等。In step S130, if it is determined that the enable is normal according to the feedback value, the underlying driver needs to report a state of approaching or moving away within a set time. The setting time generally takes the start of enabling as the time starting point, and the specific value can be set according to actual needs, for example, the setting time is set to 200ms (milliseconds).

如果使能通过,但是底层驱动在设定时间内依旧没有上报状态,则直接上报远离状态。相较于现有技术此情况下底层驱动不上报状态的方案,本发明将远离状态上报给应用程序,从而保证在接近传感器异常时应用程序的正常使用。If it is enabled and passed, but the underlying driver still does not report the status within the set time, it will directly report the away status. Compared with the solution in the prior art that the underlying driver does not report the state in this case, the present invention reports the away state to the application program, thereby ensuring the normal use of the application program when the proximity sensor is abnormal.

为了使用户及时了解是接近传感器出现异常导致的应用异常,并及时对接近传感器进行维修,在一个实施例中,在设定时间内没有向所述应用程序上报状态时,还可以包括步骤:In order for the user to know in time that the application abnormality is caused by the abnormality of the proximity sensor, and to repair the proximity sensor in time, in one embodiment, when the status is not reported to the application program within the set time, steps may also be included:

确定所述接近传感器的功能存在异常,并显示接近传感器功能异常的提醒信息。It is determined that the function of the proximity sensor is abnormal, and a reminder message that the function of the proximity sensor is abnormal is displayed.

在设定时间内没有向所述应用程序上报状态时,可以认定是接近传感器的芯片的某些功能存在问题,则上报远离状态的同时,还同时显示接近传感器功能异常的提醒信息,通知用户对接近传感器进行维修。显示提醒信息可以通过多种方式实现,例如弹出一个窗口提醒用户接近传感器的功能异常,或者显示特定符号以提醒用户接近传感器的功能异常。When the state is not reported to the application program within the set time, it can be determined that there is a problem with some functions of the chip of the proximity sensor. When the far away state is reported, a reminder message that the function of the proximity sensor is abnormal is also displayed at the same time to notify the user. Proximity sensor for repair. Displaying the reminder information can be realized in various ways, such as popping up a window to remind the user that the proximity sensor is abnormal, or displaying a specific symbol to remind the user that the proximity sensor is abnormal.

基于同一发明构思,本发明还提供一种接近传感器异常时的处理装置,下面结合附图对本发明处理装置的具体实施方式做详细描述。Based on the same inventive concept, the present invention also provides a processing device when the proximity sensor is abnormal. The specific implementation of the processing device of the present invention will be described in detail below with reference to the accompanying drawings.

如图2所示,一种接近传感器异常时的处理装置,包括:As shown in Figure 2, a processing device when the proximity sensor is abnormal, including:

接近传感器使能模块110,用于接收应用程序对接近传感器的使能指令,根据所述使能指令对所述接近传感器进行使能;The proximity sensor enabling module 110 is configured to receive an enabling instruction of the application program to the proximity sensor, and enable the proximity sensor according to the enabling instruction;

第一远离状态上报模块120,用于在使能异常时,将远离状态上报给所述应用程序;The first remote status reporting module 120 is configured to report the remote status to the application program when an exception is enabled;

第二远离状态上报模块130,用于在使能正常,但在设定时间内没有向所述应用程序上报状态时,将远离状态上报给所述应用程序。The second remote state reporting module 130 is configured to report the remote state to the application program when it is enabled normally but the state is not reported to the application program within a set time.

本发明装置可以通过底层驱动的程序模块实现,一般安装于移动终端。为了更好的理解本发明的实施过程,下面对各个模块的技术特征进行详细介绍。The device of the present invention can be realized through a program module driven by the bottom layer, and is generally installed in a mobile terminal. In order to better understand the implementation process of the present invention, the technical features of each module are introduced in detail below.

应用程序包括打电话、自动背光、防止误触发、触摸屏的黑屏手势以及指纹控制等。当接近传感器使能模块110接收到某一个App对接近传感器的使能指令时,对接近传感器进行使能。在一个实施例中,所述接近传感器使能模块110根据所述使能指令对所述接近传感器进行上电以及寄存器初始化。Applications include phone calls, automatic backlight, false trigger prevention, screen-to-black gestures for touch screens, and fingerprint control, among others. When the proximity sensor enabling module 110 receives an instruction to enable the proximity sensor from an App, it enables the proximity sensor. In one embodiment, the proximity sensor enabling module 110 powers on the proximity sensor and initializes registers according to the enabling instruction.

对接近传感器进行使能后,会有一个反馈值,该反馈值包含使能是否正常的信息,可以根据该反馈值确定使能是否正常。After the proximity sensor is enabled, there will be a feedback value, which includes information about whether the enable is normal, and whether the enable is normal can be determined according to the feedback value.

根据反馈值确定使能异常时,相较于现有技术中底层驱动不上报状态的方案,本发明的第一远离状态上报模块120将远离状态上报给应用程序,从而保证在接近传感器异常时应用程序的正常使用。When the abnormality is determined to be enabled according to the feedback value, compared with the scheme in which the underlying driver does not report the status in the prior art, the first remote status reporting module 120 of the present invention reports the remote status to the application program, thereby ensuring that the application program when the proximity sensor is abnormal normal use of the program.

为了避免误判断,即使能异常也有可能是其它原因导致的,并不一定是接近传感器出现问题,在一个实施例中,所述第一远离状态上报模块120在使能异常时,还用于重新对所述接近传感器进行使能,在连续使能异常的次数大于设定值时,将远离状态上报给所述应用程序。In order to avoid misjudgment, even if there is an abnormality, it may be caused by other reasons, and it is not necessarily a problem with the proximity sensor. In one embodiment, the first remote state reporting module 120 is also used to restart when the abnormality is enabled. The proximity sensor is enabled, and when the number of consecutive enable exceptions is greater than a set value, the remote state is reported to the application program.

为了使用户及时了解是接近传感器出现异常导致的应用异常,并及时对接近传感器进行维修,在一个实施例中,所述第一远离状态上报模块120在连续使能异常的次数大于设定值时,还用于确定所述接近传感器的硬件存在异常,并显示接近传感器硬件异常的提醒信息。In order to let the user know in time that the application abnormality is caused by the abnormality of the proximity sensor, and to repair the proximity sensor in time, in one embodiment, the first remote state reporting module 120 is enabled when the number of consecutive abnormalities is greater than the set value , is also used to determine that there is an abnormality in the hardware of the proximity sensor, and display a reminder message that the hardware of the proximity sensor is abnormal.

在连续使能异常的次数大于设定值时,可以认定是接近传感器的芯片存在硬件问题,则第一远离状态上报模块120上报远离状态的同时,还同时显示接近传感器硬件异常的提醒信息,通知用户对接近传感器进行维修。显示提醒信息可以通过多种方式实现,例如弹出一个窗口提醒用户接近传感器的硬件异常,或者显示特定符号以提醒用户接近传感器的硬件异常。When the number of times of continuous abnormality is greater than the set value, it can be determined that there is a hardware problem in the chip of the proximity sensor, and when the first distance away state reporting module 120 reports the state away from the state, it also displays the reminder information that the proximity sensor hardware is abnormal, notifying The user performs maintenance on the proximity sensor. Displaying the reminder information can be implemented in various ways, for example, popping up a window to remind the user of the hardware abnormality of the proximity sensor, or displaying a specific symbol to remind the user of the hardware abnormality of the proximity sensor.

若根据反馈值确定使能正常,则底层驱动在设定时间内就需要上报一个接近或者远离的状态。设定时间一般以开始使能为时间起始点,具体数值可以根据实际需要设定。If it is determined to be enabled normally according to the feedback value, the underlying driver needs to report a state of approaching or moving away within the set time. The setting time generally takes the start of enabling as the starting point of the time, and the specific value can be set according to actual needs.

如果使能通过,但是在设定时间内依旧没有上报状态,则第二远离状态上报模块130直接上报远离状态。相较于现有技术此情况下底层驱动不上报状态的方案,本发明将远离状态上报给应用程序,从而保证在接近传感器异常时应用程序的正常使用。If it is enabled, but the status is still not reported within the set time, the second away status reporting module 130 directly reports the away status. Compared with the solution in the prior art that the underlying driver does not report the state in this case, the present invention reports the away state to the application program, thereby ensuring the normal use of the application program when the proximity sensor is abnormal.

为了使用户及时了解是接近传感器出现异常导致的应用异常,并及时对接近传感器进行维修,在一个实施例中,所述第二远离状态上报模块130在设定时间内没有向所述应用程序上报状态时,还用于确定所述接近传感器的功能存在异常,并显示接近传感器功能异常的提醒信息。In order for the user to know in time that the application abnormality is caused by the abnormality of the proximity sensor, and to repair the proximity sensor in time, in one embodiment, the second remote state reporting module 130 does not report to the application program within the set time state, it is also used to determine that the function of the proximity sensor is abnormal, and display a reminder message that the proximity sensor is abnormal.

在设定时间内没有向所述应用程序上报状态时,可以认定是接近传感器的芯片的某些功能存在问题,则第二远离状态上报模块130上报远离状态的同时,还同时显示接近传感器功能异常的提醒信息,通知用户对接近传感器进行维修。显示提醒信息可以通过多种方式实现,例如弹出一个窗口提醒用户接近传感器的功能异常,或者显示特定符号以提醒用户接近传感器的功能异常。When the state is not reported to the application program within the set time, it can be determined that there is a problem with some functions of the chip of the proximity sensor, then the second far away state reporting module 130 reports the far away state, and simultaneously displays the proximity sensor function abnormality The reminder information to notify the user to repair the proximity sensor. Displaying the reminder information can be realized in various ways, such as popping up a window to remind the user that the proximity sensor is abnormal, or displaying a specific symbol to remind the user that the proximity sensor is abnormal.

以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, should be considered as within the scope of this specification.

以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as limiting the patent scope of the invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (10)

1.一种接近传感器异常时的处理方法,其特征在于,包括步骤:1. A processing method when a proximity sensor is abnormal, comprising the steps of: 接收应用程序对接近传感器的使能指令,根据所述使能指令对所述接近传感器进行使能;receiving an enabling instruction from the application program for the proximity sensor, and enabling the proximity sensor according to the enabling instruction; 若使能异常,将远离状态上报给所述应用程序;If abnormality is enabled, report the far away state to the application program; 若使能正常,但在设定时间内没有向所述应用程序上报状态,则将远离状态上报给所述应用程序。If it is enabled normally, but the state is not reported to the application program within the set time, the remote state is reported to the application program. 2.根据权利要求1所述的接近传感器异常时的处理方法,其特征在于,若使能异常,将远离状态上报给所述应用程序之前,还包括步骤:2. The processing method when the proximity sensor is abnormal according to claim 1, characterized in that, if the abnormality is enabled, before reporting the far away state to the application program, the step further includes: 重新对所述接近传感器进行使能;re-enabling the proximity sensor; 若连续使能异常的次数大于设定值,进入将远离状态上报给所述应用程序的步骤。If the number of consecutively enabled exceptions is greater than the set value, enter the step of reporting the remote state to the application program. 3.根据权利要求2所述的接近传感器异常时的处理方法,其特征在于,若连续使能异常的次数大于设定值,还包括步骤:3. The processing method when the proximity sensor is abnormal according to claim 2, characterized in that, if the number of consecutively enabled abnormalities is greater than the set value, further comprising the steps of: 确定所述接近传感器的硬件存在异常,并显示接近传感器硬件异常的提醒信息。It is determined that the hardware of the proximity sensor is abnormal, and a reminder message that the hardware of the proximity sensor is abnormal is displayed. 4.根据权利要求1所述的接近传感器异常时的处理方法,其特征在于,在设定时间内没有向所述应用程序上报状态时,还包括步骤:4. The processing method when the proximity sensor is abnormal according to claim 1, characterized in that, when the state is not reported to the application program within the set time, it also includes the steps of: 确定所述接近传感器的功能存在异常,并显示接近传感器功能异常的提醒信息。It is determined that the function of the proximity sensor is abnormal, and a reminder message that the function of the proximity sensor is abnormal is displayed. 5.根据权利要求1至4任意一项所述的接近传感器异常时的处理方法,其特征在于,根据所述使能指令对所述接近传感器进行上电以及寄存器初始化。5 . The method for processing when the proximity sensor is abnormal according to any one of claims 1 to 4 , wherein the proximity sensor is powered on and registers are initialized according to the enabling instruction. 6.一种接近传感器异常时的处理装置,其特征在于,包括:6. A processing device when a proximity sensor is abnormal, comprising: 接近传感器使能模块,用于接收应用程序对接近传感器的使能指令,根据所述使能指令对所述接近传感器进行使能;A proximity sensor enabling module, configured to receive an enabling instruction from an application program to the proximity sensor, and enable the proximity sensor according to the enabling instruction; 第一远离状态上报模块,用于在使能异常时,将远离状态上报给所述应用程序;The first remote status reporting module is configured to report the remote status to the application program when an exception is enabled; 第二远离状态上报模块,用于在使能正常,但在设定时间内没有向所述应用程序上报状态时,将远离状态上报给所述应用程序。The second remote status reporting module is configured to report the remote status to the application program when the status is enabled normally but the status is not reported to the application program within a set time. 7.根据权利要求6所述的接近传感器异常时的处理装置,其特征在于,所述第一远离状态上报模块在使能异常时,还用于重新对所述接近传感器进行使能,在连续使能异常的次数大于设定值时,将远离状态上报给所述应用程序。7. The processing device when the proximity sensor is abnormal according to claim 6, characterized in that, when the first remote state reporting module is enabled abnormally, it is also used to re-enable the proximity sensor. When the number of enabled exceptions is greater than the set value, the remote state is reported to the application program. 8.根据权利要求7所述的接近传感器异常时的处理装置,其特征在于,所述第一远离状态上报模块在连续使能异常的次数大于设定值时,还用于确定所述接近传感器的硬件存在异常,并显示接近传感器硬件异常的提醒信息。8. The processing device when the proximity sensor is abnormal according to claim 7, wherein the first remote state reporting module is also used to determine that the proximity sensor is abnormal when the number of consecutive abnormalities is greater than a set value There is an abnormality in the hardware of the proximity sensor, and a reminder message that the proximity sensor hardware is abnormal is displayed. 9.根据权利要求6所述的接近传感器异常时的处理装置,其特征在于,所述第二远离状态上报模块在设定时间内没有向所述应用程序上报状态时,还用于确定所述接近传感器的功能存在异常,并显示接近传感器功能异常的提醒信息。9. The processing device when the proximity sensor is abnormal according to claim 6, characterized in that, when the second distance reporting module does not report the status to the application program within the set time, it is also used to determine the There is an abnormality in the function of the proximity sensor, and a reminder message indicating that the function of the proximity sensor is abnormal is displayed. 10.根据权利要求6至9任意一项所述的接近传感器异常时的处理装置,其特征在于,所述接近传感器使能模块根据所述使能指令对所述接近传感器进行上电以及寄存器初始化。10. The processing device when the proximity sensor is abnormal according to any one of claims 6 to 9, wherein the proximity sensor enabling module powers on the proximity sensor and initializes registers according to the enabling instruction .
CN201610357530.0A 2016-05-25 2016-05-25 Method and device for processing proximity sensor abnormality Active CN106021010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610357530.0A CN106021010B (en) 2016-05-25 2016-05-25 Method and device for processing proximity sensor abnormality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610357530.0A CN106021010B (en) 2016-05-25 2016-05-25 Method and device for processing proximity sensor abnormality

Publications (2)

Publication Number Publication Date
CN106021010A true CN106021010A (en) 2016-10-12
CN106021010B CN106021010B (en) 2018-11-27

Family

ID=57094394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610357530.0A Active CN106021010B (en) 2016-05-25 2016-05-25 Method and device for processing proximity sensor abnormality

Country Status (1)

Country Link
CN (1) CN106021010B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713572A (en) * 2016-12-27 2017-05-24 广东欧珀移动通信有限公司 Data reporting control method, device and terminal
CN107517314A (en) * 2017-08-24 2017-12-26 广东欧珀移动通信有限公司 Mobile terminal, control method, control device and storage medium
CN110347541A (en) * 2019-05-20 2019-10-18 珠海格力电器股份有限公司 Method and system for checking false touch prevention function and terminal equipment
US10897318B2 (en) 2019-04-16 2021-01-19 Qualcomm Incorporated Method and apparatus for maximum permissible exposure proximity sensor fault detection
WO2021068097A1 (en) * 2019-10-08 2021-04-15 深圳市欢太科技有限公司 Black screen gesture processing method and apparatus, electronic device, and storage medium
CN114995676A (en) * 2021-12-29 2022-09-02 荣耀终端有限公司 Fingerprint anti-mistouch method, graphical interface and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104160355A (en) * 2012-01-09 2014-11-19 摩托罗拉移动有限责任公司 System and method for reducing occurrences of unintended operations in an electronic device
US9026841B1 (en) * 2014-09-09 2015-05-05 Belkin International, Inc. Coordinated and device-distributed detection of abnormal network device operation
CN104657228A (en) * 2015-03-04 2015-05-27 深圳市欧珀通信软件有限公司 Method and device for processing system exceptions of mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104160355A (en) * 2012-01-09 2014-11-19 摩托罗拉移动有限责任公司 System and method for reducing occurrences of unintended operations in an electronic device
US9026841B1 (en) * 2014-09-09 2015-05-05 Belkin International, Inc. Coordinated and device-distributed detection of abnormal network device operation
CN104657228A (en) * 2015-03-04 2015-05-27 深圳市欧珀通信软件有限公司 Method and device for processing system exceptions of mobile terminal

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713572A (en) * 2016-12-27 2017-05-24 广东欧珀移动通信有限公司 Data reporting control method, device and terminal
CN106713572B (en) * 2016-12-27 2019-12-06 Oppo广东移动通信有限公司 Data reporting control method, device and terminal
CN107517314A (en) * 2017-08-24 2017-12-26 广东欧珀移动通信有限公司 Mobile terminal, control method, control device and storage medium
CN107517314B (en) * 2017-08-24 2020-05-08 Oppo广东移动通信有限公司 Mobile terminal, control method, control device, and storage medium
US10897318B2 (en) 2019-04-16 2021-01-19 Qualcomm Incorporated Method and apparatus for maximum permissible exposure proximity sensor fault detection
US11146343B2 (en) 2019-04-16 2021-10-12 Qualcomm Incorporated Method and apparatus for maximum permissible exposure proximity sensor fault detection
US11533114B2 (en) 2019-04-16 2022-12-20 Qualcomm Incorporated Method and apparatus for maximum permissible exposure proximity sensor fault detection
CN110347541A (en) * 2019-05-20 2019-10-18 珠海格力电器股份有限公司 Method and system for checking false touch prevention function and terminal equipment
WO2021068097A1 (en) * 2019-10-08 2021-04-15 深圳市欢太科技有限公司 Black screen gesture processing method and apparatus, electronic device, and storage medium
CN114995676A (en) * 2021-12-29 2022-09-02 荣耀终端有限公司 Fingerprint anti-mistouch method, graphical interface and electronic device

Also Published As

Publication number Publication date
CN106021010B (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN106021010B (en) Method and device for processing proximity sensor abnormality
CN106921798B (en) Notification message processing method and device
CN105938699B (en) Electronic device and method for reducing aging
EP3220251B1 (en) Method and system based on mobile terminal for turning off screen during call to prevent inadvertent touch
CN105589619B (en) terminal multi-window display method and device
US11256408B2 (en) Touch method and terminal having dynamically adjustable time threshold for touch gesture recognition
WO2016101526A1 (en) Display method and device for terminal screen, and computer storage medium
US20150052484A1 (en) Information processing method and electronic device
CN106790523A (en) A kind of information push method and server
WO2017201965A1 (en) Notification message display method and device, and terminal
CN109285524B (en) Liquid crystal display, display method thereof, terminal and computer readable storage medium
CN112579369A (en) Multithreading flashing system, method, device, equipment and storage medium
US10712808B2 (en) Electronic device and method for switching display mode thereof
CN106791049A (en) A kind of notification message processing method and terminal
CN105718142B (en) A kind of status bar notification message display methods and mobile terminal
CN106096346A (en) Announcement information access method and device, unlocking screen method
EP3690652B1 (en) Fault processing method for terminal device and terminal device
EP3188566A1 (en) Application management method and device
CN112805690B (en) Display screen detection method, device, electronic device, and computer-readable storage medium
CN109491771B (en) Task processing method based on system performance optimization and related equipment
US20180024707A1 (en) Information processing device and screen display method
CN107835302B (en) Status bar display method and equipment for terminal
CN114302348B (en) Message generation method, device, electronic equipment and computer readable storage medium
JP2012048681A (en) Display terminal and control program
CN113434394B (en) Software exception handling method and device, storage medium and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

CP01 Change in the name or title of a patent holder