mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Waiting for Launcher activity to stop when starting an overview task" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
dc7de0d9fb
@@ -18,9 +18,11 @@ package com.android.quickstep;
|
||||
import static android.os.Trace.TRACE_TAG_APP;
|
||||
import static android.view.RemoteAnimationTarget.MODE_CLOSING;
|
||||
import static android.view.RemoteAnimationTarget.MODE_OPENING;
|
||||
|
||||
import static com.android.launcher3.QuickstepTransitionManager.RECENTS_LAUNCH_DURATION;
|
||||
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_DURATION;
|
||||
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_PRE_DELAY;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.LAUNCHER_ACTIVITY_STOPPED_MESSAGE;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.OVERVIEW_STATE_ORDINAL;
|
||||
import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
|
||||
import static com.android.quickstep.TaskUtils.taskIsATargetWithMode;
|
||||
@@ -344,6 +346,8 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
|
||||
// Workaround for b/78520668, explicitly trim memory once UI is hidden
|
||||
onTrimMemory(TRIM_MEMORY_UI_HIDDEN);
|
||||
mFallbackRecentsView.updateLocusId();
|
||||
AccessibilityManagerCompat.sendTestProtocolEventToTest(
|
||||
this, LAUNCHER_ACTIVITY_STOPPED_MESSAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.launcher3.tapl;
|
||||
|
||||
import static android.view.accessibility.AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
|
||||
|
||||
import android.graphics.Rect;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -192,8 +190,8 @@ public final class OverviewTask {
|
||||
private List<Integer> getCurrentTasksCenterXList() {
|
||||
return mLauncher.isTablet()
|
||||
? mOverview.getCurrentTasksForTablet().stream()
|
||||
.map(OverviewTask::getTaskCenterX)
|
||||
.collect(Collectors.toList())
|
||||
.map(OverviewTask::getTaskCenterX)
|
||||
.collect(Collectors.toList())
|
||||
: List.of(mOverview.getCurrentTask().getTaskCenterX());
|
||||
}
|
||||
|
||||
@@ -203,11 +201,11 @@ public final class OverviewTask {
|
||||
public LaunchedAppState open() {
|
||||
try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) {
|
||||
verifyActiveContainer();
|
||||
mLauncher.executeAndWaitForEvent(
|
||||
mLauncher.executeAndWaitForLauncherEvent(
|
||||
() -> mLauncher.clickLauncherObject(mTask),
|
||||
event -> event.getEventType() == TYPE_WINDOW_STATE_CHANGED,
|
||||
() -> "Launching task didn't open a new window: "
|
||||
+ mTask.getParent().getContentDescription(),
|
||||
event -> TestProtocol.LAUNCHER_ACTIVITY_STOPPED_MESSAGE
|
||||
.equals(event.getClassName().toString()),
|
||||
() -> "Launcher activity didn't stop",
|
||||
"clicking an overview task");
|
||||
if (mOverview.getContainerType()
|
||||
== LauncherInstrumentation.ContainerType.SPLIT_SCREEN_SELECT) {
|
||||
|
||||
Reference in New Issue
Block a user