Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cb63990 authored by Shan Huang's avatar Shan Huang
Browse files

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
parent b541557f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -465,7 +465,8 @@ public class Dialog implements DialogInterface, Window.Callback,
                    onBackPressed();
                }
            };
            getOnBackInvokedDispatcher().registerSystemOnBackInvokedCallback(mDefaultBackCallback);
            getOnBackInvokedDispatcher().registerOnBackInvokedCallback(
                    mDefaultBackCallback, OnBackInvokedDispatcher.PRIORITY_DEFAULT);
            mDefaultBackCallback = null;
        }
    }