summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-08-22 17:42:43 -0700
committerDianne Hackborn <hackbod@google.com>2014-08-26 21:24:42 -0700
commit852975d5377bfe5f4abc9d2a28e301aa2fa99994 (patch)
treef993644fd2a52f53268e679078428f23bb7d13ab /packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
parent330459d685bdc77780e8b77f6cbd6f94ecdd3268 (diff)
downloadframeworks_base-852975d5377bfe5f4abc9d2a28e301aa2fa99994.zip
frameworks_base-852975d5377bfe5f4abc9d2a28e301aa2fa99994.tar.gz
frameworks_base-852975d5377bfe5f4abc9d2a28e301aa2fa99994.tar.bz2
Fix issue #17179314: Make recents limits consistent
The max limit is now 100 (or 50 on svelte devices), and that is what everyone used. Re-arranged things so we have a big expensive "fix the world!" function for recents that we go in to at only select points: when first initializing the system, when external storage comes and goes, and if we detect something wrong with the recents structure. With that, now getRecentTasks() and addRecentTaskLocked() are generally much simpler, doing very little work in most cases. This will help a lot with scaling up to many more recents entries. Change-Id: I7b5ae89edc06568f68c8af54a4420aff7635581c
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index b7f6451..9803687 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -16,6 +16,7 @@
package com.android.systemui.recents;
+import android.app.ActivityManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
@@ -187,7 +188,7 @@ public class RecentsConfiguration {
res.getInteger(R.integer.recents_filter_animate_new_views_duration);
// Loading
- maxNumTasksToLoad = res.getInteger(R.integer.recents_max_num_tasks_to_load);
+ maxNumTasksToLoad = ActivityManager.getMaxRecentTasksStatic();
// Search Bar
searchBarSpaceHeightPx = res.getDimensionPixelSize(R.dimen.recents_search_bar_space_height);