File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -586,7 +586,16 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
586586 if ( alreadyHasAndroidManifest ) {
587587 this . backupOriginalAndroidManifest ( originalAndroidManifestFilePath ) . wait ( ) ;
588588 }
589- this . $fs . copyFile ( templateAndroidManifest , originalAndroidManifestFilePath ) . wait ( ) ;
589+
590+ let content = this . $fs . readText ( templateAndroidManifest ) . wait ( ) ;
591+
592+ // We do not want to force launch screens on old projects.
593+ let themeMeta = `<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />` ;
594+ content = content
595+ . replace ( `\n\t\t\tandroid:theme="@style/LaunchScreenTheme">\n` , `>\n\t\t\t<!-- android:theme="@style/LaunchScreenTheme" -->\n` )
596+ . replace ( themeMeta , "<!-- " + themeMeta + " -->" ) ;
597+
598+ this . $fs . writeFile ( originalAndroidManifestFilePath , content ) . wait ( ) ;
590599 } catch ( e ) {
591600 this . $logger . trace ( `Copying template's ${ this . platformData . configurationFileName } failed. ` , e ) ;
592601 this . revertBackupOfOriginalAndroidManifest ( originalAndroidManifestFilePath ) . wait ( ) ;
You can’t perform that action at this time.
0 commit comments