Fix NewApi Lint errors for SearchActivityTest.
NewApi warnings were suppressed accidentally and an AssertionError constructor that requires API 19 was used. The NewApi warnings are back, so this fix avoids using the AssertionError, and throws the exceptions as they are. Since a couple calls that were being caught in a try/catch block before need to throw exceptions but can't from a Runnable, a waitForActivity method in ActivityUtils was added that takes a Callable<Void> was added. The original that takes a Runnable is just a wrapper around this new method so other tests are not affected. Bug: 805509,803484 Change-Id: I7960b2725b4fad1496fbfde7aafa8e2cf52ec686 Reviewed-on: https://chromium-review.googlesource.com/884362 Commit-Queue: Troy Hildebrandt <thildebr@chromium.org> Reviewed-by:Tommy Nyquist <nyquist@chromium.org> Cr-Commit-Position: refs/heads/master@{#531951}
Showing
Please register or sign in to comment