codeplay-common 4.11.28 → 4.11.30
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.
- package/CHANGELOG.md +1 -0
- package/README.md +89 -89
- package/RELEASE_NOTES.md +13 -13
- package/files/buildCodeplay/HUAWEI-PRIVACY.md +9 -0
- package/files/buildCodeplay/add-splash-screen.js +1 -1
- package/files/buildCodeplay/codeplayBeforeBuild.js +4756 -4755
- package/files/buildCodeplay/disabled-ads.mjs +45 -45
- package/files/buildCodeplay/ensure-current-build.cjs +42 -42
- package/files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs +31 -31
- package/files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs +28 -28
- package/files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle +9 -9
- package/files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs +30 -30
- package/files/buildCodeplay/huawei-privacy-entry.js +135 -0
- package/files/buildCodeplay/huawei-privacy.cjs +92 -0
- package/files/buildCodeplay/huawei-privacy.css +22 -0
- package/files/buildCodeplay/iap-alias.cjs +116 -108
- package/files/buildCodeplay/ios-ad-consent.cjs +56 -56
- package/files/buildCodeplay/ios-emi-admob-modification.js +25 -25
- package/files/buildCodeplay/migrate-system-bars.cjs +115 -115
- package/files/buildCodeplay/newly added.txt +89 -89
- package/files/buildCodeplay/non-google-billing.pro +3 -3
- package/files/buildCodeplay/release-sync.config.json +4 -4
- package/files/buildCodeplay/remove-force-kotlin-disable.js +43 -43
- package/files/buildCodeplay/ruads.cjs +211 -211
- package/files/buildCodeplay/saf-mediastore-dependency.cjs +21 -21
- package/files/buildCodeplay/setSplashAnimation.js +2 -2
- package/files/buildCodeplay/setup-ruads.cjs +55 -55
- package/files/buildCodeplay/splash-setup.cjs +88 -88
- package/files/buildCodeplay/store-billing.cjs +43 -43
- package/files/buildCodeplay/tests/huawei-privacy.test.cjs +49 -0
- package/files/buildCodeplay/tests/huawei-vite.test.cjs +35 -0
- package/files/scripts-common/generate-baseline-profile.js +46 -46
- package/files/take-screen-image.js +4414 -4414
- package/package.json +28 -28
- package/runtime/splash-ready.mjs +52 -52
- package/runtime/vk-ads/vk-ad-configuration.json +39 -39
- package/scripts/ensure-current-build.test.cjs +76 -76
- package/scripts/iap-alias.test.cjs +117 -78
- package/scripts/ios-ad-consent.test.cjs +99 -99
- package/scripts/ruads-install.test.cjs +180 -180
- package/scripts/ruads-policy.test.cjs +174 -174
- package/scripts/saf-mediastore-dependency.test.cjs +44 -44
- package/scripts/splash-setup.test.cjs +142 -142
- package/scripts/sync-files.js +1 -1
- package/scripts/system-bars.test.cjs +77 -77
- package/scripts/vite-build-settings.test.cjs +92 -92
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
// Shared ad interface for builds with both native providers disabled.
|
|
2
|
-
const ignore = () => {};
|
|
3
|
-
const unavailable = async () => false;
|
|
4
|
-
const hidden = async () => true;
|
|
5
|
-
export const _isVideoLoad = false;
|
|
6
|
-
export const _isRewardInterstitialLoad = false;
|
|
7
|
-
export const _isNativeAdLoaded = false;
|
|
8
|
-
export const _bannerAdHeight = 0;
|
|
9
|
-
export const adjustWebViewForBanner = ignore;
|
|
10
|
-
export const hideGoogleBannerAd = hidden;
|
|
11
|
-
export const showGoogleBannerAd = unavailable;
|
|
12
|
-
export const canRequestAppAds = () => false;
|
|
13
|
-
export const getAdPrivacyOptionsState = () => ({ supported: false, requirementStatus: 'NOT_REQUIRED', loading: false, error: false, canRetry: false });
|
|
14
|
-
export const isAdPrivacyOptionsRequired = () => false;
|
|
15
|
-
export const requestAppAdConsent = unavailable;
|
|
16
|
-
export const adsOnDeviceReady = unavailable;
|
|
17
|
-
export const showAppAdPrivacyOptions = unavailable;
|
|
18
|
-
export const refreshAppAdConsent = showAppAdPrivacyOptions;
|
|
19
|
-
export async function withAdPrivacyChoices(callback) {
|
|
20
|
-
if (typeof callback === 'function') await callback();
|
|
21
|
-
}
|
|
22
|
-
export const disableFor_IAP_Subscription = ignore;
|
|
23
|
-
export const enableFor_IAP_Subscription = ignore;
|
|
24
|
-
export const disableFor_CREDIT_Subscription = ignore;
|
|
25
|
-
export const showRewardVideo = unavailable;
|
|
26
|
-
export async function levelWinInterstitial(callback) {
|
|
27
|
-
if (typeof callback === 'function') await callback();
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
export const runInterstitialTaskTransition = levelWinInterstitial;
|
|
31
|
-
export const disableAppOpenAd = ignore;
|
|
32
|
-
export const enableAppOpenAd = ignore;
|
|
33
|
-
export const noAppOpenShowUntilResume = ignore;
|
|
34
|
-
export const showRewardInterstitial = unavailable;
|
|
35
|
-
export const showNativeAd = unavailable;
|
|
36
|
-
export const showNativeAdInElement = showNativeAd;
|
|
37
|
-
export const hideNativeAd = hidden;
|
|
38
|
-
export const hideNativeAdInElement = hideNativeAd;
|
|
39
|
-
export const loadPictureInPictureAd = unavailable;
|
|
40
|
-
export const showPictureInPictureAd = loadPictureInPictureAd;
|
|
41
|
-
export const hidePictureInPictureAd = hidden;
|
|
42
|
-
export const destroyPictureInPictureAd = hidePictureInPictureAd;
|
|
43
|
-
export const removePictureInPictureAd = destroyPictureInPictureAd;
|
|
44
|
-
export const getPictureInPictureAdState = () => ({ loading: false, loaded: false, showing: false, fullscreen: false, adUnitId: '', error: null });
|
|
45
|
-
export const addPictureInPictureAdListener = () => ({ remove: ignore });
|
|
1
|
+
// Shared ad interface for builds with both native providers disabled.
|
|
2
|
+
const ignore = () => {};
|
|
3
|
+
const unavailable = async () => false;
|
|
4
|
+
const hidden = async () => true;
|
|
5
|
+
export const _isVideoLoad = false;
|
|
6
|
+
export const _isRewardInterstitialLoad = false;
|
|
7
|
+
export const _isNativeAdLoaded = false;
|
|
8
|
+
export const _bannerAdHeight = 0;
|
|
9
|
+
export const adjustWebViewForBanner = ignore;
|
|
10
|
+
export const hideGoogleBannerAd = hidden;
|
|
11
|
+
export const showGoogleBannerAd = unavailable;
|
|
12
|
+
export const canRequestAppAds = () => false;
|
|
13
|
+
export const getAdPrivacyOptionsState = () => ({ supported: false, requirementStatus: 'NOT_REQUIRED', loading: false, error: false, canRetry: false });
|
|
14
|
+
export const isAdPrivacyOptionsRequired = () => false;
|
|
15
|
+
export const requestAppAdConsent = unavailable;
|
|
16
|
+
export const adsOnDeviceReady = unavailable;
|
|
17
|
+
export const showAppAdPrivacyOptions = unavailable;
|
|
18
|
+
export const refreshAppAdConsent = showAppAdPrivacyOptions;
|
|
19
|
+
export async function withAdPrivacyChoices(callback) {
|
|
20
|
+
if (typeof callback === 'function') await callback();
|
|
21
|
+
}
|
|
22
|
+
export const disableFor_IAP_Subscription = ignore;
|
|
23
|
+
export const enableFor_IAP_Subscription = ignore;
|
|
24
|
+
export const disableFor_CREDIT_Subscription = ignore;
|
|
25
|
+
export const showRewardVideo = unavailable;
|
|
26
|
+
export async function levelWinInterstitial(callback) {
|
|
27
|
+
if (typeof callback === 'function') await callback();
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
export const runInterstitialTaskTransition = levelWinInterstitial;
|
|
31
|
+
export const disableAppOpenAd = ignore;
|
|
32
|
+
export const enableAppOpenAd = ignore;
|
|
33
|
+
export const noAppOpenShowUntilResume = ignore;
|
|
34
|
+
export const showRewardInterstitial = unavailable;
|
|
35
|
+
export const showNativeAd = unavailable;
|
|
36
|
+
export const showNativeAdInElement = showNativeAd;
|
|
37
|
+
export const hideNativeAd = hidden;
|
|
38
|
+
export const hideNativeAdInElement = hideNativeAd;
|
|
39
|
+
export const loadPictureInPictureAd = unavailable;
|
|
40
|
+
export const showPictureInPictureAd = loadPictureInPictureAd;
|
|
41
|
+
export const hidePictureInPictureAd = hidden;
|
|
42
|
+
export const destroyPictureInPictureAd = hidePictureInPictureAd;
|
|
43
|
+
export const removePictureInPictureAd = destroyPictureInPictureAd;
|
|
44
|
+
export const getPictureInPictureAdState = () => ({ loading: false, loaded: false, showing: false, fullscreen: false, adUnitId: '', error: null });
|
|
45
|
+
export const addPictureInPictureAdListener = () => ({ remove: ignore });
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { execSync, execFileSync } = require('child_process');
|
|
4
|
-
|
|
5
|
-
function findVersionedBuildFiles(projectRoot) {
|
|
6
|
-
const directory = path.join(projectRoot, 'buildCodeplay');
|
|
7
|
-
if (!fs.existsSync(directory)) return [];
|
|
8
|
-
return fs.readdirSync(directory, { withFileTypes: true })
|
|
9
|
-
.filter(entry => entry.isFile() && /-\d+(?:\.\d+)*(?:-beta-\d+)?\.[^.]+$/i.test(entry.name))
|
|
10
|
-
.map(entry => entry.name);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function ensureCurrentBuild(options = {}) {
|
|
14
|
-
const projectRoot = path.resolve(options.projectRoot || process.cwd());
|
|
15
|
-
const legacyFiles = findVersionedBuildFiles(projectRoot);
|
|
16
|
-
if (!legacyFiles.length) return false;
|
|
17
|
-
|
|
18
|
-
console.log(`Legacy buildCodeplay files found: ${legacyFiles.join(', ')}. Reinstalling codeplay-common before continuing.`);
|
|
19
|
-
const runNpm = options.runNpm || (command => execSync(command, { cwd: projectRoot, stdio: 'inherit' }));
|
|
20
|
-
runNpm('npm uninstall codeplay-common');
|
|
21
|
-
runNpm('npm install codeplay-common');
|
|
22
|
-
|
|
23
|
-
// Postinstall replaces the scripts and removes recognized legacy files.
|
|
24
|
-
// Do not run stale code or retry indefinitely if migration did not finish.
|
|
25
|
-
const remaining = findVersionedBuildFiles(projectRoot);
|
|
26
|
-
if (remaining.length) {
|
|
27
|
-
throw new Error(`Legacy buildCodeplay files remain after reinstall: ${remaining.join(', ')}. Build stopped; migrate these files before retrying.`);
|
|
28
|
-
}
|
|
29
|
-
const entrypoint = path.join(projectRoot, 'buildCodeplay', 'codeplayBeforeBuild.js');
|
|
30
|
-
if (!fs.existsSync(entrypoint)) throw new Error('codeplayBeforeBuild.js is missing after reinstall. Build stopped.');
|
|
31
|
-
|
|
32
|
-
// The current process loaded the old templates. Finish preparation in a fresh
|
|
33
|
-
// process before the caller's remaining build commands are allowed to run.
|
|
34
|
-
const runBeforeBuild = options.runBeforeBuild || (script => execFileSync(process.execPath, [script, ...process.argv.slice(2)], {
|
|
35
|
-
cwd: projectRoot,
|
|
36
|
-
stdio: 'inherit',
|
|
37
|
-
}));
|
|
38
|
-
runBeforeBuild(entrypoint);
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
module.exports = { ensureCurrentBuild, findVersionedBuildFiles };
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { execSync, execFileSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
function findVersionedBuildFiles(projectRoot) {
|
|
6
|
+
const directory = path.join(projectRoot, 'buildCodeplay');
|
|
7
|
+
if (!fs.existsSync(directory)) return [];
|
|
8
|
+
return fs.readdirSync(directory, { withFileTypes: true })
|
|
9
|
+
.filter(entry => entry.isFile() && /-\d+(?:\.\d+)*(?:-beta-\d+)?\.[^.]+$/i.test(entry.name))
|
|
10
|
+
.map(entry => entry.name);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function ensureCurrentBuild(options = {}) {
|
|
14
|
+
const projectRoot = path.resolve(options.projectRoot || process.cwd());
|
|
15
|
+
const legacyFiles = findVersionedBuildFiles(projectRoot);
|
|
16
|
+
if (!legacyFiles.length) return false;
|
|
17
|
+
|
|
18
|
+
console.log(`Legacy buildCodeplay files found: ${legacyFiles.join(', ')}. Reinstalling codeplay-common before continuing.`);
|
|
19
|
+
const runNpm = options.runNpm || (command => execSync(command, { cwd: projectRoot, stdio: 'inherit' }));
|
|
20
|
+
runNpm('npm uninstall codeplay-common');
|
|
21
|
+
runNpm('npm install codeplay-common');
|
|
22
|
+
|
|
23
|
+
// Postinstall replaces the scripts and removes recognized legacy files.
|
|
24
|
+
// Do not run stale code or retry indefinitely if migration did not finish.
|
|
25
|
+
const remaining = findVersionedBuildFiles(projectRoot);
|
|
26
|
+
if (remaining.length) {
|
|
27
|
+
throw new Error(`Legacy buildCodeplay files remain after reinstall: ${remaining.join(', ')}. Build stopped; migrate these files before retrying.`);
|
|
28
|
+
}
|
|
29
|
+
const entrypoint = path.join(projectRoot, 'buildCodeplay', 'codeplayBeforeBuild.js');
|
|
30
|
+
if (!fs.existsSync(entrypoint)) throw new Error('codeplayBeforeBuild.js is missing after reinstall. Build stopped.');
|
|
31
|
+
|
|
32
|
+
// The current process loaded the old templates. Finish preparation in a fresh
|
|
33
|
+
// process before the caller's remaining build commands are allowed to run.
|
|
34
|
+
const runBeforeBuild = options.runBeforeBuild || (script => execFileSync(process.execPath, [script, ...process.argv.slice(2)], {
|
|
35
|
+
cwd: projectRoot,
|
|
36
|
+
stdio: 'inherit',
|
|
37
|
+
}));
|
|
38
|
+
runBeforeBuild(entrypoint);
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = { ensureCurrentBuild, findVersionedBuildFiles };
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
function syncCapacitorPermissionRules(projectRoot = path.resolve(__dirname, '../..')) {
|
|
5
|
-
const appPath = path.join(projectRoot, 'android', 'app');
|
|
6
|
-
if (!fs.existsSync(path.join(appPath, 'build.gradle'))) return false;
|
|
7
|
-
|
|
8
|
-
const rulesPath = path.join(appPath, 'proguard-rules.pro');
|
|
9
|
-
const original = fs.existsSync(rulesPath) ? fs.readFileSync(rulesPath, 'utf8') : '';
|
|
10
|
-
const rules = [
|
|
11
|
-
'-keepattributes RuntimeVisibleAnnotations,AnnotationDefault',
|
|
12
|
-
'-keep @interface com.getcapacitor.annotation.CapacitorPlugin { *; }',
|
|
13
|
-
'-keep @interface com.getcapacitor.annotation.Permission { *; }',
|
|
14
|
-
];
|
|
15
|
-
const existing = new Set(original.split(/\r?\n/).map(line => line.trim()));
|
|
16
|
-
const missing = rules.filter(rule => !existing.has(rule));
|
|
17
|
-
if (!missing.length) return false;
|
|
18
|
-
|
|
19
|
-
const newline = original.includes('\r\n') ? '\r\n' : '\n';
|
|
20
|
-
fs.writeFileSync(rulesPath, `${original.trimEnd()}${newline}${newline}`
|
|
21
|
-
+ `# Preserve Capacitor permission metadata used at runtime.${newline}`
|
|
22
|
-
+ `${missing.join(newline)}${newline}`, 'utf8');
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (require.main === module) {
|
|
27
|
-
const changed = syncCapacitorPermissionRules();
|
|
28
|
-
console.log(changed ? 'Capacitor R8 permission rules restored.' : 'Capacitor R8 permission rules unchanged.');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
module.exports = { syncCapacitorPermissionRules };
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
function syncCapacitorPermissionRules(projectRoot = path.resolve(__dirname, '../..')) {
|
|
5
|
+
const appPath = path.join(projectRoot, 'android', 'app');
|
|
6
|
+
if (!fs.existsSync(path.join(appPath, 'build.gradle'))) return false;
|
|
7
|
+
|
|
8
|
+
const rulesPath = path.join(appPath, 'proguard-rules.pro');
|
|
9
|
+
const original = fs.existsSync(rulesPath) ? fs.readFileSync(rulesPath, 'utf8') : '';
|
|
10
|
+
const rules = [
|
|
11
|
+
'-keepattributes RuntimeVisibleAnnotations,AnnotationDefault',
|
|
12
|
+
'-keep @interface com.getcapacitor.annotation.CapacitorPlugin { *; }',
|
|
13
|
+
'-keep @interface com.getcapacitor.annotation.Permission { *; }',
|
|
14
|
+
];
|
|
15
|
+
const existing = new Set(original.split(/\r?\n/).map(line => line.trim()));
|
|
16
|
+
const missing = rules.filter(rule => !existing.has(rule));
|
|
17
|
+
if (!missing.length) return false;
|
|
18
|
+
|
|
19
|
+
const newline = original.includes('\r\n') ? '\r\n' : '\n';
|
|
20
|
+
fs.writeFileSync(rulesPath, `${original.trimEnd()}${newline}${newline}`
|
|
21
|
+
+ `# Preserve Capacitor permission metadata used at runtime.${newline}`
|
|
22
|
+
+ `${missing.join(newline)}${newline}`, 'utf8');
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (require.main === module) {
|
|
27
|
+
const changed = syncCapacitorPermissionRules();
|
|
28
|
+
console.log(changed ? 'Capacitor R8 permission rules restored.' : 'Capacitor R8 permission rules unchanged.');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = { syncCapacitorPermissionRules };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
// FFmpegKit's JNI library looks up these Java members by name at runtime.
|
|
5
|
-
const FFMPEG_JNI_RULES = [
|
|
6
|
-
'-keep class com.antonkarpenko.ffmpegkit.** { *; }',
|
|
7
|
-
'-keep interface com.antonkarpenko.ffmpegkit.** { *; }',
|
|
8
|
-
];
|
|
9
|
-
|
|
10
|
-
function syncFfmpegJniRules(projectRoot) {
|
|
11
|
-
const pluginPath = path.join(projectRoot, 'node_modules', 'codeplay-fmpg', 'plugin.xml');
|
|
12
|
-
const appPath = path.join(projectRoot, 'android', 'app');
|
|
13
|
-
if (!fs.existsSync(pluginPath) || !fs.existsSync(appPath)) return false;
|
|
14
|
-
|
|
15
|
-
const rulesPath = path.join(appPath, 'proguard-rules.pro');
|
|
16
|
-
const original = fs.existsSync(rulesPath) ? fs.readFileSync(rulesPath, 'utf8') : '';
|
|
17
|
-
const existing = new Set(original.split(/\r?\n/).map(line => line.trim()));
|
|
18
|
-
const missing = FFMPEG_JNI_RULES.filter(rule => !existing.has(rule));
|
|
19
|
-
if (!missing.length) return false;
|
|
20
|
-
|
|
21
|
-
const newline = original.includes('\r\n') ? '\r\n' : '\n';
|
|
22
|
-
fs.writeFileSync(rulesPath, `${original.trimEnd()}${newline}${newline}`
|
|
23
|
-
+ `# Preserve FFmpegKit JNI entry points and callbacks.${newline}`
|
|
24
|
-
+ `${missing.join(newline)}${newline}`, 'utf8');
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
module.exports = { syncFfmpegJniRules };
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// FFmpegKit's JNI library looks up these Java members by name at runtime.
|
|
5
|
+
const FFMPEG_JNI_RULES = [
|
|
6
|
+
'-keep class com.antonkarpenko.ffmpegkit.** { *; }',
|
|
7
|
+
'-keep interface com.antonkarpenko.ffmpegkit.** { *; }',
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
function syncFfmpegJniRules(projectRoot) {
|
|
11
|
+
const pluginPath = path.join(projectRoot, 'node_modules', 'codeplay-fmpg', 'plugin.xml');
|
|
12
|
+
const appPath = path.join(projectRoot, 'android', 'app');
|
|
13
|
+
if (!fs.existsSync(pluginPath) || !fs.existsSync(appPath)) return false;
|
|
14
|
+
|
|
15
|
+
const rulesPath = path.join(appPath, 'proguard-rules.pro');
|
|
16
|
+
const original = fs.existsSync(rulesPath) ? fs.readFileSync(rulesPath, 'utf8') : '';
|
|
17
|
+
const existing = new Set(original.split(/\r?\n/).map(line => line.trim()));
|
|
18
|
+
const missing = FFMPEG_JNI_RULES.filter(rule => !existing.has(rule));
|
|
19
|
+
if (!missing.length) return false;
|
|
20
|
+
|
|
21
|
+
const newline = original.includes('\r\n') ? '\r\n' : '\n';
|
|
22
|
+
fs.writeFileSync(rulesPath, `${original.trimEnd()}${newline}${newline}`
|
|
23
|
+
+ `# Preserve FFmpegKit JNI entry points and callbacks.${newline}`
|
|
24
|
+
+ `${missing.join(newline)}${newline}`, 'utf8');
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
module.exports = { syncFfmpegJniRules };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Restore native metadata before Gradle configures an optimized Android build.
|
|
2
|
-
def codeplayAppRoot = rootProject.projectDir.parentFile
|
|
3
|
-
def codeplayRepairScript = new File(codeplayAppRoot, 'buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs')
|
|
4
|
-
def codeplayNodeBinary = project.findProperty('codeplayNodeBinary') ?: 'node'
|
|
5
|
-
|
|
6
|
-
providers.exec {
|
|
7
|
-
workingDir codeplayAppRoot
|
|
8
|
-
commandLine codeplayNodeBinary, codeplayRepairScript.absolutePath
|
|
9
|
-
}.result.get().assertNormalExitValue()
|
|
1
|
+
// Restore native metadata before Gradle configures an optimized Android build.
|
|
2
|
+
def codeplayAppRoot = rootProject.projectDir.parentFile
|
|
3
|
+
def codeplayRepairScript = new File(codeplayAppRoot, 'buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs')
|
|
4
|
+
def codeplayNodeBinary = project.findProperty('codeplayNodeBinary') ?: 'node'
|
|
5
|
+
|
|
6
|
+
providers.exec {
|
|
7
|
+
workingDir codeplayAppRoot
|
|
8
|
+
commandLine codeplayNodeBinary, codeplayRepairScript.absolutePath
|
|
9
|
+
}.result.get().assertNormalExitValue()
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { syncFfmpegJniRules } = require('./ffmpeg-jni-rules.cjs');
|
|
4
|
-
const { syncCapacitorPermissionRules } = require('./android-r8-rules.cjs');
|
|
5
|
-
|
|
6
|
-
function syncAndroidR8Rules(projectRoot = path.resolve(__dirname, '../..'), { installGradleHook = false } = {}) {
|
|
7
|
-
const buildPath = path.join(projectRoot, 'android', 'app', 'build.gradle');
|
|
8
|
-
if (!fs.existsSync(buildPath)) return false;
|
|
9
|
-
const capacitorChanged = syncCapacitorPermissionRules(projectRoot);
|
|
10
|
-
const ffmpegChanged = syncFfmpegJniRules(projectRoot);
|
|
11
|
-
let hookChanged = false;
|
|
12
|
-
if (installGradleHook) {
|
|
13
|
-
const original = fs.readFileSync(buildPath, 'utf8');
|
|
14
|
-
const hook = "apply from: '../../buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle'";
|
|
15
|
-
const existingHook = /^[ \t]*apply\s+from:\s*(['"])\.\.\/\.\.\/buildCodeplay\/fix-optimize-builld\/fix-optimize-build\.gradle\1[ \t]*;?[ \t]*$/m;
|
|
16
|
-
if (!existingHook.test(original)) {
|
|
17
|
-
const newline = original.includes('\r\n') ? '\r\n' : '\n';
|
|
18
|
-
fs.writeFileSync(buildPath, `${original.trimEnd()}${newline}${newline}${hook}${newline}`, 'utf8');
|
|
19
|
-
hookChanged = true;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return capacitorChanged || ffmpegChanged || hookChanged;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (require.main === module) {
|
|
26
|
-
const changed = syncAndroidR8Rules(undefined, { installGradleHook: process.argv.includes('--install-gradle-hook') });
|
|
27
|
-
console.log(changed ? 'Android R8 keep rules restored.' : 'Android R8 keep rules unchanged; no Android app or rules already present.');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
module.exports = { syncAndroidR8Rules };
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { syncFfmpegJniRules } = require('./ffmpeg-jni-rules.cjs');
|
|
4
|
+
const { syncCapacitorPermissionRules } = require('./android-r8-rules.cjs');
|
|
5
|
+
|
|
6
|
+
function syncAndroidR8Rules(projectRoot = path.resolve(__dirname, '../..'), { installGradleHook = false } = {}) {
|
|
7
|
+
const buildPath = path.join(projectRoot, 'android', 'app', 'build.gradle');
|
|
8
|
+
if (!fs.existsSync(buildPath)) return false;
|
|
9
|
+
const capacitorChanged = syncCapacitorPermissionRules(projectRoot);
|
|
10
|
+
const ffmpegChanged = syncFfmpegJniRules(projectRoot);
|
|
11
|
+
let hookChanged = false;
|
|
12
|
+
if (installGradleHook) {
|
|
13
|
+
const original = fs.readFileSync(buildPath, 'utf8');
|
|
14
|
+
const hook = "apply from: '../../buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle'";
|
|
15
|
+
const existingHook = /^[ \t]*apply\s+from:\s*(['"])\.\.\/\.\.\/buildCodeplay\/fix-optimize-builld\/fix-optimize-build\.gradle\1[ \t]*;?[ \t]*$/m;
|
|
16
|
+
if (!existingHook.test(original)) {
|
|
17
|
+
const newline = original.includes('\r\n') ? '\r\n' : '\n';
|
|
18
|
+
fs.writeFileSync(buildPath, `${original.trimEnd()}${newline}${newline}${hook}${newline}`, 'utf8');
|
|
19
|
+
hookChanged = true;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return capacitorChanged || ffmpegChanged || hookChanged;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (require.main === module) {
|
|
26
|
+
const changed = syncAndroidR8Rules(undefined, { installGradleHook: process.argv.includes('--install-gradle-hook') });
|
|
27
|
+
console.log(changed ? 'Android R8 keep rules restored.' : 'Android R8 keep rules unchanged; no Android app or rules already present.');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
module.exports = { syncAndroidR8Rules };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Capacitor, registerPlugin } from '@capacitor/core';
|
|
2
|
+
import './huawei-privacy.css';
|
|
3
|
+
|
|
4
|
+
const consentKey = 'codeplayHuaweiPrivacyConsentV1';
|
|
5
|
+
const Analytics = registerPlugin('FirebaseAnalytics');
|
|
6
|
+
const Browser = registerPlugin('Browser');
|
|
7
|
+
const NativeApp = registerPlugin('App');
|
|
8
|
+
const RuAds = registerPlugin('CodeplayRuStoreAds');
|
|
9
|
+
|
|
10
|
+
function policyUrl(appId) {
|
|
11
|
+
return `https://htmlcodeplay.com/privacy/ch/${appId}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async function openPolicy(appId) {
|
|
15
|
+
const url = policyUrl(appId);
|
|
16
|
+
if (Capacitor.isNativePlatform() && Capacitor.isPluginAvailable('Browser')) {
|
|
17
|
+
await Browser.open({ url });
|
|
18
|
+
} else {
|
|
19
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function setAnalyticsConsent(enabled) {
|
|
24
|
+
if (!Capacitor.isNativePlatform() || !Capacitor.isPluginAvailable('FirebaseAnalytics')) return;
|
|
25
|
+
try {
|
|
26
|
+
await Analytics.setConsent({ type: 'ANALYTICS_STORAGE', status: enabled ? 'GRANTED' : 'DENIED' });
|
|
27
|
+
await Analytics.setEnabled({ enabled });
|
|
28
|
+
} catch (error) {
|
|
29
|
+
// The manifest still defaults native analytics collection to disabled.
|
|
30
|
+
if (enabled) console.warn('Huawei analytics remains disabled:', error);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function button(label, className, action) {
|
|
35
|
+
const element = document.createElement('button');
|
|
36
|
+
element.type = 'button';
|
|
37
|
+
element.className = className;
|
|
38
|
+
element.textContent = label;
|
|
39
|
+
element.addEventListener('click', action);
|
|
40
|
+
return element;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function showGate({ appId, appName, startApp }) {
|
|
44
|
+
const gate = document.createElement('section');
|
|
45
|
+
gate.className = 'codeplay-huawei-privacy-gate';
|
|
46
|
+
gate.setAttribute('role', 'dialog');
|
|
47
|
+
gate.setAttribute('aria-modal', 'true');
|
|
48
|
+
gate.setAttribute('aria-label', '隐私政策');
|
|
49
|
+
const card = document.createElement('div');
|
|
50
|
+
card.className = 'codeplay-huawei-privacy-card';
|
|
51
|
+
const title = document.createElement('h1');
|
|
52
|
+
title.textContent = '请先阅读隐私政策';
|
|
53
|
+
const message = document.createElement('p');
|
|
54
|
+
message.textContent = `${appName} 会在您同意后启动应用服务。请先阅读简体中文隐私政策,了解个人信息处理、第三方服务及您的权利。`;
|
|
55
|
+
const link = button('阅读隐私政策', 'codeplay-huawei-privacy-policy', async () => {
|
|
56
|
+
try { await openPolicy(appId); }
|
|
57
|
+
catch { status.textContent = '无法打开隐私政策。请检查网络连接后重试。'; }
|
|
58
|
+
});
|
|
59
|
+
const status = document.createElement('p');
|
|
60
|
+
status.className = 'codeplay-huawei-privacy-status';
|
|
61
|
+
status.setAttribute('role', 'status');
|
|
62
|
+
const agree = button('同意并继续', 'codeplay-huawei-privacy-agree', async () => {
|
|
63
|
+
agree.disabled = true;
|
|
64
|
+
try {
|
|
65
|
+
localStorage.setItem(consentKey, 'agreed');
|
|
66
|
+
await setAnalyticsConsent(true);
|
|
67
|
+
gate.remove();
|
|
68
|
+
await startApp();
|
|
69
|
+
installSettingsControls(appId);
|
|
70
|
+
} catch {
|
|
71
|
+
localStorage.removeItem(consentKey);
|
|
72
|
+
status.textContent = '应用暂时无法启动。请重试。';
|
|
73
|
+
agree.disabled = false;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const decline = button('不同意并退出', 'codeplay-huawei-privacy-decline', async () => {
|
|
77
|
+
await setAnalyticsConsent(false);
|
|
78
|
+
if (Capacitor.isNativePlatform() && Capacitor.isPluginAvailable('CodeplayRuStoreAds')) {
|
|
79
|
+
await RuAds.setEnabled({ enabled: false }).catch(() => {});
|
|
80
|
+
}
|
|
81
|
+
if (Capacitor.isNativePlatform() && Capacitor.isPluginAvailable('App')) {
|
|
82
|
+
await NativeApp.exitApp();
|
|
83
|
+
} else {
|
|
84
|
+
status.textContent = '您可以关闭此页面。再次打开时仍可选择是否同意。';
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
card.append(title, message, link, status, agree, decline);
|
|
88
|
+
gate.append(card);
|
|
89
|
+
document.body.append(gate);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function installSettingsControls(appId) {
|
|
93
|
+
function mount() {
|
|
94
|
+
const page = document.querySelector('.page-current[data-name="settings"] .page-content');
|
|
95
|
+
if (!page || page.querySelector('.codeplay-huawei-privacy-settings')) return;
|
|
96
|
+
const container = document.createElement('div');
|
|
97
|
+
container.className = 'codeplay-huawei-privacy-settings block';
|
|
98
|
+
const policy = button('简体中文隐私政策', 'button', async () => {
|
|
99
|
+
try { await openPolicy(appId); }
|
|
100
|
+
catch { policy.textContent = '无法打开,请重试'; }
|
|
101
|
+
});
|
|
102
|
+
const withdraw = button('撤回隐私同意', 'button', async () => {
|
|
103
|
+
const confirmed = window.confirm('撤回同意后,应用会关闭。再次打开时可重新选择。确定撤回吗?');
|
|
104
|
+
if (!confirmed) return;
|
|
105
|
+
localStorage.removeItem(consentKey);
|
|
106
|
+
await setAnalyticsConsent(false);
|
|
107
|
+
if (Capacitor.isNativePlatform() && Capacitor.isPluginAvailable('CodeplayRuStoreAds')) {
|
|
108
|
+
await RuAds.setEnabled({ enabled: false }).catch(() => {});
|
|
109
|
+
}
|
|
110
|
+
if (Capacitor.isNativePlatform() && Capacitor.isPluginAvailable('App')) await NativeApp.exitApp();
|
|
111
|
+
else location.reload();
|
|
112
|
+
});
|
|
113
|
+
container.append(policy, withdraw);
|
|
114
|
+
page.append(container);
|
|
115
|
+
}
|
|
116
|
+
document.addEventListener('page:afterin', mount);
|
|
117
|
+
document.addEventListener('page:init', mount);
|
|
118
|
+
mount();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export async function startHuaweiPrivacy(options) {
|
|
122
|
+
if (document.readyState === 'loading') {
|
|
123
|
+
await new Promise(resolve => document.addEventListener('DOMContentLoaded', resolve, { once: true }));
|
|
124
|
+
}
|
|
125
|
+
let agreed = false;
|
|
126
|
+
try { agreed = localStorage.getItem(consentKey) === 'agreed'; } catch { /* Ask again. */ }
|
|
127
|
+
if (agreed) {
|
|
128
|
+
await setAnalyticsConsent(true);
|
|
129
|
+
await options.startApp();
|
|
130
|
+
installSettingsControls(options.appId);
|
|
131
|
+
} else {
|
|
132
|
+
await setAnalyticsConsent(false);
|
|
133
|
+
showGate(options);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const generatedEntry = '../buildCodeplay/huawei-privacy-generated.js';
|
|
5
|
+
const originalAttribute = 'data-codeplay-original-src';
|
|
6
|
+
const analyticsMarker = 'CODEPLAY HUAWEI ANALYTICS ORIGINAL';
|
|
7
|
+
|
|
8
|
+
function updateEntry(projectRoot, enabled, appId, appName) {
|
|
9
|
+
const indexPath = path.join(projectRoot, 'src/index.html');
|
|
10
|
+
if (!fs.existsSync(indexPath)) {
|
|
11
|
+
if (enabled) throw new Error('Huawei privacy: src/index.html was not found.');
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const original = fs.readFileSync(indexPath, 'utf8');
|
|
15
|
+
const scripts = [...original.matchAll(/<script\b(?=[^>]*\btype\s*=\s*["']module["'])[^>]*\bsrc\s*=\s*["']([^"']+)["'][^>]*><\/script>/gi)];
|
|
16
|
+
const managed = scripts.filter(match => match[0].includes(originalAttribute));
|
|
17
|
+
if (managed.length > 1) throw new Error('Huawei privacy: more than one managed app entry was found.');
|
|
18
|
+
let target = managed[0];
|
|
19
|
+
if (!target && enabled) {
|
|
20
|
+
if (scripts.length !== 1) throw new Error('Huawei privacy: expected exactly one module app entry in src/index.html.');
|
|
21
|
+
target = scripts[0];
|
|
22
|
+
}
|
|
23
|
+
if (!target) return false;
|
|
24
|
+
const saved = target[0].match(new RegExp(`${originalAttribute}=["']([^"']+)["']`));
|
|
25
|
+
const entry = saved ? saved[1] : target[1];
|
|
26
|
+
if (!/^\.\/[\w./-]+\.js$/.test(entry) || entry.includes('..')) {
|
|
27
|
+
throw new Error(`Huawei privacy: unsupported app entry ${entry}`);
|
|
28
|
+
}
|
|
29
|
+
const entryPath = path.resolve(projectRoot, 'src', entry);
|
|
30
|
+
if (!fs.existsSync(entryPath)) throw new Error(`Huawei privacy: app entry ${entry} was not found.`);
|
|
31
|
+
const tag = enabled
|
|
32
|
+
? target[0].replace(/\ssrc\s*=\s*["'][^"']+["']/, ` src="${generatedEntry}"`)
|
|
33
|
+
.replace(/<script\b/, match => saved ? match : `${match} ${originalAttribute}="${entry}"`)
|
|
34
|
+
: target[0].replace(/\ssrc\s*=\s*["'][^"']+["']/, ` src="${entry}"`)
|
|
35
|
+
.replace(new RegExp(`\\s+${originalAttribute}=["'][^"']+["']`), '');
|
|
36
|
+
const next = original.replace(target[0], tag);
|
|
37
|
+
if (next !== original) fs.writeFileSync(indexPath, next);
|
|
38
|
+
if (enabled) {
|
|
39
|
+
const wrapperPath = path.join(projectRoot, 'buildCodeplay/huawei-privacy-generated.js');
|
|
40
|
+
const importPath = `../src/${entry.slice(2)}`;
|
|
41
|
+
const wrapper = `// Generated by codeplay-common for the Huawei build.\nimport { startHuaweiPrivacy } from './huawei-privacy-entry.js';\nstartHuaweiPrivacy({ appId: ${JSON.stringify(appId)}, appName: ${JSON.stringify(appName)}, startApp: () => import(${JSON.stringify(importPath)}) });\n`;
|
|
42
|
+
if (!fs.existsSync(wrapperPath) || fs.readFileSync(wrapperPath, 'utf8') !== wrapper) fs.writeFileSync(wrapperPath, wrapper);
|
|
43
|
+
}
|
|
44
|
+
return next !== original;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function updateAnalyticsDefault(projectRoot, enabled) {
|
|
48
|
+
const manifestPath = path.join(projectRoot, 'android/app/src/main/AndroidManifest.xml');
|
|
49
|
+
if (!fs.existsSync(manifestPath)) {
|
|
50
|
+
if (enabled) throw new Error('Huawei privacy: AndroidManifest.xml was not found.');
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const original = fs.readFileSync(manifestPath, 'utf8');
|
|
54
|
+
const newline = original.includes('\r\n') ? '\r\n' : '\n';
|
|
55
|
+
const marker = new RegExp(`(\\r?\\n)?[ \\t]*<!-- ${analyticsMarker} ([A-Za-z0-9+/=]*) -->\\r?\\n[ \\t]*<meta-data\\b(?=[^>]*\\bandroid:name=["']firebase_analytics_collection_enabled["'])[^>]*\\/\\s*>\\r?\\n?`);
|
|
56
|
+
let next = original;
|
|
57
|
+
if (marker.test(next)) {
|
|
58
|
+
if (!enabled) next = next.replace(marker, (_, leading, encoded) =>
|
|
59
|
+
encoded ? `${leading || ''}${Buffer.from(encoded, 'base64').toString('utf8')}` : '');
|
|
60
|
+
else next = next.replace(marker, match => match.replace(/android:value=["'][^"']*["']/, 'android:value="false"'));
|
|
61
|
+
} else if (enabled) {
|
|
62
|
+
const existing = /[ \t]*<meta-data\b(?=[^>]*\bandroid:name=["']firebase_analytics_collection_enabled["'])[^>]*\/\s*>\r?\n?/;
|
|
63
|
+
const prior = next.match(existing)?.[0] || '';
|
|
64
|
+
const block = ` <!-- ${analyticsMarker} ${Buffer.from(prior).toString('base64')} -->${newline} <meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />${newline}`;
|
|
65
|
+
if (!/<application\b[^>]*>/.test(next)) throw new Error('Huawei privacy: application element was not found in AndroidManifest.xml.');
|
|
66
|
+
next = prior ? next.replace(existing, block) : next.replace(/<application\b[^>]*>/, match => `${match}${newline}${block}`);
|
|
67
|
+
}
|
|
68
|
+
if (next !== original) fs.writeFileSync(manifestPath, next);
|
|
69
|
+
return next !== original;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function syncHuaweiPrivacy(projectRoot, storeId, platform = 'android') {
|
|
73
|
+
const enabled = platform === 'android' && Number(storeId) === 4;
|
|
74
|
+
const config = JSON.parse(fs.readFileSync(path.join(projectRoot, 'capacitor.config.json'), 'utf8'));
|
|
75
|
+
const appId = Number(config.android?.APP_UNIQUE_ID);
|
|
76
|
+
if (enabled && (!Number.isInteger(appId) || appId < 1)) {
|
|
77
|
+
throw new Error('Huawei privacy: capacitor.config.json needs a valid android.APP_UNIQUE_ID.');
|
|
78
|
+
}
|
|
79
|
+
// Inspect both targets before writing either one, so unsupported app layouts fail early.
|
|
80
|
+
const manifestPath = path.join(projectRoot, 'android/app/src/main/AndroidManifest.xml');
|
|
81
|
+
if (enabled && !fs.existsSync(manifestPath)) {
|
|
82
|
+
throw new Error('Huawei privacy: AndroidManifest.xml was not found.');
|
|
83
|
+
}
|
|
84
|
+
if (enabled && !/<application\b[^>]*>/.test(fs.readFileSync(manifestPath, 'utf8'))) {
|
|
85
|
+
throw new Error('Huawei privacy: application element was not found in AndroidManifest.xml.');
|
|
86
|
+
}
|
|
87
|
+
updateEntry(projectRoot, enabled, appId, config.appName || 'App');
|
|
88
|
+
updateAnalyticsDefault(projectRoot, enabled);
|
|
89
|
+
if (enabled) console.log(`Huawei privacy consent enabled. Verify https://htmlcodeplay.com/privacy/ch/${appId} is published before submission.`);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
module.exports = { syncHuaweiPrivacy };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.codeplay-huawei-privacy-gate {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 2147483647;
|
|
4
|
+
inset: 0;
|
|
5
|
+
display: grid;
|
|
6
|
+
place-items: center;
|
|
7
|
+
overflow: auto;
|
|
8
|
+
padding: calc(24px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px));
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
background: #fff;
|
|
11
|
+
color: #17212b;
|
|
12
|
+
font-family: system-ui, sans-serif;
|
|
13
|
+
}
|
|
14
|
+
.codeplay-huawei-privacy-card { width: min(100%, 420px); }
|
|
15
|
+
.codeplay-huawei-privacy-card h1 { margin: 0 0 16px; font-size: 24px; line-height: 1.3; }
|
|
16
|
+
.codeplay-huawei-privacy-card p { line-height: 1.6; }
|
|
17
|
+
.codeplay-huawei-privacy-card button { display: block; width: 100%; min-height: 48px; margin-top: 12px; border-radius: 8px; font: inherit; }
|
|
18
|
+
.codeplay-huawei-privacy-policy { border: 0; background: transparent; color: #155fc6; text-decoration: underline; }
|
|
19
|
+
.codeplay-huawei-privacy-agree { border: 0; background: #155fc6; color: #fff; }
|
|
20
|
+
.codeplay-huawei-privacy-decline { border: 1px solid #8a929c; background: #fff; color: #17212b; }
|
|
21
|
+
.codeplay-huawei-privacy-status { min-height: 1.5em; color: #9b2b20; }
|
|
22
|
+
.codeplay-huawei-privacy-settings { display: flex; flex-direction: column; gap: 8px; }
|