OSDN Git Service

Reducing the number of recent tasks we keep.
authorWinson <winsonc@google.com>
Tue, 10 May 2016 20:59:36 +0000 (13:59 -0700)
committerWinson Chung <winsonc@google.com>
Tue, 10 May 2016 21:01:33 +0000 (21:01 +0000)
- This should decrease the time it takes to fetch the recent task list,
  and also reduce the number of tasks we store on-disk.
- Since a user can still open a fair number of tasks within the
  time-window, and this list includes tasks that are excluded from the
  UI, we are just reducing it to about half for the time being.

Bug: 28318359
Change-Id: Ie21b3d3d09a567007015fbbecaf914123c71cc06

core/java/android/app/ActivityManager.java

index ff8cf66..8a92b54 100644 (file)
@@ -901,7 +901,7 @@ public class ActivityManager {
      */
     static public int getMaxRecentTasksStatic() {
         if (gMaxRecentTasks < 0) {
-            return gMaxRecentTasks = isLowRamDeviceStatic() ? 50 : 100;
+            return gMaxRecentTasks = isLowRamDeviceStatic() ? 36 : 48;
         }
         return gMaxRecentTasks;
     }