Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion external/Java.Interop
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class FixAbstractMethodsStep :
#if ILLINK
public override void Initialize (LinkContext context, MarkContext markContext)
{
this.cache = context;
base.Initialize (context, markContext);
markContext.RegisterMarkTypeAction (type => ProcessType (type));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ public static ActivityAttribute FromTypeDefinition (TypeDefinition type)
return self;
}

internal XElement ToElement (IAssemblyResolver resolver, string packageName, int targetSdkVersion)
internal XElement ToElement (IAssemblyResolver resolver, string packageName, TypeDefinitionCache cache, int targetSdkVersion)
{
return mapping.ToElement (this, specified, packageName, type, resolver, targetSdkVersion);
return mapping.ToElement (this, specified, packageName, cache, type, resolver, targetSdkVersion);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ partial class ApplicationAttribute {
"BackupAgent",
"backupAgent",
(self, value) => self._BackupAgent = (string) value,
(self, p, r) => {
(self, p, r, cache) => {
var typeDef = ManifestDocumentElement.ResolveType (self._BackupAgent, p, r);

if (!typeDef.IsSubclassOf ("Android.App.Backup.BackupAgent"))
if (!typeDef.IsSubclassOf ("Android.App.Backup.BackupAgent", cache))
throw new InvalidOperationException (
string.Format ("The Type '{0}', referenced by the Android.App.ApplicationAttribute.BackupAgent property, must be a subclass of the type Android.App.Backup.BackupAgent.",
typeDef.FullName));

return ManifestDocumentElement.ToString (typeDef);
return ManifestDocumentElement.ToString (typeDef, cache);
}
}, {
"BackupInForeground",
Expand Down Expand Up @@ -256,16 +256,16 @@ public static ApplicationAttribute FromCustomAttributeProvider (ICustomAttribute
return self;
}

internal XElement ToElement (IAssemblyResolver resolver, string packageName)
internal XElement ToElement (IAssemblyResolver resolver, string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName, provider, resolver);
return mapping.ToElement (this, specified, packageName, cache, provider, resolver);
}

static string ToNameAttribute (ApplicationAttribute self)
static string ToNameAttribute (ApplicationAttribute self, ICustomAttributeProvider provider, IAssemblyResolver resolver, TypeDefinitionCache cache)
{
var type = self.provider as TypeDefinition;
if (string.IsNullOrEmpty (self.Name) && type != null)
return JavaNativeTypeManager.ToJniName (type).Replace ('/', '.');
return JavaNativeTypeManager.ToJniName (type, cache).Replace ('/', '.');

return self.Name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public static BroadcastReceiverAttribute FromTypeDefinition (TypeDefinition type
return self;
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public static ContentProviderAttribute FromTypeDefinition (TypeDefinition type)
return self;
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public static IEnumerable<GrantUriPermissionAttribute> FromTypeDefinition (TypeD
}
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ public void SetTargetPackage (string package)
specified.Add ("TargetPackage");
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
Expand Down Expand Up @@ -62,9 +62,9 @@ public static LayoutAttribute FromTypeDefinition (TypeDefinition type)
return self;
}

internal XElement ToElement (IAssemblyResolver resolver, string packageName)
internal XElement ToElement (IAssemblyResolver resolver, string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName, type, resolver);
return mapping.ToElement (this, specified, packageName, cache, type, resolver);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public static IEnumerable<MetaDataAttribute> FromCustomAttributeProvider (ICusto
}
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public static IEnumerable<PermissionAttribute> FromCustomAttributeProvider (ICus
}
}

internal XElement ToElement (string packageName)
internal XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}

internal class PermissionAttributeComparer : IEqualityComparer<PermissionAttribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public static IEnumerable<PermissionGroupAttribute> FromCustomAttributeProvider
}
}

internal XElement ToElement (string packageName)
internal XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}

internal class PermissionGroupAttributeComparer : IEqualityComparer<PermissionGroupAttribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public static IEnumerable<PermissionTreeAttribute> FromCustomAttributeProvider (
}
}

internal XElement ToElement (string packageName)
internal XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}

internal class PermissionTreeAttributeComparer : IEqualityComparer<PermissionTreeAttribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public static ServiceAttribute FromTypeDefinition (TypeDefinition type)
return self;
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ partial class SupportsGLTextureAttribute
};


internal XElement ToElement (string packageName)
internal XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}

ICollection<string> specified;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ partial class UsesConfigurationAttribute {
}
};

internal XElement ToElement (string packageName)
internal XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}

ICollection<string> specified;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ internal string GLESVesionAsString ()
return String.Format("0x{0}", GLESVersion.ToString("X8"));
}

internal XElement ToElement (string packageName)
internal XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}

ICollection<string> specified;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public static IEnumerable<UsesLibraryAttribute> FromCustomAttributeProvider (ICu
}
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public static IEnumerable<UsesPermissionAttribute> FromCustomAttributeProvider (
}
}

public XElement ToElement (string packageName)
public XElement ToElement (string packageName, TypeDefinitionCache cache)
{
return mapping.ToElement (this, specified, packageName);
return mapping.ToElement (this, specified, packageName, cache);
}

internal class UsesPermissionComparer : IEqualityComparer<UsesPermissionAttribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ bool CreateJavaSources (IEnumerable<TypeDefinition> javaTypes, TypeDefinitionCac
jti.Generate (writer);
if (useMarshalMethods) {
if (classifier.FoundDynamicallyRegisteredMethods (t)) {
Log.LogWarning ($"Type '{t.GetAssemblyQualifiedName ()}' will register some of its Java override methods dynamically. This may adversely affect runtime performance. See preceding warnings for names of dynamically registered methods.");
Log.LogWarning ($"Type '{t.GetAssemblyQualifiedName (cache)}' will register some of its Java override methods dynamically. This may adversely affect runtime performance. See preceding warnings for names of dynamically registered methods.");
}
}
writer.Flush ();
Expand Down
Loading