A kind of method and apparatus for clearing up Android system memory
Technical field
The present invention relates to Android system and its equipment more particularly to a kind of methods for clearing up Android system memory.
Background technique
It is well known that using android system (Android system) if mobile phone for a long time do not shut down, system will become
Very Caton, even if user clears up memory, still not as good as smooth when being just switched on.The main reason for android system is more used and more is blocked
Be there is extensive application running quietly from the background, and the basic cleaning of these applications is not fallen, they can receive it is various respectively
After the Receiver notice of sample and wake up.As a comparison, the method that the background process killed in iOS system is restarted is very
Limited, briefly, iOS is really to clear up memory, and many applications be can't get rid of in android system, constantly be lived again, respectively
Kind process is stealthily being run from the background with service, so as to cause system Caton and power consumption.
Summary of the invention
In order to solve Android system Caton in the prior art the technical issues of proposes a kind of cleaning Android system memory
Method, comprising steps of
The habit of user's night use Android system is collected, the free time at Android system night is obtained;
Android system is restarted within the free time at the night.
Method of the invention further include: the use state for recording Android system before the restart after restarting, restores Android
The use state of system, and/or the APP of Android system is handled according to the habit of user.
Specifically: before restarting, record the list of all APP in current Android system in foreground;After restarting, according to
Corresponding APP, which is opened, according to the list is at foreground.Before restarting, the ring status of current Android system is recorded;Restart
Later, restore the corresponding ring status of Android system according to the ring status.It obtains user in nearest a period of time and uses peace
The frequency of APP in tall and erect system;And before the restart, the occupied memory of the APP not used in preset duration is cleared up, and frozen
Cleared up APP is tied, its self-starting is prevented.
Preferably, the specific flag bit of assignment before restarting judges whether the flag bit is assigned after restarting, thus
Execute the recovery and/or processing operation.
Preferably, meet within the free time at the night Android system play music, from the background have data downloading,
Equipment where Android system is in any one condition that the equipment where bright screen state, Android system is in in call
Reboot operation is not executed then.
The invention also provides the equipment of the method cleaning Android system memory described by adopting the above technical scheme.
The equipment includes mobile phone, tablet computer.
Using the present invention, the equipment moment of the operation Android system such as mobile phone can be allowed to keep the higher speed of service, promoted
User experience, while will not influence the normal use of user again.
Detailed description of the invention
Fig. 1 restarts flow chart for a preferred embodiment of the invention.
Fig. 2 is to restore flow chart after the restarting of an of the invention preferred embodiment.
Specific embodiment
The method of cleaning Android system memory proposed by the present invention takes the mobile phone as an example.
As shown in Figure 1 and Figure 2, this method first collects the habit of user's night use Android system, obtains Android system night
Free time restart mobile phone within the free time at Android system night, avoid most of user from restarting using mobile phone shutdown
Frequency is seldom, is only just to go the problem of restarting mobile phone Caton is not all right.Solve that modern life rhythm is fast, and people are reluctant simultaneously
Meaning waits this period for restarting booting.
, can be within the free time at Android system night on the basis of above-mentioned technical proposal, further judgement is used
Whether family is also using mobile phone, specifically includes: then to regard as user and using mobile phone when user is when playing music;Work as hand
There is downloading task on machine backstage, then it is assumed that user is using mobile phone;When mobile phone is in bright screen state, then it is assumed that user is using hand
Machine;When mobile phone is in talking state, then it is assumed that user is using mobile phone.If meeting any one in these conditions, then not
Restart mobile phone.
On the basis of above-mentioned technical proposal, the use state of Android system can be further recorded before the restart,
After restarting, restore the use state of Android system, and/or handle APP according to the use habit of user.
Specifically the list of all APP in current Android system in foreground can be recorded, then again before the restart
After restarting, the list according to record opens corresponding APP and is at foreground.The bell of current Android system is recorded before restarting
Sound state restores the corresponding ring status of Android system according to the ring status after restarting.It obtains in nearest a period of time
User uses the frequency of APP in Android system, and before the restart, and the APP not used in preset duration is occupied interior
Cleaning is deposited, and freezes cleared up APP, prevents its self-starting.
The specific flag bit of assignment before the restart judges whether the flag bit is assigned after restarting, to be different from
Common restarts, to execute above-mentioned recovery and/or processing operation.And user in the reboot process also do not light by mobile phone screen,
Booting the tinkle of bells is not issued simultaneously yet.
The present invention also protects the equipment using above method cleaning Android system memory simultaneously.The equipment is enumerated in addition to above-mentioned
Mobile phone other than, further include tablet computer etc. other use Android system equipment.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.