Last active
August 29, 2015 14:25
-
-
Save noln/1c5b595fbc2f83072a98 to your computer and use it in GitHub Desktop.
Using this instead of straight Spoon.screenshot(..) until issue identified in https://github.com/square/spoon/issues/151 is resolved. Extremely noddy for a Gist, but works with my library-builder script (which I might open source when it's done :-P).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void failoverScreenshot(String desc) { | |
try { | |
Spoon.screenshot(getActivity(), desc); | |
} | |
catch (IllegalArgumentException e) { | |
Log.v(TAG, "Handled erroneous Spoon-Client screenshot exception."); | |
} | |
catch (OutOfMemoryError e) { | |
Log.v(TAG, "Couldn't take screenshot: OOM on device"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment