Patent ID: 9588805
Date: 2017-03-07
CPC Classifications: G06F

Claim:
1. A method for controlling a background application, comprising: generating an application list according to applications running in an operating system, wherein the application list comprises at least identifiers of the applications running in the operating system; traversing the identifiers in the application list; determining whether an application corresponding to a currently traversed identifier is a background application; determining whether a predetermined white list comprises the currently traversed identifier and whether the number of identifiers corresponding to background applications in the application list is greater than a predetermined threshold, if the application corresponding to the currently traversed identifier is a background application, wherein the predetermined white list comprises identifiers of background applications assigned by a user; and selecting an identifier corresponding to a background application from the application list and closing the background application corresponding to the selected identifier, if the predetermined white list comprises the currently traversed identifier and the number is greater than the predetermined threshold; or closing the application corresponding to the currently traversed identifier if the predetermined white list does not comprise the currently traversed identifier and the number is greater than the predetermined threshold; obtaining an inactive time period of the application corresponding to the currently traversed identifier if the predetermined white list comprises the currently traversed identifier and the number is not greater than the predetermined threshold; determining whether the inactive time period is longer than a first predetermined time period; and closing the application corresponding to the currently traversed identifier if the inactive time period is longer than the first predetermined time period; detecting whether the inactive time period is longer than a second predetermined time period if the inactive time period is not longer than the first predetermined time period; and releasing a memory space occupied by a user interface of the application corresponding to the currently traversed identifier if the inactive time period is longer than the second predetermined time period, wherein the second predetermined time period is shorter than the first predetermined time period.