Fix HoloTest instability
testHolo began failing on a device that crashed in the prior camera
tests. When the phone got a mcc, it triggered a configuration change
that caused the controlling ThemeTestActivity to restart. This in turn
caused two LayoutTestActivity instances to launch which in turn started
two threads that process the same resource bitmap and thenn call
recycle. The thread unfortunate enough not to finish early gets an error
when it tries to read a pixel from the recycled bitmap.
- Don't call recycle on the resource drawable bitmap.
- Make holo test not restart on mcc and mnc changes.
- Move bitmap comparison into thread rather than blocking main thread.
The real fix would be to rewrite the Holo test so that it can handle
configuration changes like an ordinary app would.
2 files changed