CN104484223B - A kind of Android system application method for closing and device - Google Patents
A kind of Android system application method for closing and device Download PDFInfo
- Publication number
- CN104484223B CN104484223B CN201410784204.9A CN201410784204A CN104484223B CN 104484223 B CN104484223 B CN 104484223B CN 201410784204 A CN201410784204 A CN 201410784204A CN 104484223 B CN104484223 B CN 104484223B
- Authority
- CN
- China
- Prior art keywords
- window
- window object
- services
- android system
- module
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 465
- 230000008569 process Effects 0.000 claims abstract description 423
- 230000012447 hatching Effects 0.000 claims abstract description 86
- 230000006870 function Effects 0.000 claims description 199
- 238000012544 monitoring process Methods 0.000 claims description 48
- 230000009471 action Effects 0.000 claims description 24
- 230000000903 blocking effect Effects 0.000 claims description 15
- 230000008859 change Effects 0.000 claims description 5
- 235000013399 edible fruits Nutrition 0.000 claims description 2
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000004913 activation Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000001035 drying Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
Abstract
The invention discloses a kind of Android system application method for closing, field of computer technology is related generally to, is specifically included:Monitor in Android system and whether start hatching process;If starting hatching process, the process whether process belongs in the necessary scope of system is judged;If the process is not belonging to the process in the necessary scope of system, the progress information of the process is recorded;Judge whether to receive the out code that user triggers under Android system screen lock state;If receiving out code, according to the progress information of the record, the process is closed.Progress information of the invention then that app can be recorded, after system screen locking, if user triggers out code by the function key of terminal, then can be then according to the progress information of the record, the process is closed, the process of the necessary scope of the nonsystematic run in Android system can easily be closed under screen lock state by achieving, and reduce the power consumption beneficial effect of system.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of Android system application method for closing and device.
Background technology
With the development of smart mobile phone, there is the system of a variety of support smart mobile phones.Such as android (Android) system
System.Android is a kind of open source code operating system based on Linux, is mainly used for the mobile terminals such as mobile phone.
Android platform is made up of operating system, middleware, user interface and application software.
With the increase of the occupation rate of market of android system, increasing developer is developed based on android system
App (application, using), user is more convenient using android mobile phones.In traditional Android system, one kind be present
Using method for closing, i.e., in system released state, user's long-press exit function key, that is, eject the application opened in current system
Window interface, then user is operable closing respective application.But its closing to application is, it is necessary to which first operating system enters solution
Lock status, it then could enter and apply closing process.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on
State a kind of Android system application shutoff device of problem and a kind of corresponding Android system application method for closing.
According to one aspect of the present invention, there is provided a kind of Android system application method for closing, including:
Monitor in Android system and whether start hatching process;
If starting hatching process, the process whether process belongs in the necessary scope of system is judged;It is if described
Process is not belonging to the process in the necessary scope of system, then records the progress information of the process;
Judge whether to receive the out code that user triggers under Android system screen lock state;
If receiving out code, according to the progress information of the record, the process is closed.
Preferably, in addition to:
The initial process incubator of Android system is replaced with into specific first process incubator;Pass through first process
Incubator monitors whether Android system starts hatching process.
Preferably, it is described to include by the way that whether the first process incubator monitoring Android system starts hatching process:
Java virtual machines are created by the first process incubator;
Registered by the java virtual machines and monitor socket, monitor whether Android system is opened by the monitoring socket
Beginning hatching process.
Preferably, it is described to include by the way that whether socket monitoring starts hatching window services:
Monitor the establishment message that hatching process whether is received in the socket;If the monitoring socket receives
Create message, it is determined that start hatching process.
Preferably, the out code for judging whether to receive user's triggering under Android system screen lock state includes:
Under screen lock state, trigger action of the user to specified button is received, judges the triggering behaviour to specified button
Whether pre-defined rule is met;If the trigger action to specified button meets pre-defined rule, judgement receives closing
Instruction.
Preferably, in addition to:
Before the window object that window services are called obtains function, intercept to home window object in the Android system
Obtain the calling of function;
The home window object acquisition function of the interception is replaced with into first window object acquisition function;
When triggering window services to obtain window object, the window services are by calling the first window object to obtain
Take function to obtain window object and return to the process of specifying to carry out window object record.
Preferably, after out code is received, in addition to:
According to progress information and the corresponding relation of window object, window thumbnail is obtained from corresponding window object, and
The window thumbnail is illustrated in the specified location of locking screen interface;
Further, in addition to:
Receive the second out code that user is directed at least one window thumbnail;At least one window is directed to when receiving
Second out code of mouth thumbnail, according to the progress information of the record, is closed to corresponding process.
Preferably, before the window object called in window services obtains function, intercept in the Android system
The calling of home window object acquisition function includes:
Monitored by the first process incubator and whether start to hatch window services;
Start to hatch window services if listened to, intercept the establishment to the window services, so as to intercept window clothes
Business needs the loading of home window object acquisition function in the Android system that calls to it.
Preferably, the interception window object acquisition function is replaced with into first window object acquisition function includes:
After establishment to the window services is intercepted, home window object acquisition function that window services are needed to load
Replace with first window object acquisition function;
The window services are created, and load the first window object acquisition function.
Preferably, the home window object acquisition function that window services are needed to load replaces with first window object
Obtaining function includes:
The initial getfocuswindow functions that window services are needed to load, replace with the first getfocuswindow letters
Number;The return sequential of the first getfocuswindow functions specifies process for return.
Preferably, the window services are included by calling the first window object acquisition function to obtain window object:
By the first getfocuswindow functions, the windowstata window objects at the top of window object storehouse are searched.
Preferably, in addition to:
When window object at the top of window object storehouse changes, judge whether the window object has obtained;
If the window object does not obtain, continue the window object returning to the process of specifying.
According to another aspect of the present invention, there is provided a kind of Android system application shutoff device, including:
Process creation monitors module, is adapted for listening in Android system whether starting hatching process;
Information logging modle is carried out, if suitable for starting hatching process, it is necessary to judge whether the process belongs to system
In the range of process;If the process is not belonging to the process in the necessary scope of system, the progress information of the process is recorded;
Trigger module is closed, the closing suitable for judging whether to receive user's triggering under Android system screen lock state refers to
Order;
Process closedown module, if suitable for receiving out code, according to the progress information of the record, to it is described enter
Cheng Jinhang is closed.
Preferably, in addition to:
Process incubator replacement module, suitable for the initial process incubator of Android system is replaced with into specific first process
Incubator;Monitor whether Android system starts hatching process by the first process incubator.
Preferably, the process creation is monitored module and included:
Java Virtual Machine creation module, suitable for creating java virtual machines by the first process incubator;
Socket Registering modules are monitored, socket is monitored suitable for being registered by the java virtual machines, passes through the monitoring
Socket monitors whether Android system starts hatching process.
Preferably, the process creation is monitored module and included:
First process creation monitors module, and the establishment for being adapted for listening for whether receiving hatching process in the socket disappears
Breath;If the monitoring socket receives establishment message, it is determined that starts hatching process.
Preferably, the closing trigger module includes:
First closes trigger module, suitable under screen lock state, receiving user to the trigger action of specified button, judges institute
State to whether the trigger action of specified button meets pre-defined rule;If the trigger action to specified button meets pre- set pattern
Then, then judge to receive out code.
Preferably, in addition to:
Window blocking module, before the window object suitable for being called in window services obtains function, intercept to the Android
The calling of home window object acquisition function in system;
Function replacement module, obtained suitable for the home window object acquisition function of the interception is replaced with into first window object
Take function;
Window acquisition module, suitable for when triggering window services to obtain window object, the window services pass through calling
The first window object acquisition function obtains window object and returns to the process of specifying to carry out window object record.
Preferably, after trigger module is closed, in addition to:
Window display module, suitable for the corresponding relation according to progress information and window object, from corresponding window object
Window thumbnail is obtained, and the window thumbnail is illustrated in the specified location of locking screen interface;
Further, in addition to:
Second out code module, the second out code of at least one window thumbnail is directed to suitable for receiving user;
When receiving the second out code at least one window thumbnail, according to the progress information of the record, to corresponding
Process is closed.
Preferably, the window blocking module includes:
Whether first monitors module, start to hatch window services suitable for monitoring by the first process incubator;
First blocking module, if starting to hatch window services suitable for listening to, intercept the wound to the window services
Build, the loading of home window object acquisition function in the Android system that calls is needed so as to intercepting window services to it.
Preferably, the function replacement module includes:
First function replacement module, suitable for after the establishment to the window services is intercepted, window services being needed to load
Home window object acquisition function replace with first window object acquisition function;
Window services creation module, suitable for creating the window services, and load the first window object acquisition function.
Preferably, the home window object acquisition function that window services are needed to load replaces with first window object
Obtaining function includes:
Second function replacement module, suitable for the initial getfocuswindow functions for needing to load by window services, replace
For the first getfocuswindow functions;The return sequential of the first getfocuswindow functions specifies process for return.
Preferably, the window services are included by calling the first window object acquisition function to obtain window object:
First window object acquisition module, suitable for by the first getfocuswindow functions, searching window object storehouse
The windowstata window objects at top.
Preferably, in addition to:
Window object judge module, when being changed suitable for the window object at the top of window object storehouse, described in judgement
Whether window object has obtained;If the window object does not obtain, continue the window object returning to the process of specifying.
It can hatch (fork) process in Android system according to a kind of Android system application method for closing of the present invention to start
When, you can the progress information of process is obtained, for the process of the necessary scope of system, for example systemsever processes are Androids
The basic process that system performs, including call process, informing process etc., without record, then for except system it is necessary
Other processes outside process, such as APP (application, using) process, process letter of the invention then that app can be recorded
Breath., can be then according to the process of the record if user triggers out code by the function key of terminal after system screen locking
Information, to the system must process without close, avoid by system associated process if turned off and influence the normal of user
Use, and the process of process must be outside to(for) system can then close., can not be fast after of the invention this solves system screen locking
Speed closes in Android system the problem of running the process outside the necessary scope of nonsystematic, and achieving can easily close under screen lock state
The process of the necessary scope of the nonsystematic run in Android system is closed, reduces the power consumption beneficial effect of system.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention
Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of schematic flow sheet of Android system application method for closing according to an embodiment of the invention;
Fig. 2 shows a kind of flow signal of Android system window object acquisition methods according to an embodiment of the invention
Figure;
Fig. 3 shows a kind of flow signal of Android system window object acquisition methods according to an embodiment of the invention
Figure;
Fig. 4 shows a kind of structural representation of Android system application shutoff device according to an embodiment of the invention;
Fig. 5 shows a kind of structural representation of Android system application shutoff device according to an embodiment of the invention;
Fig. 6 shows a kind of structural representation of Android system application shutoff device according to an embodiment of the invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
One of core concept of the present invention is:When Android system hatching (fork) process starts, you can obtain process
Progress information, then judge these processes which be the necessary process of non-Android system (such as systemsever processes be peace
The basic process that tall and erect system performs, systemsever also include call process, informing process etc.), for not being Android system
Necessary process (such as APP (application, using) process), it is of the invention then its progress information can be recorded.Then basis
The out code of user's triggering, then can be closed these processes according to the progress information of record.Make it can be in screen lock state
Under easily close the process that the nonsystematic that is run in Android system must be outside scope, reduce the power consumption of system.
Embodiment one
Reference picture 1, it illustrates a kind of schematic flow sheet of Android system application method for closing of the present invention, including:
Step 110, monitor in Android system whether start hatching process;
In android system, all program process and system service process SystemServer be all by
What zygote processes hatching (fork) came out, the present invention can be when zygote processes hatch other processes, then to hatching process
Monitored, namely monitor the establishment to process.
Preferably, in addition to:
Sub-step 100, the initial process incubator of Android system is replaced with into specific first process incubator;Pass through institute
State the first process incubator and monitor whether Android system starts hatching process.
In the present invention, in order to realize the monitoring of process hatching process, it is necessary to initial to Android system first process
Incubator is that zygote processes are replaced, and replaces with the first process incubator specified, i.e. the first zygote processes, this first
Zygote processes can monitor whether Android system starts hatching process.The present invention can be initial by Android system
Zygote processes replace with the first zygote processes and realize monitoring and acquisition process.
Certainly, it is necessary to restart android after replacing the initial zygote processes of Android system and being the first zygote processes
System.The function of the first zygote processes after replacement in addition to the function of the zygote process initial including Android system,
Also added monitoring is the no various processing logics started after hatching process and monitoring of Android system.
Certainly, the root authority of system can be obtained in advance, is then replaced again for Android system, above-mentioned replacement process
Change.
Preferably, it is described to include by the way that whether the first process incubator monitoring Android system starts hatching process:
Sub-step 112, java virtual machines are created by the first process incubator;
Sub-step 113, registered by the java virtual machines and monitor socket, Android is monitored by the monitoring socket
Whether system starts hatching process.
In the normal boot process of Android system, substantially:Activation system->Init processes, which are read, to be started
init.rc—>Init process creation zygote processes->Zygote process creation java virtual machines loading zygoteInit classes-
>By the virtual machine register socket->ActivityManagerService is waited to write establishment process to socket
Establishment message->Zygote processes correspond to process according to the establishment message establishing.
So the present invention the initial zygote processes of Android system are replaced with that the present invention specifies in abovementioned steps the
After one zygote processes, after Android system is restarted, its init process can create the first zygote processes of the present invention, so
After can the first zygote process creation java virtual machines, and then register monitor socket, pass through it is described monitoring socket monitor
Being that Android system is no starts hatching process.
Preferably, it is described to include by the way that whether socket monitoring starts hatching window services:
Sub-step 134, monitor the establishment message that hatching process whether is received in the socket;If described monitor set
Connect word and receive establishment message, it is determined that start hatching process.
In embodiments of the present invention when Android system needs establishment process, system (such as
ActivityManagerService) need to create the establishment message carried out to the monitoring socket write-in, then monitor institute
State and monitor in socket whether receive establishment message, you can judge whether system starts hatching process.If described monitor set
Connect word and receive establishment message, it is determined that start hatching process.If the monitoring socket does not receive establishment message, say
Bright no process needs to hatch.
Step 120, if starting hatching process, the process whether process belongs in the necessary scope of system is judged;
If the process is not belonging to the process in the necessary scope of system, into step 130;
Step 130, the progress information of the process is recorded;
In embodiments of the present invention, the first zygote processes after replacement can also load a process list, the process name
Unirecord system must be in scope process, for example the system such as systemsever processes, WindowManagerService enters
Journey, if these processes are closed, the normal use of system in itself can be influenceed.For the process outside the process list, than
Such as browser, instant messaging APP process, it is of the invention then its progress information can be recorded, such as record the process name.
Also the progress information can be returned into the process of specifying in the embodiment of the present invention to be recorded.
Then it may wait for subsequent step.
Step 140, judge whether to receive the out code that user triggers under Android system screen lock state;If receive
To out code, then into step 150;
After user is in installation system screen locking, if user want to close its using when start but the APP that is not turned off, can
So that under screen lock state, by the monitoring to some function button pre-set, such as sound button, long-press increases sound key
3s, then trigger out code, and system is then needed into the step of closing the app processes opened.It is above-mentioned pre-set to some
The monitoring of function button, by foregoing first zygote processes a snoop logic can also be set to perform.
Preferably, the out code for judging whether to receive user's triggering under Android system screen lock state includes:
Sub-step 141, under screen lock state, trigger action of the user to specified button is received, judge to specify for described pair and press
Whether the trigger action of key meets pre-defined rule;If the trigger action to specified button meets pre-defined rule, judge
Receive out code.
In embodiments of the present invention, the first zygote processes after replacement also load the pre- set pattern of the triggering to specified button
Long-press increases sound key 3s under then logic, such as foregoing screen lock state, then triggers out code.So start in follow-up system
Afterwards, the triggering to increasing sound key under screen lock state is monitored.
Certainly, in embodiments of the present invention, it can be lighted in screen and be followed by receiving trigger action of the family to specified button.
Step 150, according to the progress information of the record, the process is closed.
After operating system determines to receive out code, then according to the progress information of the record, the process is entered
Row is closed.Such as the progress information according to record, killprocess function pair processes can be called to be closed.
The embodiment of the present invention is when Android system hatching (fork) process starts, you can the progress information of process is obtained,
So the present invention can by the necessary process of nonsystematic, such as the Android system such as systemsever processes perform basic process,
Also such as converse process, informing process etc., without record, to avoid these system associated process in follow-up close such as
Fruit is closed, and influences the normal use of user, and for other processes in addition to the necessary process of system, such as APP processes, sheet
Invention can then record app progress information.After system screen locking, refer to if user triggers closing by the function key of terminal
Order, then can be then according to the progress information of the record, and process that must be outside Process Extents to the system is closed.Make it
The process that can be easily closed under screen lock state outside the necessary scope of the nonsystematic run in Android system, reduces system
Power consumption.
Embodiment two
Reference picture 2, it illustrates a kind of schematic flow sheet of Android system window object acquisition methods of the present invention, including:
Step 210, monitor in Android system whether start hatching process;
Step 220, if starting hatching process, the process whether process belongs in the necessary scope of system is judged;
If the process is not belonging to the process in the necessary scope of system, the progress information of the process is recorded;
Step 230, before the window object that window services are called obtains function, intercept to initial in the Android system
Window object obtains the calling of function;
In traditional viewserver implementation procedures, it is necessary to adjust when going to obtain window object by viewserver
Function is obtained with window object, has called the window object to obtain function in viewserver and has gone window management service
After obtaining window object windostata in the window list storehouses that windows manager servive are maintained, it can return
Viewserver, all data of window object are then got as described in viewserver by the transmission of outside socket again.
Wherein, Viewserver is a kind of service, it can be understood as a process.
And the embodiment of the present invention, then before viewserver calls the window object acquisition function, intercept to the peace
The calling of home window object acquisition function in tall and erect system, subsequently into step 120.
In embodiments of the present invention, can be entered by the way that the initial process incubator of Android system is replaced with into specific first
Journey incubator, then realized before the window object that window services are called obtains function, intercepted by the first process incubator
To the calling of home window object acquisition function in the Android system.
Preferably, before the window object called in window services obtains function, intercept in the Android system
The calling of home window object acquisition function includes:
Sub-step 231, monitored by the first process incubator and whether start to hatch window services;
Specific first process is replaced with the present invention is implemented in the foregoing process incubator that Android system is initial to incubate
When changing device, i.e., process incubator initial to Android system is that zygote processes are replaced, and replaces with first specified
Zygote processes, the first zygote processes can also add the logic monitored and whether start to create viewserver, i.e., may be used also
Monitored by the first process incubator and whether start to hatch window services.
Preferably, include by the way that whether the first process incubator monitoring starts hatching window services:
Sub-step A2311, java virtual machines are created by the first process incubator;
The step and sub-step 112 are same steps.
Sub-step A2312, registered by the java virtual machines and monitor socket, being added in the monitoring socket is
It is no to start to hatch window services logic, to monitor whether Android system starts hatching process by the monitoring socket.
The step is that registration with the addition of when monitoring socket monitors socket described on the basis of the execution of sub-step 113
Added in word and whether start to hatch window services logic.
In the normal boot process of Android system, substantially:Activation system->Init processes, which are read, to be started
init.rc—>Init process creation zygote processes->Zygote process creation java virtual machines loading zygoteInit classes-
>By the virtual machine socket->ActivityManagerService is waited to write the establishment of establishment process to socket
Message->Zygote processes correspond to process according to the establishment message establishing.
So the present invention the initial zygote processes of Android system are replaced with that the present invention specifies in abovementioned steps the
After one zygote processes, after Android system is restarted, its init process can create the first zygote processes of the present invention, so
After can the first zygote process creation java virtual machines, enter by the java virtual machines register monitor socket, in this hair
The logic that whether starts hatching of the bright monitoring socket except monitoring each process, also further has for viewserver
The snoop logic of this specific process.
Preferably, it is described to include by the way that whether socket monitoring starts hatching window services:
Sub-step A215, monitor the first message that hatching window services whether are received in the socket;It is if described
Socket receives the first message of hatching window services, it is determined that starts to hatch window services.
The socket of above-mentioned registration, it is to monitor the message received in socket in the embodiment of the present invention.In android
When system needs establishment process, system needs to send the first message for creating viewserver to socket, then described in monitoring
Whether the first message of hatching window services is received in socket, you can judges whether system starts to create viewserver.
If the socket receives the first message of hatching window services, it is determined that starts to hatch window services.If the set
The first message that word does not receive hatching window services is connect, then system does not hatch window services.
Sub-step 232, start to hatch window services if listened to, intercept the establishment to the window services, so as to
Intercepting window services needs the loading of home window object acquisition function in the Android system that calls to it.
So the embodiment of the present invention is then intercepted to viewserver wound after listening to and starting to create viewserver
Build.Intercept the process interception viewserver of the establishment to viewserver in embodiments of the present invention needs to call to it
The loading of function, for example intercept the loading that viewserver needs the window object that calls to obtain function to it.
Step 240, the home window object acquisition function of the interception is replaced with into first window object acquisition function;
The home window object acquisition function of interception is replaced with the first window object acquisition of oneself by the embodiment of the present invention
Function, i.e., foregoing first window object acquisition function;The work(of the first window object acquisition function of oneself in the embodiment of the present invention
Can and interface it is consistent with the function and interface of window object that Android system is initial acquisition function, can all remove windows
Windowstata is obtained in the window object list storehouses that manager servive are maintained, first window object acquisition function is only
It is that the object returned after windowstata is got is changed to the specified process that the embodiment of the present invention is specified.
Preferably, the interception window object acquisition function is replaced with into first window object acquisition function includes:
Sub-step 241, after establishment to the window services is intercepted, home window pair that window services are needed to load
First window object acquisition function is replaced with as obtaining function;
In embodiments of the present invention, it is the first of the present invention in the initial zygote processes of foregoing replacement Android system
During zygote processes, during initial zygoteInit classes are replaced with into the amended zygoteInit classes of the present invention,
In amended zygoteInit classes, the first window object acquisition function that the present invention needs can also be added, first window
Process of the mouth object acquisition function before windowstata is got obtains letter with the original window object of Android system
Number is consistent, and simply first window object acquisition function gets the return sequential after windowstata and is changed to directly return and refers to
Determine process.
Sub-step 242, the window services are created, and load the first window object acquisition function.
So obtained in the first window object that the initial window object acquisition function of Android system is replaced with to the present invention
After taking function, then the process for creating the viewserver can be continued executing with, the function needed for it can be then loaded after creating,
Function needed for it includes the first window object acquisition function.
Step 250, when triggering window services to obtain window object, the window services are by calling first window
Mouth object acquisition function obtains window object and returns to the process of specifying to carry out window object record;
The first window object acquisition letter of oneself of the invention is replaced with the initial window object of interception is obtained into function
After number, viewserver calling is continued executing with, then what it was called is the first window object acquisition function of the present invention,
The first window object acquisition function gets the object returned after windowstata and is changed to the finger that the embodiment of the present invention is specified
Determine process, then can be by specifying process to record each windowstata information.
When the viewserver calls the first window object acquisition function to remove windows manager servive
After windowstata being got in the window list storehouses of maintenance, you can directly pass through the windowstata
Pipe pipelines between viewserver and specified process return to the specified process of Android system.
Step 260, judge whether to receive the out code that user triggers under Android system screen lock state;If receive
To out code, then into step 270;
Step 270, according to progress information and the corresponding relation of window object, window contracting is obtained from corresponding window object
Sketch map, and the window thumbnail is illustrated in the specified location of locking screen interface;
In embodiments of the present invention, in the windowstata that can be recorded from specified process, the progress information with record is obtained
Corresponding windowstata, the window message being then based in these windowstata generate corresponding window thumbnail.
Step 280, the second out code that user is directed at least one window thumbnail is received;
Step 290, when receiving the second out code at least one window thumbnail, according to entering for the record
Journey information, corresponding process is closed.
For example the app processes run in current system internal memory have A, B, C, then in step 280 displaying A, B, C window contracting
After sketch map, user can select Close All, can also select to close some, then can entering according to record after selection
The progress information of the journey information searching selected process, call and close the corresponding process closing of function pair.
Preferably, in addition to:
Step 292, when the window object at the top of window object storehouse changes, judge the window object whether
Through obtaining;
Step 294, if the window object does not obtain, continue the window object returning to the process of specifying.
In embodiments of the present invention, because the first getfocuswindow functions are the windowstata of the stack top obtained,
And the windowstata of stack top represents the window object for activating application in other words of current presentation, other are in the window on backstage
Object then can be in the position of some under stack top.As long as the windowstata changes of stack top of the embodiment of the present invention, i.e. android
The app changes of system current presentation, you can obtain the windowstata after the change.
So the present invention can constantly obtain the windowstata of stack top, and the windowstata to having obtained is carried out
Record, when next time obtains windowstata, according to foregoing record, if the windowstata of stack top does not change,
Without obtaining, if the windowstata of stack top changes, continue the window object returning to the process of specifying.
The embodiment of the present invention, can be while recording to progress information, also can be to the window pair corresponding to process
As being recorded, under screen lock state, window information corresponding to displaying, user's control can be facilitated to close with the process of foundation record
Which process closed.User is set easily to be closed under screen lock state outside the necessary scope of the nonsystematic run in Android system
Process, reduce the power consumption of system.
Embodiment three
Reference picture 3, it illustrates a kind of schematic flow sheet of Android system window object acquisition methods of the present invention, including:
Step 310, the initial process incubator of Android system is replaced with into specific first process incubator;
The initial zygote processes of Android system are replaced with into the first preset zygote processes of the present invention;First
The function of zygote processes also added whether monitoring begins listening for pacifying in addition to the function including initial zygote processes
Whether tall and erect system starts hatching process and hatches the processing logic after window services and monitoring.After replacement, it can restart
System, the init processes that activation system most starts.
Step 312, java virtual machines are created by the first process incubator;
Step 314, registered by the java virtual machines and monitor socket, to monitor Android by the monitoring socket
Whether system starts whether hatching process and further monitoring Android system starts to hatch window services;If listen to peace
Tall and erect system starts hatching process, then into step 316;If listening to whether Android system starts to hatch window services, enter
Enter step 322;
Step 316, the process whether process belongs in the necessary scope of system is judged;If the process is not belonging to
Process in the necessary scope of system, then into step 318;
Step 318, the progress information of the process is recorded;
Step 322, the establishment to the window services is intercepted, that calls is needed to it so as to intercept window services
The loading of getfocuswindow functions;
Step 324, after the establishment to the window services is intercepted, window services needs are loaded initial
Getfocuswindow functions, replace with the first getfocuswindow functions;The first getfocuswindow functions
Sequential is returned to return to the process of specifying;
The first getfocuswindow functions of the present invention and the initial getfocuswindow of itself in Android system
Function has identical parameter setting, simply changes the returning an object value of the initial getfocuswindow functions of system for this
The specified process of invention.
Step 326, the window services are created, and load the first getfocuswindow functions;
After it substituted for above-mentioned function, you can continue executing with process hatching process, the first zygote processes can continue
Viewserver is created, the relevant parameter of the first getfocuswindow functions is loaded after establishment.
Step 328, window services are searched at the top of window object storehouse by the first getfocuswindow functions
Windowstata window objects, and windowstata window objects are returned into the process of specifying with the record of Process Window object;
After abovementioned steps, when window services perform and obtain window object, then described first can be called
Getfocuswindow functions, from the storehouse of memory window object, the windowstata of stack top is obtained, then can be incited somebody to action
Windowstata is passed by the pipe pipelines between viewserver and specified process and is returned to specified process.Certainly
Pipe pipelines between viewserver and specified process can be built when in use.
In embodiments of the present invention, when any one app is opened, its corresponding windowstata can be in said stack
Stack top, then pass through above-mentioned steps be can record all openings app windowstata.
Step 330, judge whether to receive the out code that user triggers under Android system screen lock state;If receive
To out code, then into step 332;
Step 332, according to progress information and the corresponding relation of window object, window contracting is obtained from corresponding window object
Sketch map, and the window thumbnail is illustrated in the specified location of locking screen interface;
Step 334, the second out code that user is directed at least one window thumbnail is received;
Step 336, when receiving the second out code at least one window thumbnail, according to entering for the record
Journey information, corresponding process is closed.
Example IV
Reference picture 4, it illustrates a kind of structural representation of Android system application shutoff device of the present invention, including:
Process creation monitors module 410, is adapted for listening in Android system whether starting hatching process;
Information logging modle 420 is carried out, if suitable for starting hatching process, judging whether the process belongs to system must
Process in the range of palpus;If the process is not belonging to the process in the necessary scope of system, the process letter of the process is recorded
Breath;
Trigger module 430 is closed, suitable for judging whether to receive the closing of user's triggering under Android system screen lock state
Instruction;
Process closedown module 440, if suitable for receiving out code, according to the progress information of the record, to institute
The process of stating is closed.
Preferably, in addition to:
Process incubator replacement module, suitable for the initial process incubator of Android system is replaced with into specific first process
Incubator;Monitor whether Android system starts hatching process by the first process incubator.
Preferably, the process creation is monitored module and included:
Java Virtual Machine creation module, suitable for creating java virtual machines by the first process incubator;
Socket Registering modules are monitored, socket is monitored suitable for being registered by the java virtual machines, passes through the monitoring
Socket monitors whether Android system starts hatching process.
Preferably, the process creation is monitored module and included:
First process creation monitors module, and the establishment for being adapted for listening for whether receiving hatching process in the socket disappears
Breath;If the monitoring socket receives establishment message, it is determined that starts hatching process.
Preferably, the closing trigger module includes:
First closes trigger module, suitable under screen lock state, receiving user to the trigger action of specified button, judges institute
State to whether the trigger action of specified button meets pre-defined rule;If the trigger action to specified button meets pre- set pattern
Then, then judge to receive out code.
Embodiment five
Reference picture 5, it illustrates a kind of structural representation of Android system application shutoff device of the present invention, including:
Process creation monitors module 510, is adapted for listening in Android system whether starting hatching process;
Information logging modle 520 is carried out, if suitable for starting hatching process, judging whether the process belongs to system must
Process in the range of palpus;If the process is not belonging to the process in the necessary scope of system, the process letter of the process is recorded
Breath;
Window blocking module 530, before the window object suitable for being called in window services obtains function, intercept to the peace
The calling of home window object acquisition function in tall and erect system;
Function replacement module 540, suitable for the home window object acquisition function of the interception is replaced with into first window pair
As obtaining function;
Window acquisition module 550, suitable for when triggering window services to obtain window object, the window services pass through tune
Window object is obtained with the first window object acquisition function and returns to the process of specifying to carry out window object record.
Trigger module 560 is closed, suitable for judging whether to receive the closing of user's triggering under Android system screen lock state
Instruction;Into window display module 570;
Window display module 570, suitable for the corresponding relation according to progress information and window object, from corresponding window object
Middle acquisition window thumbnail, and the window thumbnail is illustrated in the specified location of locking screen interface;
Second out code module 580, refer to suitable for receiving user and being closed for the second of at least one window thumbnail
Order;
Process closedown module 590, suitable for working as the second out code received at least one window thumbnail, according to
The progress information of the record, corresponding process is closed.
Preferably, the window blocking module includes:
Whether first monitors module, start to hatch window services suitable for monitoring by the first process incubator;
First blocking module, if starting to hatch window services suitable for listening to, intercept the wound to the window services
Build, the loading of home window object acquisition function in the Android system that calls is needed so as to intercepting window services to it.
Preferably, the function replacement module includes:
First function replacement module, suitable for after the establishment to the window services is intercepted, window services being needed to load
Home window object acquisition function replace with first window object acquisition function;
Window services creation module, suitable for creating the window services, and load the first window object acquisition function.
Preferably, monitored by the first process incubator and whether start to create window services.
Preferably, monitored by the monitoring socket and whether start to create window services.
Preferably, the window blocking module includes:
Create message and monitor module, be adapted for listening for whether receiving in the socket and create the first of window services and disappear
Breath;If the socket receives the first message for creating window services, it is determined that starts to create window services.
Embodiment six
Reference picture 6, it illustrates a kind of structural representation of Android system application shutoff device of the present invention, including:
Process incubator replacement module 610, suitable for the initial process incubator of Android system is replaced with into specific first
Process incubator;
Virtual machine creating module 612, suitable for creating java virtual machines by the first process incubator;
First window service-creation monitors module 614, socket is monitored suitable for being registered by the java virtual machines, with logical
Cross whether the monitoring socket monitoring Android system starts whether hatching process and further monitoring Android system starts
Hatch window services;If listening to Android system starts hatching process, into process judge module 616;If listen to
Whether Android system starts to hatch window services, then into the second blocking module 622;
Process judge module 616, if suitable for starting hatching process, judge whether the process belongs to the necessary model of system
Enclose interior process;If the process is not belonging to the process in the necessary scope of system, into process logging modle 618;
Process logging modle 618, suitable for recording the progress information of the process;
Second blocking module 622, intercepts the establishment to the window services, and it is needed to call so as to intercept window services
Getfocuswindow functions loading;
Second function replacement module 624, suitable for the initial getfocuswindow functions for needing to load by window services, replace
It is changed to the first getfocuswindow functions;The return sequential of the first getfocuswindow functions be return specify into
Journey;
Window services creation module 626, suitable for creating the window services, and load the first getfocuswindow
Function;
First window object acquisition module 628, suitable for window services by the first getfocuswindow functions, search window
Windowstata window objects at the top of mouth object stack, and windowstata window objects are returned into the process of specifying;
By the record of above-mentioned module, then data support can be provided to close APP processes subsequently under screen lock state.
Trigger module 630 is closed, suitable for judging whether to receive the closing of user's triggering under Android system screen lock state
Instruction;Into window display module 632;
Window display module 632, suitable for the corresponding relation according to progress information and window object, from corresponding window object
Middle acquisition window thumbnail, and the window thumbnail is illustrated in the specified location of locking screen interface;
Second out code module 634, refer to suitable for receiving user and being closed for the second of at least one window thumbnail
Order;
Process closedown module 636, suitable for working as the second out code received at least one window thumbnail, according to
The progress information of the record, corresponding process is closed.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of system
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself
Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be realized with hardware, or to be run on one or more processor
Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice
Microprocessor or digital signal processor (DSP) are realized in Android system application pass hull closure according to embodiments of the present invention
Some or all parts some or all functions.The present invention is also implemented as being used to perform side as described herein
The some or all equipment or program of device (for example, computer program and computer program product) of method.It is such
Realizing the program of the present invention can store on a computer-readable medium, or can have the shape of one or more signal
Formula.Such signal can be downloaded from internet website and obtained, and either be provided or with any other shape on carrier signal
Formula provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real
It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
A1, a kind of Android system application method for closing, including:
Monitor in Android system and whether start hatching process;
If starting hatching process, the process whether process belongs in the necessary scope of system is judged;It is if described
Process is not belonging to the process in the necessary scope of system, then records the progress information of the process;
Judge whether to receive the out code that user triggers under Android system screen lock state;
If receiving out code, according to the progress information of the record, the process is closed.
A2, the method as described in A1, in addition to:
The initial process incubator of Android system is replaced with into specific first process incubator;Pass through first process
Incubator monitors whether Android system starts hatching process.
A3, the method as described in A2, it is described to monitor whether Android system starts to hatch by the first process incubator
Process includes:
Java virtual machines are created by the first process incubator;
Registered by the java virtual machines and monitor socket, monitor whether Android system is opened by the monitoring socket
Beginning hatching process.
A4, the method as described in A3, it is described to include by the way that whether socket monitoring starts hatching window services:
Monitor the establishment message that hatching process whether is received in the socket;If the monitoring socket receives
Create message, it is determined that start hatching process.
A5, the method as described in A1, the pass for judging whether to receive user's triggering under Android system screen lock state
Closing instruction includes:
Under screen lock state, trigger action of the user to specified button is received, judges the triggering behaviour to specified button
Whether pre-defined rule is met;If the trigger action to specified button meets pre-defined rule, judgement receives closing
Instruction.
A6, the method as described in A2, in addition to:
Before the window object that window services are called obtains function, intercept to home window object in the Android system
Obtain the calling of function;
The home window object acquisition function of the interception is replaced with into first window object acquisition function;
When triggering window services to obtain window object, the window services are by calling the first window object to obtain
Take function to obtain window object and return to the process of specifying to carry out window object record.
A7, the method as described in A6, after out code is received, in addition to:
According to progress information and the corresponding relation of window object, window thumbnail is obtained from corresponding window object, and
The window thumbnail is illustrated in the specified location of locking screen interface;
Further, in addition to:
Receive the second out code that user is directed at least one window thumbnail;At least one window is directed to when receiving
Second out code of mouth thumbnail, according to the progress information of the record, is closed to corresponding process.
A8, the method as described in A6, before the window object called in window services obtains function, intercept to described
The calling of home window object acquisition function includes in Android system:
Monitored by the first process incubator and whether start to hatch window services;
Start to hatch window services if listened to, intercept the establishment to the window services, so as to intercept window clothes
Business needs the loading of home window object acquisition function in the Android system that calls to it.
A9, the method as described in A6, the interception window object is obtained into function and replaces with first window object acquisition letter
Number includes:
After establishment to the window services is intercepted, home window object acquisition function that window services are needed to load
Replace with first window object acquisition function;
The window services are created, and load the first window object acquisition function.
A10, the method as described in A9, the home window object acquisition function that window services are needed to load replace with
First window object acquisition function includes:
The initial getfocuswindow functions that window services are needed to load, replace with the first getfocuswindow letters
Number;The return sequential of the first getfocuswindow functions specifies process for return.
A11, the method as described in A10, the window services are by calling the first window object acquisition function to obtain
Window object includes:
By the first getfocuswindow functions, the windowstata window objects at the top of window object storehouse are searched.
A12, the method as described in A10, in addition to:
When window object at the top of window object storehouse changes, judge whether the window object has obtained;
If the window object does not obtain, continue the window object returning to the process of specifying.
Present invention also offers B13, a kind of Android system application shutoff device, including:
Process creation monitors module, is adapted for listening in Android system whether starting hatching process;
Information logging modle is carried out, if suitable for starting hatching process, it is necessary to judge whether the process belongs to system
In the range of process;If the process is not belonging to the process in the necessary scope of system, the progress information of the process is recorded;
Trigger module is closed, the closing suitable for judging whether to receive user's triggering under Android system screen lock state refers to
Order;
Process closedown module, if suitable for receiving out code, according to the progress information of the record, to it is described enter
Cheng Jinhang is closed.
B14, the device as described in B13, in addition to:
Process incubator replacement module, suitable for the initial process incubator of Android system is replaced with into specific first process
Incubator;Monitor whether Android system starts hatching process by the first process incubator.
B15, the device as described in B14, the process creation, which monitors module, to be included:
Java Virtual Machine creation module, suitable for creating java virtual machines by the first process incubator;
Socket Registering modules are monitored, socket is monitored suitable for being registered by the java virtual machines, passes through the monitoring
Socket monitors whether Android system starts hatching process.
B16, the device as described in B15, the process creation, which monitors module, to be included:
First process creation monitors module, and the establishment for being adapted for listening for whether receiving hatching process in the socket disappears
Breath;If the monitoring socket receives establishment message, it is determined that starts hatching process.
B17, the device as described in B13, the closing trigger module include:
First closes trigger module, suitable under screen lock state, receiving user to the trigger action of specified button, judges institute
State to whether the trigger action of specified button meets pre-defined rule;If the trigger action to specified button meets pre- set pattern
Then, then judge to receive out code.
B18, the device as described in B14, in addition to:
Window blocking module, before the window object suitable for being called in window services obtains function, intercept to the Android
The calling of home window object acquisition function in system;
Function replacement module, obtained suitable for the home window object acquisition function of the interception is replaced with into first window object
Take function;
Window acquisition module, suitable for when triggering window services to obtain window object, the window services pass through calling
The first window object acquisition function obtains window object and returns to the process of specifying to carry out window object record.
B19, the device as described in B18, after trigger module is closed, in addition to:
Window display module, suitable for the corresponding relation according to progress information and window object, from corresponding window object
Window thumbnail is obtained, and the window thumbnail is illustrated in the specified location of locking screen interface;
Further, in addition to:
Second out code module, the second out code of at least one window thumbnail is directed to suitable for receiving user;
When receiving the second out code at least one window thumbnail, according to the progress information of the record, to corresponding
Process is closed.
B20, the device as described in B18, the window blocking module include:
Whether first monitors module, start to hatch window services suitable for monitoring by the first process incubator;
First blocking module, if starting to hatch window services suitable for listening to, intercept the wound to the window services
Build, the loading of home window object acquisition function in the Android system that calls is needed so as to intercepting window services to it.
B21, the device as described in B18, the function replacement module include:
First function replacement module, suitable for after the establishment to the window services is intercepted, window services being needed to load
Home window object acquisition function replace with first window object acquisition function;
Window services creation module, suitable for creating the window services, and load the first window object acquisition function.
B22, the device as described in B21, the home window object acquisition function that window services are needed to load are replaced
Include for first window object acquisition function:
Second function replacement module, suitable for the initial getfocuswindow functions for needing to load by window services, replace
For the first getfocuswindow functions;The return sequential of the first getfocuswindow functions specifies process for return.
B23, the device as described in B22, the window services are by calling the first window object acquisition function to obtain
Window object includes:
First window object acquisition module, suitable for by the first getfocuswindow functions, searching window object storehouse
The windowstata window objects at top.
B24, the device as described in B23, in addition to:
Window object judge module, when being changed suitable for the window object at the top of window object storehouse, described in judgement
Whether window object has obtained;If the window object does not obtain, continue the window object returning to the process of specifying.
Claims (22)
1. a kind of Android system application method for closing, including:
Monitor in Android system and whether start hatching process;Wherein, the initial process incubator of Android system is replaced with specific
The first process incubator;Monitor whether Android system starts hatching process by the first process incubator;
If starting hatching process, the process whether process belongs in the necessary scope of system is judged;If the process
The process being not belonging in the necessary scope of system, then record the progress information of the process;
Judge whether to receive the out code that user triggers under Android system screen lock state;
If receiving out code, according to the progress information of the record, the process is closed.
2. the method as described in claim 1, it is characterised in that described that Android system is monitored by the first process incubator
Whether starting hatching process includes:
Java virtual machines are created by the first process incubator;
Registered by the java virtual machines and monitor socket, monitor whether Android system starts to incubate by the monitoring socket
Change process.
3. method as claimed in claim 2, it is characterised in that described that whether Android system is monitored by the monitoring socket
Starting hatching process includes:
Monitor the establishment message that hatching process whether is received in the socket;If the monitoring socket receives establishment
Message, it is determined that start hatching process.
4. the method as described in claim 1, it is characterised in that described to judge whether to receive under Android system screen lock state
The out code of user's triggering includes:
Under screen lock state, user is received to the trigger action of specified button, judges that the trigger action to specified button is
It is no to meet pre-defined rule;If the trigger action to specified button meets pre-defined rule, judgement receives out code.
5. the method as described in claim 1, it is characterised in that also include:
Before the window object that window services are called obtains function, intercept to home window object acquisition in the Android system
The calling of function;
The home window object acquisition function of the interception is replaced with into first window object acquisition function;
When triggering window services to obtain window object, the window services are by calling the first window object acquisition letter
Number obtains window object and returns to the process of specifying to carry out window object record.
6. method as claimed in claim 5, it is characterised in that after out code is received, in addition to:
According to progress information and the corresponding relation of window object, window thumbnail is obtained from corresponding window object, and by institute
State the specified location that window thumbnail is illustrated in locking screen interface;
Further, in addition to:
Receive the second out code that user is directed at least one window thumbnail;Contracted when receiving at least one window
Second out code of sketch map, according to the progress information of the record, corresponding process is closed.
7. method as claimed in claim 5, it is characterised in that it is described window services call window object obtain function it
Before, intercept includes to the calling of home window object acquisition function in the Android system:
Monitored by the first process incubator and whether start to hatch window services;
Start to hatch window services if listened to, the establishment to the window services is intercepted, so as to intercept window services pair
The loading of home window object acquisition function in the Android system that its needs calls.
8. method as claimed in claim 5, it is characterised in that the interception window object is obtained into function and replaces with the first window
Mouth object acquisition function includes:
After the establishment to the window services is intercepted, the home window object acquisition function that window services need to load is replaced
For first window object acquisition function;
The window services are created, and load the first window object acquisition function.
9. method as claimed in claim 8, it is characterised in that the home window object for needing to load by window services obtains
Taking function to replace with first window object acquisition function includes:
The initial getfocuswindow functions that window services are needed to load, replace with the first getfocuswindow functions;
The return sequential of the first getfocuswindow functions specifies process for return.
10. method as claimed in claim 9, it is characterised in that the window services are by calling the first window object
Obtaining function acquisition window object includes:
By the first getfocuswindow functions, the windowstata window objects at the top of window object storehouse are searched.
11. method as claimed in claim 9, it is characterised in that also include:
When window object at the top of window object storehouse changes, judge whether the window object has obtained;
If the window object does not obtain, continue the window object returning to the process of specifying.
12. a kind of Android system application shutoff device, including:
Process creation monitors module, is adapted for listening in Android system whether starting hatching process;
Process incubator replacement module, hatch suitable for the initial process incubator of Android system is replaced with into specific first process
Device;Monitor whether Android system starts hatching process by the first process incubator;
Information logging modle is carried out, if suitable for starting hatching process, judges whether the process belongs to the necessary scope of system
Interior process;If the process is not belonging to the process in the necessary scope of system, the progress information of the process is recorded;
Trigger module is closed, suitable for judging whether to receive the out code of user's triggering under Android system screen lock state;
Process closedown module, if suitable for receiving out code, according to the progress information of the record, the process is entered
Row is closed.
13. device as claimed in claim 12, it is characterised in that the process creation, which monitors module, to be included:
Java Virtual Machine creation module, suitable for creating java virtual machines by the first process incubator;
Socket Registering modules are monitored, socket is monitored suitable for being registered by the java virtual machines, are socketed by described monitor
Word monitors whether Android system starts hatching process.
14. device as claimed in claim 13, it is characterised in that the process creation, which monitors module, to be included:
First process creation monitors module, is adapted for listening for whether receiving the establishment message of hatching process in the socket;Such as
Socket is monitored described in fruit and receives establishment message, it is determined that starts hatching process.
15. device as claimed in claim 12, it is characterised in that the closing trigger module includes:
First closes trigger module, and suitable under screen lock state, receiving user to the trigger action of specified button, it is described right to judge
Whether the trigger action of specified button meets pre-defined rule;If the trigger action to specified button meets pre-defined rule,
Then judge to receive out code.
16. device as claimed in claim 13, it is characterised in that also include:
Window blocking module, before the window object suitable for being called in window services obtains function, intercept to the Android system
The calling of middle home window object acquisition function;
Function replacement module, suitable for the home window object acquisition function of the interception is replaced with into first window object acquisition letter
Number;
Window acquisition module, suitable for when triggering window services to obtain window object, the window services pass through described in calling
First window object acquisition function obtains window object and returns to the process of specifying to carry out window object record.
17. device as claimed in claim 16, it is characterised in that after trigger module is closed, in addition to:
Window display module, suitable for the corresponding relation according to progress information and window object, obtained from corresponding window object
Window thumbnail, and the window thumbnail is illustrated in the specified location of locking screen interface;
Further, in addition to:
Second out code module, the second out code of at least one window thumbnail is directed to suitable for receiving user;When connecing
The second out code at least one window thumbnail is received, according to the progress information of the record, to corresponding process
Closed.
18. device as claimed in claim 16, it is characterised in that the window blocking module includes:
Whether first monitors module, start to hatch window services suitable for monitoring by the first process incubator;
First blocking module, if starting to hatch window services suitable for listening to, the establishment to the window services is intercepted, from
And intercepting window services needs the loading of home window object acquisition function in the Android system that calls to it.
19. device as claimed in claim 16, it is characterised in that the function replacement module includes:
First function replacement module, suitable for after the establishment to the window services is intercepted, window services needs being loaded first
Beginning window object obtains function and replaces with first window object acquisition function;
Window services creation module, suitable for creating the window services, and load the first window object acquisition function.
20. device as claimed in claim 19, it is characterised in that the home window object for needing to load by window services
Acquisition function, which replaces with first window object acquisition function, to be included:
Second function replacement module, suitable for window services are needed into the initial getfocuswindow functions that load, replace with the
One getfocuswindow functions;The return sequential of the first getfocuswindow functions specifies process for return.
21. device as claimed in claim 20, it is characterised in that the window services are by calling the first window object
Obtaining function acquisition window object includes:
First window object acquisition module, suitable for by the first getfocuswindow functions, searching at the top of window object storehouse
Windowstata window objects.
22. device as claimed in claim 21, it is characterised in that also include:
Window object judge module, when being changed suitable for the window object at the top of window object storehouse, judge the window
Whether object has obtained;If the window object does not obtain, continue the window object returning to the process of specifying.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810058686.8A CN108228321B (en) | 2014-12-16 | 2014-12-16 | Android system application closing method and device |
CN201410784204.9A CN104484223B (en) | 2014-12-16 | 2014-12-16 | A kind of Android system application method for closing and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410784204.9A CN104484223B (en) | 2014-12-16 | 2014-12-16 | A kind of Android system application method for closing and device |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810058686.8A Division CN108228321B (en) | 2014-12-16 | 2014-12-16 | Android system application closing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104484223A CN104484223A (en) | 2015-04-01 |
CN104484223B true CN104484223B (en) | 2018-02-16 |
Family
ID=52758767
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810058686.8A Active CN108228321B (en) | 2014-12-16 | 2014-12-16 | Android system application closing method and device |
CN201410784204.9A Active CN104484223B (en) | 2014-12-16 | 2014-12-16 | A kind of Android system application method for closing and device |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810058686.8A Active CN108228321B (en) | 2014-12-16 | 2014-12-16 | Android system application closing method and device |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN108228321B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108228321B (en) * | 2014-12-16 | 2021-08-10 | 北京奇虎科技有限公司 | Android system application closing method and device |
CN105373750B (en) * | 2015-12-02 | 2018-05-25 | 小米科技有限责任公司 | terminal operation control method and device |
CN105630354A (en) * | 2015-12-25 | 2016-06-01 | 小米科技有限责任公司 | Application control method and device |
CN105718786A (en) * | 2016-01-18 | 2016-06-29 | 成都中科创达软件有限公司 | System lock screen protection method and system |
CN105867771A (en) * | 2016-04-11 | 2016-08-17 | 广东欧珀移动通信有限公司 | Mobile terminal and method and device for turning off application programs |
CN106020820A (en) * | 2016-05-18 | 2016-10-12 | 北京麒麟合盛网络技术有限公司 | User process termination method and apparatus |
CN106020908B (en) * | 2016-05-31 | 2019-04-12 | Oppo广东移动通信有限公司 | A kind of function method for closing and device |
CN106598572B (en) * | 2016-11-17 | 2018-08-03 | 武汉斗鱼网络科技有限公司 | Method and device is exited in a kind of application |
CN109144677B (en) * | 2017-06-16 | 2022-08-26 | 百度在线网络技术(北京)有限公司 | Keep-alive process method and device for android system |
CN107844338B (en) * | 2017-10-31 | 2019-09-13 | Oppo广东移动通信有限公司 | Application program management-control method, device, medium and electronic equipment |
CN108196913A (en) * | 2018-01-05 | 2018-06-22 | 青岛海信移动通信技术股份有限公司 | The process method for cleaning and device of a kind of application program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102830996A (en) * | 2012-08-08 | 2012-12-19 | 广东欧珀移动通信有限公司 | Fast boot method of handheld device |
CN103064590A (en) * | 2012-12-25 | 2013-04-24 | 天津三星通信技术研究有限公司 | Control method and system for closing running programs of mobile terminal |
CN103514007A (en) * | 2012-08-31 | 2014-01-15 | Tcl集团股份有限公司 | Method for warm start of mobile terminal based on Android system |
CN104038642A (en) * | 2014-07-01 | 2014-09-10 | 中科创达软件股份有限公司 | Method and device for responding to incoming call |
CN104102540A (en) * | 2014-06-30 | 2014-10-15 | 上海卓悠网络科技有限公司 | Operation process management method and mobile terminal |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020192631A1 (en) * | 2001-05-23 | 2002-12-19 | Chase Weir | Method and system for interactive teaching |
CN1842770A (en) * | 2003-08-28 | 2006-10-04 | 美普思科技有限公司 | Integrated mechanism for suspension and deallocation of computational threads of execution in a processor |
CN102497469A (en) * | 2011-11-25 | 2012-06-13 | 深圳市五巨科技有限公司 | Method and device for operating music player in screen lock state |
CN102946486A (en) * | 2012-11-20 | 2013-02-27 | 惠州Tcl移动通信有限公司 | Background application automatic clearing method based on mobile phone and mobile phone |
CN104199669B (en) * | 2014-09-12 | 2017-12-15 | 北京奇虎科技有限公司 | The method and device being managed to the process of application program |
CN108228321B (en) * | 2014-12-16 | 2021-08-10 | 北京奇虎科技有限公司 | Android system application closing method and device |
-
2014
- 2014-12-16 CN CN201810058686.8A patent/CN108228321B/en active Active
- 2014-12-16 CN CN201410784204.9A patent/CN104484223B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102830996A (en) * | 2012-08-08 | 2012-12-19 | 广东欧珀移动通信有限公司 | Fast boot method of handheld device |
CN103514007A (en) * | 2012-08-31 | 2014-01-15 | Tcl集团股份有限公司 | Method for warm start of mobile terminal based on Android system |
CN103064590A (en) * | 2012-12-25 | 2013-04-24 | 天津三星通信技术研究有限公司 | Control method and system for closing running programs of mobile terminal |
CN104102540A (en) * | 2014-06-30 | 2014-10-15 | 上海卓悠网络科技有限公司 | Operation process management method and mobile terminal |
CN104038642A (en) * | 2014-07-01 | 2014-09-10 | 中科创达软件股份有限公司 | Method and device for responding to incoming call |
Also Published As
Publication number | Publication date |
---|---|
CN108228321B (en) | 2021-08-10 |
CN108228321A (en) | 2018-06-29 |
CN104484223A (en) | 2015-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104484223B (en) | A kind of Android system application method for closing and device | |
CN104965790B (en) | Method for testing software and system based on crucial word drive | |
CN105573755B (en) | A kind of application Activity render time acquisition methods and device | |
CN107704356B (en) | Exception stack information acquisition method, device and computer readable storage medium | |
US9921569B2 (en) | Field device commissioning system and method | |
CN106293507A (en) | There is electronic equipment and the method for operation electronic equipment of external memory storage | |
CN103778012B (en) | The method and device of change terminal operator's informaiton | |
CN105516321B (en) | A kind of collecting method and device | |
CN108549568A (en) | Using entrance processing method, apparatus, storage medium and electronic equipment | |
CN106843977B (en) | A kind of processing method, device and the mobile terminal of application program self-starting | |
CN106874086B (en) | A kind of processing method, device and the mobile terminal of application program self-starting | |
CN106874089A (en) | A kind of processing method of application program self-starting, device and mobile terminal | |
CN110471738A (en) | Method for switching theme, device, electronic equipment and the storage medium of application program | |
CN104484176B (en) | A kind of Android system window object acquisition methods and device | |
CN106528206A (en) | Application starting control method and apparatus, and application installation package reinforcement apparatus | |
CN106445479B (en) | Information-pushing method and device | |
CN104899059B (en) | Operating system update method and device | |
CN104461741B (en) | Graphics device interface based computing device optimizing method and device | |
CN103530180B (en) | Method and device for switching storage space of application programs | |
CN109558187A (en) | A kind of user interface rendering method and device | |
US10944587B2 (en) | Event processing associated with a smart device | |
CN105335169A (en) | Method and apparatus for starting up communication in intelligent terminal | |
CN106874088B (en) | A kind of processing method, device and the mobile terminal of application program self-starting | |
CN107368406A (en) | The method, apparatus and equipment of test application program | |
CN106911730A (en) | A kind of cloud disk service device accesses moving method and 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: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Co-patentee after: Beijing Qizhi Business Consulting Co. Ltd. Patentee after: Beijing Qihu Technology Co., Ltd. Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Co-patentee before: Qizhi Software (Beijing) Co., Ltd. Patentee before: Beijing Qihu Technology Co., Ltd. |
|
CP01 | Change in the name or title of a patent holder |