Fixing issues in Maximize Menu

The following issues are adressed in this CL:
1) Maximize menu closes after long press.
2) If maximize menu is open and a user clicks the maximize button, the
   maximize menu closes and the task maximizes while it is expected that
   the menu closes and the task remains the same size.

Bug: 319735069
Test: Manual Testing
Change-Id: I807aeab0a317f30d05c1ae6ee22d59eda9f1006f
5 files changed