Merge "Respect the enforce flag for callback registration." into tm-qpr-dev am: a2c8daf7d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19563307 Change-Id: I1366d03a794ead35ba2a5aa3134306b4e0062399 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -325,7 +325,8 @@ public class WindowOnBackInvokedDispatcher implements OnBackInvokedDispatcher {
|
|||||||
public boolean checkApplicationCallbackRegistration(int priority,
|
public boolean checkApplicationCallbackRegistration(int priority,
|
||||||
OnBackInvokedCallback callback) {
|
OnBackInvokedCallback callback) {
|
||||||
if (!mApplicationCallBackEnabled
|
if (!mApplicationCallBackEnabled
|
||||||
&& !(callback instanceof CompatOnBackInvokedCallback)) {
|
&& !(callback instanceof CompatOnBackInvokedCallback)
|
||||||
|
&& !ALWAYS_ENFORCE_PREDICTIVE_BACK) {
|
||||||
Log.w("OnBackInvokedCallback",
|
Log.w("OnBackInvokedCallback",
|
||||||
"OnBackInvokedCallback is not enabled for the application."
|
"OnBackInvokedCallback is not enabled for the application."
|
||||||
+ "\nSet 'android:enableOnBackInvokedCallback=\"true\"' in the"
|
+ "\nSet 'android:enableOnBackInvokedCallback=\"true\"' in the"
|
||||||
|
|||||||
Reference in New Issue
Block a user