Fix Activity leaking form OnBackInvokedCallbackWrapper

 - The callback was not removed on the server in the clear() method since mWindow and
   mWindowSession fields were cleared before
 - The wrapper class was not static, risking to leak it's outer class
   and its field.

Test: com.android.launcher3.ui.widget.RequestPinItemTest#testPinWidgetWithConfig
Fixes: 220385755
Change-Id: I3e5a81bf48c2272b1cb2b5a9f2ba940d0f794a6f
1 file changed