Loading core/java/android/app/ActivityManager.java +32 −3 Original line number Diff line number Diff line Loading @@ -67,6 +67,8 @@ public class ActivityManager { private static String TAG = "ActivityManager"; private static boolean localLOGV = false; private static int gMaxRecentTasks = -1; private final Context mContext; private final Handler mHandler; Loading Loading @@ -472,6 +474,33 @@ public class ActivityManager { !Resources.getSystem().getBoolean(com.android.internal.R.bool.config_avoidGfxAccel); } /** * Return the maximum number of recents entries that we will maintain and show. * @hide */ static public int getMaxRecentTasksStatic() { if (gMaxRecentTasks < 0) { return gMaxRecentTasks = isLowRamDeviceStatic() ? 50 : 100; } return gMaxRecentTasks; } /** * Return the default limit on the number of recents that an app can make. * @hide */ static public int getDefaultAppRecentsLimitStatic() { return getMaxRecentTasksStatic() / 6; } /** * Return the maximum limit on the number of recents that an app can make. * @hide */ static public int getMaxAppRecentsLimitStatic() { return getMaxRecentTasksStatic() / 2; } /** * Information you can set and retrieve about the current activity within the recent task list. */ Loading Loading @@ -1184,13 +1213,13 @@ public class ActivityManager { public void writeToParcel(Parcel dest, int flags) { if (mainThumbnail != null) { dest.writeInt(1); mainThumbnail.writeToParcel(dest, 0); mainThumbnail.writeToParcel(dest, flags); } else { dest.writeInt(0); } if (thumbnailFileDescriptor != null) { dest.writeInt(1); thumbnailFileDescriptor.writeToParcel(dest, 0); thumbnailFileDescriptor.writeToParcel(dest, flags); } else { dest.writeInt(0); } Loading core/java/android/content/pm/PackageParser.java +2 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_NOT_APK; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_NO_CERTIFICATES; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION; import android.app.ActivityManager; import android.content.ComponentName; import android.content.Intent; import android.content.IntentFilter; Loading Loading @@ -3077,7 +3078,7 @@ public class PackageParser { ActivityInfo.DOCUMENT_LAUNCH_NONE); a.info.maxRecents = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_maxRecents, 15); ActivityManager.getDefaultAppRecentsLimitStatic()); a.info.screenOrientation = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_screenOrientation, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); Loading packages/SystemUI/res/values/config.xml +0 −2 Original line number Diff line number Diff line Loading @@ -145,8 +145,6 @@ <integer name="recents_animate_task_view_remove_duration">250</integer> <!-- The minimum alpha for the dim applied to cards that go deeper into the stack. --> <integer name="recents_max_task_stack_view_dim">96</integer> <!-- The number of tasks that RecentsTaskLoader should load. --> <integer name="recents_max_num_tasks_to_load">50</integer> <!-- The delay to enforce between each alt-tab key press. --> <integer name="recents_alt_tab_key_delay">200</integer> <!-- Transposes the recents layout in landscape. --> Loading packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading services/core/java/com/android/server/am/ActivityManagerService.java +383 −88 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
core/java/android/app/ActivityManager.java +32 −3 Original line number Diff line number Diff line Loading @@ -67,6 +67,8 @@ public class ActivityManager { private static String TAG = "ActivityManager"; private static boolean localLOGV = false; private static int gMaxRecentTasks = -1; private final Context mContext; private final Handler mHandler; Loading Loading @@ -472,6 +474,33 @@ public class ActivityManager { !Resources.getSystem().getBoolean(com.android.internal.R.bool.config_avoidGfxAccel); } /** * Return the maximum number of recents entries that we will maintain and show. * @hide */ static public int getMaxRecentTasksStatic() { if (gMaxRecentTasks < 0) { return gMaxRecentTasks = isLowRamDeviceStatic() ? 50 : 100; } return gMaxRecentTasks; } /** * Return the default limit on the number of recents that an app can make. * @hide */ static public int getDefaultAppRecentsLimitStatic() { return getMaxRecentTasksStatic() / 6; } /** * Return the maximum limit on the number of recents that an app can make. * @hide */ static public int getMaxAppRecentsLimitStatic() { return getMaxRecentTasksStatic() / 2; } /** * Information you can set and retrieve about the current activity within the recent task list. */ Loading Loading @@ -1184,13 +1213,13 @@ public class ActivityManager { public void writeToParcel(Parcel dest, int flags) { if (mainThumbnail != null) { dest.writeInt(1); mainThumbnail.writeToParcel(dest, 0); mainThumbnail.writeToParcel(dest, flags); } else { dest.writeInt(0); } if (thumbnailFileDescriptor != null) { dest.writeInt(1); thumbnailFileDescriptor.writeToParcel(dest, 0); thumbnailFileDescriptor.writeToParcel(dest, flags); } else { dest.writeInt(0); } Loading
core/java/android/content/pm/PackageParser.java +2 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_NOT_APK; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_NO_CERTIFICATES; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION; import android.app.ActivityManager; import android.content.ComponentName; import android.content.Intent; import android.content.IntentFilter; Loading Loading @@ -3077,7 +3078,7 @@ public class PackageParser { ActivityInfo.DOCUMENT_LAUNCH_NONE); a.info.maxRecents = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_maxRecents, 15); ActivityManager.getDefaultAppRecentsLimitStatic()); a.info.screenOrientation = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_screenOrientation, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); Loading
packages/SystemUI/res/values/config.xml +0 −2 Original line number Diff line number Diff line Loading @@ -145,8 +145,6 @@ <integer name="recents_animate_task_view_remove_duration">250</integer> <!-- The minimum alpha for the dim applied to cards that go deeper into the stack. --> <integer name="recents_max_task_stack_view_dim">96</integer> <!-- The number of tasks that RecentsTaskLoader should load. --> <integer name="recents_max_num_tasks_to_load">50</integer> <!-- The delay to enforce between each alt-tab key press. --> <integer name="recents_alt_tab_key_delay">200</integer> <!-- Transposes the recents layout in landscape. --> Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading
services/core/java/com/android/server/am/ActivityManagerService.java +383 −88 File changed.Preview size limit exceeded, changes collapsed. Show changes