Skip to content

Commit

Permalink
Merge pull request #10226 from jquick-axway/TIMOB-26250-7_3_X
Browse files Browse the repository at this point in the history
[7_3_X][TIMOB-26250] Android: Allow activity "android:launchMode" to be set in "tiapp.xml"
  • Loading branch information
garymathews committed Aug 2, 2018
2 parents 065f72d + 2a0588e commit a0a7f12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3772,14 +3772,14 @@ AndroidBuilder.prototype.generateAndroidManifest = function generateAndroidManif
}, this);
}, this);

// TIMOB-15253: Titanium Android cannot be used with 'android:launchMode' as it can dispose the KrollRuntime instance
// prevent 'android:launchMode' from being defined in the AndroidManifest.xml
// scan "AndroidManifest.xml" activities
if (tiappAndroidManifest && tiappAndroidManifest.application) {
// Log a warning if Activity "launchMode" is set. May make app behave in a manner Titanium does not expect.
// Note: Allow it since some developers want "singleTask" support and know how to deal with its repercussions.
for (const activity in tiappAndroidManifest.application.activity) {
const parameters = tiappAndroidManifest.application.activity[activity];
if (parameters['launchMode']) {
delete parameters['launchMode'];
this.logger.warn(__('%s should not be used. Ignoring definition from %s', 'android:launchMode'.red, activity.cyan));
this.logger.warn(__('Setting "%s" is not recommended for activity "%s"', 'android:launchMode'.red, activity.cyan));
}
}

Expand Down

0 comments on commit a0a7f12

Please sign in to comment.