Embodiment
In order to make those skilled in the art person understand better the technical scheme in the application, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiment.Based on the embodiment in the application, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, should belong to the scope of protection of the invention.
For example, the embodiment of the present invention can be applied in the terminal of little internal memory, the in the situation that of memory source anxiety, can be in the time of incoming call or in the time that retrieval system Home button is pressed, releasing resource fast, thus can fast reaction send a telegram here, or Quick-return system main screen interface.Certainly, the embodiment of the present invention is not limited to be applied in the terminal of little internal memory, in the larger terminal of memory size, also can apply.
For example, referring to Fig. 1, the schematic flow sheet of a kind of method that responds incoming call providing for the embodiment of the present invention.As shown in the figure, the method can comprise:
S110, in response to the message that receives origin electricity and trigger, judge just whether the application at terminal operating is system applies;
S120, if not, judge whether to exist system main screen process;
For example, if be just system applies in the application of terminal operating, can, in this system applies operation, start incoming call interface flow process.
S130, if there is no, closes described just in the application of terminal operating by force.
For example, can use Kill (killing) order, close by force described just in the application of terminal operating.
For example, may be just system applies in the application of terminal operating, may be also game application, or other provide application of service etc. for user.If system applies is normally moved for guarantee system, the embodiment of the present invention can not closed system applies by force.If not system applies, by judging whether to exist system main screen process to judge that whether memory source is nervous, if there is system main screen process, can determine that memory source takes it easy, and then start the interface flow process of sending a telegram here in the application operation of terminal operating, if there is no system main screen process, can determine memory source anxiety, thereby close by force described just in the application of terminal operating with releasing resource, provide more resources for starting incoming call interface flow process, accelerate incoming call interface display, user can be seen in time and carry out electric interface with response incoming call.
In some possible execution modes of the embodiment of the present invention, exist system main screen process, resource also may be not enough to start in time electric interface even if consider.For this problem, whether the embodiment of the present invention also shows and judges within a certain period of time carrying out electric interface, thereby judging while not showing to come electric interface in certain time length, just close by force application at terminal operating with releasing resource, provide more resources for starting incoming call interface flow process.Be understandable that, if receive the message that electric interface has shown in default duration, without closing by force again the application moving.Particularly, the embodiment of the present invention can exist system main screen process from judging, judge in default duration whether receive the message that electric interface has shown, if do not receive the message that electric interface has shown in default duration, close by force described just in the application of terminal operating.
It should be noted that in this embodiment, to how to judge in default duration, whether receive that the embodiment of the message that electric interface shown is not limit.For example, in some possible execution modes, timer can be set, judging while there is system main screen process, described timer starts timing, while receiving the message that electric interface shown, can determine in default duration and receive the message that electric interface has shown in the time that timing duration does not exceed default duration, also do not receive the message that electric interface shown in the time that timing duration exceedes default duration time, can determine in default duration and not receive the message that electric interface has shown.Again for example, in some possible execution modes, the mechanism that can utilize message queue time delay message to send after set delay duration, when judging while there is system main screen process, be the time delay message of default duration to message queue forward delay interval, if receive the message that electric interface has shown, and also do not receive described time delay message from message queue, determine in default duration and receive the message that electric interface has shown, described time delay message is deleted from described message queue, if receive the described time delay message that message queue sends, and also do not receive the message that electric interface has shown, determine in default duration and do not receive the message that electric interface has shown.
It should be noted that, the embodiment of the present invention can be applied on the terminal of any operating system.For example, in some possible execution modes, the embodiment of the present invention can be applied on the terminal of Android (Android) operating system.Particularly, can be applied to Android AMS (Android Activity Manager Service, system service).AMS, is the service end of Activity management, for managing the various actions of Activity, controls the life cycle of Activity, distributes message event, can be for interprocess communication, etc.Activity, is application component, is the basic units of pages of application, and the interface of application with user interactions is provided.
The execution mode that the embodiment of the present invention is applied to Android AMS below, describes in detail further.For example, this execution mode can comprise:
RIL layer (radio interface layer) receives after incoming telephone signal, (for example call call-in reporting interface that AMS provides, can need this call-in reporting interface of self-defining according to enforcement) for example, to send the message (, can define this type of message for KILL_STOP_FRONT_APP) of incoming call to AMS.Certainly, RIL layer, after AMS sends KILL_STOP_FRONT_APP message, can continue to report to the incoming call application of terminal the message that receives incoming telephone signal, so that incoming call application start shows to come the flow process of electric interface.
AMS for example,, in response to the message (, KILL_STOP_FRONT_APP message) that receives the transmission of RIL layer, judges just whether the application at terminal operating is system applies.For example, can judge just whether the application at terminal operating is system applies by the local variable in AMS, this local variable can be interior for identifying whether the just application at terminal operating is the local variable of system applies for AMS.
If it be not just system applies in the application of terminal operating that AMS judges, further judge whether to exist system main screen process (or claiming HOME process).
There is not system main screen process if AMS judges, determine the current memory source anxiety of terminal, close by force (or claim, kill) described just in the application of terminal operating.
If AMS judges the system main screen process that exists, be the time delay message of default duration to message queue forward delay interval by the Handler message mechanism of AMS.
For example, if AMS (receives message that electric interface shown from incoming call application, can be CANCEL_KILL_STOP_TIMEOUT by the type definition of this message) and also do not receive described time delay message from message queue, determine in default duration and receive the message that electric interface has shown, described time delay message is deleted from described message queue.
If AMS receives the described time delay message that message queue sends, and also do not receive the message that electric interface has shown, determine in default duration and do not receive the message that electric interface has shown, close by force described just in the application of terminal operating.
In other possible execution modes of the embodiment of the present invention, also provide the implementation at quick recovery system main screen interface.For example, the embodiment of the present invention can for example, be pressed in response to retrieval system Home button (, HOME key), judges Launcher, and whether system desktop starter moves; If described system desktop starter off-duty, and not just system applies in the application of terminal operating, close by force described just in the application of terminal operating with releasing resource, provide more resources for starting system main screen interface flow process, quickening system main screen interface, be HOME interface display, make user can see in time HOME interface.
In the other possible execution mode of the embodiment of the present invention, also provide quick response to carry out the implementation of note.For example, the embodiment of the present invention can, in response to the message that receives the triggering of origin note, judge just whether the application at terminal operating is system applies; If not, judge whether to exist system main screen process; If there is no, close by force described just in the application of terminal operating.
Corresponding with the method for above-mentioned response incoming call, the present invention also provides a kind of device that responds incoming call.For example, referring to Fig. 2, the structural representation of a kind of device that responds incoming call providing for the embodiment of the present invention.As shown in Figure 2, this device can comprise:
Application judging unit 210, can, for the message in response to receiving the triggering of origin electricity, judge just whether the application at terminal operating is system applies;
Main screen judging unit 220, is not system applies if can judge the just application at terminal operating for described application judging unit, judges whether to exist system main screen process;
Close performance element 230, if can judge and not have system main screen process for described main screen judging unit, close by force described just in the application of terminal operating.
Because embodiment of the present invention application judging unit 210 is in the time receiving the message of origin electricity triggering, judge just whether the application at terminal operating is system applies, thereby judge whether to exist system main screen process to determine that whether memory source is nervous by main screen judging unit 220 in the time being not system applies, if there is system main screen process, can determine that memory source takes it easy, and then start the interface flow process of sending a telegram here in the application operation of terminal operating, if there is no system main screen process, can determine memory source anxiety, thereby by close performance element 230 close by force described just in the application of terminal operating with releasing resource, provide more resources for starting incoming call interface flow process, accelerate incoming call interface display, user can be seen in time and carry out electric interface with response incoming call.
In some possible execution modes of the embodiment of the present invention, exist system main screen process, resource also may be not enough to start in time electric interface even if consider.For this problem, the device that the embodiment of the present invention is passed through can also comprise as shown in Figure 2: caller identification judging unit 240, can exist system main screen process for judging from described main screen judging unit, judge in default duration whether receive the message that electric interface has shown.Close performance element 230, judge in default duration and do not receive the message that electric interface has shown if can also be used for described caller identification judging unit 240, close by force described just in the application of terminal operating.
It should be noted that in this embodiment, to how to judge in default duration, whether receive that the embodiment of the message that electric interface shown is not limit.For example, in some possible execution modes, described caller identification judging unit 240 can comprise: time delay message sends subelement 241, can be for judging when described main screen judging unit while there is system main screen process, and be the time delay message of presetting duration to message queue forward delay interval.Delete subelement 242, if can be for receiving the message that electric interface shown and also not receiving described time delay message from message queue, determine in default duration and receive the message that electric interface has shown, described time delay message is deleted from described message queue.Caller identification judgment sub-unit 243, if the described time delay message that can send for receiving message queue, and also do not receive the message that electric interface has shown, determine in default duration and do not receive the message that electric interface has shown.
It should be noted that, the embodiment of the present invention can be disposed on the terminal of any operating system.For example, in some possible execution modes, the embodiment of the present invention can be disposed on the terminal of Android operating system.Particularly, can be disposed at Android AMS.Below, the execution mode that the device embodiment of the present invention being passed through is disposed at Android AMS describes in detail further.For example, the described application judging unit 210 of this device, can, for receiving after incoming telephone signal in response to receiving RIL layer the message that the call-in reporting interface by calling AMS and providing sends, judge just whether the application at terminal operating is system applies.Wherein, described come the message that shown of electric interface specifically can be applied by the incoming call moving in described terminal, send in the incoming call interface completing after incoming call interface display by calling AMS and providing.Time delay message sends subelement 241, can, for judging when described main screen judging unit while there is system main screen process, be the time delay message of presetting duration by the Handler message mechanism of AMS to message queue forward delay interval.
In other possible execution modes of the embodiment of the present invention, also provide the implementation at quick recovery system main screen interface.For example, the device that the embodiment of the present invention provides can also comprise: major key response unit 250, can be for being pressed in response to retrieval system Home button, and judge whether system desktop starter moves.The described performance element 230 of closing, if can also be used for described system desktop starter off-duty, and be not just system applies in the application of terminal operating, closes by force described just in the application of terminal operating.
In the other possible execution mode of the embodiment of the present invention, also provide quick response to carry out the implementation of note.For example, the device that the embodiment of the present invention provides can also comprise: note response unit 260, can, for the message in response to receiving the triggering of origin note, judge just whether the application at terminal operating is system applies; If not, trigger described main screen judging unit and judge whether to exist system main screen process; If there is no, close by force described just in the application of terminal operating.
It should be noted that, caller identification judging unit 240, time delay message send subelement 241, deletion subelement 242, caller identification judgment sub-unit 243, major key response unit 250 and note response unit 260 and in Fig. 2, use dotted lines, to represent that these unit are not necessary unit of the present invention.
For convenience of description, while describing above device, being divided into various unit with function describes respectively.Certainly, in the time that enforcement is of the present invention, the function of each unit can be realized in same or multiple software and/or hardware.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential general hardware platform by software and realizes.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually referring to, what each embodiment stressed is and the difference of other embodiment.Especially,, for system embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
The present invention can be used in numerous general or special purpose computing system environment or configuration.For example: personal computer, server computer, handheld device or portable set, laptop device, multicomputer system, system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, the distributed computing environment (DCE) that comprises above any system or equipment etc.
The present invention can describe in the general context of computer executable instructions, for example program module.Usually, program module comprises and carries out particular task or realize routine, program, object, assembly, data structure of particular abstract data type etc.Also can in distributed computing environment (DCE), put into practice the present invention, in these distributed computing environment (DCE), be executed the task by the teleprocessing equipment being connected by communication network.In distributed computing environment (DCE), program module can be arranged in the local and remote computer-readable storage medium including memory device.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.