Bug 2484 - Android.Content.PM.PackageManager.MatchDefaultOnly and related are now missing, used to be there...
Summary: Android.Content.PM.PackageManager.MatchDefaultOnly and related are now missin...
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2011-12-13 15:31 UTC by kenny goers
Modified: 2014-03-11 11:48 UTC (History)
3 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 kenny goers 2011-12-13 15:31:51 UTC
PackageManager.MatchDefaultOnly used to exist, but is now gone, seemed to have been there before 4.0.1.

Kenny.
Comment 1 Jonathan Pobst 2011-12-13 16:11:59 UTC
Looks like in 1.6 - 2.3, it's:
Android.Content.PM.PackageInfoFlags.MatchDefaultOnly

In 3.1 and 4.0, it's:
Android.Content.PM.PackageManager.MatchDefaultOnly

Atsushi, can you look into why this is?
Comment 2 kenny goers 2011-12-13 16:30:37 UTC
Its back to PackageInfoFlags.MatchDefaultOnly in 4.0.1! My code compiled before the 4.0.1 update ;-)
Comment 3 kenny goers 2011-12-13 16:34:07 UTC
And it doesn't compile the following statement anymore as it's not "int" compatible:

myActivity.PackageManager.QueryIntentActivities(externalIntent, PackageInfoFlags.MatchDefaultOnly)
Comment 4 Atsushi Eno 2012-01-04 23:49:35 UTC
That is due to missing int-to-enum mapping on android.content.pm.PackageManager.queryIntentActivities() 2nd. parameter.

We have a corresponding fix in our almost-complete enum change updates, but it would not be available until the next upgrade. So far, please explicitly cast it to int: myActivity.PackageManager.QueryIntentActivities(externalIntent, (int) PackageInfoFlags.MatchDefaultOnly).

(Closing as fixed as we have fix internally.)
Comment 5 Miha Markic 2014-03-11 10:46:40 UTC
Looks like this is happening again in 4.12.2 (or maybe before). No enums there, just string constants in PackageManager.
Comment 6 Miha Markic 2014-03-11 11:48:23 UTC
Nevermind, those constants are packed in PackageInfoFlags enum. Duh.