summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tracy Zhou <tracyzhou@google.com> 2021-04-28 13:24:59 -0700
committer Tracy Zhou <tracyzhou@google.com> 2021-04-28 13:24:59 -0700
commit4c42d815c114afead2363cf73d7d5636fe80e5b1 (patch)
treeaf5c56e3c97d501d0f8e58a67a14f715f5355b75
parentcda17304637c504dc74944acc22f1658ff21d70a (diff)
Add onSwipeToHomeFinished to OverviewProxyListener
So that game dashboard can listen to it Fixes: 182500083 Test: manual Change-Id: I367c1ead84152bddab01fa9472f3ad3fbcf8fe38
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
index 850f8a5959a0..f078ccd9d382 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
@@ -408,6 +408,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
mPipOptional.ifPresent(
pip -> pip.setPinnedStackAnimationType(
PipAnimationController.ANIM_TYPE_ALPHA));
+ mHandler.post(() -> notifySwipeToHomeFinishedInternal());
} finally {
Binder.restoreCallingIdentity(token);
}
@@ -886,6 +887,12 @@ public class OverviewProxyService extends CurrentUserTracker implements
}
}
+ public void notifySwipeToHomeFinishedInternal() {
+ for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) {
+ mConnectionCallbacks.get(i).onSwipeToHomeFinished();
+ }
+ }
+
public void notifyAssistantVisibilityChanged(float visibility) {
try {
if (mOverviewProxy != null) {
@@ -962,6 +969,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
public interface OverviewProxyListener {
default void onConnectionChanged(boolean isConnected) {}
default void onQuickStepStarted() {}
+ default void onSwipeToHomeFinished() {}
default void onQuickSwitchToNewTask(@Surface.Rotation int rotation) {}
default void onOverviewShown(boolean fromHome) {}
default void onQuickScrubStarted() {}