Fix PopupMenuTest#testHoverSelectsMenuItem failed

We emulate hover event to test if menu item could be selected, but
the first or last visible item may present partially to the screen.
So when inject mouse event to the cetner of item view, it may send to
another window cause the unexpected result.

- Wakeup and unlock device before testing to prevent it inject input
  event to the lock screen.
- Ignore first/last items to prevent injecting the input event to
  the covered window.

Bug: 169296842
Test: atest PopupMenuTest
Change-Id: I5fd3a31f04f82511fe03d179f51e2045425ed65c
2 files changed