From 0777a18a84ea829dd19d311a378ae3ae1db7d338 Mon Sep 17 00:00:00 2001 From: iwgeric Date: Sat, 24 Jan 2015 11:05:20 -0500 Subject: [PATCH] Deprecate screenOrientation from AndroidHarness. Users should set the AndroidManifest.xml property for screen orientation instead. Removes app start, end, restart if the MainActivity.screenOrientation doesn't match the current device orientation. Setting the value in AndroidManifest.xml sets the device orientation before the app starts. --- .../main/java/com/jme3/app/AndroidHarness.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/jme3-android/src/main/java/com/jme3/app/AndroidHarness.java b/jme3-android/src/main/java/com/jme3/app/AndroidHarness.java index 7ce66ae98..1d2835bc3 100644 --- a/jme3-android/src/main/java/com/jme3/app/AndroidHarness.java +++ b/jme3-android/src/main/java/com/jme3/app/AndroidHarness.java @@ -166,17 +166,14 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt * splashPicID = 0, then no splash screen will be displayed. */ protected int splashPicID = 0; + /** - * Set the screen orientation, default is SENSOR - * ActivityInfo.SCREEN_ORIENTATION_* constants package - * android.content.pm.ActivityInfo - * - * SCREEN_ORIENTATION_UNSPECIFIED SCREEN_ORIENTATION_LANDSCAPE - * SCREEN_ORIENTATION_PORTRAIT SCREEN_ORIENTATION_USER - * SCREEN_ORIENTATION_BEHIND SCREEN_ORIENTATION_SENSOR (default) - * SCREEN_ORIENTATION_NOSENSOR + * No longer used - Use the android:screenOrientation declaration in + * the AndroidManifest.xml file. */ + @Deprecated protected int screenOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR; + protected OGLESContext ctx; protected GLSurfaceView view = null; protected boolean isGLThreadPaused = true; @@ -216,8 +213,6 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt } } - setRequestedOrientation(screenOrientation); - final DataObject data = (DataObject) getLastNonConfigurationInstance(); if (data != null) { logger.log(Level.FINE, "Using Retained App");