Merge "Start collecting task dismiss CUJ on dismiss animation start." into main
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 98228ad..3dd1473 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -99,6 +99,7 @@
import android.widget.Toast;
import android.window.DesktopModeFlags;
import android.window.PictureInPictureSurfaceTransaction;
+import android.window.TransitionInfo;
import android.window.WindowAnimationState;
import androidx.annotation.NonNull;
@@ -954,10 +955,10 @@
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
- super.onRecentsAnimationStart(controller, targets);
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
+ super.onRecentsAnimationStart(controller, targets, transitionInfo);
if (targets.hasDesktopTasks(mContext)) {
- mRemoteTargetHandles = mTargetGluer.assignTargetsForDesktop(targets);
+ mRemoteTargetHandles = mTargetGluer.assignTargetsForDesktop(targets, transitionInfo);
} else {
int untrimmedAppCount = mRemoteTargetHandles.length;
mRemoteTargetHandles = mTargetGluer.assignTargetsForSplitScreen(targets);
diff --git a/quickstep/src/com/android/quickstep/GestureState.java b/quickstep/src/com/android/quickstep/GestureState.java
index cfbcf0a..e0fa77a 100644
--- a/quickstep/src/com/android/quickstep/GestureState.java
+++ b/quickstep/src/com/android/quickstep/GestureState.java
@@ -33,6 +33,7 @@
import android.os.SystemClock;
import android.view.MotionEvent;
import android.view.RemoteAnimationTarget;
+import android.window.TransitionInfo;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -491,7 +492,7 @@
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
+ RecentsAnimationTargets targets, TransitionInfo info) {
mStateCallback.setState(STATE_RECENTS_ANIMATION_STARTED);
}
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt
index 089706f..66f307c 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt
@@ -23,6 +23,7 @@
import android.os.Trace
import android.util.Log
import android.view.View
+import android.window.TransitionInfo
import androidx.annotation.BinderThread
import androidx.annotation.UiThread
import androidx.annotation.VisibleForTesting
@@ -369,6 +370,7 @@
override fun onRecentsAnimationStart(
controller: RecentsAnimationController,
targets: RecentsAnimationTargets,
+ transitionInfo: TransitionInfo,
) {
Log.d(TAG, "recents animation started: $command")
updateRecentsViewFocus(command)
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
index 8fc1a78..87bf81c 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
@@ -26,6 +26,7 @@
import android.os.Bundle;
import android.util.ArraySet;
import android.view.RemoteAnimationTarget;
+import android.window.TransitionInfo;
import androidx.annotation.BinderThread;
import androidx.annotation.NonNull;
@@ -93,7 +94,7 @@
RemoteAnimationTarget[] appTargets, Rect homeContentInsets,
Rect minimizedHomeBounds, Bundle extras) {
onAnimationStart(controller, appTargets, new RemoteAnimationTarget[0],
- homeContentInsets, minimizedHomeBounds, extras);
+ homeContentInsets, minimizedHomeBounds, extras, /* transitionInfo= */ null);
}
// Called only in R+ platform
@@ -101,7 +102,8 @@
public final void onAnimationStart(RecentsAnimationControllerCompat animationController,
RemoteAnimationTarget[] appTargets,
RemoteAnimationTarget[] wallpaperTargets,
- Rect homeContentInsets, Rect minimizedHomeBounds, Bundle extras) {
+ Rect homeContentInsets, Rect minimizedHomeBounds, Bundle extras,
+ TransitionInfo transitionInfo) {
long appCount = Arrays.stream(appTargets)
.filter(app -> app.mode == MODE_CLOSING)
.count();
@@ -141,7 +143,7 @@
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(), () -> {
ActiveGestureProtoLogProxy.logOnRecentsAnimationStart(targets.apps.length);
for (RecentsAnimationListener listener : getListeners()) {
- listener.onRecentsAnimationStart(mController, targets);
+ listener.onRecentsAnimationStart(mController, targets, transitionInfo);
}
});
}
@@ -205,7 +207,7 @@
*/
public interface RecentsAnimationListener {
default void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {}
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {}
/**
* Callback from the system when the recents animation is canceled. {@param thumbnailData}
diff --git a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
index 89337e5..8edbacb 100644
--- a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
+++ b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
@@ -24,6 +24,7 @@
import android.graphics.Rect;
import android.util.Log;
import android.view.RemoteAnimationTarget;
+import android.window.TransitionInfo;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -213,7 +214,8 @@
* Similar to {@link #assignTargets(RemoteAnimationTargets)}, except this creates distinct
* transform params per app in {@code targets.apps} list.
*/
- public RemoteTargetHandle[] assignTargetsForDesktop(RemoteAnimationTargets targets) {
+ public RemoteTargetHandle[] assignTargetsForDesktop(
+ RemoteAnimationTargets targets, TransitionInfo transitionInfo) {
resizeRemoteTargetHandles(targets);
for (int i = 0; i < mRemoteTargetHandles.length; i++) {
@@ -222,6 +224,7 @@
.filter(target -> target.taskId != primaryTaskTarget.taskId).toList();
mRemoteTargetHandles[i].mTransformParams.setTargetSet(
createRemoteAnimationTargetsForTarget(targets, excludeTargets));
+ mRemoteTargetHandles[i].mTransformParams.setTransitionInfo(transitionInfo);
mRemoteTargetHandles[i].mTaskViewSimulator.setPreview(primaryTaskTarget, null);
}
return mRemoteTargetHandles;
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.kt b/quickstep/src/com/android/quickstep/SystemUiProxy.kt
index feb9107..f2cedba 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.kt
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.kt
@@ -45,6 +45,7 @@
import android.window.RemoteTransition
import android.window.TaskSnapshot
import android.window.TransitionFilter
+import android.window.TransitionInfo
import androidx.annotation.MainThread
import androidx.annotation.VisibleForTesting
import androidx.annotation.WorkerThread
@@ -1175,6 +1176,7 @@
homeContentInsets: Rect?,
minimizedHomeBounds: Rect?,
extras: Bundle?,
+ transitionInfo: TransitionInfo?,
) =
listener.onAnimationStart(
RecentsAnimationControllerCompat(controller),
@@ -1187,6 +1189,7 @@
// https://developer.android.com/guide/components/aidl#Bundles
classLoader = SplitBounds::class.java.classLoader
},
+ transitionInfo,
)
override fun onAnimationCanceled(taskIds: IntArray?, taskSnapshots: Array<TaskSnapshot>?) =
diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
index 731c256..1fd7211 100644
--- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java
+++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
@@ -35,6 +35,7 @@
import android.os.SystemProperties;
import android.util.Log;
import android.view.RemoteAnimationTarget;
+import android.window.TransitionInfo;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -67,6 +68,7 @@
private RecentsAnimationController mController;
private RecentsAnimationCallbacks mCallbacks;
private RecentsAnimationTargets mTargets;
+ private TransitionInfo mTransitionInfo;
private RecentsAnimationDeviceState mDeviceState;
// Temporary until we can hook into gesture state events
@@ -154,7 +156,7 @@
mCallbacks.addListener(new RecentsAnimationCallbacks.RecentsAnimationListener() {
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
if (enableHandleDelayedGestureCallbacks() && mRecentsAnimationStartPending) {
ActiveGestureProtoLogProxy.logStartRecentsAnimationCallback(
"onRecentsAnimationStart");
@@ -168,6 +170,7 @@
}
mController = controller;
mTargets = targets;
+ mTransitionInfo = transitionInfo;
// TODO(b/236226779): We can probably get away w/ setting mLastAppearedTaskTargets
// to all appeared targets directly vs just looking at running ones
int[] runningTaskIds = mLastGestureState.getRunningTaskIds(targets.apps.length > 1);
@@ -436,7 +439,7 @@
public void notifyRecentsAnimationState(
RecentsAnimationCallbacks.RecentsAnimationListener listener) {
if (isRecentsAnimationRunning()) {
- listener.onRecentsAnimationStart(mController, mTargets);
+ listener.onRecentsAnimationStart(mController, mTargets, mTransitionInfo);
}
// TODO: Do we actually need to report canceled/finished?
}
@@ -476,6 +479,7 @@
mController = null;
mCallbacks = null;
mTargets = null;
+ mTransitionInfo = null;
mLastGestureState = null;
mLastAppearedTaskTargets = null;
}
diff --git a/quickstep/src/com/android/quickstep/TaskViewUtils.java b/quickstep/src/com/android/quickstep/TaskViewUtils.java
index c21ffb7..3133907 100644
--- a/quickstep/src/com/android/quickstep/TaskViewUtils.java
+++ b/quickstep/src/com/android/quickstep/TaskViewUtils.java
@@ -190,7 +190,8 @@
RemoteTargetGluer gluer = new RemoteTargetGluer(v.getContext(),
recentsView.getSizeStrategy(), targets, forDesktop);
if (forDesktop) {
- remoteTargetHandles = gluer.assignTargetsForDesktop(targets);
+ remoteTargetHandles =
+ gluer.assignTargetsForDesktop(targets, /* transitionInfo=*/ null);
} else if (v.containsMultipleTasks()) {
remoteTargetHandles = gluer.assignTargetsForSplitScreen(targets,
((GroupedTaskView) v).getSplitBoundsConfig());
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index efd9a56..f7fb18b 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -47,7 +47,9 @@
import android.graphics.Region;
import android.os.Bundle;
import android.os.IBinder;
+import android.os.IRemoteCallback;
import android.os.Looper;
+import android.os.RemoteException;
import android.os.SystemClock;
import android.util.Log;
import android.view.Choreographer;
@@ -385,6 +387,20 @@
taskbarManager.onNavigationBarLumaSamplingEnabled(displayId, enable));
}
+ @Override
+ public void onUnbind(IRemoteCallback reply) {
+ // Run everything in the same main thread block to ensure the cleanup happens before
+ // sending the reply.
+ MAIN_EXECUTOR.execute(() -> {
+ executeForTaskbarManager(TaskbarManager::destroy);
+ try {
+ reply.sendResult(null);
+ } catch (RemoteException e) {
+ Log.w(TAG, "onUnbind: Failed to reply to OverviewProxyService", e);
+ }
+ });
+ }
+
private void executeForTouchInteractionService(
@NonNull Consumer<TouchInteractionService> tisConsumer) {
TouchInteractionService tis = mTis.get();
diff --git a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java
index 12bae53..973fb2f 100644
--- a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowSwipeHandler.java
@@ -49,6 +49,7 @@
import android.view.SurfaceControl;
import android.view.SurfaceControl.Transaction;
import android.view.animation.Interpolator;
+import android.window.TransitionInfo;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -124,8 +125,8 @@
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
- super.onRecentsAnimationStart(controller, targets);
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
+ super.onRecentsAnimationStart(controller, targets, transitionInfo);
initTransformParams();
}
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
index 01f5522..503b900 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
@@ -37,6 +37,7 @@
import android.view.MotionEvent;
import android.view.RemoteAnimationTarget;
import android.view.VelocityTracker;
+import android.window.TransitionInfo;
import com.android.app.animation.Interpolators;
import com.android.launcher3.R;
@@ -249,7 +250,7 @@
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
mRecentsAnimationController = controller;
mTransformParams.setTargetSet(targets);
applyTransform();
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
index f33eb5e..dd2b2be 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
@@ -38,6 +38,7 @@
import android.util.Log;
import android.view.MotionEvent;
import android.view.VelocityTracker;
+import android.window.TransitionInfo;
import androidx.annotation.UiThread;
@@ -573,8 +574,9 @@
private static class FinishImmediatelyHandler
implements RecentsAnimationCallbacks.RecentsAnimationListener {
+ @Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
if (DEBUG) {
Log.d(TAG, "FinishImmediatelyHandler: queuing callback");
}
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/ProgressDelegateInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/ProgressDelegateInputConsumer.java
index 6dcb7bc..c91bebe 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/ProgressDelegateInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/ProgressDelegateInputConsumer.java
@@ -28,6 +28,7 @@
import android.content.Intent;
import android.graphics.Point;
import android.view.MotionEvent;
+import android.window.TransitionInfo;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.anim.AnimatorListeners;
@@ -172,7 +173,7 @@
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
mRecentsAnimationController = controller;
mStateCallback.setState(STATE_TARGET_RECEIVED);
}
diff --git a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java
index 6b59c1b..5f8b4d9 100644
--- a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java
+++ b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java
@@ -678,7 +678,7 @@
}
@Override
- public void startAnimation(IBinder transition, TransitionInfo info,
+ public void startAnimation(IBinder transition, TransitionInfo transitionInfo,
SurfaceControl.Transaction t,
IRemoteTransitionFinishedCallback finishedCallback) {
final Runnable finishAdapter = () -> {
@@ -708,7 +708,7 @@
null /* nonApps */,
mStateManager,
mDepthController,
- info, t, () -> {
+ transitionInfo, t, () -> {
finishAdapter.run();
cleanup(true /*success*/);
},
@@ -919,7 +919,7 @@
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
StatsLogManager.LauncherEvent launcherDesktopSplitEvent =
mSplitPosition == STAGE_POSITION_BOTTOM_OR_RIGHT ?
LAUNCHER_DESKTOP_MODE_SPLIT_RIGHT_BOTTOM :
diff --git a/quickstep/src/com/android/quickstep/util/SplitWithKeyboardShortcutController.java b/quickstep/src/com/android/quickstep/util/SplitWithKeyboardShortcutController.java
index 6ba733a..0e27139 100644
--- a/quickstep/src/com/android/quickstep/util/SplitWithKeyboardShortcutController.java
+++ b/quickstep/src/com/android/quickstep/util/SplitWithKeyboardShortcutController.java
@@ -29,6 +29,7 @@
import android.app.ActivityOptions;
import android.graphics.Rect;
import android.graphics.RectF;
+import android.window.TransitionInfo;
import androidx.annotation.BinderThread;
@@ -112,7 +113,7 @@
@Override
public void onRecentsAnimationStart(RecentsAnimationController controller,
- RecentsAnimationTargets targets) {
+ RecentsAnimationTargets targets, TransitionInfo transitionInfo) {
mController.setInitialTaskSelect(mRunningTaskInfo,
mLeftOrTop ? STAGE_POSITION_TOP_OR_LEFT : STAGE_POSITION_BOTTOM_OR_RIGHT,
null /* itemInfo */,
diff --git a/quickstep/src/com/android/quickstep/util/TransformParams.java b/quickstep/src/com/android/quickstep/util/TransformParams.java
index 401eccc..bb88818 100644
--- a/quickstep/src/com/android/quickstep/util/TransformParams.java
+++ b/quickstep/src/com/android/quickstep/util/TransformParams.java
@@ -19,9 +19,12 @@
import android.util.FloatProperty;
import android.view.RemoteAnimationTarget;
+import android.view.SurfaceControl;
+import android.window.TransitionInfo;
import com.android.quickstep.RemoteAnimationTargets;
import com.android.quickstep.util.SurfaceTransaction.SurfaceProperties;
+import com.android.window.flags.Flags;
public class TransformParams {
@@ -56,6 +59,7 @@
private float mTargetAlpha;
private float mCornerRadius;
private RemoteAnimationTargets mTargetSet;
+ private TransitionInfo mTransitionInfo;
private SurfaceTransactionApplier mSyncTransactionApplier;
private BuilderProxy mHomeBuilderProxy = BuilderProxy.ALWAYS_VISIBLE;
@@ -107,6 +111,14 @@
}
/**
+ * Provides the {@code TransitionInfo} of the transition that this transformation stems from.
+ */
+ public TransformParams setTransitionInfo(TransitionInfo transitionInfo) {
+ mTransitionInfo = transitionInfo;
+ return this;
+ }
+
+ /**
* Sets the SyncRtSurfaceTransactionApplierCompat that will apply the SurfaceParams that
* are computed based on these TransformParams.
*/
@@ -152,6 +164,9 @@
builder.setAlpha(getTargetAlpha());
}
targetProxy.onBuildTargetParams(builder, app, this);
+ // Override the corner radius for {@code app} with the leash used by Shell, so that it
+ // doesn't interfere with the window clip and corner radius applied here.
+ overrideChangeLeashCornerRadiusToZero(app, transaction.getTransaction());
}
// always put wallpaper layer to bottom.
@@ -163,6 +178,28 @@
return transaction;
}
+ private void overrideChangeLeashCornerRadiusToZero(
+ RemoteAnimationTarget app, SurfaceControl.Transaction transaction) {
+ if (!Flags.enableDesktopRecentsTransitionsCornersBugfix()) {
+ return;
+ }
+ SurfaceControl changeLeash = getChangeLeashForApp(app);
+ if (changeLeash != null) {
+ transaction.setCornerRadius(changeLeash, 0);
+ }
+ }
+
+ private SurfaceControl getChangeLeashForApp(RemoteAnimationTarget app) {
+ if (mTransitionInfo == null) return null;
+ for (TransitionInfo.Change change : mTransitionInfo.getChanges()) {
+ if (change.getTaskInfo() == null) continue;
+ if (change.getTaskInfo().taskId == app.taskId) {
+ return change.getLeash();
+ }
+ }
+ return null;
+ }
+
// Pubic getters so outside packages can read the values.
public float getProgress() {
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 248d7a3..cfad303 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -5837,7 +5837,8 @@
if (recentsAnimationTargets.hasDesktopTasks(mContext)) {
gluer = new RemoteTargetGluer(getContext(), getSizeStrategy(), recentsAnimationTargets,
true /* forDesktop */);
- mRemoteTargetHandles = gluer.assignTargetsForDesktop(recentsAnimationTargets);
+ mRemoteTargetHandles = gluer.assignTargetsForDesktop(
+ recentsAnimationTargets, /* transitionInfo= */ null);
} else {
gluer = new RemoteTargetGluer(getContext(), getSizeStrategy(), recentsAnimationTargets,
false);
diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java b/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java
index f16e193..542eb64 100644
--- a/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java
+++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/AbsSwipeUpHandlerTestCase.java
@@ -364,7 +364,7 @@
private void onRecentsAnimationStart(SWIPE_HANDLER absSwipeUpHandler) {
runOnMainSync(() -> absSwipeUpHandler.onRecentsAnimationStart(
- mRecentsAnimationController, mRecentsAnimationTargets));
+ mRecentsAnimationController, mRecentsAnimationTargets, /* transitionInfo= */null));
}
protected static void runOnMainSync(Runnable runnable) {
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index 961dc58..15038a4 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -50,7 +50,6 @@
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
import com.android.launcher3.util.TestUtil;
import com.android.launcher3.util.Wait;
-import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import com.android.launcher3.util.rule.TestStabilityRule;
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch;
@@ -584,19 +583,14 @@
public void testExcludeFromRecents() throws Exception {
startExcludeFromRecentsTestActivity();
OverviewTask currentTask = getAndAssertLaunchedApp().switchToOverview().getCurrentTask();
- // TODO(b/342627272): the expected content description shouldn't be null but for now there
- // is a bug that causes it to sometimes be for excludeForRecents tasks.
assertTrue("Can't find ExcludeFromRecentsTestActivity after entering Overview from it",
- currentTask.containsContentDescription("ExcludeFromRecents")
- || currentTask.containsContentDescription(null));
+ currentTask.containsContentDescription("ExcludeFromRecents"));
// Going home should clear out the excludeFromRecents task.
BaseOverview overview = mLauncher.goHome().switchToOverview();
if (overview.hasTasks()) {
currentTask = overview.getCurrentTask();
assertFalse("Found ExcludeFromRecentsTestActivity after entering Overview from Home",
- currentTask.containsContentDescription(
- "ExcludeFromRecents")
- || currentTask.containsContentDescription(null));
+ currentTask.containsContentDescription("ExcludeFromRecents"));
} else {
// Presumably the test started with 0 tasks and remains that way after going home.
}
diff --git a/tests/tapl/com/android/launcher3/tapl/OverviewTask.java b/tests/tapl/com/android/launcher3/tapl/OverviewTask.java
index 8512d73..70bfb60 100644
--- a/tests/tapl/com/android/launcher3/tapl/OverviewTask.java
+++ b/tests/tapl/com/android/launcher3/tapl/OverviewTask.java
@@ -24,7 +24,6 @@
import android.graphics.Rect;
import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
import androidx.test.uiautomator.By;
import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.UiObject2;
@@ -281,10 +280,8 @@
/**
* Returns whether the given String is contained in this Task's contentDescription. Also returns
* true if both Strings are null.
- *
- * TODO(b/342627272): remove Nullable support once the bug causing it to be null is fixed.
*/
- public boolean containsContentDescription(@Nullable String expected,
+ public boolean containsContentDescription(String expected,
OverviewTaskContainer overviewTaskContainer) {
String actual = findObjectInTask(overviewTaskContainer.snapshotRes).getContentDescription();
if (actual == null && expected == null) {
@@ -300,7 +297,7 @@
* Returns whether the given String is contained in this Task's contentDescription. Also returns
* true if both Strings are null
*/
- public boolean containsContentDescription(@Nullable String expected) {
+ public boolean containsContentDescription(String expected) {
return containsContentDescription(expected, DEFAULT);
}