Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-16015] Fixed bug where the application icon was not properly bein... #5137

Merged
merged 3 commits into from
Dec 18, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 14 additions & 3 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,11 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) {
}

// make sure we have an icon
if (this.tiappAndroidManifest && this.tiappAndroidManifest.application && this.tiappAndroidManifest.application.icon) {
cli.tiapp.icon = this.tiappAndroidManifest.application.icon.replace(/^\@drawable\//, '') + '.png';
} else if (this.customAndroidManifest && this.customAndroidManifest.application && this.customAndroidManifest.application.icon) {
cli.tiapp.icon = this.customAndroidManifest.application.icon.replace(/^\@drawable\//, '') + '.png';
}
if (!cli.tiapp.icon || !['Resources', 'Resources/android'].some(function (p) {
return fs.existsSync(cli.argv['project-dir'], p, cli.tiapp.icon);
})) {
Expand Down Expand Up @@ -3394,8 +3399,13 @@ AndroidBuilder.prototype.generateAndroidManifest = function generateAndroidManif
}
}, this);

// merge the android manifests
// set the app icon
finalAndroidManifest.application.icon = '@drawable/' + this.tiapp.icon.replace(/((\.9)?\.(png|jpg))$/, '');

// merge the custom android manifest
finalAndroidManifest.merge(customAndroidManifest);

// merge the tiapp.xml android manifest
finalAndroidManifest.merge(tiappAndroidManifest);

this.modules.forEach(function (module) {
Expand Down Expand Up @@ -3830,9 +3840,10 @@ AndroidBuilder.prototype.createSignedApk = function createSignedApk(next) {
'-storepass', this.keystoreStorePassword,
'-alias', this.keystoreAlias
],
keytoolArgsSafe = [].concat(keytoolArgs);
keytoolArgsSafe = [].concat(keytoolArgs),
i = keytoolArgs.indexOf('-storepass') + 1;

keytoolArgsSafe[5] = keytoolArgsSafe[5].replace(/./g, '*');
keytoolArgsSafe[i] = keytoolArgsSafe[i].replace(/./g, '*');

this.logger.info(__('Determining signature algorithm: %s', (this.jdkInfo.executables.keytool + ' "' + keytoolArgsSafe.join('" "') + '"').cyan));

Expand Down