mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-02-17 17:01:12 -05:00
Add forgotten input stream initialization
This commit is contained in:
parent
1a2433885d
commit
bbba46c143
1 changed files with 3 additions and 6 deletions
|
@ -323,12 +323,9 @@ public class ScratchJrActivity
|
|||
// Read the project one byte at a time into a buffer
|
||||
ByteArrayOutputStream projectData = new ByteArrayOutputStream();
|
||||
try {
|
||||
InputStream is = null;
|
||||
if (projectFile != null) {
|
||||
is = new FileInputStream(projectFile);
|
||||
} else {
|
||||
getContentResolver().openInputStream(projectUri);
|
||||
}
|
||||
InputStream is = (projectFile != null) ? new FileInputStream(projectFile) :
|
||||
getContentResolver().openInputStream(projectUri);
|
||||
|
||||
byte[] readByte = new byte[1];
|
||||
while ((is.read(readByte)) == 1) {
|
||||
projectData.write(readByte[0]);
|
||||
|
|
Loading…
Reference in a new issue