Fix callbacks not being unregistered from ProxyDispatcher

Test: Manual
Bug: N/A
Change-Id: I1caae0fe212ca7915d6d689183e615e9c421dbfa
This commit is contained in:
Vadim Caen
2022-02-21 22:01:59 +01:00
parent c099351d94
commit cb4c2a66cd

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);
}
}
}