Bug 15127 - Invalid method signature for PackageManager.SetApplicationEnabledSetting() and SetComponentEnabledSetting()
Summary: Invalid method signature for PackageManager.SetApplicationEnabledSetting() an...
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.8.x
Hardware: PC Windows
: --- normal
Target Milestone: 4.12.0 (KitKat)
Assignee: Atsushi Eno
Depends on:
Reported: 2013-10-02 11:06 UTC by Markus
Modified: 2013-12-16 10:06 UTC (History)
3 users (show)

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:

Description Markus 2013-10-02 11:06:05 UTC
The parameter types for the methods Android.Content.PM.PackageManager.SetApplicationEnabledSetting() and SetComponentEnabledSetting() are incorrect. Both take a PackageInfoFlags enum as third parameter. To match the corresponding Android method http://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting(android.content.ComponentName, int, int), the last parameter type should be a ComponentEnableOption. Acceptable values are None (0) or DontKillApp (1).
As a workaround, the enum value can be cast via int type.
Comment 1 Atsushi Eno 2013-10-29 06:22:55 UTC
Thanks for the bugreport. This will be fixed in the next to next major release (4.12 / 4.11.0, or whatever that comes next).
Comment 2 Sadik Ali 2013-12-16 10:06:41 UTC
I verified this issue, following are the verified steps

1. Created a new android project.
2. Open Mono.Android assembly.
3. Search "Android.Content.PM.PackageManager".
3. Verified that "SetComponentEnabledSetting" and "SetApplicationEnabledSetting" function have third argument "ComponentEnableOption" type.

Refer Screen shot: http://screencast.com/t/rD89UzuTa

Checked With:
Windows 7
X.S 4.2.2 (build 2)