1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Support dotless activity names.

This commit is contained in:
Simo Kinnunen 2015-02-05 22:07:58 +09:00
parent 4a1b68155d
commit 9209b923c7

View file

@ -136,12 +136,20 @@ module.exports = syrup.serial()
.then(function() { .then(function() {
if (message.launch) { if (message.launch) {
if (manifest.application.launcherActivities.length) { if (manifest.application.launcherActivities.length) {
var activityName = manifest.application.launcherActivities[0].name
// According to the AndroidManifest.xml documentation the dot is
// required, but actually it isn't.
if (activityName.indexOf('.') === -1) {
activityName = util.format('.%s', activityName)
}
var launchActivity = { var launchActivity = {
action: 'android.intent.action.MAIN' action: 'android.intent.action.MAIN'
, component: util.format( , component: util.format(
'%s/%s' '%s/%s'
, pkg , pkg
, manifest.application.launcherActivities[0].name , activityName
) )
, category: ['android.intent.category.LAUNCHER'] , category: ['android.intent.category.LAUNCHER']
, flags: 0x10200000 , flags: 0x10200000