mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-04 00:02:03 +08:00
Minor change for synchronous write. This seems like a bad idea.
This commit is contained in:
@@ -97,7 +97,7 @@ public class FileUtils {
|
||||
data = "FAIL: IO ERROR";
|
||||
}
|
||||
|
||||
mView.loadUrl("javascript:navigator.FileReader.hasRead('" + data + "')");
|
||||
//mView.loadUrl("javascript:navigator.FileReader.hasRead('" + data + "')");
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -113,9 +113,11 @@ public class FileUtils {
|
||||
out.write(buff, 0, rawData.length);
|
||||
out.flush();
|
||||
out.close();
|
||||
mView.loadUrl("javascript:navigator.file.onsuccess('File written')");
|
||||
//mView.loadUrl("javascript:navigator.FileReader.onsuccess('File written')");
|
||||
} catch (Exception e) {
|
||||
mView.loadUrl("javascript:navigator.file.onerror('Fail')");
|
||||
//mView.loadUrl("javascript:navigator.FileReader.onerror('Fail')");
|
||||
// So, do we just return -1 at this point!
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user