From 7843095bf1cf03eb8e5ca396b78ca7afcc1f3cb9 Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Tue, 15 Nov 2022 15:29:53 +0800 Subject: [PATCH] Fixes onBackAnimationFinished executed in binder thread. The finishCallback can be called from binder thread. Post it to shell executor to make sure member fields are synchronized. Bug: 241808055 Test: verify onBackAnimationFinished is executed in the same thread. Change-Id: Iaf9ec5499d6d47b51bd06ec68a329259e90ad3b1 --- .../com/android/wm/shell/back/BackAnimationController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java index d9eaeeeaf45fd..07cd7d6f60b74 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java @@ -611,8 +611,8 @@ public class BackAnimationController implements RemoteCallable mShellExecutor.execute( + BackAnimationController.this::onBackAnimationFinished)); if (apps.length >= 1) { dispatchOnBackStarted(