Skip to content

Commit c2fcba0

Browse files
committed
add android imports
1 parent 5a4067a commit c2fcba0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/processing/mode/android/AndroidPreprocessor.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ protected int writeImports(final PrintWriter out,
204204
final List<String> codeFolderImports) {
205205
out.println("package " + packageName + ";");
206206
out.println();
207-
// add two lines for the package above
208-
return 2 + super.writeImports(out, programImports, codeFolderImports);
207+
int count = 2;
208+
count += super.writeImports(out, programImports, codeFolderImports);
209+
count += writeImportList(out, getAndroidImports());
210+
return count;
209211
}
210212

211213
/*
@@ -302,4 +304,10 @@ public String[] getDefaultImports() {
302304
};
303305
}
304306
*/
307+
308+
public String[] getAndroidImports() {
309+
return new String[] {
310+
"processing.android.ServiceEngine"
311+
};
312+
}
305313
}

0 commit comments

Comments
 (0)