diff options
| author | The Fuzzy Riolu <[email protected]> | 2018-03-12 11:52:38 -0400 |
|---|---|---|
| committer | The Fuzzy Riolu <[email protected]> | 2018-03-12 12:02:33 -0400 |
| commit | 40d01342d00c57dce5069e53a455db048a2967d5 (patch) | |
| tree | 99e64bed61317a564253e456e2aa45fba3c0c6ec /WatercolorGames.Pong/obj/Debug/android/src/mono/MonoRuntimeProvider.java | |
| parent | cdb0da6c34228a4034dbe179dc268aaded532619 (diff) | |
| download | shiftos-pong-master.tar.gz shiftos-pong-master.tar.bz2 shiftos-pong-master.zip | |
Diffstat (limited to 'WatercolorGames.Pong/obj/Debug/android/src/mono/MonoRuntimeProvider.java')
| -rw-r--r-- | WatercolorGames.Pong/obj/Debug/android/src/mono/MonoRuntimeProvider.java | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/WatercolorGames.Pong/obj/Debug/android/src/mono/MonoRuntimeProvider.java b/WatercolorGames.Pong/obj/Debug/android/src/mono/MonoRuntimeProvider.java new file mode 100644 index 0000000..c006006 --- /dev/null +++ b/WatercolorGames.Pong/obj/Debug/android/src/mono/MonoRuntimeProvider.java @@ -0,0 +1,83 @@ +package mono; + +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 {{{ + android.content.pm.ApplicationInfo apiInfo = null; + + String platformPackage = mono.MonoPackageManager.getApiPackageName (); + if (platformPackage != null) { + Throwable t = null; + try { + apiInfo = context.getPackageManager ().getApplicationInfo (platformPackage, 0); + } catch (android.content.pm.PackageManager.NameNotFoundException e) { + // ignore + } + if (apiInfo == null) { + try { + apiInfo = context.getPackageManager ().getApplicationInfo ("Xamarin.Android.Platform", 0); + } catch (android.content.pm.PackageManager.NameNotFoundException e) { + t = e; + } + } + if (apiInfo == null) + throw new RuntimeException ("Unable to find application " + platformPackage + " or Xamarin.Android.Platform!", t); + } + try { + android.content.pm.ApplicationInfo runtimeInfo = context.getPackageManager ().getApplicationInfo ("Mono.Android.DebugRuntime", 0); + mono.MonoPackageManager.LoadApplication (context, runtimeInfo, + apiInfo != null + ? new String[]{runtimeInfo.sourceDir, apiInfo.sourceDir, context.getApplicationInfo ().sourceDir} + : new String[]{runtimeInfo.sourceDir, context.getApplicationInfo ().sourceDir}); + } catch (android.content.pm.PackageManager.NameNotFoundException e) { + throw new RuntimeException ("Unable to find application Mono.Android.DebugRuntime!", e); + } + // }}} + 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."); + } +} + |
