From 4ed9a7e4d1b0aa126c19456160054b4e66240120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Bukowski?= Date: Fri, 13 Nov 2020 18:41:48 +0100 Subject: [PATCH 1/2] [xdl]: Remove default splash screen image When a user does not provide a splash image we shouldn't show any image. Ensured the splash screen image from Expo Client is not propagated to standalones. --- packages/xdl/src/detach/AndroidShellApp.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/xdl/src/detach/AndroidShellApp.js b/packages/xdl/src/detach/AndroidShellApp.js index 9a11e972c1..b74d648430 100644 --- a/packages/xdl/src/detach/AndroidShellApp.js +++ b/packages/xdl/src/detach/AndroidShellApp.js @@ -1065,18 +1065,18 @@ export async function runShellAppModificationsAsync(context, sdkVersion, buildMo path.join(shellPath, 'app', 'src', 'main', 'res', 'values', 'colors.xml') ); - // Splash Background - if (backgroundImages && backgroundImages.length > 0) { - // Delete the placeholder images - const splashImageFilename = - majorSdkVersion >= 39 ? 'splashscreen_image.png' : 'shell_launch_background_image.png'; - globSync(`**/${splashImageFilename}'`, { - cwd: path.join(shellPath, 'app', 'src', 'main', 'res'), - absolute: true, - }).forEach(filePath => { - fs.removeSync(filePath); - }); + // Delete the placeholder splash images + const splashImageFilename = + majorSdkVersion >= 39 ? 'splashscreen_image.png' : 'shell_launch_background_image.png'; + globSync(`**/${splashImageFilename}`, { + cwd: path.join(shellPath, 'app', 'src', 'main', 'res'), + absolute: true, + }).forEach(filePath => { + fs.removeSync(filePath); + }); + // Use the splash images provided by the user + if (backgroundImages && backgroundImages.length > 0) { await Promise.all( backgroundImages.map(async image => { if (isRunningInUserContext) { From 3ff6c670d6bc0a49076fd136ef70105755d21d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Bukowski?= Date: Tue, 24 Nov 2020 12:45:23 +0100 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 270596d5a7..148b04bbfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ This is the log of notable changes to Expo CLI and related packages. ### 🐛 Bug fixes +- [xdl] On Android remove default template splash image when no splash image is specified in the app manifest ([#2883](https://github.com/expo/expo-cli/pull/2883)) + ## [Mon, 9 Nov 2020 13:44:59 -0800](https://github.com/expo/expo-cli/commit/d5b8759b32d5a7747067a969728d9ba732926824) ### 🛠 Breaking changes