[Mono-bugs] [Bug 638437] New: Activity.OnActivityResult() takes int, but should be Android.App.Result

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Sep 9 23:32:20 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=638437

https://bugzilla.novell.com/show_bug.cgi?id=638437#c0


           Summary: Activity.OnActivityResult() takes int, but should be
                    Android.App.Result
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: jpobst at novell.com
        ReportedBy: aenomoto at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Activity has this method to override, and some args should be replaced with
specific enums (note that I needed explicit cast to compare resultCode right
now):

        protected override void OnActivityResult(int requestCode, int
resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);
            if (resultCode == (int) Android.App.Result.Ok && data != null)
            {
                String filename = data.DataString;
                if (filename == null)
                    return;
                if (filename.StartsWith("file://"))
                    filename = filename.Substring(7); // remove URI prefix

                this.view.LoadFileAsync(new FileInfo(filename));
            }
        }

Probably this kind of replacement work would be here and there.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list