NIU Actions: Dismiss modal dialogs when overlay is closed

This prevents overlay-specific dialogs (e.g. the privacy confirmation for NIU Actions) from staying open when the user closes the overlay. For example, the user can tap the Home button or lock the device while a dialog is open on the Recents screen. In these cases, the user is sent to the Home screen, so it wouldn't make sense to leave Recents-related dialogs open.

Bug: 194991283
Test: Manual (local Wembley device)
Change-Id: Ie922ddf5d503b8b9818ee7887021f4df8520ae00
diff --git a/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java b/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java
index bc38739..c997e52 100644
--- a/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java
+++ b/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java
@@ -186,6 +186,9 @@
         public void reset() {
             super.reset();
             mWebUrl = null;
+            if (mDialog != null && mDialog.isShowing()) {
+                mDialog.dismiss();
+            }
         }
 
         @Override