Cleanup, compile fix

This commit is contained in:
Joshua Granick
2014-04-16 15:39:46 -07:00
parent 823d409508
commit 97dc9df075

View File

@@ -98,7 +98,6 @@ public class GameActivity extends Activity implements SensorEventListener {
requestWindowFeature (Window.FEATURE_NO_TITLE); requestWindowFeature (Window.FEATURE_NO_TITLE);
::if WIN_FULLSCREEN:: ::if WIN_FULLSCREEN::
::if (ANDROID_TARGET_SDK_VERSION < 19):: ::if (ANDROID_TARGET_SDK_VERSION < 19)::
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN
@@ -106,13 +105,9 @@ public class GameActivity extends Activity implements SensorEventListener {
::end:: ::end::
::end:: ::end::
metrics = new DisplayMetrics (); metrics = new DisplayMetrics ();
getWindowManager ().getDefaultDisplay ().getMetrics (metrics); getWindowManager ().getDefaultDisplay ().getMetrics (metrics);
Log.d ("lime", "mMainView is NULL");
::foreach ndlls:: ::foreach ndlls::
System.loadLibrary ("::name::"); System.loadLibrary ("::name::");
::end:: ::end::
@@ -132,11 +127,11 @@ public class GameActivity extends Activity implements SensorEventListener {
} }
Extension.PACKAGE_NAME = getApplicationContext().getPackageName(); Extension.packageName = getApplicationContext ().getPackageName ();
if (extensions == null) { if (extensions == null) {
extensions = new ArrayList<Extension>(); extensions = new ArrayList<Extension> ();
::if (ANDROID_EXTENSIONS != null)::::foreach ANDROID_EXTENSIONS:: ::if (ANDROID_EXTENSIONS != null)::::foreach ANDROID_EXTENSIONS::
extensions.add (new ::__current__:: ());::end::::end:: extensions.add (new ::__current__:: ());::end::::end::
@@ -400,19 +395,6 @@ public class GameActivity extends Activity implements SensorEventListener {
}
@Override
protected void onNewIntent(final Intent intent) {
for (Extension extension : extensions) {
extension.onNewIntent (intent);
}
super.onNewIntent (intent);
}
@Override
public void onBackPressed() {
} }
@@ -449,6 +431,32 @@ public class GameActivity extends Activity implements SensorEventListener {
} }
@Override public void onLowMemory () {
super.onLowMemory ();
for (Extension extension : extensions) {
extension.onLowMemory ();
}
}
@Override protected void onNewIntent (final Intent intent) {
for (Extension extension : extensions) {
extension.onNewIntent (intent);
}
super.onNewIntent (intent);
}
@Override protected void onPause () { @Override protected void onPause () {
doPause (); doPause ();
@@ -490,31 +498,6 @@ public class GameActivity extends Activity implements SensorEventListener {
} }
@Override public void onLowMemory () {
super.onLowMemory ();
for (Extension extension : extensions) {
extension.onLowMemory ();
}
}
@Override public void onTrimMemory (int level) {
super.onTrimMemory (level);
for (Extension extension : extensions) {
extension.onTrimMemory (level);
}
}
@Override public void onSensorChanged (SensorEvent event) { @Override public void onSensorChanged (SensorEvent event) {
loadNewSensorData (event); loadNewSensorData (event);
@@ -571,6 +554,19 @@ public class GameActivity extends Activity implements SensorEventListener {
} }
@Override public void onTrimMemory (int level) {
super.onTrimMemory (level);
for (Extension extension : extensions) {
extension.onTrimMemory (level);
}
}
public static void popView () { public static void popView () {
activity.setContentView (activity.mView); activity.setContentView (activity.mView);