Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[xdl]<fix>: Remove default splash screen image on Android #2883

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions packages/xdl/src/detach/AndroidShellApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down