Remove deprecated fields from AndroidHarness

experimental
shadowislord 10 years ago
parent bbd6c613f0
commit b7a4faebf0
  1. 72
      jme3-android/src/main/java/com/jme3/app/AndroidHarness.java
  2. 27
      jme3-android/src/main/java/jme3test/android/DemoAndroidHarness.java

@ -54,18 +54,6 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
*/ */
protected Application app = null; protected Application app = null;
/**
* ConfigType.FASTEST is RGB565, GLSurfaceView default ConfigType.BEST is
* RGBA8888 or better if supported by the hardware
* @deprecated ConfigType has been deprecated. AppSettings are now used
* to determine the desired configuration to match how LWJGL is implemented.
* Use eglBitsPerPixel, eglAlphaBits, eglDepthBits, eglStencilBits in MainActivity to
* override the default values
* (default values: RGB888, 0 alpha bits, 16 bit depth, 0 stencil bits)
*/
@Deprecated
protected ConfigType eglConfigType = null;
/** /**
* Sets the desired RGB size for the surfaceview. 16 = RGB565, 24 = RGB888. * Sets the desired RGB size for the surfaceview. 16 = RGB565, 24 = RGB888.
* (default = 24) * (default = 24)
@ -102,20 +90,6 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
*/ */
protected int eglStencilBits = 0; protected int eglStencilBits = 0;
/**
* If true all valid and not valid egl configs are logged
* @deprecated this has no use
*/
@Deprecated
protected boolean eglConfigVerboseLogging = false;
/**
* set to 2, 4 to enable multisampling.
* @deprecated Use eglSamples
*/
@Deprecated
protected int antiAliasingSamples = 0;
/** /**
* Sets the type of Audio Renderer to be used. * Sets the type of Audio Renderer to be used.
* <p> * <p>
@ -254,44 +228,16 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
settings.setEmulateMouse(mouseEventsEnabled); settings.setEmulateMouse(mouseEventsEnabled);
settings.setEmulateMouseFlipAxis(mouseEventsInvertX, mouseEventsInvertY); settings.setEmulateMouseFlipAxis(mouseEventsInvertX, mouseEventsInvertY);
settings.setUseJoysticks(joystickEventsEnabled); settings.setUseJoysticks(joystickEventsEnabled);
if (eglConfigType == null) {
logger.log(Level.FINE, "using new appsettings for eglConfig"); settings.setBitsPerPixel(eglBitsPerPixel);
settings.setBitsPerPixel(eglBitsPerPixel); settings.setAlphaBits(eglAlphaBits);
settings.setAlphaBits(eglAlphaBits); settings.setDepthBits(eglDepthBits);
settings.setDepthBits(eglDepthBits); settings.setSamples(eglSamples);
settings.setSamples(eglSamples); settings.setStencilBits(eglStencilBits);
settings.setStencilBits(eglStencilBits);
} else {
logger.log(Level.FINE, "using old eglConfigType {0} for eglConfig", eglConfigType);
switch (eglConfigType) {
case BEST:
settings.setBitsPerPixel(24);
settings.setAlphaBits(0);
settings.setDepthBits(16);
settings.setStencilBits(0);
break;
case FASTEST:
case LEGACY:
settings.setBitsPerPixel(16);
settings.setAlphaBits(0);
settings.setDepthBits(16);
settings.setStencilBits(0);
break;
case BEST_TRANSLUCENT:
settings.setBitsPerPixel(24);
settings.setAlphaBits(8);
settings.setDepthBits(16);
settings.setStencilBits(0);
break;
default:
throw new IllegalArgumentException("Invalid eglConfigType");
}
settings.setSamples(antiAliasingSamples);
}
settings.setResolution(disp.getWidth(), disp.getHeight()); settings.setResolution(disp.getWidth(), disp.getHeight());
settings.setAudioRenderer(audioRendererType); settings.setAudioRenderer(audioRendererType);
// Create application instance // Create application instance
try { try {
if (app == null) { if (app == null) {
@ -456,8 +402,8 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
} }
if (splashPicID != 0) { if (splashPicID != 0) {
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.MATCH_PARENT,
LayoutParams.FILL_PARENT, LayoutParams.MATCH_PARENT,
Gravity.CENTER); Gravity.CENTER);
frameLayout = new FrameLayout(this); frameLayout = new FrameLayout(this);

@ -3,7 +3,6 @@ package jme3test.android;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.os.Bundle; import android.os.Bundle;
import com.jme3.app.AndroidHarness; import com.jme3.app.AndroidHarness;
import com.jme3.system.android.AndroidConfigChooser.ConfigType;
public class DemoAndroidHarness extends AndroidHarness public class DemoAndroidHarness extends AndroidHarness
{ {
@ -17,32 +16,6 @@ public class DemoAndroidHarness extends AndroidHarness
//Next extract the values using the key as //Next extract the values using the key as
appClass = bundle.getString("APPCLASSNAME"); appClass = bundle.getString("APPCLASSNAME");
String eglConfig = bundle.getString("EGLCONFIG");
if (eglConfig.equals("Best"))
{
eglConfigType = ConfigType.BEST;
}
else if (eglConfig.equals("Legacy"))
{
eglConfigType = ConfigType.LEGACY;
}
else
{
eglConfigType = ConfigType.FASTEST;
}
if (bundle.getBoolean("VERBOSE"))
{
eglConfigVerboseLogging = true;
}
else
{
eglConfigVerboseLogging = false;
}
exitDialogTitle = "Close Demo?"; exitDialogTitle = "Close Demo?";
exitDialogMessage = "Press Yes"; exitDialogMessage = "Press Yes";

Loading…
Cancel
Save