aboutsummaryrefslogtreecommitdiff
path: root/WatercolorGames.Pong/obj/Release/android/src/mono
diff options
context:
space:
mode:
authorThe Fuzzy Riolu <[email protected]>2018-03-12 11:52:38 -0400
committerThe Fuzzy Riolu <[email protected]>2018-03-12 12:02:33 -0400
commit40d01342d00c57dce5069e53a455db048a2967d5 (patch)
tree99e64bed61317a564253e456e2aa45fba3c0c6ec /WatercolorGames.Pong/obj/Release/android/src/mono
parentcdb0da6c34228a4034dbe179dc268aaded532619 (diff)
downloadshiftos-pong-master.tar.gz
shiftos-pong-master.tar.bz2
shiftos-pong-master.zip
Initial commitHEADmaster
Diffstat (limited to 'WatercolorGames.Pong/obj/Release/android/src/mono')
-rw-r--r--WatercolorGames.Pong/obj/Release/android/src/mono/MonoPackageManager.java115
-rw-r--r--WatercolorGames.Pong/obj/Release/android/src/mono/MonoRuntimeProvider.java57
-rw-r--r--WatercolorGames.Pong/obj/Release/android/src/mono/android/app/ApplicationRegistration.java10
-rw-r--r--WatercolorGames.Pong/obj/Release/android/src/mono/android/app/NotifyTimeZoneChanges.java8
4 files changed, 190 insertions, 0 deletions
diff --git a/WatercolorGames.Pong/obj/Release/android/src/mono/MonoPackageManager.java b/WatercolorGames.Pong/obj/Release/android/src/mono/MonoPackageManager.java
new file mode 100644
index 0000000..613e11f
--- /dev/null
+++ b/WatercolorGames.Pong/obj/Release/android/src/mono/MonoPackageManager.java
@@ -0,0 +1,115 @@
+package mono;
+
+import java.io.*;
+import java.lang.String;
+import java.util.Locale;
+import java.util.HashSet;
+import java.util.zip.*;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.res.AssetManager;
+import android.util.Log;
+import mono.android.Runtime;
+
+public class MonoPackageManager {
+
+ static Object lock = new Object ();
+ static boolean initialized;
+
+ static android.content.Context Context;
+
+ public static void LoadApplication (Context context, ApplicationInfo runtimePackage, String[] apks)
+ {
+ synchronized (lock) {
+ if (context instanceof android.app.Application) {
+ Context = context;
+ }
+ if (!initialized) {
+ android.content.IntentFilter timezoneChangedFilter = new android.content.IntentFilter (
+ android.content.Intent.ACTION_TIMEZONE_CHANGED
+ );
+ context.registerReceiver (new mono.android.app.NotifyTimeZoneChanges (), timezoneChangedFilter);
+
+ System.loadLibrary("monodroid");
+ Locale locale = Locale.getDefault ();
+ String language = locale.getLanguage () + "-" + locale.getCountry ();
+ String filesDir = context.getFilesDir ().getAbsolutePath ();
+ String cacheDir = context.getCacheDir ().getAbsolutePath ();
+ String dataDir = getNativeLibraryPath (context);
+ ClassLoader loader = context.getClassLoader ();
+ java.io.File external0 = android.os.Environment.getExternalStorageDirectory ();
+ String externalDir = new java.io.File (
+ external0,
+ "Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath ();
+ String externalLegacyDir = new java.io.File (
+ external0,
+ "../legacy/Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath ();
+
+ Runtime.init (
+ language,
+ apks,
+ getNativeLibraryPath (runtimePackage),
+ new String[]{
+ filesDir,
+ cacheDir,
+ dataDir,
+ },
+ loader,
+ new String[] {
+ externalDir,
+ externalLegacyDir
+ },
+ MonoPackageManager_Resources.Assemblies,
+ context.getPackageName ());
+
+ mono.android.app.ApplicationRegistration.registerApplications ();
+
+ initialized = true;
+ }
+ }
+ }
+
+ public static void setContext (Context context)
+ {
+ // Ignore; vestigial
+ }
+
+ static String getNativeLibraryPath (Context context)
+ {
+ return getNativeLibraryPath (context.getApplicationInfo ());
+ }
+
+ static String getNativeLibraryPath (ApplicationInfo ainfo)
+ {
+ if (android.os.Build.VERSION.SDK_INT >= 9)
+ return ainfo.nativeLibraryDir;
+ return ainfo.dataDir + "/lib";
+ }
+
+ public static String[] getAssemblies ()
+ {
+ return MonoPackageManager_Resources.Assemblies;
+ }
+
+ public static String[] getDependencies ()
+ {
+ return MonoPackageManager_Resources.Dependencies;
+ }
+
+ public static String getApiPackageName ()
+ {
+ return MonoPackageManager_Resources.ApiPackageName;
+ }
+}
+
+class MonoPackageManager_Resources {
+ public static final String[] Assemblies = new String[]{
+ /* We need to ensure that "WatercolorGames.Pong.dll" comes first in this list. */
+ "WatercolorGames.Pong.dll",
+ "MonoGame.Framework.dll",
+ };
+ public static final String[] Dependencies = new String[]{
+ };
+ public static final String ApiPackageName = null;
+}
diff --git a/WatercolorGames.Pong/obj/Release/android/src/mono/MonoRuntimeProvider.java b/WatercolorGames.Pong/obj/Release/android/src/mono/MonoRuntimeProvider.java
new file mode 100644
index 0000000..3543307
--- /dev/null
+++ b/WatercolorGames.Pong/obj/Release/android/src/mono/MonoRuntimeProvider.java
@@ -0,0 +1,57 @@
+package mono;
+
+import android.util.Log;
+
+public class MonoRuntimeProvider
+ extends android.content.ContentProvider
+{
+ public MonoRuntimeProvider ()
+ {
+ }
+
+ @Override
+ public boolean onCreate ()
+ {
+ return true;
+ }
+
+ @Override
+ public void attachInfo (android.content.Context context, android.content.pm.ProviderInfo info)
+ {
+ // Mono Runtime Initialization {{{
+ mono.MonoPackageManager.LoadApplication (context, context.getApplicationInfo (), new String[]{context.getApplicationInfo ().sourceDir});
+ // }}}
+ super.attachInfo (context, info);
+ }
+
+ @Override
+ public android.database.Cursor query (android.net.Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
+ {
+ throw new RuntimeException ("This operation is not supported.");
+ }
+
+ @Override
+ public String getType (android.net.Uri uri)
+ {
+ throw new RuntimeException ("This operation is not supported.");
+ }
+
+ @Override
+ public android.net.Uri insert (android.net.Uri uri, android.content.ContentValues initialValues)
+ {
+ throw new RuntimeException ("This operation is not supported.");
+ }
+
+ @Override
+ public int delete (android.net.Uri uri, String where, String[] whereArgs)
+ {
+ throw new RuntimeException ("This operation is not supported.");
+ }
+
+ @Override
+ public int update (android.net.Uri uri, android.content.ContentValues values, String where, String[] whereArgs)
+ {
+ throw new RuntimeException ("This operation is not supported.");
+ }
+}
+
diff --git a/WatercolorGames.Pong/obj/Release/android/src/mono/android/app/ApplicationRegistration.java b/WatercolorGames.Pong/obj/Release/android/src/mono/android/app/ApplicationRegistration.java
new file mode 100644
index 0000000..b150f3d
--- /dev/null
+++ b/WatercolorGames.Pong/obj/Release/android/src/mono/android/app/ApplicationRegistration.java
@@ -0,0 +1,10 @@
+package mono.android.app;
+
+public class ApplicationRegistration {
+
+ public static void registerApplications ()
+ {
+ // Application and Instrumentation ACWs must be registered first.
+
+ }
+}
diff --git a/WatercolorGames.Pong/obj/Release/android/src/mono/android/app/NotifyTimeZoneChanges.java b/WatercolorGames.Pong/obj/Release/android/src/mono/android/app/NotifyTimeZoneChanges.java
new file mode 100644
index 0000000..21896a0
--- /dev/null
+++ b/WatercolorGames.Pong/obj/Release/android/src/mono/android/app/NotifyTimeZoneChanges.java
@@ -0,0 +1,8 @@
+package mono.android.app;
+
+public class NotifyTimeZoneChanges extends android.content.BroadcastReceiver {
+ @Override
+ public void onReceive (android.content.Context context, android.content.Intent intent) {
+ mono.android.Runtime.notifyTimeZoneChanged ();
+ }
+}