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

fix: Use .BrowserApp as default reference browser apk component #2069

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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: 4 additions & 0 deletions src/firefox/package-identifiers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ export default [
'org.mozilla.firefox',
'org.mozilla.reference.browser',
];

export const defaultApkComponents = {
'org.mozilla.reference.browser': '.BrowserActivity',
};
ankushduacodes marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 7 additions & 2 deletions src/util/adb.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
WebExtError,
} from '../errors';
import {createLogger} from '../util/logger';
import packageIdentifiers from '../firefox/package-identifiers';
import packageIdentifiers, { defaultApkComponents }
from '../firefox/package-identifiers';
ankushduacodes marked this conversation as resolved.
Show resolved Hide resolved

export const DEVICE_DIR_BASE = '/sdcard/';
export const ARTIFACTS_DIR_PREFIX = 'web-ext-artifacts-';
Expand Down Expand Up @@ -312,7 +313,11 @@ export default class ADBUtils {
}];

if (!apkComponent) {
apkComponent = '.App';
if (defaultApkComponents[apk]) {
apkComponent = defaultApkComponents[apk];
} else {
apkComponent = '.App';
}
ankushduacodes marked this conversation as resolved.
Show resolved Hide resolved
} else if (!apkComponent.includes('.')) {
apkComponent = `.${apkComponent}`;
}
Expand Down