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:
parent
4a1b68155d
commit
9209b923c7
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue