summaryrefslogtreecommitdiff
path: root/apct-tests
diff options
context:
space:
mode:
authorlumark <lumark@google.com>2020-03-07 00:03:33 +0800
committerMing-Shin Lu <lumark@google.com>2020-04-10 02:20:03 +0800
commit04bceb99f12d4abd63d547cbb29602539197b548 (patch)
tree5120abef9d53e5038993d43be9af99568e91075a /apct-tests
parentedb826c298b525a3a13678db27e8e25c6c579a6d (diff)
Trigger onTaskAppeared when a task started from recents becomes ready.
In quick switch flows, launcher will first swipe task snapshot through recents animation, and then start new task with custom animation options through startActivityFromRecents after gesture finish detected, and then finish recents animation finally. But that way user may experience flickering before the new task launch and recents animation finish. To improve quick switch flickering, we ignore the new task's custom animation from recents and generate task remote animation target, and then trigger a callback for launcher to control/animate this task surface, more like a part of RecentsAnimation, Also, adding removeTask method for launcher can flexibility remove the new task animation target once no need to animate, so that launcher can decide when to finish recents animation. Bug: 152480470 Test: manual as below steps: 1) Doing quick switch task. 2) Make sure launcher can receive onTaskAppeared callback. 3) Make sure launcher calls removeTask successfully. 4) Make sure launcher can finish recents animation after 3). Change-Id: I0692a280a49719229fa8871509bad37a1343a00f
Diffstat (limited to 'apct-tests')
-rw-r--r--apct-tests/perftests/core/src/android/wm/RecentsAnimationPerfTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/apct-tests/perftests/core/src/android/wm/RecentsAnimationPerfTest.java b/apct-tests/perftests/core/src/android/wm/RecentsAnimationPerfTest.java
index 73b4a1914ad1..836e6b617395 100644
--- a/apct-tests/perftests/core/src/android/wm/RecentsAnimationPerfTest.java
+++ b/apct-tests/perftests/core/src/android/wm/RecentsAnimationPerfTest.java
@@ -192,6 +192,11 @@ public class RecentsAnimationPerfTest extends WindowManagerPerfTestBase {
Assume.assumeNoException(
new AssertionError("onAnimationCanceled should not be called"));
}
+
+ @Override
+ public void onTaskAppeared(RemoteAnimationTarget app) throws RemoteException {
+ /* no-op */
+ }
};
recentsSemaphore.tryAcquire();