Fix setRequestedOrientation Calls for Increased Stability

Bug 2639189

Tens of random failures in DialogTest and InstrumentationTest seemed
to occur. Commenting out the setRequestedOrientation calls in
ApplicationTest seemed to remove the problem. It seems if the orientation
is not restored properly, then Froyo will attempt to change the
orientation on subsequent activities causing the test activities to
restart and making the references to the prior activity null!

Create a method that check what the current orientation is in order to
switch to a new orientation and then restore the original orientation.

Change-Id: I3218cb2770e70168f4785eb49800bf85293b7ad4
6 files changed
tree: 4ea5bfa9810e8e1ec47d21d0633dae58fdd6dcf9
  1. development/
  2. tests/
  3. tools/
  4. .gitignore
  5. Android.mk
  6. CleanSpec.mk