mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 05:53:19 +02:00
Support dotless activity names.
This commit is contained in:
@@ -136,12 +136,20 @@ module.exports = syrup.serial()
|
||||
.then(function() {
|
||||
if (message.launch) {
|
||||
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 = {
|
||||
action: 'android.intent.action.MAIN'
|
||||
, component: util.format(
|
||||
'%s/%s'
|
||||
, pkg
|
||||
, manifest.application.launcherActivities[0].name
|
||||
, activityName
|
||||
)
|
||||
, category: ['android.intent.category.LAUNCHER']
|
||||
, flags: 0x10200000
|
||||
|
||||
Reference in New Issue
Block a user