Fix failing and disabled SearchManager CTS tests

The tests were really messy, and used fixed timeouts and
Thread.sleep(). Rewrote them to use a Handler to postpone checks
until after the search dialog has had time to show / hide.

This fixes the failing testSetOnCancelListener test,
and reinstates the disabled testStopSearch test.

Fixes http://b/issue?id=2483047

Change-Id: If2b6d6645f6380fefffa4ac018dfb773d012a0b1
7 files changed
tree: 3a653ad6dea0acb4e91f4f37669371f7ed8e0b6c
  1. tests/
  2. tools/
  3. .gitignore
  4. Android.mk
  5. CleanSpec.mk