MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / chooseAndroidLaunchComponent

Function chooseAndroidLaunchComponent

scripts/integration/android.mjs:607–628  ·  view source on GitHub ↗
(components)

Source from the content-addressed store, hash-verified

605}
606
607function chooseAndroidLaunchComponent(components) {
608 const preferredPackages = [
609 "com.android.settings/",
610 "com.google.android.apps.nexuslauncher/",
611 "com.android.launcher3/",
612 ];
613 for (const packagePrefix of preferredPackages) {
614 const component = components.find((value) =>
615 value.startsWith(packagePrefix),
616 );
617 if (component) {
618 return component;
619 }
620 }
621 return (
622 components.find(
623 (value) =>
624 !value.startsWith("com.android.systemui/") &&
625 !value.startsWith("android/"),
626 ) ?? null
627 );
628}
629
630function runningAndroidAvds(fallbackAvdName = "") {
631 const adb = androidSdkTool("platform-tools/adb");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected