Merge cherrypicks of ['googleplex-android-review.googlesource.com/31017804'] into 25Q1-release.
Change-Id: I29bcd74ec4455f75637a4917165fb75897667787
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index c8e53ab..6c7fb2a 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -48,7 +48,9 @@
import android.hardware.input.InputManager;
import android.os.Bundle;
import android.os.IBinder;
+import android.os.IRemoteCallback;
import android.os.Looper;
+import android.os.RemoteException;
import android.os.SystemClock;
import android.os.Trace;
import android.util.ArraySet;
@@ -400,6 +402,20 @@
taskbarManager.onNavigationBarLumaSamplingEnabled(displayId, enable));
}
+ @Override
+ public void onUnbind(IRemoteCallback reply) {
+ // Run everything in the same main thread block to ensure the cleanup happens before
+ // sending the reply.
+ MAIN_EXECUTOR.execute(() -> {
+ executeForTaskbarManager(TaskbarManager::destroy);
+ try {
+ reply.sendResult(null);
+ } catch (RemoteException e) {
+ Log.w(TAG, "onUnbind: Failed to reply to OverviewProxyService", e);
+ }
+ });
+ }
+
private void executeForTouchInteractionService(
@NonNull Consumer<TouchInteractionService> tisConsumer) {
TouchInteractionService tis = mTis.get();