Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86d873d4 authored by Winson's avatar Winson Committed by android-build-merger
Browse files

Move preloading to boot complete. am: 16ef39a7 am: 067d73e5

am: 93f7f196

Change-Id: I0d91cce33589ab55b4f3a334e33367f8878851a6
parents 546d937e 93f7f196
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -185,7 +185,9 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        mHeaderBar = (TaskViewHeader) inflater.inflate(R.layout.recents_task_view_header,
                null, false);
        reloadResources();
    }

    public void onBootCompleted() {
        // When we start, preload the data associated with the previous recent tasks.
        // We can use a new plan since the caches will be the same.
        RecentsTaskLoader loader = Recents.getTaskLoader();
@@ -198,10 +200,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        loader.loadTasks(mContext, plan, launchOpts);
    }

    public void onBootCompleted() {
        // Do nothing
    }

    public void onConfigurationChanged() {
        reloadResources();
        mDummyStackView.reloadOnConfigurationChange();
+6 −2
Original line number Diff line number Diff line
@@ -315,8 +315,12 @@ public class SystemServicesProxy {
        if (includeFrontMostExcludedTask) {
            flags |= ActivityManager.RECENT_WITH_EXCLUDED;
        }
        List<ActivityManager.RecentTaskInfo> tasks = mAm.getRecentTasksForUser(numTasksToQuery,
                flags, userId);
        List<ActivityManager.RecentTaskInfo> tasks = null;
        try {
            tasks = mAm.getRecentTasksForUser(numTasksToQuery, flags, userId);
        } catch (Exception e) {
            Log.e(TAG, "Failed to get recent tasks", e);
        }

        // Break early if we can't get a valid set of tasks
        if (tasks == null) {