Skip to content

Commit

Permalink
Converted Application to an interface and renamed the old Application to
Browse files Browse the repository at this point in the history
LegacyApplication.  This is a breaking change for any class extending Application
directly.
And regardless, if you refer to Application then you will need to clean build
your app... and any of your dependencies that also refer to Application.  Basically,
anything using an AppState will need to be clean built against the next alpha.
  • Loading branch information
pspeed42 committed Mar 28, 2016
1 parent ab6fb03 commit 3c56afe
Show file tree
Hide file tree
Showing 14 changed files with 922 additions and 675 deletions.
6 changes: 3 additions & 3 deletions jme3-android/src/main/java/com/jme3/app/AndroidHarness.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
/**
* The jme3 application object
*/
protected Application app = null;
protected LegacyApplication app = null;

/**
* Sets the desired RGB size for the surfaceview. 16 = RGB565, 24 = RGB888.
Expand Down Expand Up @@ -178,7 +178,7 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
private boolean inConfigChange = false;

private class DataObject {
protected Application app = null;
protected LegacyApplication app = null;
}

@Override
Expand Down Expand Up @@ -241,7 +241,7 @@ public void onCreate(Bundle savedInstanceState) {
try {
if (app == null) {
@SuppressWarnings("unchecked")
Class<? extends Application> clazz = (Class<? extends Application>) Class.forName(appClass);
Class<? extends LegacyApplication> clazz = (Class<? extends LegacyApplication>) Class.forName(appClass);
app = clazz.newInstance();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public class AndroidHarnessFragment extends Fragment implements
protected ImageView splashImageView = null;
final private String ESCAPE_EVENT = "TouchEscape";
private boolean firstDrawFrame = true;
private Application app = null;
private LegacyApplication app = null;
private int viewWidth = 0;
private int viewHeight = 0;

Expand Down Expand Up @@ -258,7 +258,7 @@ public void onCreate(Bundle savedInstanceState) {
try {
if (app == null) {
@SuppressWarnings("unchecked")
Class<? extends Application> clazz = (Class<? extends Application>) Class.forName(appClass);
Class<? extends LegacyApplication> clazz = (Class<? extends LegacyApplication>) Class.forName(appClass);
app = clazz.newInstance();
}

Expand Down
Loading

2 comments on commit 3c56afe

@phr00t
Copy link
Contributor

@phr00t phr00t commented on 3c56afe Mar 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LegacyApplication sounds like something that is old & will be deprecated. Is that the case? If so, what will it be replaced by?

@pspeed42
Copy link
Contributor Author

@pspeed42 pspeed42 commented on 3c56afe Mar 28, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.