Bug 14206 - VS AndroidManifest.xml redactor replaces permission for Google Maps
Summary: VS AndroidManifest.xml redactor replaces permission for Google Maps
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: High critical
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2013-08-23 07:28 UTC by Arvis
Modified: 2016-08-03 15:23 UTC (History)
8 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 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 Arvis 2013-08-23 07:28:15 UTC
VisualStudio 2012 AndroidManifest.xml redactor replaces uses-permission for Google Maps v2:
from
  <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
to
  <uses-permission android:name="android.permission.READ_GSERVICES" />

which not grant access to Google Maps service in Release(production) build.
Comment 1 Paul Keefe 2013-08-29 14:43:11 UTC
Note that the redactor also replaces:

<uses-permission android:name="[package].permission.MAPS_RECEIVE" />

With:

<uses-permission android:name="android.permission.MAPS_RECEIVE" />
Comment 2 Stuart Lodge 2013-10-03 07:21:04 UTC
I've also seen this - and I've seen it do much worse - like ripping out all the manifest entries - see repro at http://youtu.be/dK7fyEd1itc (using project https://github.com/MvvmCross/NPlus1DaysOfMvvmCross/tree/master/N-40-Maps)
Comment 3 Paul Keefe 2013-10-30 16:57:29 UTC
Here is some info on what seems to be an underlying symptom of the bug. 

I opened the properties panel for my project, looked through each of its sub-panels, and then closed the properties panel and almost all of my <uses-permission/> statements were missing from the AndroidManifest.xml.

I tried it again (after setting the manifest back to normal) and it deleted all of them again. (thank god for backups)

I noticed the other day when I made changes in the properties panel that the manifest had been reorganized and that many of the <uses-permission/> statements were moved to the end of the manifest file. Those are the ones that are being deleted.

Here is a list of the ones deleted in my manifest:

<uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" />
	<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
	<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
	<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
	<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
	<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
	<uses-permission android:name="android.permission.CAMERA" />
	<uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
	<uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" />
	<uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
	<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
	<uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.RECORD_AUDIO" />
	<uses-permission android:name="android.permission.STATUS_BAR" />
	<uses-permission android:name="android.permission.VIBRATE" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.BILLING" />
	<uses-permission android:name="com.mytourguide.mytourguide.permission.MAPS_RECEIVE" />
	<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />


THANKS!!!
Comment 4 dean.ellis 2013-11-14 08:41:44 UTC
I have managed to replicate this issue, and believe I have fixed it. 

The code will need to go through testing and be scheduled for the next major release.