From 48119d438409fbc5b1009f71dd6d90d34e65fe7a Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 6 Mar 2023 19:43:04 +0000 Subject: [PATCH 1/8] Restore old interpolators for Overview -> Home This regressed due to b/236761067 updating the transition from Split Select to Home (go to Overview, select an app to enter Split screen, but then go home instead of picking the second app to split with). Kept the new interpolators for OVERVIEW_SPLIT_SELECT to home, but restored the old interpolators for OVERVIEW to home Test: Manual, watch transition from Overview to Home, and Split Select to Home Fixes: 269348223 Change-Id: Ifc72f467881e235c24c35d86755dc5db675a9452 --- .../states/QuickstepAtomicAnimationFactory.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java index 5eeeb36981..77a94dda92 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java @@ -31,6 +31,7 @@ import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7; import static com.android.launcher3.anim.Interpolators.DEACCEL_3; import static com.android.launcher3.anim.Interpolators.EMPHASIZED_ACCELERATE; import static com.android.launcher3.anim.Interpolators.EMPHASIZED_DECELERATE; +import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; @@ -102,7 +103,10 @@ public class QuickstepAtomicAnimationFactory extends } config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, clampToProgress(LINEAR, 0, 0.25f)); - config.setInterpolator(ANIM_SCRIM_FADE, clampToProgress(LINEAR, 0.33f, 1)); + config.setInterpolator(ANIM_SCRIM_FADE, + fromState == OVERVIEW_SPLIT_SELECT + ? clampToProgress(LINEAR, 0.33f, 1) + : LINEAR); config.setInterpolator(ANIM_WORKSPACE_SCALE, DEACCEL); config.setInterpolator(ANIM_WORKSPACE_FADE, ACCEL); @@ -111,7 +115,10 @@ public class QuickstepAtomicAnimationFactory extends // Overview is going offscreen, so keep it at its current scale and opacity. config.setInterpolator(ANIM_OVERVIEW_SCALE, FINAL_FRAME); config.setInterpolator(ANIM_OVERVIEW_FADE, FINAL_FRAME); - config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, EMPHASIZED_DECELERATE); + config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, + fromState == OVERVIEW_SPLIT_SELECT + ? EMPHASIZED_DECELERATE + : clampToProgress(FAST_OUT_SLOW_IN, 0, 0.75f)); config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, FINAL_FRAME); // Scroll RecentsView to page 0 as it goes offscreen, if necessary. From cdc13fc4e8768c44a681c18f4a46fad407d35325 Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Sat, 4 Mar 2023 00:21:41 +0000 Subject: [PATCH 2/8] Log when FLAG_STASHED_IN_APP_AUTO changes. Bug: 261177876 Test: wwdebug & wwlogcat Change-Id: If2d2a3d38f3128a60d551bca9f4cdf64f2bcb032 --- .../android/launcher3/taskbar/TaskbarActivityContext.java | 1 - .../android/launcher3/taskbar/TaskbarStashController.java | 7 +++++++ src/com/android/launcher3/logging/StatsLogManager.java | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index 5c4f3e190d..f631a438c0 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -316,7 +316,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext { return mTransientTaskbarBounds; } - @VisibleForTesting @Override public StatsLogManager getStatsLogManager() { // Used to mock, can't mock a default interface method directly diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java index 115db25b52..539048aa44 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java @@ -24,6 +24,8 @@ import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.config.FeatureFlags.FORCE_PERSISTENT_TASKBAR; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_LONGPRESS_HIDE; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_LONGPRESS_SHOW; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TRANSIENT_TASKBAR_HIDE; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TRANSIENT_TASKBAR_SHOW; import static com.android.launcher3.taskbar.Utilities.appendFlag; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING; @@ -967,6 +969,11 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba mActivity.getStatsLogManager().logger().log(LAUNCHER_TASKBAR_LONGPRESS_SHOW); } } + if (hasAnyFlag(changedFlags, FLAG_STASHED_IN_APP_AUTO)) { + mActivity.getStatsLogManager().logger().log(hasAnyFlag(FLAG_STASHED_IN_APP_AUTO) + ? LAUNCHER_TRANSIENT_TASKBAR_HIDE + : LAUNCHER_TRANSIENT_TASKBAR_SHOW); + } } private void notifyStashChange(boolean visible, boolean stashed) { diff --git a/src/com/android/launcher3/logging/StatsLogManager.java b/src/com/android/launcher3/logging/StatsLogManager.java index 5f6df277f8..cf710da484 100644 --- a/src/com/android/launcher3/logging/StatsLogManager.java +++ b/src/com/android/launcher3/logging/StatsLogManager.java @@ -636,6 +636,12 @@ public class StatsLogManager implements ResourceBasedOverride { @UiEvent(doc = "User scrolled up on the search result page.") LAUNCHER_ALLAPPS_SEARCH_SCROLLED_UP(1286), + + @UiEvent(doc = "User or automatic timeout has hidden transient taskbar.") + LAUNCHER_TRANSIENT_TASKBAR_HIDE(1330), + + @UiEvent(doc = "User has swiped upwards from the gesture handle to show transient taskbar.") + LAUNCHER_TRANSIENT_TASKBAR_SHOW(1331), ; // ADD MORE From 9abd8cbf141183c7acd46eff47f7ac65f228c6d8 Mon Sep 17 00:00:00 2001 From: Stefan Andonian Date: Wed, 22 Feb 2023 23:43:33 +0000 Subject: [PATCH 3/8] Allow Binding the First Workspace Page before the Rest. The way WorkspaceBinder is currently setup, any calls to bindWorkspace will result in the entire workspace being bound all at the same time. These edits change that. Now callers like LoaderTask can bind the first workspace pages before the rest by splitting the WorkspaceBinding into 3 methods that need to be called in order, but can happen at a staggered cadence. Bug: 251502424 Test: Loaded and bound the workspace properly. Change-Id: I28fa721ea95dae2df03e27f600653ba5bebe3ef1 --- .../launcher3/config/FeatureFlags.java | 5 + .../launcher3/model/BaseLauncherBinder.java | 150 +++++++++++++++++- 2 files changed, 152 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index b1159cdf07..ffcc385280 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -363,6 +363,11 @@ public final class FeatureFlags { "Enables taskbar pinning to allow user to switch between transient and persistent " + "taskbar flavors"); + public static final BooleanFlag ENABLE_WORKSPACE_LOADING_OPTIMIZATION = getDebugFlag(251502424, + "ENABLE_WORKSPACE_LOADING_OPTIMIZATION", false, "load the current workspace screen " + + "visible to the user before the rest rather than loading all of them at once." + ); + public static final BooleanFlag ENABLE_GRID_ONLY_OVERVIEW = getDebugFlag(270397206, "ENABLE_GRID_ONLY_OVERVIEW", false, "Enable a grid-only overview without a focused task."); diff --git a/src/com/android/launcher3/model/BaseLauncherBinder.java b/src/com/android/launcher3/model/BaseLauncherBinder.java index 8519a3ef52..91ace27459 100644 --- a/src/com/android/launcher3/model/BaseLauncherBinder.java +++ b/src/com/android/launcher3/model/BaseLauncherBinder.java @@ -27,6 +27,7 @@ import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.LauncherAppState; import com.android.launcher3.LauncherModel.CallbackTask; import com.android.launcher3.LauncherSettings; +import com.android.launcher3.Workspace; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.model.BgDataModel.Callbacks; import com.android.launcher3.model.BgDataModel.FixedContainerItems; @@ -42,8 +43,10 @@ import com.android.launcher3.util.RunnableList; import java.util.ArrayList; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Objects; +import java.util.Set; import java.util.concurrent.Executor; /** @@ -77,6 +80,36 @@ public abstract class BaseLauncherBinder { * Binds all loaded data to actual views on the main thread. */ public void bindWorkspace(boolean incrementBindId) { + if (FeatureFlags.ENABLE_WORKSPACE_LOADING_OPTIMIZATION.get()) { + DisjointWorkspaceBinder workspaceBinder = + initWorkspaceBinder(incrementBindId, mBgDataModel.collectWorkspaceScreens()); + workspaceBinder.bindCurrentWorkspacePages(); + workspaceBinder.bindOtherWorkspacePages(); + } else { + bindWorkspaceAllAtOnce(incrementBindId); + } + } + + /** + * Initializes the WorkspaceBinder for binding. + * + * @param incrementBindId this is used to stop previously started binding tasks that are + * obsolete but still queued. + * @param workspacePages this allows the Launcher to add the correct workspace screens. + */ + public DisjointWorkspaceBinder initWorkspaceBinder(boolean incrementBindId, + IntArray workspacePages) { + + synchronized (mBgDataModel) { + if (incrementBindId) { + mBgDataModel.lastBindId++; + } + mMyBindingId = mBgDataModel.lastBindId; + return new DisjointWorkspaceBinder(workspacePages); + } + } + + private void bindWorkspaceAllAtOnce(boolean incrementBindId) { // Save a copy of all the bg-thread collections ArrayList workspaceItems = new ArrayList<>(); ArrayList appWidgets = new ArrayList<>(); @@ -95,7 +128,7 @@ public abstract class BaseLauncherBinder { } for (Callbacks cb : mCallbacksList) { - new WorkspaceBinder(cb, mUiExecutor, mApp, mBgDataModel, mMyBindingId, + new UnifiedWorkspaceBinder(cb, mUiExecutor, mApp, mBgDataModel, mMyBindingId, workspaceItems, appWidgets, extraItems, orderedScreenIds).bind(); } } @@ -180,7 +213,7 @@ public abstract class BaseLauncherBinder { return idleLock; } - private class WorkspaceBinder { + private class UnifiedWorkspaceBinder { private final Executor mUiExecutor; private final Callbacks mCallbacks; @@ -194,7 +227,7 @@ public abstract class BaseLauncherBinder { private final IntArray mOrderedScreenIds; private final ArrayList mExtraItems; - WorkspaceBinder(Callbacks callbacks, + UnifiedWorkspaceBinder(Callbacks callbacks, Executor uiExecutor, LauncherAppState app, BgDataModel bgDataModel, @@ -320,4 +353,115 @@ public abstract class BaseLauncherBinder { }); } } + + private class DisjointWorkspaceBinder { + private final IntArray mOrderedScreenIds; + private final IntSet mCurrentScreenIds = new IntSet(); + private final Set mBoundItemIds = new HashSet<>(); + + protected DisjointWorkspaceBinder(IntArray orderedScreenIds) { + mOrderedScreenIds = orderedScreenIds; + + for (Callbacks cb : mCallbacksList) { + mCurrentScreenIds.addAll(cb.getPagesToBindSynchronously(orderedScreenIds)); + } + if (mCurrentScreenIds.size() == 0) { + mCurrentScreenIds.add(Workspace.FIRST_SCREEN_ID); + } + } + + /** + * Binds the currently loaded items in the Data Model. Also signals to the Callbacks[] + * that these items have been bound and their respective screens are ready to be shown. + * + * If this method is called after all the items on the workspace screen have already been + * loaded, it will bind all workspace items immediately, and bindOtherWorkspacePages() will + * not bind any items. + */ + protected void bindCurrentWorkspacePages() { + // Save a copy of all the bg-thread collections + ArrayList workspaceItems; + ArrayList appWidgets; + + synchronized (mBgDataModel) { + workspaceItems = new ArrayList<>(mBgDataModel.workspaceItems); + appWidgets = new ArrayList<>(mBgDataModel.appWidgets); + } + + workspaceItems.forEach(it -> mBoundItemIds.add(it.id)); + appWidgets.forEach(it -> mBoundItemIds.add(it.id)); + + sortWorkspaceItemsSpatially(mApp.getInvariantDeviceProfile(), workspaceItems); + + // Tell the workspace that we're about to start binding items + executeCallbacksTask(c -> { + c.clearPendingBinds(); + c.startBinding(); + }, mUiExecutor); + + // Bind workspace screens + executeCallbacksTask(c -> c.bindScreens(mOrderedScreenIds), mUiExecutor); + + bindWorkspaceItems(workspaceItems); + bindAppWidgets(appWidgets); + + executeCallbacksTask(c -> { + MODEL_EXECUTOR.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND); + c.onInitialBindComplete(mCurrentScreenIds, new RunnableList()); + }, mUiExecutor); + } + + protected void bindOtherWorkspacePages() { + // Save a copy of all the bg-thread collections + ArrayList workspaceItems; + ArrayList appWidgets; + + synchronized (mBgDataModel) { + workspaceItems = new ArrayList<>(mBgDataModel.workspaceItems); + appWidgets = new ArrayList<>(mBgDataModel.appWidgets); + } + + workspaceItems.removeIf(it -> mBoundItemIds.contains(it.id)); + appWidgets.removeIf(it -> mBoundItemIds.contains(it.id)); + + sortWorkspaceItemsSpatially(mApp.getInvariantDeviceProfile(), workspaceItems); + + bindWorkspaceItems(workspaceItems); + bindAppWidgets(appWidgets); + + executeCallbacksTask(c -> c.finishBindingItems(mCurrentScreenIds), mUiExecutor); + mUiExecutor.execute(() -> { + MODEL_EXECUTOR.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT); + ItemInstallQueue.INSTANCE.get(mApp.getContext()) + .resumeModelPush(FLAG_LOADER_RUNNING); + }); + + for (Callbacks cb : mCallbacksList) { + cb.bindStringCache(mBgDataModel.stringCache.clone()); + } + } + + private void bindWorkspaceItems(final ArrayList workspaceItems) { + // Bind the workspace items + int count = workspaceItems.size(); + for (int i = 0; i < count; i += ITEMS_CHUNK) { + final int start = i; + final int chunkSize = (i + ITEMS_CHUNK <= count) ? ITEMS_CHUNK : (count - i); + executeCallbacksTask( + c -> c.bindItems(workspaceItems.subList(start, start + chunkSize), false), + mUiExecutor); + } + } + + private void bindAppWidgets(List appWidgets) { + // Bind the widgets, one at a time + int count = appWidgets.size(); + for (int i = 0; i < count; i++) { + final ItemInfo widget = appWidgets.get(i); + executeCallbacksTask( + c -> c.bindItems(Collections.singletonList(widget), false), + mUiExecutor); + } + } + } } From 45ef9b6c01dbbbb4d2a40b6ae54c47f08cf01b54 Mon Sep 17 00:00:00 2001 From: Ankita Vyas Date: Fri, 20 Jan 2023 09:19:29 +0000 Subject: [PATCH 4/8] Do not display clone apps in launcher work tab. This change is only for dogfooding and will not be part of android release. Guarded by feature flag. Test: manual Bug: 266177840 Change-Id: Iee416b43e0864b98f08149c46b7d011271ba8de6 --- .../launcher3/allapps/WorkProfileManager.java | 31 ++++++++++++++++++- .../launcher3/config/FeatureFlags.java | 4 +++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java index f66ea34d7c..e02fa2ae06 100644 --- a/src/com/android/launcher3/allapps/WorkProfileManager.java +++ b/src/com/android/launcher3/allapps/WorkProfileManager.java @@ -44,12 +44,14 @@ import com.android.launcher3.LauncherPrefs; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.allapps.BaseAllAppsAdapter.AdapterItem; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.reflect.Method; import java.util.ArrayList; import java.util.function.Predicate; @@ -93,7 +95,11 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP StatsLogManager statsLogManager) { mUserManager = userManager; mAllApps = allApps; - mMatcher = mAllApps.mPersonalMatcher.negate(); + if (FeatureFlags.ENABLE_APP_CLONING_CHANGES_IN_LAUNCHER.get()) { + mMatcher = ofWorkProfileUser(userManager); + } else { + mMatcher = mAllApps.mPersonalMatcher.negate(); + } mStatsLogManager = statsLogManager; } @@ -260,4 +266,27 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP } }; } + + /** + * Filter to only display apps in managed profile in work tab. + */ + private Predicate ofWorkProfileUser(UserManager um) { + return info -> info != null && isManagedProfile(um, info.user.hashCode()); + } + + + private static boolean isManagedProfile(UserManager um, int userId) { + try { + // isManagedProfile is a @SystemApi. + String methodName = "isManagedProfile"; + Method method = um.getClass().getDeclaredMethod(methodName, int.class); + Object result = method.invoke(um, userId); + if (result instanceof Boolean) { + return (boolean) result; + } + } catch (Exception e) { + Log.e(TAG, "Failed to call #isManagedProfile via reflection from Launcher"); + } + return false; + } } diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index 54720c4cd3..ecf9d7b19c 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -391,6 +391,10 @@ public final class FeatureFlags { "ENABLE_KEYBOARD_QUICK_SWITCH", true, "Enables keyboard quick switching"); + public static final BooleanFlag ENABLE_APP_CLONING_CHANGES_IN_LAUNCHER = getDebugFlag(266177840, + "ENABLE_APP_CLONING_CHANGES_IN_LAUNCHER", false, + "Removes clone apps from the work profile tab."); + public static class BooleanFlag { private final boolean mCurrentValue; From 66e5c91380041974ddb850dad75d629e9e30b11a Mon Sep 17 00:00:00 2001 From: Andrew Cole Date: Fri, 10 Mar 2023 11:12:46 -0800 Subject: [PATCH 5/8] Asking the test to wait for launcher to commit the uninstall transaction before opening all apps. Bug: 258071914 Test: Run testUnintallFromAllApps Change-Id: Iceba2650e24b06c162f42767955fa6ae3e3b19c8 --- tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java index 5f516eb7fc..0507f0a7ef 100644 --- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java @@ -506,7 +506,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { @Test @PortraitLandscape - @ScreenRecord // (b/256659409) public void testUninstallFromAllApps() throws Exception { installDummyAppAndWaitForUIUpdate(); try { @@ -515,6 +514,8 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { allApps.freeze(); try { workspace = allApps.getAppIcon(DUMMY_APP_NAME).uninstall(); + // After the toast clears, then the model tries to commit the uninstall transaction + mLauncher.waitForModelQueueCleared(); } finally { allApps.unfreeze(); } From c58dc1063a9770114fa247118b37fc4b391c1e1f Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Mon, 13 Mar 2023 11:12:09 -0700 Subject: [PATCH 6/8] Only hide taskbar view for app launches w/ transient taskbar. Bug: 246635237 Test: launch app w/ 3 button nav -> observe taskbar view always visible launch app w/ gesture nav / transient taskbar -> taskbar view hidden during animation Change-Id: I6233a9bb6f23ee5f516f5d4712631da214ebc14e --- .../com/android/launcher3/QuickstepTransitionManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index ea7eba3e8b..da28cfa953 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -52,6 +52,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_SCRIM_FOR_APP_LAU import static com.android.launcher3.config.FeatureFlags.KEYGUARD_ANIMATION; import static com.android.launcher3.config.FeatureFlags.SEPARATE_RECENTS_ACTIVITY; import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID; +import static com.android.launcher3.util.DisplayController.isTransientTaskbar; import static com.android.launcher3.util.MultiPropertyFactory.MULTI_PROPERTY_VALUE; import static com.android.launcher3.util.window.RefreshRateTracker.getSingleFrameMs; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; @@ -122,7 +123,6 @@ import com.android.launcher3.testing.shared.ResourceUtils; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.ActivityOptionsWrapper; -import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.DynamicResource; import com.android.launcher3.util.ObjectWrapper; import com.android.launcher3.util.RunnableList; @@ -448,7 +448,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } if (mDeviceProfile.isTaskbarPresentInApps && !target.willShowImeOnTarget - && !DisplayController.isTransientTaskbar(mLauncher)) { + && !isTransientTaskbar(mLauncher)) { // Animate to above the taskbar. bounds.bottom -= target.contentInsets.bottom; } @@ -635,7 +635,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener RectF launcherIconBounds = new RectF(); FloatingIconView floatingView = getFloatingIconView(mLauncher, v, - mLauncher.getTaskbarUIController() == null + (mLauncher.getTaskbarUIController() == null || !isTransientTaskbar(mLauncher)) ? null : mLauncher.getTaskbarUIController().findMatchingView(v), !appTargetsAreTranslucent, launcherIconBounds, true /* isOpening */); From 5e71487d5c6403660f45f739d32525fa6f3d38a3 Mon Sep 17 00:00:00 2001 From: Fengjiang Li Date: Fri, 10 Mar 2023 11:55:55 -0800 Subject: [PATCH 7/8] [Predictive Back] Taskbar allapps -> home Bug: b/272797556 Test: manual Change-Id: I98a6033b3aa73199da8951cf094a3f7d7eccd032 --- .../allapps/TaskbarAllAppsSlideInView.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java index 8502752652..fbc7be0832 100644 --- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java +++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java @@ -23,10 +23,14 @@ import android.graphics.Rect; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.animation.Interpolator; +import android.window.BackEvent; +import android.window.OnBackAnimationCallback; +import android.window.OnBackInvokedDispatcher; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Insettable; import com.android.launcher3.R; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.taskbar.allapps.TaskbarAllAppsViewController.TaskbarAllAppsCallbacks; import com.android.launcher3.taskbar.overlay.TaskbarOverlayContext; import com.android.launcher3.views.AbstractSlideInView; @@ -53,6 +57,28 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView Date: Fri, 10 Mar 2023 15:38:18 -0800 Subject: [PATCH 8/8] Fix two issues with splitting from Taskbar This patch fixes two issues that would arise when the user initiated split from Taskbar: 1) The Overview Actions View would animate out, then erroneously pop back in. 2) When initiating split from home repeatedly, the task thumbnail grid would not animate downward properly, instead staying in the wrong y-position. Both issues were caused by the fact that we now have a new way to enter OverviewSplitSelect (directly from Taskbar/Home), which rendered some of our old assumptions incorrect. Namely: 1) When we finish transitioning to OverviewSplitSelect, we need to update OverviewActionsView visibility so that it stays hidden. 2) mSplitHiddenTaskView is no longer a good way to tell if we are in split select state or not. Fixed by adding a new call to updateCurrentTaskActionsVisibility() to the end of the split staging animation, and by making sure translations get reset every time resetFromSplitSelect() is called. Fixes: 271624078 Fixes: 261544937 Test: Manual, verified on large and small tablet screens with various types of split invocations and rotation combinations. Change-Id: Ied0f4818ce6da599845ccd07e9dc96ef4ba030c3 --- .../src/com/android/quickstep/views/RecentsView.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 614ef81add..4ba02769a5 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -3166,6 +3166,8 @@ public abstract class RecentsView