Merge "Fix callbacks not being unregistered from ProxyDispatcher" into tm-dev

This commit is contained in:
Vadim Caen
2022-02-25 13:09:22 +00:00
committed by Android (Google) Code Review

View File

@@ -81,6 +81,10 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher {
}
synchronized (mLock) {
mCallbacks.removeIf((p) -> p.first.equals(callback));
if (mActualDispatcherOwner != null) {
mActualDispatcherOwner.getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(
callback);
}
}
}