Merge "Dismiss the dialog manually if controller is null (e.g, when the dialog is triggered from search box or the screen is locked)." into main