Browse Source

Fixed issue with nexus 7 and fixed alert dialogs to work correctly

Tim Newell 12 years ago
parent
commit
17f88b618c

+ 1 - 1
engine/compilers/android/.cproject

@@ -22,7 +22,7 @@
 					<folderInfo id="com.android.toolchain.gcc.1442582075.1056020003" name="/" resourcePath="">
 						<toolChain id="com.android.toolchain.gcc.1400756764" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
 							<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.1302199400" isAbstract="false" superClass="com.android.targetPlatform"/>
-							<builder arguments="" command="ndk-build" id="com.android.builder.1818800065" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
+							<builder arguments="NDK_DEBUG=1" command="ndk-build" id="com.android.builder.1818800065" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
 							<tool id="com.android.gcc.compiler.1014866906" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
 								<option id="com.android.gcc.option.includePath.100688008" superClass="com.android.gcc.option.includePath" valueType="includePath">
 									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Torque2D/jni/include/libpng}&quot;"/>

+ 1 - 1
engine/compilers/android/.project

@@ -19,7 +19,7 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildArguments</key>
-					<value></value>
+					<value>NDK_DEBUG=1</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildCommand</key>

+ 1 - 1
engine/compilers/android/AndroidManifest.xml

@@ -20,7 +20,7 @@
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
         android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-        android:hardwareAccelerated="true" android:hasCode="true">
+        android:hardwareAccelerated="true" android:hasCode="true" android:debuggable="true">
         <activity
             android:name="android.app.NativeActivity"
             android:label="@string/app_name"

+ 1 - 1
engine/compilers/android/jni/Application.mk

@@ -1,4 +1,4 @@
 APP_PLATFORM := android-10
 APP_STL := stlport_static
-APP_OPTIM := release
+APP_OPTIM := debug
 APP_ABI   := armeabi-v7a

+ 4 - 1
engine/compilers/android/src/com/garagegames/torque2d/FileWalker.java

@@ -73,7 +73,6 @@ public class FileWalker
 		    	dirPath = dirPath.substring(0,dirPath.length()-1);
 		   
 	    }
-	   
 		DumpDir2(context, dirPath);
 		
 		while (depth && dumpDirVec.size() > 0)
@@ -154,22 +153,26 @@ public class FileWalker
 		if (dir.endsWith("/"))
 	    	dir = dir.substring(0,dir.length()-1);
 	   
+		//Log.i("torque2d","path start: " + dir);
 		DumpDir(context, dir);
 		
 		while (depth && dumpDirVec.size() > 0)
 		{
 			String newdir = dumpDirVec.remove(0);
+			//Log.i("torque2d","newpath " + newdir);
 			DumpDir(context,newdir);
 		}
 		
 		int size = dumpPathVec.size();
 		if (size > 500)
 			size = 500;
+		//Log.i("torque2d","size " + size);
 		String[] retStringArray = new String[size];
 		int cnt = 0;
 		for(cnt = 0; cnt < size; cnt++)
 		{
 			String s = dumpPathVec.remove(0);
+			//Log.i("torque2d","file " + s);
 			retStringArray[cnt] = "/" + s;
 		}
 		Log.i("torque2d", "time in java: " + (System.currentTimeMillis() - time) );

+ 70 - 56
engine/compilers/android/src/com/garagegames/torque2d/T2DUtilities.java

@@ -18,7 +18,6 @@ public class T2DUtilities {
 	
 	public static void DisplayAlertOK(final Context context, final String title, final String message)
 	{
-		Log.i("torque2d", "DisplayAlertOK");
 		final Activity activity = (Activity)context;
 		activity.runOnUiThread(new Runnable() {			
 			@Override
@@ -29,7 +28,7 @@ public class T2DUtilities {
 					builder.setCancelable(false);
 					builder.setNeutralButton("OK", new DialogInterface.OnClickListener() {
 					           public void onClick(DialogInterface dialog, int id) {
-					                
+					        	   alert = null; 
 					           }
 					       });
 					AlertDialog alert = builder.create();
@@ -38,11 +37,12 @@ public class T2DUtilities {
 		});
 	}
 	
-	private static boolean retValue = false;
+	private static int retValue = -1;
+	private static AlertDialog alert = null;
 	
 	public static void DisplayAlertOKCancel(final Context context, final String title, final String message)
 	{
-		Log.i("torque2d", "DisplayAlertOKCancel");
+		retValue = -1;
 		final Activity activity = (Activity)context;
 		activity.runOnUiThread(new Runnable() {			
 			@Override
@@ -52,75 +52,89 @@ public class T2DUtilities {
 					builder.setTitle(title);
 					builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
 				           public void onClick(DialogInterface dialog, int id) {
-				                retValue = true;
+				                retValue = 1;
+				                alert = null;
 				           }
 				       });
 					builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
 				           public void onClick(DialogInterface dialog, int id) {
-				                retValue = false;
+				                retValue = 0;
+				                alert = null;
 				           }
 				       });
-					AlertDialog alert = builder.create();
+					alert = builder.create();
 					alert.show();
 				}
 		});
 	}
 	
-	public static boolean DisplayAlertRetry(Context context, String title, String message)
+	public static int CheckAlert()
 	{
-		AlertDialog.Builder builder = new AlertDialog.Builder(context);
-		builder.setMessage(message);
-		builder.setTitle(title);
-		builder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
-	           public void onClick(DialogInterface dialog, int id) {
-	                retValue = true;
-	           }
-	       });
-		builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
-	           public void onClick(DialogInterface dialog, int id) {
-	                retValue = false;
-	           }
-	       });
-		AlertDialog alert = builder.create();
-		alert.show();
+		if (alert == null && retValue == -1)
+			return -1;
+		
+		if (retValue == -1)
+			return -1;
 		
-		while(alert.isShowing())
-		{
-			try {
-				Thread.sleep(64);
-			} catch (InterruptedException e) {
-			}
-		}
+		if (alert != null && alert.isShowing())
+			return -1;
 		
 		return retValue;
 	}
 	
-	public static boolean DisplayAlertYesNo(Context context, String title, String message)
+	public static void DisplayAlertRetry(final Context context, final String title, final String message)
 	{
-		AlertDialog.Builder builder = new AlertDialog.Builder(context);
-		builder.setMessage(message);
-		builder.setTitle(title);
-		builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
-	           public void onClick(DialogInterface dialog, int id) {
-	                retValue = true;;
-	           }
-	       });
-		builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
-	           public void onClick(DialogInterface dialog, int id) {
-	                retValue = false;
-	           }
-	       });
-		AlertDialog alert = builder.create();
-		alert.show();
-		
-		while(alert.isShowing())
-		{
-			try {
-				Thread.sleep(64);
-			} catch (InterruptedException e) {
-			}
-		}
-		
-		return retValue;
+		retValue = -1;
+		final Activity activity = (Activity)context;
+		activity.runOnUiThread(new Runnable() {			
+			@Override
+				public void run() {
+					AlertDialog.Builder builder = new AlertDialog.Builder(context);
+					builder.setMessage(message);
+					builder.setTitle(title);
+					builder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
+				           public void onClick(DialogInterface dialog, int id) {
+				                retValue = 1;
+				                alert = null;
+				           }
+				       });
+					builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
+				           public void onClick(DialogInterface dialog, int id) {
+				                retValue = 0;
+				                alert = null;
+				           }
+				       });
+					AlertDialog alert = builder.create();
+					alert.show();
+				}
+		});
+	}
+	
+	public static void DisplayAlertYesNo(final Context context, final String title, final String message)
+	{
+		retValue = -1;
+		final Activity activity = (Activity)context;
+		activity.runOnUiThread(new Runnable() {			
+			@Override
+				public void run() {
+					AlertDialog.Builder builder = new AlertDialog.Builder(context);
+					builder.setMessage(message);
+					builder.setTitle(title);
+					builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
+				           public void onClick(DialogInterface dialog, int id) {
+				                retValue = 1;
+				                alert = null;
+				           }
+				       });
+					builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
+				           public void onClick(DialogInterface dialog, int id) {
+				                retValue = 0;
+				                alert = null;
+				           }
+				       });
+					AlertDialog alert = builder.create();
+					alert.show();
+				}
+		});
 	}
 }

+ 0 - 12
engine/source/platform/platformAssert.cc

@@ -178,15 +178,3 @@ ConsoleFunction( Assert, void, 3, 3, "(condition, message) - Fatal Script Assert
     AssertISV( dAtob(argv[1]), argv[2] );
 }
 
-ConsoleFunction(testAlertBox, void, 4, 4, "(title,message,retry)")
-{
-	if (dAtob(argv[3]) == true)
-	{
-		bool retry = Platform::AlertOKCancel(argv[1], argv[2]);
-		Con::printf("testAlertBox - retry = %d", retry);
-	}
-	else
-	{
-		Platform::AlertOK(argv[1], argv[2]);
-	}
-}

+ 33 - 10
engine/source/platformAndroid/AndroidAlerts.cpp

@@ -22,12 +22,11 @@
 #include "platformAndroid/platformAndroid.h"
 #include "platformAndroid/AndroidAlerts.h"
 
-//TODO: currently crashes so commented out
-
 extern void android_AlertOK(const char *title, const char *message);
-extern bool android_AlertOKCancel(const char *title, const char *message);
-extern bool android_AlertRetry(const char *title, const char *message);
-extern bool android_AlertYesNo(const char *title, const char *message);
+extern void android_AlertOKCancel(const char *title, const char *message);
+extern void android_AlertRetry(const char *title, const char *message);
+extern void android_AlertYesNo(const char *title, const char *message);
+extern int android_checkAlert();
 
 //-----------------------------------------------------------------------------
 void Platform::AlertOK(const char *windowTitle, const char *message)
@@ -38,20 +37,44 @@ void Platform::AlertOK(const char *windowTitle, const char *message)
 bool Platform::AlertOKCancel(const char *windowTitle, const char *message)
 {
 	android_AlertOKCancel(windowTitle, message);
-	return false;
+
+	int ret = -1;
+
+	while((ret = android_checkAlert()) == -1)
+	{
+		usleep(32);
+	}
+
+	return (ret == 1) ? true : false;
 }
 
 //-----------------------------------------------------------------------------
 bool Platform::AlertRetry(const char *windowTitle, const char *message)
 {//retry/cancel
 	
-	//return android_AlertRetry(windowTitle, message);
-	return false;
+	android_AlertRetry(windowTitle, message);
+
+	int ret = -1;
+
+	while((ret = android_checkAlert()) == -1)
+	{
+		usleep(32);
+	}
+
+	return (ret == 1) ? true : false;
 }
 
 //-----------------------------------------------------------------------------
 bool Platform::AlertYesNo(const char *windowTitle, const char *message)
 {
-	//return android_AlertYesNo(windowTitle, message);
-	return false;
+	android_AlertYesNo(windowTitle, message);
+
+	int ret = -1;
+
+	while((ret = android_checkAlert()) == -1)
+	{
+		usleep(32);
+	}
+
+	return (ret == 1) ? true : false;
 }

+ 79 - 64
engine/source/platformAndroid/T2DActivity.cpp

@@ -76,7 +76,6 @@ void ChangeVolume(bool up) {
     // Attaches the current thread to the JVM.
     jint lResult;
     jint lFlags = 0;
-    adprintf("JVM ChangeVolume");
     JavaVM* lJavaVM = platState.engine->app->activity->vm;
     JNIEnv* lJNIEnv = platState.engine->app->activity->env;
 
@@ -521,7 +520,6 @@ void _AndroidGetDeviceIPAddress(char* address) {
 	 // Attaches the current thread to the JVM.
 	 jint lResult;
 	 jint lFlags = 0;
-	 adprintf("JVM GetDeviceIP");
 	 JavaVM* lJavaVM = platState.engine->app->activity->vm;
 	 JNIEnv* lJNIEnv = platState.engine->app->activity->env;
 
@@ -785,7 +783,6 @@ void keepScreenOn() {
     // Attaches the current thread to the JVM.
     jint lResult;
     jint lFlags = 0;
-    adprintf("JVM KeepScreenOn");
     JavaVM* lJavaVM = platState.engine->app->activity->vm;
     JNIEnv* lJNIEnv = platState.engine->app->activity->env;
 
@@ -831,7 +828,6 @@ void T2DActivity::loadCacheDir() {
     // Attaches the current thread to the JVM.
     jint lResult;
     jint lFlags = 0;
-    adprintf("JVM loadCacheDir");
     JavaVM* lJavaVM = platState.engine->app->activity->vm;
     JNIEnv* lJNIEnv = platState.engine->app->activity->env;
 
@@ -871,7 +867,6 @@ void T2DActivity::enumerateFonts() {
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JVM enumerateFonts");
 	JavaVM* lJavaVM = platState.engine->app->activity->vm;
 	JNIEnv* lJNIEnv = platState.engine->app->activity->env;
 
@@ -908,7 +903,6 @@ void T2DActivity::dumpFontList() {
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JVM dumpFontList");
 	JavaVM* lJavaVM = platState.engine->app->activity->vm;
 	JNIEnv* lJNIEnv = platState.engine->app->activity->env;
 
@@ -945,7 +939,6 @@ void T2DActivity::getFontPath(const char* fontName, char* fontPath) {
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JVM getFontPath");
 	JavaVM* lJavaVM = platState.engine->app->activity->vm;
 	JNIEnv* lJNIEnv = platState.engine->app->activity->env;
 
@@ -1181,7 +1174,6 @@ bool android_DumpDirectoriesExtra(Vector<StringTableEntry> &directoryVector)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI dumpDirExtra");
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1250,7 +1242,6 @@ bool android_DumpDirectories(const char *basePath, const char *path, Vector<Stri
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI dumpDir");
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1341,7 +1332,6 @@ bool android_DumpPathExtra(Vector<Platform::FileInfo>& fileVector)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI dumpPathExtra");
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1464,7 +1454,6 @@ bool android_DumpPath(const char* dir, Vector<Platform::FileInfo>& fileVector, U
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI dumpPath");
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1477,7 +1466,7 @@ bool android_DumpPath(const char* dir, Vector<Platform::FileInfo>& fileVector, U
 	if (lResult == JNI_ERR) {
 		return false;
 	}
-	double time = timeGetTime();
+
 	// Retrieves NativeActivity.
 	jobject lNativeActivity = engine.app->activity->clazz;
 	jclass ClassNativeActivity = lJNIEnv->GetObjectClass(lNativeActivity);
@@ -1515,15 +1504,12 @@ bool android_DumpPath(const char* dir, Vector<Platform::FileInfo>& fileVector, U
 			rInfo.pFileName = StringTable->insert(fileName.c_str());
 			rInfo.fileSize  = fileSize;
 
-			if (strcmp(dir, "") == 0)
-			{
-				dumpPathBackup.increment();
-				Platform::FileInfo& rInfo2 = dumpPathBackup.last();
-				rInfo2.pFullPath = rInfo.pFullPath;
-				rInfo2.pFileName = rInfo.pFileName;
-				rInfo2.fileSize  = rInfo.fileSize;
+			dumpPathBackup.increment();
+			Platform::FileInfo& rInfo2 = dumpPathBackup.last();
+			rInfo2.pFullPath = rInfo.pFullPath;
+			rInfo2.pFileName = rInfo.pFileName;
+			rInfo2.fileSize  = rInfo.fileSize;
 
-			}
 		}
 		lJNIEnv->DeleteLocalRef(stringArray);
 		stringArray = NULL;
@@ -1555,7 +1541,7 @@ bool android_DumpPath(const char* dir, Vector<Platform::FileInfo>& fileVector, U
 		lJavaVM->DetachCurrentThread();
 		ret = false;
 	}
-	adprintf("time to parse paths: %g", timeGetTime() - time);
+
 	return ret;
 
 }
@@ -1565,7 +1551,7 @@ void android_InitDirList(const char* dir)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI InitDirList");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1606,7 +1592,7 @@ void android_GetNextDir(const char* pdir, char *dir)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI GetNextDir");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1657,7 +1643,7 @@ void android_GetNextFile(const char* pdir, char *file)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI GetNextFile");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1708,7 +1694,7 @@ bool android_IsFile(const char* path)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI ISFile");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1760,7 +1746,7 @@ bool android_IsDir(const char* path)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI ISDir");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1876,7 +1862,7 @@ bool Platform::openWebBrowser(const char *webAddress)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI openWeb");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1917,7 +1903,7 @@ void android_AlertOK(const char *title, const char *message)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI AlertOK");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1953,12 +1939,12 @@ void android_AlertOK(const char *title, const char *message)
 	lJavaVM->DetachCurrentThread();
 }
 
-bool android_AlertOKCancel(const char *title, const char *message)
+int android_checkAlert()
 {
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI AlertOKCancel");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -1969,7 +1955,49 @@ bool android_AlertOKCancel(const char *title, const char *message)
 
 	lResult=lJavaVM->AttachCurrentThread(&lJNIEnv, &lJavaVMAttachArgs);
 	if (lResult == JNI_ERR) {
-		return false;
+		return 0;
+	}
+
+	// Retrieves NativeActivity.
+	jobject lNativeActivity = engine.app->activity->clazz;
+	jclass ClassNativeActivity = lJNIEnv->GetObjectClass(lNativeActivity);
+
+	jmethodID getClassLoader = lJNIEnv->GetMethodID(ClassNativeActivity,"getClassLoader", "()Ljava/lang/ClassLoader;");
+	jobject cls = lJNIEnv->CallObjectMethod(lNativeActivity, getClassLoader);
+	jclass classLoader = lJNIEnv->FindClass("java/lang/ClassLoader");
+	jmethodID findClass = lJNIEnv->GetMethodID(classLoader, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;");
+	jstring strClassName = lJNIEnv->NewStringUTF("com/garagegames/torque2d/T2DUtilities");
+	jclass T2DUtilitiesClass = (jclass)lJNIEnv->CallObjectMethod(cls, findClass, strClassName);
+	jmethodID MethodT2DUtilities = lJNIEnv->GetStaticMethodID(T2DUtilitiesClass, "CheckAlert", "()I");
+	jint jret = lJNIEnv->CallStaticIntMethod(T2DUtilitiesClass, MethodT2DUtilities);
+
+	int ret = jret;
+
+	lJNIEnv->DeleteLocalRef(strClassName);
+
+	// Finished with the JVM.
+	lJavaVM->DetachCurrentThread();
+
+	return ret;
+}
+
+void android_AlertOKCancel(const char *title, const char *message)
+{
+	// Attaches the current thread to the JVM.
+	jint lResult;
+	jint lFlags = 0;
+
+	JavaVM* lJavaVM = engine.app->activity->vm;
+	JNIEnv* lJNIEnv = engine.app->activity->env;
+
+	JavaVMAttachArgs lJavaVMAttachArgs;
+	lJavaVMAttachArgs.version = JNI_VERSION_1_6;
+	lJavaVMAttachArgs.name = "NativeThread";
+	lJavaVMAttachArgs.group = NULL;
+
+	lResult=lJavaVM->AttachCurrentThread(&lJNIEnv, &lJavaVMAttachArgs);
+	if (lResult == JNI_ERR) {
+		return;
 	}
 
 	// Retrieves NativeActivity.
@@ -1991,21 +2019,16 @@ bool android_AlertOKCancel(const char *title, const char *message)
 	lJNIEnv->DeleteLocalRef(strTitle);
 	lJNIEnv->DeleteLocalRef(strMessage);
 
-	//TODO: return needs to come from popup
-	bool ret = true;
-
-		// Finished with the JVM.
+	// Finished with the JVM.
 	lJavaVM->DetachCurrentThread();
-
-	return ret;
 }
 
-bool android_AlertRetry(const char *title, const char *message)
+void android_AlertRetry(const char *title, const char *message)
 {
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI alertRetry");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2016,7 +2039,7 @@ bool android_AlertRetry(const char *title, const char *message)
 
 	lResult=lJavaVM->AttachCurrentThread(&lJNIEnv, &lJavaVMAttachArgs);
 	if (lResult == JNI_ERR) {
-		return false;
+		return;
 	}
 
 	// Retrieves NativeActivity.
@@ -2031,27 +2054,23 @@ bool android_AlertRetry(const char *title, const char *message)
 	jclass T2DUtilitiesClass = (jclass)lJNIEnv->CallObjectMethod(cls, findClass, strClassName);
 	jstring strTitle = lJNIEnv->NewStringUTF(title);
 	jstring strMessage = lJNIEnv->NewStringUTF(message);
-	jmethodID MethodT2DUtilities = lJNIEnv->GetStaticMethodID(T2DUtilitiesClass, "DisplayAlertRetry", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z");
-	jboolean jret = lJNIEnv->CallStaticBooleanMethod(T2DUtilitiesClass, MethodT2DUtilities, lNativeActivity, strTitle, strMessage);
+	jmethodID MethodT2DUtilities = lJNIEnv->GetStaticMethodID(T2DUtilitiesClass, "DisplayAlertRetry", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V");
+	lJNIEnv->CallStaticVoidMethod(T2DUtilitiesClass, MethodT2DUtilities, lNativeActivity, strTitle, strMessage);
 
 	lJNIEnv->DeleteLocalRef(strClassName);
 	lJNIEnv->DeleteLocalRef(strTitle);
 	lJNIEnv->DeleteLocalRef(strMessage);
 
-	bool ret = jret;
-
-		// Finished with the JVM.
+	// Finished with the JVM.
 	lJavaVM->DetachCurrentThread();
-
-	return ret;
 }
 
-bool android_AlertYesNo(const char *title, const char *message)
+void android_AlertYesNo(const char *title, const char *message)
 {
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI AlertYesNO");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2062,7 +2081,7 @@ bool android_AlertYesNo(const char *title, const char *message)
 
 	lResult=lJavaVM->AttachCurrentThread(&lJNIEnv, &lJavaVMAttachArgs);
 	if (lResult == JNI_ERR) {
-		return false;
+		return;
 	}
 
 	// Retrieves NativeActivity.
@@ -2077,19 +2096,15 @@ bool android_AlertYesNo(const char *title, const char *message)
 	jclass T2DUtilitiesClass = (jclass)lJNIEnv->CallObjectMethod(cls, findClass, strClassName);
 	jstring strTitle = lJNIEnv->NewStringUTF(title);
 	jstring strMessage = lJNIEnv->NewStringUTF(message);
-	jmethodID MethodT2DUtilities = lJNIEnv->GetStaticMethodID(T2DUtilitiesClass, "DisplayAlertYesNo", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z");
-	jboolean jret = lJNIEnv->CallStaticBooleanMethod(T2DUtilitiesClass, MethodT2DUtilities, lNativeActivity, strTitle, strMessage);
+	jmethodID MethodT2DUtilities = lJNIEnv->GetStaticMethodID(T2DUtilitiesClass, "DisplayAlertYesNo", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V");
+	lJNIEnv->CallStaticVoidMethod(T2DUtilitiesClass, MethodT2DUtilities, lNativeActivity, strTitle, strMessage);
 
 	lJNIEnv->DeleteLocalRef(strClassName);
 	lJNIEnv->DeleteLocalRef(strTitle);
 	lJNIEnv->DeleteLocalRef(strMessage);
 
-	bool ret = jret;
-
-		// Finished with the JVM.
+	// Finished with the JVM.
 	lJavaVM->DetachCurrentThread();
-
-	return ret;
 }
 
 void android_LoadMusicTrack( const char *mFilename )
@@ -2097,7 +2112,7 @@ void android_LoadMusicTrack( const char *mFilename )
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI LoadMusic");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2137,7 +2152,7 @@ void android_UnLoadMusicTrack()
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI UnloadMusic");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2175,7 +2190,7 @@ bool android_isMusicTrackPlaying()
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI isMusicPLaying");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2217,7 +2232,7 @@ void android_StartMusicTrack()
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI StartMusic");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2255,7 +2270,7 @@ void android_StopMusicTrack()
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI stopMusic");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2293,7 +2308,7 @@ void android_setMusicTrackVolume(F32 volume)
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JNI setMusicVol");
+
 	JavaVM* lJavaVM = engine.app->activity->vm;
 	JNIEnv* lJNIEnv = engine.app->activity->env;
 
@@ -2333,7 +2348,7 @@ ConsoleFunction(doDeviceVibrate, void, 1, 1, "Makes the device do a quick vibrat
 	// Attaches the current thread to the JVM.
 	jint lResult;
 	jint lFlags = 0;
-	adprintf("JVM DeviceVibrate");
+
 	JavaVM* lJavaVM = platState.engine->app->activity->vm;
 	JNIEnv* lJNIEnv = platState.engine->app->activity->env;