CN106060274B - A kind of report method, device and the mobile terminal of ambient light sensor data - Google Patents

A kind of report method, device and the mobile terminal of ambient light sensor data Download PDF

Info

Publication number
CN106060274B
CN106060274B CN201610560933.5A CN201610560933A CN106060274B CN 106060274 B CN106060274 B CN 106060274B CN 201610560933 A CN201610560933 A CN 201610560933A CN 106060274 B CN106060274 B CN 106060274B
Authority
CN
China
Prior art keywords
sensor
ambient light
sensor data
light sensor
report
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.)
Active
Application number
CN201610560933.5A
Other languages
Chinese (zh)
Other versions
CN106060274A (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 CN201610560933.5A priority Critical patent/CN106060274B/en
Publication of CN106060274A publication Critical patent/CN106060274A/en
Application granted granted Critical
Publication of CN106060274B publication Critical patent/CN106060274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses report method, device and the mobile terminals of a kind of ambient light sensor data.The described method includes: judging whether ambient light sensor data report when detecting that first sensor close event is triggered and finishing;It is finished if the ambient light sensor data report, closes the first sensor;It is finished if the ambient light sensor data do not report, reports the ambient light sensor data.Technical solution provided in an embodiment of the present invention, by when detecting that first sensor close event is triggered, first judge whether ambient light sensor data report to finish, the first sensor is closed if ambient light sensor data are reported and finished, otherwise first sensor data are not closed but report ambient light sensor data, the report speed of ambient light sensor data is improved, ensure that ambient light sensor data can quickly finish and report.

Description

A kind of report method, device and the mobile terminal of ambient light sensor data
Technical field
The present embodiments relate to technical field of mobile terminals more particularly to a kind of sides of reporting of ambient light sensor data Method, device and mobile terminal.
Background technique
With the development of mobile terminal technology and display screen technology, the bright screen speed of mobile terminal is getting faster, most of Mobile terminal has automatic backlight regulatory function, the light intensity of the varying environment according to locating for mobile terminal, automatic adjustment The brightness and contrast of screen brings preferable experience to user to be suitble to human eye viewing.
If user opens automatic backlight regulatory function, when user presses power key bright screen, it is necessary to Ambient light sensor is cracking to report an environmental light intensity value, and current backlight illumination is arranged before being lit for screen.Such as Fruit just receives the environmental light intensity value that ambient light sensor reports after bright screen, then removes one backlight illumination of setting, often will Lead to the flashing of screen.It is the sensing all by sensor hardware level of abstraction (sensorhal) management of process in the terminal Device event, all applications are all the data that sensor is got by the process.But the process is single thread operating mode, When mobile terminal bright screen, certain applications (for example preventing false triggering application) can open proximity sensor, obtain close to biography The data of sensor, are then shut off proximity sensor, and certain applications (such as automatic backlight adjusts application) can open environment light biography Sensor obtains ambient light sensor, is then shut off ambient light sensor.But it is connect if preventing false triggering application from enabling first Nearly sensor, proximity sensor data report it is faster than the speed that ambient light sensor data report, it would be possible that when close to pass When sensor executes closing function, ambient light sensor just reports ambient light sensor data.Since sensor hardware is taken out As the single thread problem of layer process, although having led to sensor hardware level of abstraction more early has received ambient light sensor data, But automatic backlight adjusts application and to complete just take ambient light sensor data until proximity sensor closing, in this way, The phenomenon that will lead to the lag that ambient light sensor data upload, mobile terminal caused to generate splashette.
Summary of the invention
The embodiment of the present invention provides report method, device and the mobile terminal of a kind of ambient light sensor data, to be promoted The report speed of ambient light sensor data.
In a first aspect, the embodiment of the invention provides a kind of report methods of ambient light sensor data, comprising:
When detecting that first sensor close event is triggered, judges whether ambient light sensor data report and finish;
It is finished if the ambient light sensor data report, closes the first sensor;
It is finished if the ambient light sensor data do not report, reports the ambient light sensor data.
In second aspect, the embodiment of the invention provides a kind of reporting devices of ambient light sensor data, comprising:
Data report judgment module, for when detecting that first sensor close event is triggered, judging that environment light passes Whether sensor data, which report, finishes;
First sensor closedown module finishes if reporting for the ambient light sensor data, closes described first Sensor;
Data reporting module finishes if not reporting for the ambient light sensor data, and the environment light is reported to pass Sensor data.
In the third aspect, the embodiment of the invention provides a kind of mobile terminal, the mobile terminal is integrated with such as second party Device provided by face.
The embodiment of the present invention is by first judging ambient light sensor when detecting that first sensor close event is triggered Whether data, which report, finishes, and closes the first sensor if ambient light sensor data are reported and finished, and does not otherwise close One sensing data but report ambient light sensor data, improve the report speed of ambient light sensor data, ensure that Ambient light sensor data can be quickly finished and be reported.
Detailed description of the invention
Fig. 1 is the flow chart of the report method for the ambient light sensor data that the embodiment of the present invention one provides;
Fig. 2 is the flow chart of the report method of ambient light sensor data provided by Embodiment 2 of the present invention;
Fig. 3 is the flow chart of the report method for the ambient light sensor data that the embodiment of the present invention three provides;
Fig. 4 is the flow chart of the report method for the ambient light sensor data that the embodiment of the present invention four provides;
Fig. 5 is the structural schematic diagram of the reporting device for the ambient light sensor data that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural schematic diagram for mobile terminal that the embodiment of the present invention six provides.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawing to of the invention specific real Example is applied to be described in further detail.It is understood that specific embodiment described herein is used only for explaining the present invention, Rather than limitation of the invention.It also should be noted that illustrating only for ease of description, in attached drawing related to the present invention Part rather than full content.It should be mentioned that some exemplary realities before exemplary embodiment is discussed in greater detail It applies example and is described as the processing or method described as flow chart.Although operations (or step) are described as sequence by flow chart Processing, but many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations It can be rearranged.The processing can be terminated when its operations are completed, be not included in attached drawing it is also possible to have Additional step.The processing can correspond to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 gives the flow chart of the report method of the ambient light sensor data of the offer of the embodiment of the present invention one, this reality The method for applying example can be executed by the reporting device of ambient light sensor data, which can pass through hardware and/or software Mode realizes that a part that described device can be used as mobile terminal is arranged inside the mobile terminal.
As shown in Figure 1, the report method of ambient light sensor data provided in this embodiment specifically includes the following steps:
Whether step 101, detection first sensor close event are triggered, if so, thening follow the steps 102, otherwise execute Step 101.
Wherein, the first sensor is the sensor in mobile terminal in addition to ambient light sensor, specifically be can wrap Include at least one in proximity sensor, gravity sensor, acceleration transducer and magnetometric sensor.
In this step, first sensor close event can be triggered when the first sensor data report completion.
Illustratively, the first sensor can be proximity sensor, report and finish and institute in proximity sensor data When stating state of the proximity sensor data instruction mobile terminal for separate target object, the proximity sensor close event is touched Hair.
Step 102 judges whether ambient light sensor data report and finishes, if so, thening follow the steps 103, otherwise executes Step 104.
It further include in the terminal at least one first sensor other than ambient light sensor, in ambient light sensing Device is enabled and obtains in this period before and after the process of data and reported data, it is understood that there may be first sensor also passes through The process for being enabled and obtaining data and reported data is gone through, and is reported there may be ambient light sensor data and finishes it Before, first sensor data, which have reported, to finish and needs to close, since the process of management of sensor in mobile terminal is single line Journey, then first sensor close that behaviour just delays ambient light sensor data report operation, so detecting the first biography When sensor close event is triggered, judges whether ambient light sensor data report and finish, determine whether to close according to judging result Close first sensor.
Judge whether ambient light sensor data report to finish, finishes, close if the ambient light sensor data report The first sensor is closed, is finished if the ambient light sensor data do not report, the ambient light sensor data are reported.
It is described to judge whether ambient light sensor data report and finish, the uploaded state of ambient light sensor data at this time It can be and do not report all or all reported or part has reported, it is described to judge whether ambient light sensor data report and finish Specially judge whether the ambient light sensor data all report to finish.
Step 103 closes the first sensor.
It is finished if the ambient light sensor data report, closes the first sensor.
Step 104 reports the ambient light sensor data.
It is finished if the ambient light sensor data do not report, reports the ambient light sensor data, by the ring Border optical sensor data is reported to the application for enabling the sensor.Specifically, if the ambient light sensor data have not reported Finish, then closes the first sensor after reporting the ambient light sensor data and the setting time that is delayed.It is set by delay First sensor is closed after time, reports the ambient light sensor in this period of delay, to guarantee that the environment light passes Sensor can be quickly finished and be reported.The benefit being arranged in this way is: the application of mobile terminal, for example, automatic backlight adjusts application After receiving the ambient light sensor data, it is bright corresponding backlight can be set according to the ambient light sensor data Degree carries out bright screen operation according to the backlight illumination, can so prevent mobile terminal since the environment light has not been obtained Sensing data and backlight illumination is arranged in the ambient light sensor data defaulted using one, be successfully received the environmentally sensitive One backlight illumination of setting is gone to carry out bright screen, caused splashette phenomenon again after device data again.
Wherein, the value range of the setting time can be 50ms-200ms, so that ambient light sensor data have foot The enough time completes to upload.
The report method of ambient light sensor data provided in this embodiment, by detecting first sensor closing thing When part is triggered, first judges whether ambient light sensor data report and finish, is closed if ambient light sensor data are reported and finished The first sensor is closed, otherwise do not close first sensor data but reports ambient light sensor data, improves environment The report speed of optical sensor data ensure that ambient light sensor data can quickly finish and report.
Embodiment two
Fig. 2 gives the flow chart of the report method of ambient light sensor data provided by Embodiment 2 of the present invention.This reality Example is applied to optimize based on above-described embodiment one.In the present embodiment, step 101 is specifically optimized are as follows: detect bright screen thing Whether part is triggered, if bright screen event is triggered, detects whether first sensor close event is triggered.
Correspondingly, as shown in Fig. 2, method provided in this embodiment the following steps are included:
Whether step 201, the bright screen event of detection are triggered, if so, 202 are thened follow the steps, it is no to then follow the steps 201.
Illustratively, user presses power key to light screen, detects that user presses power key in mobile terminal When key command, that is, detect that bright screen event is triggered.Need to illustrate explanation, the bright screen event may be that user presses Other keys execute other operations to trigger, and the present embodiment is to this and is not limited.
Whether step 202, detection first sensor close event are triggered, if so, thening follow the steps 203, otherwise execute Step 202.
When detecting that bright screen event is triggered, whether detection first sensor close event is triggered, if so, judgement Whether ambient light sensor data, which report, finishes, and otherwise continues to test whether first sensor close event is triggered.
Step 203 judges whether ambient light sensor data report and finishes, if so, thening follow the steps 204, otherwise executes Step 205.
Step 204 closes the first sensor.
It is finished if the ambient light sensor data report, closes the first sensor.
Step 205 reports the ambient light sensor data.
It is finished if the ambient light sensor data do not report, reports the ambient light sensor data.
Method provided in this embodiment, by detecting, bright screen event is triggered and first sensor close event is touched When hair, first judge whether ambient light sensor data report and finish, if ambient light sensor data are reported and finished described in closing Otherwise first sensor does not close first sensor data but reports ambient light sensor data, improves ambient light sensing The report speed of device data ensure that ambient light sensor data can quickly finish and report.
Embodiment three
Fig. 3 gives the flow chart of the report method of the ambient light sensor data of the offer of the embodiment of the present invention three.This reality Example is applied to optimize based on above-described embodiment one.In the present embodiment, step 101 is specifically optimized are as follows: mobile terminal Whether application layer detection first sensor close event is triggered, if so, the sensor of the application layer to mobile terminal is hard Part level of abstraction sends first sensor out code.
Correspondingly, as shown in figure 3, method provided in this embodiment the following steps are included:
Whether step 301, the application layer of mobile terminal detection first sensor close event are triggered, if so, executing Step 302, no to then follow the steps 301.
Illustratively, the application layer of mobile terminal is detecting the first sensor number reported by sensor hardware level of abstraction According to report finish when, trigger first sensor close event.
Below by taking ambient light sensor as an example, illustratively illustrate the workflow of each layer in mobile terminal:
When detecting that power key is pressed, the information that key is pressed is sent to mobile whole the driving layer of mobile terminal The power management module at end;The power management module of mobile terminal broadcasts the information after receiving the information;It is mobile whole The application layer at end sends ambient light sensing after receiving the information of broadcast, to the sensor hardware level of abstraction of mobile terminal The enabled instruction of device;The enabled instruction of the ambient light sensor is sent to driving layer by the sensor hardware level of abstraction;The drive Dynamic layer enables the ambient light sensor after receiving the enabled instruction of the sensor, and acquires the ambient light sensor number According to;The ambient light sensor data are reported to sensor hardware level of abstraction by the driving layer;The sensor hardware is abstract The ambient light sensor data are reported to application layer by layer;The application layer receive the ambient light sensor data it After corresponding backlight illumination, and build environment optical sensor out code are set;Sensor hardware level of abstraction is receiving environment After optical sensor out code, ambient light sensor is closed.
Step 302, the application layer send first sensor out code to the sensor hardware level of abstraction of mobile terminal.
Step 303, the sensor hardware level of abstraction judge environment when receiving the first sensor out code Whether optical sensor data, which reports, finishes, if so, 304 are thened follow the steps, it is no to then follow the steps 305.
Step 304 closes the first sensor.
It is finished if the ambient light sensor data report, closes the first sensor.
Step 305 reports the ambient light sensor data.
It is finished if the ambient light sensor data do not report, reports the ambient light sensor data.
Method provided in this embodiment detects that first sensor close event is touched by the application layer in mobile terminal When hair, first sensor out code, the sensor hardware level of abstraction are sent to the sensor hardware level of abstraction of mobile terminal When receiving the first sensor out code, first judges whether ambient light sensor data report and finish, if environment light Sensing data, which reports, to be finished, and the first sensor is closed, and is not otherwise closed first sensor data but is reported environment light Sensing data improves the report speed of ambient light sensor data, ensure that ambient light sensor data can be quick Completion reports.
Example IV
Fig. 4 gives the flow chart of the report method of the ambient light sensor data of the offer of the embodiment of the present invention four.This reality It applies example to optimize based on the various embodiments described above, a kind of preferred embodiment is provided, not detailed description in the present embodiment Details can be found in the various embodiments described above.In the present embodiment, the first sensor is proximity sensor, further, Proximity sensor data report finish and the proximity sensor data instruction mobile terminal be far from target object state when, The proximity sensor close event is triggered.
Correspondingly, as shown in figure 4, method provided in this embodiment the following steps are included:
Step 401 opens mobile terminal and prevents false triggering function and automatic backlight regulatory function.
Wherein, after preventing false triggering function from opening, prevent false triggering application from allowing access to sensor;When automatic backlight tune After section function is triggered, automatic backlight, which is adjusted, applies enabled context optical sensor.
Step 402, mobile terminal driving layer will be in collected proximity sensor data and ambient light sensor data The sensor hardware level of abstraction of registration mobile terminal.
Wherein, proximity sensor data and ambient light sensor data on call time between to have the regular hour poor.
The false triggering application that prevents of step 403, mobile terminal receives the proximity sensor data, and described close When sensing data indicates that mobile terminal is the state far from target object, proximity sensor out code is generated, and be sent to The sensor device hardware abstraction layer of mobile terminal.
Illustratively, when proximity sensor data instruction mobile terminal is close to the state of target object, then this state Under false triggering phenomenon may occur (for example, mobile terminal is put into pocket by user, may accidentally be touched if mobile terminal has incoming call Send out and answered phone), then show it is preset prevent false triggering interface so that user can not operate mobile terminal and realizing prevents The effect of false triggering;When proximity sensor data instruction mobile terminal is the state far from target object, then under this state not False triggering phenomenon can occur, then mobile terminal be just not necessarily to show it is preset prevent false triggering interface, and close proximity sensor.
Step 404, the sensor hardware level of abstraction judge environment after receiving the proximity sensor out code Whether optical sensor data, which reports, finishes, if so, 405 are thened follow the steps, it is no to then follow the steps 406.
The first sensor is closed after step 405, delay setting time.
Step 406 reports the ambient light sensor data.
Embodiment five
Fig. 5 is a kind of structural block diagram of the reporting device for ambient light sensor data that the embodiment of the present invention five provides, should Device can be implemented by software and/or hardware, and be typically integrated in mobile terminal, can pass through the upper of performing environment optical sensor data Reporting method reports ambient light sensor data.As shown in figure 5, the device includes that data report judgment module 501, first to sense Device closedown module 502 and data reporting module 503.
The data report judgment module 501, for judging ring when detecting that first sensor close event is triggered Whether border optical sensor data, which reports, finishes;
The first sensor closedown module 502 finishes if reporting for the ambient light sensor data, closes institute State first sensor;
The data reporting module 503 finishes if not reporting for the ambient light sensor data, reports the ring Border optical sensor data.
Technical solution provided in an embodiment of the present invention, by when detecting that first sensor close event is triggered, first Judge whether ambient light sensor data report to finish, first sensing is closed if ambient light sensor data are reported and finished Otherwise device does not close first sensor data but reports ambient light sensor data, improves ambient light sensor data Report speed ensure that ambient light sensor data can quickly finish and report.
On the basis of the various embodiments described above, the data report judgment module to be specifically used for:
When detecting that bright screen event is triggered, whether detection first sensor close event is triggered;
When detecting that first sensor close event is triggered, judges whether ambient light sensor data report and finish.
It is described to report judgment module to be specifically used in data on the basis of the various embodiments described above:
When the application layer of mobile terminal detects that first sensor close event is triggered, to the sensor of mobile terminal Hardware abstraction layer sends first sensor out code;
The sensor hardware level of abstraction judges ambient light sensor when receiving the first sensor out code Whether data, which report, finishes.
On the basis of the various embodiments described above, the data reporting module is specifically used for:
It is finished if the ambient light sensor data do not report, reports the ambient light sensor data and the setting that is delayed The first sensor is closed after time.
On the basis of the various embodiments described above, the value range of the setting time is 50ms-200ms.
On the basis of the various embodiments described above, the first sensor includes proximity sensor, gravity sensor, acceleration At least one of in sensor and magnetometric sensor.
On the basis of the various embodiments described above, the first sensor is proximity sensor, and the data report judgement mould First sensor close event is triggered in block specifically: reports and finishes and the proximity sensor number in proximity sensor data When according to the state that instruction mobile terminal is separate target object, the proximity sensor close event is triggered.
The reporting device of ambient light sensor data provided in an embodiment of the present invention can be performed any embodiment of that present invention and mention The report method of the ambient light sensor data of confession has the corresponding functional module of execution method and beneficial effect.
Embodiment six
The present embodiment six provides a kind of mobile terminal, which includes environment light described in the embodiment of the present invention The reporting device of sensing data can carry out ambient light sensor number by the report method of performing environment optical sensor data According to report.Fig. 6 is a kind of structural schematic diagram for mobile terminal that the embodiment of the present invention six provides, as shown in fig. 6, the movement is whole End may include: memory 601,602, peripheral hardware central processing unit (Central Processing Unit, hereinafter referred to as CPU) Interface 603, RF (Radio Frequency, radio frequency) circuit 605, voicefrequency circuit 606, loudspeaker 611, power management chip 608, input/output (I/O) subsystem 609, touch screen 612, other input/control devicess 610 and outside port 604, this A little components are communicated by one or more communication bus or signal wire 607.
It should be understood that illustrating the example that mobile terminal 600 is only mobile terminal, and mobile terminal 600 It can have than shown in the drawings more or less component, can combine two or more components, or can be with It is configured with different components.Various parts shown in the drawings can include one or more signal processings and/or dedicated It is realized in the combination of hardware, software or hardware and software including integrated circuit.
Just the mobile terminal provided in this embodiment for adjusting screen display brightness is described in detail below, the shifting Dynamic terminal takes the mobile phone as an example.
Memory 601, the memory 601 can be accessed by CPU602, Peripheral Interface 603 etc., and the memory 601 can It can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU602 and deposited by Peripheral Interface 603, the Peripheral Interface 603 Reservoir 601.
I/O subsystem 609, the I/O subsystem 609 can be by the input/output peripherals in equipment, such as touch screen 602 (being equivalent to the screen in above-described embodiment) and other input/control devicess 610, are connected to Peripheral Interface 603.I/O subsystem 609 may include display controller 6091 and one or more input controllers for controlling other input/control devicess 610 6092.Wherein, one or more input controllers 6092 from other input/control devicess 610 receive electric signal or to other Input/control devices 610 sends electric signal, other input/control devicess 610 may include physical button (push button, rocker arm Button etc.), dial, slide switch, control stick, click idler wheel.It is worth noting that input controller 6092 can with it is following Any one connection: the indicating equipment of keyboard, infrared port, USB interface and such as mouse.
Touch screen 612, the touch screen 612 are the input interface and output interface between user terminal and user, can It is shown to user depending on output, visual output may include figure, text, icon, video etc..
Display controller 6091 in I/O subsystem 609 receives electric signal from touch screen 612 or sends out to touch screen 612 Electric signals.Touch screen 612 detects the contact on touch screen, and the contact that display controller 6091 will test is converted to and is shown The interaction of user interface object on touch screen 612, i.e. realization human-computer interaction, the user interface being shown on touch screen 612 Object can be the icon of running game, the icon for being networked to corresponding network etc..It is worth noting that equipment can also include light Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuit 605 is mainly used for establishing the communication of mobile phone Yu wireless network (i.e. network side), realizes mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuit 605 receives and sends RF letter Number, RF signal is also referred to as electromagnetic signal, and RF circuit 605 converts electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuit 605 may include for executing The known circuit of these functions comprising but it is not limited to antenna system, RF transceiver, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 606 is mainly used for receiving audio data from Peripheral Interface 603, which is converted to telecommunications Number, and the electric signal is sent to loudspeaker 611.
Loudspeaker 611 is reduced to sound for mobile phone to be passed through RF circuit 605 from the received voice signal of wireless network And the sound is played to user.
Power management chip 608, the hardware for being connected by CPU602, I/O subsystem and Peripheral Interface are powered And power management.
The executable following operation of CPU602 provided in an embodiment of the present invention:
When detecting that first sensor close event is triggered, judges whether ambient light sensor data report and finish;
It is finished if the ambient light sensor data report, closes the first sensor;
It is finished if the ambient light sensor data do not report, reports the ambient light sensor data.
Method provided by any embodiment of the invention can be performed in above-mentioned mobile terminal, has the corresponding function of execution method Module and beneficial effect.The not technical detail of detailed description in the above-described embodiments, reference can be made to any embodiment of that present invention is mentioned The report method of the ambient light sensor data of confession.
The technical principle that above are only presently preferred embodiments of the present invention and used.The present invention is not limited to spies described here Determine embodiment, various significant changes, readjustment and the substitution being able to carry out for a person skilled in the art are not departing from Protection scope of the present invention.Therefore, although the present invention has been described in more detail through the above examples, this hair It is bright to be not limited only to above embodiments, it can also include other more equivalence enforcements without departing from the inventive concept Example, and the scope of the present invention is determined by the scope of the claims.

Claims (11)

1. a kind of report method of ambient light sensor data characterized by comprising
When the application layer of mobile terminal detects that first sensor close event is triggered, to the sensor hardware of mobile terminal Level of abstraction sends first sensor out code;
The sensor hardware level of abstraction judges ambient light sensor data when receiving the first sensor out code Whether report and finishes;
It is finished if the ambient light sensor data report, closes the first sensor;
It is finished if the ambient light sensor data do not report, reports the ambient light sensor data and the setting time that is delayed After close the first sensor.
2. the method according to claim 1, wherein described detect that first sensor close event is triggered When, judging whether ambient light sensor data report to finish includes:
When detecting that bright screen event is triggered, whether detection first sensor close event is triggered;
When detecting that first sensor close event is triggered, judges whether ambient light sensor data report and finish.
3. the method according to claim 1, wherein the value range of the setting time is 50ms-200ms.
4. method according to claim 1-3, which is characterized in that the first sensor includes close to sensing At least one of in device, gravity sensor, acceleration transducer and magnetometric sensor.
5. method according to claim 1-3, which is characterized in that the first sensor is proximity sensor, Proximity sensor data report finish and the proximity sensor data instruction mobile terminal be far from target object state When, the proximity sensor close event is triggered.
6. a kind of reporting device of ambient light sensor data characterized by comprising
Data report judgment module, when detecting that first sensor close event is triggered for the application layer in mobile terminal, First sensor out code is sent to the sensor hardware level of abstraction of mobile terminal;The sensor hardware level of abstraction is receiving It is finished to when the first sensor out code, judging whether ambient light sensor data report;
First sensor closedown module finishes if reporting for the ambient light sensor data, closes first sensing Device;
Data reporting module finishes if not reporting for the ambient light sensor data, reports the ambient light sensor The first sensor is closed after data and the setting time that is delayed.
7. device according to claim 6, which is characterized in that the data report judgment module to be specifically used for:
When detecting that bright screen event is triggered, whether detection first sensor close event is triggered;
When detecting that first sensor close event is triggered, judges whether ambient light sensor data report and finish.
8. device according to claim 6, which is characterized in that the value range of the setting time is 50ms-200ms.
9. according to the described in any item devices of claim 6-8, which is characterized in that the first sensor includes close to sensing At least one of in device, gravity sensor, acceleration transducer and magnetometric sensor.
10. according to the described in any item devices of claim 6-8, which is characterized in that the first sensor is proximity sensor, The data report first sensor close event in judgment module to be triggered specifically: report and finish in proximity sensor data And proximity sensor data instruction mobile terminal is when being the state far from target object, the proximity sensor close event It is triggered.
11. a kind of mobile terminal, which is characterized in that the mobile terminal is integrated with such as the described in any item dresses of claim 6-10 It sets.
CN201610560933.5A 2016-07-14 2016-07-14 A kind of report method, device and the mobile terminal of ambient light sensor data Active CN106060274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610560933.5A CN106060274B (en) 2016-07-14 2016-07-14 A kind of report method, device and the mobile terminal of ambient light sensor data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610560933.5A CN106060274B (en) 2016-07-14 2016-07-14 A kind of report method, device and the mobile terminal of ambient light sensor data

Publications (2)

Publication Number Publication Date
CN106060274A CN106060274A (en) 2016-10-26
CN106060274B true CN106060274B (en) 2019-08-30

Family

ID=57187058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610560933.5A Active CN106060274B (en) 2016-07-14 2016-07-14 A kind of report method, device and the mobile terminal of ambient light sensor data

Country Status (1)

Country Link
CN (1) CN106060274B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108696630B (en) * 2018-03-28 2020-06-26 Oppo广东移动通信有限公司 Control method, control device, electronic device, computer storage medium, and apparatus
CN109254656B (en) * 2018-08-22 2021-03-23 Oppo广东移动通信有限公司 Proximity detection method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458110A (en) * 2013-08-17 2013-12-18 广东欧珀移动通信有限公司 Method and mobile terminal for adjusting display screen backlight in combination with acceleration sensor
CN103619056A (en) * 2013-12-02 2014-03-05 华为终端有限公司 Method and terminal for reporting sensor data
CN105519086A (en) * 2014-09-30 2016-04-20 华为技术有限公司 Method and device for controlling proximity optical sensor, and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3123458B1 (en) * 2014-03-28 2019-08-28 Electronic Warfare Associates, Inc. Systems and methods for sensor synchronization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458110A (en) * 2013-08-17 2013-12-18 广东欧珀移动通信有限公司 Method and mobile terminal for adjusting display screen backlight in combination with acceleration sensor
CN103619056A (en) * 2013-12-02 2014-03-05 华为终端有限公司 Method and terminal for reporting sensor data
CN105519086A (en) * 2014-09-30 2016-04-20 华为技术有限公司 Method and device for controlling proximity optical sensor, and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《android之各类传感器使用详解》;飞上北极星;《CSDN博客》;20150316;第1-8页

Also Published As

Publication number Publication date
CN106060274A (en) 2016-10-26

Similar Documents

Publication Publication Date Title
CN106708407B (en) Prevent the method, device and mobile terminal of touch key-press false triggering
CN106131345B (en) Control method and device of proximity sensor and mobile terminal
CN106681554B (en) A kind of control method of mobile terminal touch screen, device and mobile terminal
CN109643203B (en) Method for lighting screen of double-screen terminal and terminal
CN106681637B (en) A kind of touch screen display methods, device and mobile terminal
CN106776385B (en) A kind of transmission method, device and the terminal of log log information
CN106060284B (en) The method, device and mobile terminal of backlight control
CN102662554B (en) Information processing apparatus and code input mode switching method thereof
CN109240551B (en) Method for controlling electronic device by using gestures and related product
CN107944259A (en) Using the management-control method of startup, device and storage medium and mobile terminal
WO2017113821A1 (en) Method and apparatus for operating smart phone and smart phone
CN108920071B (en) Control method and device based on special-shaped display screen, storage medium and mobile terminal
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN109937583A (en) The method and terminal of data sharing
CN106445596B (en) Method and device for managing setting items
CN106708409B (en) A kind of response method of popup menu, device and mobile terminal
CN107317918B (en) Parameter setting method and related product
US20210132791A1 (en) Key control method, storage medium, and smart terminal
CN109274812B (en) Method for controlling electronic device through ultrasonic gestures and related product
CN107967418B (en) Face recognition method and mobile terminal
CN110691168B (en) Screen control method and device of mobile terminal and storage medium
CN106060274B (en) A kind of report method, device and the mobile terminal of ambient light sensor data
CN108196664A (en) screen display method, device, storage medium and terminal
CN110062412B (en) Wireless pairing method, system, storage medium and mobile terminal
CN110892372B (en) Screen control method and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

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

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

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

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant