codeplay-common 4.11.25 → 4.11.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -482,6 +482,10 @@ async function addOptionalCameraFeatures() {
482
482
  if (!fs.existsSync(manifestPath)) return;
483
483
 
484
484
  let manifest = fs.readFileSync(manifestPath, 'utf8');
485
+ const permissionManifest = manifest.replace(/<!--[\s\S]*?-->/g, '');
486
+ const hasCameraPermission = /<uses-permission(?:-sdk-23)?\b[^>]*\bandroid:name\s*=\s*(["'])android\.permission\.CAMERA\1(?=[\s/>])/.test(permissionManifest);
487
+ if (!hasCameraPermission) return;
488
+
485
489
  const features = ['android.hardware.camera', 'android.hardware.camera.autofocus', 'android.hardware.camera.flash'];
486
490
  const featureName = tag => /\bandroid:name\s*=\s*(["'])(.*?)\1/.exec(tag)?.[2];
487
491
  const featureTags = /<!--[\s\S]*?-->|<uses-feature\b[^>]*>/g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "4.11.25",
3
+ "version": "4.11.26",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",