Fix a problem that Dialog does not close in new dispatch.
We can treat Dialog as a standard widget that handles back.
Its dedicated back nav type is not in use and can eventually be removed.
Test: try dismiss dialog in BackTest app.
Change-Id: If89856ccfac8b1fd968aa674628476de02fbf489
(cherry picked from commit 6cb6399008)
This commit is contained in:
@@ -465,7 +465,8 @@ public class Dialog implements DialogInterface, Window.Callback,
|
||||
onBackPressed();
|
||||
}
|
||||
};
|
||||
getOnBackInvokedDispatcher().registerSystemOnBackInvokedCallback(mDefaultBackCallback);
|
||||
getOnBackInvokedDispatcher().registerOnBackInvokedCallback(
|
||||
mDefaultBackCallback, OnBackInvokedDispatcher.PRIORITY_DEFAULT);
|
||||
mDefaultBackCallback = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user