Github user rakatyal commented on a diff in the pull request:

    https://github.com/apache/cordova-windows/pull/168#discussion_r60444685
  
    --- Diff: template/cordova/lib/ConfigChanges.js ---
    @@ -0,0 +1,85 @@
    +/*
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + *
    +*/
    +
    +var util = require('util');
    +var CommonMunger = require('cordova-common').ConfigChanges.PlatformMunger;
    +
    +function PlatformMunger(platform, project_dir, platformJson, 
pluginInfoProvider) {
    +    CommonMunger.apply(this, arguments);
    +}
    +
    +util.inherits(PlatformMunger, CommonMunger);
    +
    +/**
    + * This is an override of apply_file_munge method from cordova-common's 
PlatformMunger class.
    + * In addition to parent's method logic also removes capabilities with 
'uap:' prefix that were
    + * added by AppxManifest class
    + *
    + * @param {String}  file   A file name to apply munge to
    + * @param {Object}  munge  Serialized changes that need to be applied to 
the file
    + * @param {Boolean} [remove=false] Flag that specifies whether the changes
    + *   need to be removed or added to the file
    + */
    +PlatformMunger.prototype.apply_file_munge = function (file, munge, remove) 
{
    +    // Call parent class' method
    +    PlatformMunger.super_.prototype.apply_file_munge.call(this, file, 
munge, remove);
    +
    +    // CB-11066 If this is a windows10 manifest and we're removing the 
changes
    +    // then we also need to check if there are <Capability> elements were 
previously
    +    // added and schedule removal of corresponding <uap:Capability> 
elements
    +    if (remove && file === 'package.windows10.appxmanifest') {
    +        var uapCapabilitiesMunge = generateUapCapabilities(munge);
    +        PlatformMunger.super_.prototype.apply_file_munge.call(this, file, 
uapCapabilitiesMunge, remove);
    +    }
    +};
    +
    +/**
    + * Generates a new munge that contains <uap:Capability> elements created 
based on
    + * corresponding <Capability> elements from base munge. If there is no 
such elements
    + * found in base munge, the empty munge is returned (selectors might 
present under
    --- End diff --
    
    If there *are* no such elements ..
    selectors might *be* present..


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to