summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorTracy Zhou <tracyzhou@google.com>2019-07-31 15:15:03 -0700
committerTracy Zhou <tracyzhou@google.com>2019-08-02 03:44:37 +0000
commitbd7acf7665712c742af7f08dd76c3678cb5d52ab (patch)
treeacdf02017a92b93ad0ac8c8a9eaf45e2c5e92d24 /quickstep
parentb1d8ad6be5d4f02bec05e9b496c6d06b9331b716 (diff)
downloadandroid_packages_apps_Trebuchet-bd7acf7665712c742af7f08dd76c3678cb5d52ab.tar.gz
android_packages_apps_Trebuchet-bd7acf7665712c742af7f08dd76c3678cb5d52ab.tar.bz2
android_packages_apps_Trebuchet-bd7acf7665712c742af7f08dd76c3678cb5d52ab.zip
Change RecentsAnimationListenerSet interface (Launcher)
Bug: 138683199 Test: N/A Change-Id: Ic53ef92fe4d5b55ff1d105a250accdf6f6c0916b (cherry picked from commit 8e8a36f673de31a31e19131ab286de7798e23b78)
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java
index 83601e617..14083dd95 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationListenerSet.java
@@ -23,6 +23,7 @@ import android.util.ArraySet;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.Preconditions;
import com.android.quickstep.util.SwipeAnimationTargetSet.SwipeAnimationListener;
+import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
import com.android.systemui.shared.system.RecentsAnimationListener;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
@@ -39,7 +40,7 @@ import androidx.annotation.UiThread;
public class RecentsAnimationListenerSet implements RecentsAnimationListener {
// The actual app surface is replaced by a screenshot upon recents animation cancelation when
- // deferredWithScreenshot is true. Launcher takes the responsibility to clean up this screenshot
+ // the thumbnailData exists. Launcher takes the responsibility to clean up this screenshot
// after app transition is finished. This delay is introduced to cover the app transition
// period of time.
private final int TRANSITION_DELAY = 100;
@@ -90,14 +91,14 @@ public class RecentsAnimationListenerSet implements RecentsAnimationListener {
}
@Override
- public final void onAnimationCanceled(boolean deferredWithScreenshot) {
+ public final void onAnimationCanceled(ThumbnailData thumbnailData) {
Utilities.postAsyncCallback(MAIN_THREAD_EXECUTOR.getHandler(), () -> {
for (SwipeAnimationListener listener : getListeners()) {
listener.onRecentsAnimationCanceled();
}
});
// TODO: handle the transition better instead of simply using a transition delay.
- if (deferredWithScreenshot) {
+ if (thumbnailData != null) {
MAIN_THREAD_EXECUTOR.getHandler().postDelayed(() -> mController.cleanupScreenshot(),
TRANSITION_DELAY);
}
@@ -109,6 +110,6 @@ public class RecentsAnimationListenerSet implements RecentsAnimationListener {
public void cancelListener() {
mCancelled = true;
- onAnimationCanceled(false);
+ onAnimationCanceled(null);
}
}