Explorar el Código

Remove deprecated fields from AndroidHarness

shadowislord hace 11 años
padre
commit
b7a4faebf0

+ 9 - 63
jme3-android/src/main/java/com/jme3/app/AndroidHarness.java

@@ -54,18 +54,6 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
      */
     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.
      * (default = 24)
@@ -102,20 +90,6 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
      */
     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.
      * <p>
@@ -254,44 +228,16 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
             settings.setEmulateMouse(mouseEventsEnabled);
             settings.setEmulateMouseFlipAxis(mouseEventsInvertX, mouseEventsInvertY);
             settings.setUseJoysticks(joystickEventsEnabled);
-            if (eglConfigType == null) {
-                logger.log(Level.FINE, "using new appsettings for eglConfig");
-                settings.setBitsPerPixel(eglBitsPerPixel);
-                settings.setAlphaBits(eglAlphaBits);
-                settings.setDepthBits(eglDepthBits);
-                settings.setSamples(eglSamples);
-                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.setBitsPerPixel(eglBitsPerPixel);
+            settings.setAlphaBits(eglAlphaBits);
+            settings.setDepthBits(eglDepthBits);
+            settings.setSamples(eglSamples);
+            settings.setStencilBits(eglStencilBits);
+            
             settings.setResolution(disp.getWidth(), disp.getHeight());
             settings.setAudioRenderer(audioRendererType);
 
-
             // Create application instance
             try {
                 if (app == null) {
@@ -456,8 +402,8 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt
         }
         if (splashPicID != 0) {
             FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
-                    LayoutParams.FILL_PARENT,
-                    LayoutParams.FILL_PARENT,
+                    LayoutParams.MATCH_PARENT,
+                    LayoutParams.MATCH_PARENT,
                     Gravity.CENTER);
 
             frameLayout = new FrameLayout(this);

+ 0 - 27
jme3-android/src/main/java/jme3test/android/DemoAndroidHarness.java

@@ -3,7 +3,6 @@ package jme3test.android;
 import android.content.pm.ActivityInfo;
 import android.os.Bundle;
 import com.jme3.app.AndroidHarness;
-import com.jme3.system.android.AndroidConfigChooser.ConfigType;
 
 public class DemoAndroidHarness extends AndroidHarness
 {
@@ -17,32 +16,6 @@ public class DemoAndroidHarness extends AndroidHarness
         //Next extract the values using the key as
         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?";
         exitDialogMessage = "Press Yes";