History log of /packages/apps/Contacts/tests/src/com/android/contacts/util/IntegrationTestUtils.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c06f21bd72611b335f4d34586f656225fb02f0fb 24-Aug-2011 Hugo Hudson <hugohudson@google.com> When we leave the voicemail activity, stop playback.

- On pause is propagated through to the VoicemailPlaybackPresenter.
- We use this to stop playback.
- Added a test used when working with this, but suppressed it because
I can't find a simple-enough way of checking that the audio has
stopped.
- Adds the ability to test the CallDetailActivity with a real voicemail.
- Fixes to the FakeAsyncTaskExecutor that Flavio and I have already
discussed - fixes that make the onPreExecute() method work correctly
(i.e. get invoked immediately on the thread that calls submit() on the
executor, rather than on the same thread that calls run... from the
test, which is a poor simulation and also illegal).

Bug: 5206675
Change-Id: I3f96c438dc6bbc1413a40b7bb2306ceb413f14a8
/packages/apps/Contacts/tests/src/com/android/contacts/util/IntegrationTestUtils.java
d1cac908706366a50bd3ffd71f90334bf812792f 25-Jul-2011 Hugo Hudson <hugohudson@google.com> Voicemail ui indicates both time left and playback speed.

- Playback time indicator has changed from current position in
voicemail to time remaining.
- This same text view is also used to briefly display current playback
rate when playback rate buttons are pressed.
- Unit tests to show that this logic works.
- This cl introduces a new class whose job is to handle the transition
between the different text states.
- Fixes a crash when we might release the player before the last
update gets the duration from the released player.
- New test method to fetch a text view's content on the ui thread.

Bug: 5044075
Change-Id: Ie3cf6e58c1a0139edb78cf3564a8aec94512156f
/packages/apps/Contacts/tests/src/com/android/contacts/util/IntegrationTestUtils.java
157dde190ff8f158dac60495c3b3b4ab2847e764 22-Jul-2011 Hugo Hudson <hugohudson@google.com> Remove "Remove from call log" from menu for voicemails.

- When looking at a voicemail we shouldn't remove from call log, because
we can just hit the trash button.

Bug: 5054103
Change-Id: I97c5870f12a7d495d2c49bb94f0795a1b3e12f9e
/packages/apps/Contacts/tests/src/com/android/contacts/util/IntegrationTestUtils.java
149fb7fd82554d5b02c335a3f9b8c60be4d083ec 21-Jul-2011 Hugo Hudson <hugohudson@google.com> Fix intermittently failing unit test.

- This test fails if you haven't switched the phone screen on, which
can be very confusing if you don't know about it.
- This cl introduces acquiring and releasing the screen wake lock to
the integration test utils, and uses it to prevent this test failure.

Change-Id: I378b6effd56e912213eb0af81f8add5c3bba39f2
/packages/apps/Contacts/tests/src/com/android/contacts/util/IntegrationTestUtils.java
757aa55194ba962c71feabe99d47b3021c3f294b 20-Jul-2011 Hugo Hudson <hugohudson@google.com> Fix crash when altering rate for voicemails without content.

- Repro for crash was to click on voicemail from call log without
content, try to play it (which would silently fail), then try to
use the rate increase/decrease buttons.
- The error being reported to the ui was disabling all the ui elements
but not the rate buttons.
- This fix makes the ui disable the rate buttons too, as well as showing
a Toast, and logging the exception to logcat.
- This cl also adds the unit tests that prove that the bug is fixed.
- In the process, I discovered another bug where missing extras from
the intent used to start the CallDetailsActivity could cause a crash,
so this adds a test and a fix for that case too.
- Also introduces IntegrationTestUtils class, with some useful methods
for doing things like clicking on different parts of the ui.

Bug: 5047879
Change-Id: I46d18723fe783a7a820446e1e13e19b5af82fa5c
/packages/apps/Contacts/tests/src/com/android/contacts/util/IntegrationTestUtils.java