[Contextual Edu] Dismiss the existing dialog when a new dialog is shown

Fix the issue of education dialog stucking in the screen and not disappearing. This issue happens when the old dialog has not timed out yet but a new dialog is triggered. The previous dialog is not dismissed before a new one is created. It should dismiss the previous dialog if any, before showing a new dialog.

Bug: 378370473
Test: ContextualEduUiCoordinatorTest
Flag: com.android.systemui.keyboard_touchpad_contextual_education
Change-Id: I49650422fa75367b5b818ac949f13cbc4f5b9f17
2 files changed