Bug 59532 - [API 26] Android.App.Assist.AssistStructure AutofillType/InputType Mapped Backwards
Summary: [API 26] Android.App.Assist.AssistStructure AutofillType/InputType Mapped Bac...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 8.0 (15.4)
Hardware: PC Windows
: High major
Target Milestone: 15.4
Assignee: Atsushi Eno
URL:
: 59625 ()
Depends on:
Blocks:
 
Reported: 2017-09-15 19:31 UTC by kyle.spearrin
Modified: 2017-09-27 18:31 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description kyle.spearrin 2017-09-15 19:31:08 UTC
I am looking at the Android.App.Assist.AssistStructure metadata class and I see the following properties:

    public virtual AutofillType InputType { get; }
    public virtual InputTypes AutofillType { get; }

This looks backwards to me?
Comment 1 Jon Douglas [MSFT] 2017-09-18 15:05:23 UTC
I can CONFIRM this behavior in Mono.Android.dll 8.0+ and it looks like this is the culprit:

https://github.com/xamarin/xamarin-android/blob/47f370f6f4b142fd8fa830000aa3e69ef29ae1fc/src/Mono.Android/methodmap.csv#L2287-L2288

Setting priority to HIGH due to nature of binding.

EX in a decompiler:

      public virtual unsafe InputTypes AutofillType
      {
        [Register("getAutofillType", "()I", "GetGetAutofillTypeHandler", ApiSince = 26)] get
        {
          return (InputTypes) AssistStructure.ViewNode._members.get_InstanceMethods().InvokeVirtualInt32Method("getAutofillType.()I", (IJavaPeerable) this, (JniArgumentValue*) null);
        }
      }

      public virtual unsafe AutofillType InputType
      {
        [Register("getInputType", "()I", "GetGetInputTypeHandler", ApiSince = 26)] get
        {
          return (AutofillType) AssistStructure.ViewNode._members.get_InstanceMethods().InvokeVirtualInt32Method("getInputType.()I", (IJavaPeerable) this, (JniArgumentValue*) null);
        }
      }
Comment 2 Peter Collins 2017-09-20 19:20:27 UTC
*** Bug 59625 has been marked as a duplicate of this bug. ***
Comment 3 Cody Beyer (MSFT) 2017-09-21 16:19:49 UTC
https://github.com/xamarin/xamarin-android/pull/882
Comment 4 Peter Collins 2017-09-27 18:31:50 UTC
Verified fixed in monodroid/d15-4/87269403:

> 	public virtual AutofillType AutofillType {
>		[Register ("getAutofillType", "()I", "GetGetAutofillTypeHandler", ApiSince = 26)]
>		get;
>	}
>	public virtual InputTypes InputType {
>		[Register ("getInputType", "()I", "GetGetInputTypeHandler", ApiSince = 26)]
>		get;
>	}