Summary of the invention
Embodiment of the present invention is designed to provide a kind of method for controlling mobile terminal, the computer-readable storage of device machine
Medium can ensure the personal secrets of user.
In order to solve the above technical problems, embodiments of the present invention provide a kind of method for controlling mobile terminal, comprising:
The use state of each hardware of real-time detection mobile terminal;When detecting that hardware is in called state, judgement
Whether the hardware is used by a user, and is determining the hardware not by the user in use, closing the hardware.
Embodiments of the present invention additionally provide a kind of control of mobile terminal and set, comprising: at least one processor;And
The memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory
The instruction that device executes is managed, described instruction is executed by least one described processor, so that at least one described processor can be held
The above-mentioned method for controlling mobile terminal of row.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, described
Above-mentioned method for controlling mobile terminal is realized when computer program is executed by processor.
Embodiments of the present invention in terms of existing technologies, pass through the use of each hardware of real-time detection mobile terminal
State makes it possible to accurately learn the current situation of each hardware of mobile terminal (whether being currently being used), is detecting
When hardware is in called state (being currently being used), judge whether the hardware is used by a user, that is to say, that work as hardware
When in called state, it may be possible to certain softwares illegally use the hardware, by judge the hardware whether by with
The mode that family uses, can accurately learn whether the hardware is illegally usurped, and determine the hardware not by the user
When using (the i.e. described hardware is illegally usurped), the hardware is closed, has ensured the personal secrets of user, avoided " some not
When method software usurps the camera of customer mobile terminal, user can not learn that camera is being stolen, and personal secret is caused to be shone
The generation of the case where leakage, so that the personal secrets of user cannot ensure ".
In addition, it is described judge whether the hardware is used by a user before, further includes: obtain and the hardware called to answer
Use program;The process of the application program and the input of the access right of the hardware are used for deletion process and cancel the right to use
The equipment manager of limit.In this manner, user can be allowed intuitively to see which hardware of mobile terminal is currently being used, and
The process that the application program of hardware is used can be turned off manually, can also directly cancel use of the application program to the hardware
Permission effectively prevents the application program and illegally usurps hardware again during follow-up operation, further ensured user
Personal secrets, improve the usage experience of user.
Judge whether the hardware is used by a user in addition, described, is not used by the user in the judgement hardware
When, the hardware is closed, is specifically included: judging whether camera is used by a user, is determining that the camera is not described
User is in use, close the camera.
Judge whether camera is used by a user in addition, described, specifically includes: scanning the screen interface of mobile terminal;Sentence
Whether the fixed screen interface shows the preview screen that the camera is taken pictures;It is described to determine that the camera is not described
User specifically includes in use, close the camera: when determining that the screen interface does not show the preview screen, closing
Close the camera.
In addition, further includes: when determining that the screen interface shows the preview screen, terminate scanning.So set, energy
The case where reaching under the premise of not influencing scanning result, effectively avoiding " screen interface is still scanning after showing preview screen "
Generation, to reduce the loss of mobile terminal electricity.
In addition, after the closing hardware, further includes: Xiang Suoshu user, which sends, includes at least the application program
The prompting message of title.In this manner, allow users to accurately learn by prompting message illegally is using hardware
Which application program deletes the program to the access right of hardware or directly in order to which user cancels the application program, further
The personal secrets for having ensured user improve the usage experience of user.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention
In formula, many technical details are proposed in order to make reader more fully understand the present invention.But even if without these technical details
And various changes and modifications based on the following respective embodiments, claimed technical solution of the invention also may be implemented.
The first embodiment of the present invention is related to a kind of method for controlling mobile terminal, detailed process is as shown in Figure 1, comprising:
S101: the use state of each hardware of real-time detection mobile terminal.
About step S101, specifically, by writing a mobile terminal system software in present embodiment, and assign
The permission of all mobile terminal hardware of the mobile terminal system software transfer, when mobile terminal-opening, the software is automatic
Starting, real-time detection need whether the hardware monitored is called.
S102: when detecting that hardware is in called state, judge whether hardware is used by a user, do not have in determination hardware
When being used by a user, hardware is closed.
About step S102, specifically, in present embodiment judge whether the hardware is used by a user, is determining institute
Hardware is stated not by the user in use, closing the hardware, specifically includes: judging whether camera is used by a user,
Determine the camera not by the user in use, closing the camera.Judge whether camera is used by a user, has
Body includes: the screen interface for scanning mobile terminal;Determine that the preview whether screen interface shows that the camera is taken pictures is drawn
Face;It is described to determine that the camera in use, close the camera, specifically includes not by the user: determining institute
When stating screen interface and not showing the preview screen, the camera is closed.In other words, when camera is used in user
When, screen interface inherently shows the preview screen that the camera is taken pictures, if the screen interface does not show that the preview is drawn
When face, then show that user does not use camera, that is to say, that there is application program illegally using camera, to close institute at this time
Camera is stated, personal secret is effectively prevented according to leakage, has ensured the personal secrets of user.
Embodiments of the present invention in terms of existing technologies, pass through the use of each hardware of real-time detection mobile terminal
State makes it possible to accurately learn the current situation of each hardware of mobile terminal (whether being currently being used), is detecting
When hardware is in called state (being currently being used), judge whether the hardware is used by a user, that is to say, that work as hardware
When in called state, it may be possible to certain softwares illegally use the hardware, by judge the hardware whether by with
The mode that family uses, can accurately learn whether the hardware is illegally usurped, and determine the hardware not by the user
When using (the i.e. described hardware is illegally usurped), the hardware is closed, has ensured the personal secrets of user, avoided " some not
When method software usurps the camera of customer mobile terminal, user can not learn that camera is being stolen, and personal secret is caused to be shone
The generation of the case where leakage, so that the personal secrets of user cannot ensure ".
Second embodiment of the present invention is related to a kind of method for controlling mobile terminal, and second embodiment is implemented first
Further improvement has been done on the basis of mode, has specifically been theed improvement is that: in this second embodiment, described in the judgement
Before whether hardware is used by a user, further includes: obtain the application program for calling the hardware;By the process of the application program
And the access right input of the hardware is for deletion process and the equipment manager of cancellation access right.Pass through such side
Formula can allow user intuitively to see which hardware of mobile terminal is currently being used, and can be turned off manually and hardware be used
The process of application program can also directly cancel the application program to the access right of the hardware, effectively prevent the application
Program illegally usurps hardware again during follow-up operation, has further ensured the personal secrets of user, has improved user's
Usage experience.
The detailed process of present embodiment is as shown in Figure 2, comprising:
S201: the use state of each hardware of real-time detection mobile terminal.
S202: when detecting that hardware is in called state, the application program for calling hardware is obtained, by application program
Process and the input of the access right of hardware are for deletion process and the equipment manager of cancellation access right.
About step S202, specifically, equipment manager is a kind of management tool, can be managed on mobile terminal with it
Equipment.Can be used " equipment manager " check and change device attribute, more new device driver, configuration equipment setting and
Unloading equipment, equipment manager provide the graphics view of installed hardware on mobile terminal.
S203: judging whether hardware is used by a user, in determination hardware not by the user in use, closing hardware.
Embodiments of the present invention in terms of existing technologies, pass through the use of each hardware of real-time detection mobile terminal
State makes it possible to accurately learn the current situation of each hardware of mobile terminal (whether being currently being used), is detecting
When hardware is in called state (being currently being used), judge whether the hardware is used by a user, that is to say, that work as hardware
When in called state, it may be possible to certain softwares illegally use the hardware, by judge the hardware whether by with
The mode that family uses, can accurately learn whether the hardware is illegally usurped, and determine the hardware not by the user
When using (the i.e. described hardware is illegally usurped), the hardware is closed, has ensured the personal secrets of user, avoided " some not
When method software usurps the camera of customer mobile terminal, user can not learn that camera is being stolen, and personal secret is caused to be shone
The generation of the case where leakage, so that the personal secrets of user cannot ensure ".
Third embodiment of the present invention is related to a kind of method for controlling mobile terminal, and third embodiment is implemented second
Further improvement has been done on the basis of mode, has specifically been theed improvement is that: in the third embodiment, described in the closing
After hardware, further includes: Xiang Suoshu user sends the prompting message for including at least the application name.Pass through such side
Formula, which application program allows users to accurately to learn by prompting message illegal using hardware is, in order to which user takes
The application program that disappears deletes the program to the access right of hardware or directly, has further ensured the personal secrets of user, improves
The usage experience of user.
The detailed process of present embodiment is as shown in Figure 3, comprising:
S301: the use state of each hardware of real-time detection mobile terminal.
S302: when detecting that hardware is in called state, the application program for calling hardware is obtained, by application program
Process and the input of the access right of hardware are for deletion process and the equipment manager of cancellation access right.
S303: judging whether hardware is used by a user, in determination hardware not by the user in use, closing hardware.
The step S301 to step S303 of present embodiment is similar to step S203 with the step S201 of second embodiment,
In order to avoid repeating, details are not described herein again.
S304: the prompting message for including at least application name is sent to user.
About step S304, specifically, prompting message is the system information that system software issues, to prompt user non-
Which application program is method be using hardware, can also include the frequency of use etc. of application program in the prompting message, to provide
Whether user directly deletes the application program or whether only cancels the reference frame of the application program hardware access right, further
Improve the usage experience of user.
In order to make it easy to understand, being carried out specifically to the specific implementation process of present embodiment method for controlling mobile terminal below
It is bright:
By one cell phone system software of software programming, the permission that the cell phone software calls all mobile phone hardwares is assigned.When
When mobile phone power-on, which starts automatically, and real-time detection needs whether the hardware monitored is called, if called, energy
Which software detect currently to call the hardware is, is output to equipment manager interface.Meanwhile the software can also be forced to close
The use of some hardware is closed, it is as follows to close the illegal process for usurping mobile phone camera:
1: mobile phone power-on, the software start automatically, real-time detection mobile phone hardware use state.
2: when user opens camera, scanning screen interface, judge whether screen is in the preview that camera is taken pictures
Stage, if it is preview phase, it was demonstrated that user's normal use camera exits scanning.If not preview phase, it was demonstrated that have
APP illegally usurps camera, forcibly closes camera
3: issuing system information, which APP prompts user just now using camera is illegally, to allow user to cancel this
APP uses the permission of camera.
Embodiments of the present invention in terms of existing technologies, pass through the use of each hardware of real-time detection mobile terminal
State makes it possible to accurately learn the current situation of each hardware of mobile terminal (whether being currently being used), is detecting
When hardware is in called state (being currently being used), judge whether the hardware is used by a user, that is to say, that work as hardware
When in called state, it may be possible to certain softwares illegally use the hardware, by judge the hardware whether by with
The mode that family uses, can accurately learn whether the hardware is illegally usurped, and determine the hardware not by the user
When using (the i.e. described hardware is illegally usurped), the hardware is closed, has ensured the personal secrets of user, avoided " some not
When method software usurps the camera of customer mobile terminal, user can not learn that camera is being stolen, and personal secret is caused to be shone
The generation of the case where leakage, so that the personal secrets of user cannot ensure ".
Four embodiment of the invention is related to a kind of mobile terminal control device, as shown in Figure 4, comprising:
At least one processor 401;And
With the memory 402 of at least one processor 401 communication connection;Wherein,
Memory 402 is stored with the instruction that can be executed by least one processor 401, instructs by least one processor
401 execute, so that at least one processor 401 is able to carry out above-mentioned method for controlling mobile terminal.
Wherein, memory 402 is connected with processor 401 using bus mode, and bus may include any number of interconnection
Bus and bridge, bus is by one or more processors 401 together with the various circuit connections of memory 402.Bus may be used also
With by such as peripheral equipment, voltage-stablizer, together with various other circuit connections of management circuit or the like, these are all
It is known in the art, therefore, it will not be further described herein.Bus interface provides between bus and transceiver
Interface.Transceiver can be an element, be also possible to multiple element, such as multiple receivers and transmitter, provide for
The unit communicated on transmission medium with various other devices.The data handled through processor 401 pass through antenna on the radio medium
It is transmitted, further, antenna also receives data and transfers data to processor 401.
Processor 401 is responsible for management bus and common processing, can also provide various functions, including timing, periphery connects
Mouthful, voltage adjusting, power management and other control functions.And memory 402 can be used for storage processor 401 and execute
Used data when operation.
Fifth embodiment of the invention is related to a kind of computer readable storage medium, is stored with computer program.Computer
Above method embodiment is realized when program is executed by processor.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with
Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make
It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes side described in each embodiment of the application
The all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention,
And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.