[TIMOB-16088] Android: Remove lines from Android manifest that are autogenerated
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-01-03T19:38:42.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2013 Sprint 26, 2013 Sprint 26 Core, Release 3.2.1, Release 3.3.0 |
Components | Android |
Labels | module_build, qe-testadded |
Reporter | Radamantis Torres-Lechuga |
Assignee | Chris Barber |
Created | 2013-12-26T21:29:45.000+0000 |
Updated | 2014-03-07T01:44:06.000+0000 |
I'm not 100% sure what you mean by new functionality described in TIMOB-15981. You just want to remove those lines from the auto generated manifest, yes?
Yes, if the customer remove those lines from the custom Android Manifest, somehow, after build the project the lines are there again
Added a config to disable the auto-merging behavior called 'android.skipCustomManifestMerge'. To test: 1. On the command, set the property to true: 'ti config android.skipCustomManifestMerge true' 2. Create a project with a custom manifest inside platform/android 3. Build the project 4. Verify that the android manifest inside the build directory is the exact same as the custom manifest Master PR: https://github.com/appcelerator/titanium_mobile/pull/5169 3_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/5170
WRITE_EXTERNAL_STORAGE is apart of the required permissions. This has been the default behavior for nearly 4 years. Maybe these required permissions are handled differently in Titanium 3.1 and older when a custom AndroidManifest.xml is present? As far as the "org.appcelerator.titanium.analytics.TiAnalyticsService" service, it is trivial to detect if analytics is enabled and if not, don't add that line. That is a bug. I don't see why adding a "android.skipCustomManifestMerge" is the correct way to solve this. I propose we close PR 5169 and 5170 and properly fix the bug with the TiAnalyticsService being added when analytics is not enabled.
Could you add an attribute into the manifest XML indicating this section is not to be altered?
To fix this ticket, here's what we're going to do: 1. Only add the TiAnalyticsService to the AndroidManifest.xml if and only if analytics are enabled in the tiapp.xml 2. Only add the WRITE_EXTERNAL_STORAGE permission to the AndroidManifest.xml if and only if the deploy type is development OR debugging is enabled 3. Create a CLI plugin hook when the AndroidManifest.xml is being assembled that allows a plugin to modify the AndroidManifest XML DOM after the merging has occurred and before the file is written. It will be possible for a plugin to force the custom AndroidManifest.xml without any of the merged settings from the default AndroidManifest.xml or tiapp.xml.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5172 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5173
To test: 1. Create a project with a custom manifest inside platform/android (make sure you omit the
Follow up PR Master: https://github.com/appcelerator/titanium_mobile/pull/5185 3_2_X: https://github.com/appcelerator/titanium_mobile/pull/5186
Observations: Steps followed as mentioned above: 1. Create a project with a custom manifest inside platform/android (make sure you omit the
Closing ticket as fixed. While following Allen's test steps and created a custom AndroidManifest.xml file that did not have these tags:
verified the following: 1. After building app to an Android device, verified the above tags do not appear in