Skip to content

Commit f9db44f

Browse files
committed
ANDROID: file manager webui (wip)
1 parent b891bea commit f9db44f

File tree

4 files changed

+178
-153
lines changed

4 files changed

+178
-153
lines changed

src/platform/android/app/src/main/java/net/sourceforge/smallbasic/MainActivity.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -752,14 +752,14 @@ private void execScheme(final String data) {
752752
}
753753
}
754754

755-
private void execStream(final String line, InputStream inputStream) throws IOException {
755+
private void execStream(InputStream inputStream) throws IOException {
756756
File outputFile = new File(getInternalStorage(), WEB_BAS);
757757
BufferedWriter output = new BufferedWriter(new FileWriter(outputFile));
758758
Log.i(TAG, "execStream() entered");
759-
String nextLine = line;
760-
while (nextLine != null) {
761-
output.write(nextLine + "\n");
762-
nextLine = readLine(inputStream);
759+
String line = readLine(inputStream);
760+
while (line != null) {
761+
output.write(line + "\n");
762+
line = readLine(inputStream);
763763
}
764764
output.close();
765765
Log.i(TAG, "invoke runFile: " + outputFile.getAbsolutePath());
@@ -932,8 +932,8 @@ private void setupStorageEnvironment(boolean external) {
932932

933933
private class WebServerImpl extends WebServer {
934934
@Override
935-
protected void execStream(String line, InputStream inputStream) throws IOException {
936-
MainActivity.this.execStream(line, inputStream);
935+
protected void execStream(InputStream inputStream) throws IOException {
936+
MainActivity.this.execStream(inputStream);
937937
}
938938

939939
@Override
@@ -958,5 +958,10 @@ protected void log(String message, Exception exception) {
958958
protected void log(String message) {
959959
Log.i(TAG, message);
960960
}
961+
962+
@Override
963+
protected boolean saveFile(String fileName, String content) {
964+
return false;
965+
}
961966
};
962967
}

0 commit comments

Comments
 (0)