Merge "Send divider change to launcher to animate" into udc-dev am: 2725473272 am: 67d6b0026a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22572268 Change-Id: Icb3dc0442cc9fcbf7e3c110271be8599439568a2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.android.quickstep;
|
package com.android.quickstep;
|
||||||
|
|
||||||
|
import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
|
||||||
|
|
||||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||||
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.CANCEL_RECENTS_ANIMATION;
|
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.CANCEL_RECENTS_ANIMATION;
|
||||||
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.START_RECENTS_ANIMATION;
|
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.START_RECENTS_ANIMATION;
|
||||||
@@ -34,6 +36,7 @@ import com.android.quickstep.util.ActiveGestureLog;
|
|||||||
import com.android.systemui.shared.recents.model.ThumbnailData;
|
import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||||
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
|
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -105,8 +108,16 @@ public class RecentsAnimationCallbacks implements
|
|||||||
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(),
|
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(),
|
||||||
mController::finishAnimationToApp);
|
mController::finishAnimationToApp);
|
||||||
} else {
|
} else {
|
||||||
RemoteAnimationTarget[] nonAppTargets =
|
RemoteAnimationTarget[] nonAppTargets;
|
||||||
mSystemUiProxy.onGoingToRecentsLegacy(appTargets);
|
if (!TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
|
||||||
|
nonAppTargets = mSystemUiProxy.onGoingToRecentsLegacy(appTargets);
|
||||||
|
} else {
|
||||||
|
final ArrayList<RemoteAnimationTarget> apps = new ArrayList<>();
|
||||||
|
final ArrayList<RemoteAnimationTarget> nonApps = new ArrayList<>();
|
||||||
|
classifyTargets(appTargets, apps, nonApps);
|
||||||
|
appTargets = apps.toArray(new RemoteAnimationTarget[apps.size()]);
|
||||||
|
nonAppTargets = nonApps.toArray(new RemoteAnimationTarget[nonApps.size()]);
|
||||||
|
}
|
||||||
if (nonAppTargets == null) {
|
if (nonAppTargets == null) {
|
||||||
nonAppTargets = new RemoteAnimationTarget[0];
|
nonAppTargets = new RemoteAnimationTarget[0];
|
||||||
}
|
}
|
||||||
@@ -176,6 +187,18 @@ public class RecentsAnimationCallbacks implements
|
|||||||
return mListeners.toArray(new RecentsAnimationListener[mListeners.size()]);
|
return mListeners.toArray(new RecentsAnimationListener[mListeners.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void classifyTargets(RemoteAnimationTarget[] appTargets,
|
||||||
|
ArrayList<RemoteAnimationTarget> apps, ArrayList<RemoteAnimationTarget> nonApps) {
|
||||||
|
for (int i = 0; i < appTargets.length; i++) {
|
||||||
|
RemoteAnimationTarget target = appTargets[i];
|
||||||
|
if (target.windowType == TYPE_DOCK_DIVIDER) {
|
||||||
|
nonApps.add(target);
|
||||||
|
} else {
|
||||||
|
apps.add(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener for the recents animation callbacks.
|
* Listener for the recents animation callbacks.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user