Consolidate ImeAwareEditText#scheduleShowSoftInput (2/2)

CL[1] add IMM#hasActiveInputConnection(view) to check if the give view
has an active input connection for better schedule showSoftInput request.

Apply this method in ImeAwareEditText#scheduleShowSoftInput for cts test
package usage.

[1]: I466a93e2b4706ae809ac50dc16dc8e4ffa7c2f1c

Bug: 176697749
Test: atest --iterations 100 KeyboardVisibilityControlTest#\
      testImeInvisibleWhenForceStopPkgProcess_Full
Change-Id: I0268dab23b17f66135c50ed015987986d53da252
4 files changed