Bug 2582 - Android.Util.TypedValue.ApplyDimension should take enum parameter
Summary: Android.Util.TypedValue.ApplyDimension should take enum parameter
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.0
Hardware: PC All
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2011-12-20 08:44 UTC by MikeFayer
Modified: 2011-12-21 03:37 UTC (History)
2 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:
RESOLVED FIXED

Description MikeFayer 2011-12-20 08:44:32 UTC
Android.Util.TypedValue.ApplyDimension takes an int as the first parameter to indicate unit type, but you guys re-factored the unit-type int constants into the ComplexUnitType enumeration in Android.Util, so ApplyDimensions should take the enum parameter instead of the int.
Comment 1 Atsushi Eno 2011-12-21 03:11:12 UTC
Wow, I didn't know that this complex type is using enums. And while such int->enum conversion should have already been completed in our sources, it actually *wasn't*.

Thanks for the report anyways, I'll fix this in our sources so that this should become enum in the next major release.

The problem is, it even caught in my latest "collect every int-based methods and review everything" work BUT I thought it *is* an int value as there is *no* description on unit parameter saying it uses those constants for whatever converted to ComplexUnitType in the earlier days (before I started to improve enums). And now I cannot be very sure that we're finalizing enum changes.

The review process is still human-dependent which means there will be errors (and unlike others expect there is not really automatic way to verify enum state sanity).
Comment 2 Atsushi Eno 2011-12-21 03:37:54 UTC
Fixed.