Fixing issue with PIP while IME is showing.

- Unifying logic to ensure that the PIP is moved consistently as its
  movement bounds are shifted.  This is done by adding a snap fraction
  which is a fraction relative to one set of movement bounds, and applied
  to a new movement bounds.  This is flexible to work with all of the
  current snap modes being tested.
- Fixing issue where you can drag out of bounds when touching the PIP
  before the IME shows.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackOffsetForIME
Change-Id: Ie68c1ca599f6196726b8224585974a0972b93701
Signed-off-by: Winson Chung <winsonc@google.com>
4 files changed