Provide the back callback instance when unregistering it from SysUI.

Bug: 228535747
Test: atest BackAnimationControllerTest
Test: Make sure back to home animation works on tablets and phones.
Change-Id: Iacbd581f382da50e96cfefbefe569800e9e1043b
This commit is contained in:
Shan Huang committed 2022-05-02 04:57:11 +00:00
1 parent 833b0a0b5b
commit 883e7e412b
2 files changed
+40 -28

No files matched your search

@@ -847,8 +847,14 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI
}
}
/** Clears the previously registered {@link IOnBackInvokedCallback}. */
public void clearBackToLauncherCallback() {
/** Clears the previously registered {@link IOnBackInvokedCallback}.
*
* @param callback The previously registered callback instance.
*/
public void clearBackToLauncherCallback(IOnBackInvokedCallback callback) {
if (mBackToLauncherCallback != callback) {
return;
}
mBackToLauncherCallback = null;
if (mBackAnimation == null) {
return;