Created
August 14, 2012 08:22
-
-
Save masarugen/3347508 to your computer and use it in GitHub Desktop.
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
if (mSaveUri != null) { | |
OutputStream outputStream = null; | |
try { | |
outputStream = mContentResolver.openOutputStream(mSaveUri); | |
outputStream.write(data); | |
outputStream.close(); | |
setResult(RESULT_OK); | |
finish(); | |
} catch (IOException ex) { | |
// ignore exception | |
} finally { | |
Util.closeSilently(outputStream); | |
} | |
} else { | |
Bitmap bitmap = createCaptureBitmap(data); | |
setResult(RESULT_OK, | |
new Intent("inline-data").putExtra("data", bitmap)); | |
finish(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment