summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Huang <tonyychuang@google.com>2022-01-05 02:04:18 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-01-05 02:04:18 +0000
commit07a5dd0cb28cd02cd7befbe9eb3e4affb4ac51e9 (patch)
tree5071e7cc889382556f441f9ab97ee31b95475b22
parent5a1d0103e4e8341ac5c45e119a28e86b99ffe1ef (diff)
parentadae4870fb862acf83837922362ca1762c19c9aa (diff)
Merge "Fix toucn unresponsive after half fold in split" into sc-v2-dev
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskUnfoldController.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskUnfoldController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskUnfoldController.java
index e904f6a9e22c..4849163e96fd 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskUnfoldController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskUnfoldController.java
@@ -100,6 +100,9 @@ public class StageTaskUnfoldController implements UnfoldListener, OnInsetsChange
* @param leash surface leash for the appeared task
*/
public void onTaskAppeared(ActivityManager.RunningTaskInfo taskInfo, SurfaceControl leash) {
+ // Only handle child task surface here.
+ if (!taskInfo.hasParentTask()) return;
+
AnimationContext context = new AnimationContext(leash);
mAnimationContextByTaskId.put(taskInfo.taskId, context);
}
@@ -109,6 +112,8 @@ public class StageTaskUnfoldController implements UnfoldListener, OnInsetsChange
* @param taskInfo info for the vanished task
*/
public void onTaskVanished(ActivityManager.RunningTaskInfo taskInfo) {
+ if (!taskInfo.hasParentTask()) return;
+
AnimationContext context = mAnimationContextByTaskId.get(taskInfo.taskId);
if (context != null) {
final SurfaceControl.Transaction transaction = mTransactionPool.acquire();