diff --git a/lib/prepare.js b/lib/prepare.js index 37550071ea..1efc8dfaf9 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -385,7 +385,6 @@ function updateProjectSplashScreen (platformConfig, locations) { break; case 'windowSplashScreenAnimatedIcon': - case 'windowSplashScreenBrandingImage': // handle here the cases of "png" vs "xml" (drawable) // If "png": // - Clear out default or previous set "drawable/ic_cdv_splashscreen.xml" if exisiting. @@ -398,22 +397,26 @@ function updateProjectSplashScreen (platformConfig, locations) { // value should change depending on case: // If "png": "@mipmap/ic_cdv_splashscreen" // If "xml": "@drawable/ic_cdv_splashscreen" + updateProjectSplashScreenImage(locations, themeKey, cdvConfigPrefKey, cdvConfigPrefValue); + break; + + case 'windowSplashScreenBrandingImage': + events.emit('warn', `"${themeKey}" is currently not supported by the splash screen compatibility library. https://issuetracker.google.com/issues/194301890`); + updateProjectSplashScreenImage(locations, themeKey, cdvConfigPrefKey, cdvConfigPrefValue); - if (themeKey === 'windowSplashScreenBrandingImage') { - // force the themes value to `@color/cdv_splashscreen_icon_background` - if (!cdvConfigPrefValue && themeTargetNode) { - splashScreenTheme.remove(themeTargetNode); - } else if (cdvConfigPrefValue) { - // if there is no current node, create a new node. - if (!themeTargetNode) { - themeTargetNode = themes.getroot().makeelement('item', { name: themeKey }); - splashScreenTheme.append(themeTargetNode); - } - - // set the user defined color. - themeTargetNode.text = '@drawable/ic_cdv_splashscreen_branding'; + // force the themes value to `@color/cdv_splashscreen_icon_background` + if (!cdvConfigPrefValue && themeTargetNode) { + splashScreenTheme.remove(themeTargetNode); + } else if (cdvConfigPrefValue) { + // if there is no current node, create a new node. + if (!themeTargetNode) { + themeTargetNode = themes.getroot().makeelement('item', { name: themeKey }); + splashScreenTheme.append(themeTargetNode); } + + // set the user defined color. + themeTargetNode.text = '@drawable/ic_cdv_splashscreen_branding'; } break;