Only stabilize tasks during quick switch session
- A stabilization session starts when going to a new task via a quick switch - A stabilization session ends after 5 seconds on the same task or when completing a gesture to go to home or overview - We track the system task order and copy it for the duration of the stabilization session - After the session ends, we switch back to the system task order - Remove ENABLE_TASK_STABILIZATION flag (and also QUICK_SWITCH) Bug: 111926330 Change-Id: I2c18dff2d20ad02b73a4935ac534e9fc9f5f49c0
This commit is contained in:
1 parent
5616670a5a
commit
60ac5d2b34
6 files changed
+76
-76
No files matched your search
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep;
|
||||
|
||||
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.ComponentCallbacks2;
|
||||
@@ -28,6 +26,7 @@ import android.os.Process;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
|
||||
import com.android.launcher3.MainThreadExecutor;
|
||||
import com.android.launcher3.util.MainThreadInitializedObject;
|
||||
import com.android.launcher3.util.Preconditions;
|
||||
@@ -35,11 +34,14 @@ import com.android.systemui.shared.recents.ISystemUiProxy;
|
||||
import com.android.systemui.shared.recents.model.Task;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.shared.system.TaskStackChangeListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
|
||||
|
||||
/**
|
||||
* Singleton class to load and manage recents model.
|
||||
*/
|
||||
@@ -90,6 +92,14 @@ public class RecentsModel extends TaskStackChangeListener {
|
||||
return mThumbnailCache;
|
||||
}
|
||||
|
||||
public void startStabilizationSession() {
|
||||
mTaskList.startStabilizationSession();
|
||||
}
|
||||
|
||||
public void endStabilizationSession() {
|
||||
mTaskList.endStabilizationSession();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the list of recent tasks.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user