Skip to content

Commit 1dd4cc2

Browse files
committed
keep getActivity() for compatibility with older code
1 parent 2fc53fb commit 1dd4cc2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/processing/core/PApplet.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.util.regex.*;
3434
import java.util.zip.*;
3535

36+
import android.app.Activity;
3637
import android.content.*;
3738
import android.content.pm.PackageManager;
3839
import android.content.res.AssetManager;
@@ -467,6 +468,11 @@ public PSurface getSurface() {
467468
}
468469

469470

471+
public Activity getActivity() {
472+
return surface.getActivity();
473+
}
474+
475+
470476
public void initSurface(AppComponent component, SurfaceHolder holder) {
471477
parentLayout = -1;
472478
initSurface(null, null, null, component, holder);

0 commit comments

Comments
 (0)