mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-20 00:06:32 +00:00
Revert "Merge branch 'develop' into chore/expo-52"
This reverts commit933f3f2f7c, reversing changes made tof92fee4158.
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="false">
|
||||
<trust-anchors>
|
||||
<certificates src="system" />
|
||||
</trust-anchors>
|
||||
</base-config>
|
||||
</network-security-config>
|
||||
@@ -1,34 +0,0 @@
|
||||
const { withAndroidManifest } = require("@expo/config-plugins");
|
||||
|
||||
const withGoogleCastActivity = (config) =>
|
||||
withAndroidManifest(config, async (config) => {
|
||||
const mainApplication = config.modResults.manifest.application[0];
|
||||
|
||||
// Initialize activity array if it doesn't exist
|
||||
if (!mainApplication.activity) {
|
||||
mainApplication.activity = [];
|
||||
}
|
||||
|
||||
// Check if the activity already exists
|
||||
const activityExists = mainApplication.activity.some(
|
||||
(activity) =>
|
||||
activity.$?.["android:name"] ===
|
||||
"com.reactnative.googlecast.RNGCExpandedControllerActivity"
|
||||
);
|
||||
|
||||
// Only add the activity if it doesn't already exist
|
||||
if (!activityExists) {
|
||||
mainApplication.activity.push({
|
||||
$: {
|
||||
"android:name":
|
||||
"com.reactnative.googlecast.RNGCExpandedControllerActivity",
|
||||
"android:theme": "@style/Theme.MaterialComponents.NoActionBar",
|
||||
"android:launchMode": "singleTask",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return config;
|
||||
});
|
||||
|
||||
module.exports = withGoogleCastActivity;
|
||||
@@ -1,44 +0,0 @@
|
||||
const { AndroidConfig, withAndroidManifest } = require("@expo/config-plugins");
|
||||
const { Paths } = require("@expo/config-plugins/build/android");
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const fsPromises = fs.promises;
|
||||
|
||||
const { getMainApplicationOrThrow } = AndroidConfig.Manifest;
|
||||
|
||||
const withTrustLocalCerts = (config) => {
|
||||
return withAndroidManifest(config, async (config) => {
|
||||
config.modResults = await setCustomConfigAsync(config, config.modResults);
|
||||
return config;
|
||||
});
|
||||
};
|
||||
|
||||
async function setCustomConfigAsync(config, androidManifest) {
|
||||
const src_file_path = path.join(__dirname, "network_security_config.xml");
|
||||
const res_file_path = path.join(
|
||||
await Paths.getResourceFolderAsync(config.modRequest.projectRoot),
|
||||
"xml",
|
||||
"network_security_config.xml"
|
||||
);
|
||||
|
||||
const res_dir = path.resolve(res_file_path, "..");
|
||||
|
||||
if (!fs.existsSync(res_dir)) {
|
||||
await fsPromises.mkdir(res_dir);
|
||||
}
|
||||
|
||||
try {
|
||||
await fsPromises.copyFile(src_file_path, res_file_path);
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Failed to copy network security config file from ${src_file_path} to ${res_file_path}: ${e.message}`
|
||||
);
|
||||
}
|
||||
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
||||
mainApplication.$["android:networkSecurityConfig"] =
|
||||
"@xml/network_security_config";
|
||||
|
||||
return androidManifest;
|
||||
}
|
||||
|
||||
module.exports = withTrustLocalCerts;
|
||||
Reference in New Issue
Block a user