Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ function parseManifest(xml) {
result.activities = activity_nodes.map(n => attributeValue(n));
}

// extract the default launcher activity
const launcher_xpath = '/manifest/application/activity[intent-filter/action[@android:name="android.intent.action.MAIN"] and intent-filter/category[@android:name="android.intent.category.LAUNCHER"]]/@android:name';
// extract the default launcher activity (Looking for <activity> or <activity-alias> with intent-filter action=MAIN and category=LAUNCHER)
const launcher_xpath = '(/manifest/application/activity[intent-filter/action[@android:name="android.intent.action.MAIN"] and intent-filter/category[@android:name="android.intent.category.LAUNCHER"] and not(@android:enabled="false")] | /manifest/application/activity-alias[intent-filter/action[@android:name="android.intent.action.MAIN"] and intent-filter/category[@android:name="android.intent.category.LAUNCHER"] and not(@android:enabled="false")])/@android:name';
const launcher_nodes = android_select(launcher_xpath, doc);
// should we warn if there's more than one?
if (Array.isArray(launcher_nodes) && launcher_nodes.length >= 1) {
Expand Down