Generalize ActivityTracker to support RecentsWindowManager

Continued quick switch couldn't work using existing infrastructure until RecentsWindowManager could be properly tracked by ActivityTracker. Refactored ActivityTracker into ContextTracker to support this.

Also refactored ActivityInitListener into ContextInitListener to fit the updated pattern.

Flag: com.android.launcher3.enable_fallback_overview_in_window
Fixes: 366023051
Test: RecentsWindowSwipeHandlerTestCase; Attempted continued quick switch from home and launched app
Change-Id: Ic38ebf3611ef22fbfd1ddeb79d72d8a3621940a0
This commit is contained in:
Schneider Victor-Tulias committed 2024-10-22 15:29:59 -04:00
1 parent 9dbae036d3
commit 8463dc47eb
22 files changed
+222 -203

No files matched your search

@@ -136,7 +136,7 @@ public class TaplAddConfigWidgetTest extends AbstractLauncherUiTest<Launcher> {
@Override
public boolean isTrue() throws Throwable {
return mMainThreadExecutor.submit(() -> {
Launcher l = Launcher.ACTIVITY_TRACKER.getCreatedActivity();
Launcher l = Launcher.ACTIVITY_TRACKER.getCreatedContext();
return l != null && l.getWorkspace().getFirstMatch(this) != null;
}).get();
}