Proper ActionMode clean up when spring opening directories.

Since ActionMode has an assert that it should be null when being reset,
there was a crash for the case of spring opening directories due to
actionMode.finish() not properly called before opening the directory.
This now ensures actionMode.finish() is called beforehand.

Test: Wrote ActionHandlerTest#testSpringOpenDirectory.

Bug: 32749167
Change-Id: Ifa39e9fcf02f4f848ea5cf4f26b01280d32a47c0
9 files changed