diff --git a/src/Mono.Android/Java.Interop/TypeManager.cs b/src/Mono.Android/Java.Interop/TypeManager.cs index 2a8be4c2f81..cce37dde0ba 100644 --- a/src/Mono.Android/Java.Interop/TypeManager.cs +++ b/src/Mono.Android/Java.Interop/TypeManager.cs @@ -218,29 +218,9 @@ static Exception CreateJavaLocationException () if (type != null) return type; - if (!JNIEnv.IsRunningOnDesktop) { - // Miss message is logged in the native runtime - if (JNIEnv.LogTypemapMissStackTrace) - JNIEnv.LogTypemapTrace (new System.Diagnostics.StackTrace (true)); - return null; - } + if (!JNIEnv.IsRunningOnDesktop && JNIEnv.LogTypemapMissStackTrace) + JNIEnv.LogTypemapTrace (new System.Diagnostics.StackTrace (true)); - __TypeRegistrations.RegisterPackages (); - - type = null; - int ls = class_name.LastIndexOf ('/'); - var package = ls >= 0 ? class_name.Substring (0, ls) : ""; - if (packageLookup.TryGetValue (package, out var mappers)) { - foreach (Converter c in mappers) { - type = c (class_name); - if (type == null) - continue; - return type; - } - } - if ((type = Type.GetType (JavaNativeTypeManager.ToCliType (class_name))) != null) { - return type; - } return null; } @@ -353,36 +333,14 @@ public static void RegisterType (string java_class, Type t) } } - static Dictionary>> packageLookup = new Dictionary>> (); - public static void RegisterPackage (string package, Converter lookup) { - lock (packageLookup) { - if (!packageLookup.TryGetValue (package, out var lookups)) - packageLookup.Add (package, lookups = new List> ()); - lookups.Add (lookup); - } + throw new NotImplementedException (); } public static void RegisterPackages (string[] packages, Converter[] lookups) { - if (packages == null) - throw new ArgumentNullException ("packages"); - if (lookups == null) - throw new ArgumentNullException ("lookups"); - if (packages.Length != lookups.Length) - throw new ArgumentException ("`packages` and `lookups` arrays must have same number of elements."); - - lock (packageLookup) { - for (int i = 0; i < packages.Length; ++i) { - string package = packages [i]; - var lookup = lookups [i]; - - if (!packageLookup.TryGetValue (package, out var _lookups)) - packageLookup.Add (package, _lookups = new List> ()); - _lookups.Add (lookup); - } - } + throw new NotImplementedException (); } [Register ("mono/android/TypeManager", DoNotGenerateAcw = true)] diff --git a/src/Mono.Android/Mono.Android.csproj b/src/Mono.Android/Mono.Android.csproj index 21378536fec..e3faf6cc7ea 100644 --- a/src/Mono.Android/Mono.Android.csproj +++ b/src/Mono.Android/Mono.Android.csproj @@ -120,7 +120,11 @@ - + + + + + diff --git a/src/Mono.Android/Mono.Android.targets b/src/Mono.Android/Mono.Android.targets index 98364ae33dd..c2668253eb4 100644 --- a/src/Mono.Android/Mono.Android.targets +++ b/src/Mono.Android/Mono.Android.targets @@ -167,7 +167,7 @@ IgnoreStandardErrorWarningFormat="True" /> - +