Skip to content

Commit 8eaccf1

Browse files
committed
use activity.finish() instead of System.exit()
1 parent 5fa6299 commit 8eaccf1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/src/processing/core/PApplet.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3335,7 +3335,8 @@ public void exit() {
33353335

33363336
void exit2() {
33373337
try {
3338-
System.exit(0);
3338+
activity.finish();
3339+
// System.exit(0);
33393340
} catch (SecurityException e) {
33403341
// don't care about applet security exceptions
33413342
}
@@ -3364,11 +3365,11 @@ final public void dispose() {
33643365
// https://github.com/processing/processing-android/issues/213#issuecomment-217348480
33653366
surfaceView.getHolder().getSurface().release();
33663367
surfaceView = null;
3367-
3368+
33683369
// In API level 21 you can do
33693370
// activity.releaseInstance();
33703371
// to ask the app to free up its memory.
3371-
3372+
33723373
activity = null;
33733374
}
33743375

0 commit comments

Comments
 (0)