@@ -35,11 +35,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3535exports . killEmulator = exports . launchEmulator = void 0 ;
3636const exec = __importStar ( require ( "@actions/exec" ) ) ;
3737const fs = __importStar ( require ( "fs" ) ) ;
38- const EMULATOR_BOOT_TIMEOUT_SECONDS = 600 ;
3938/**
4039 * Creates and launches a new AVD instance with the specified configurations.
4140 */
42- function launchEmulator ( apiLevel , target , arch , profile , cores , ramSize , heapSize , sdcardPathOrSize , diskSize , avdName , forceAvdCreation , emulatorOptions , disableAnimations , disableSpellChecker , disableLinuxHardwareAcceleration , enableHardwareKeyboard ) {
41+ function launchEmulator ( apiLevel , target , arch , profile , cores , ramSize , heapSize , sdcardPathOrSize , diskSize , avdName , forceAvdCreation , emulatorBootTimeout , emulatorOptions , disableAnimations , disableSpellChecker , disableLinuxHardwareAcceleration , enableHardwareKeyboard ) {
4342 return __awaiter ( this , void 0 , void 0 , function * ( ) {
4443 try {
4544 console . log ( `::group::Launch Emulator` ) ;
@@ -83,7 +82,7 @@ function launchEmulator(apiLevel, target, arch, profile, cores, ramSize, heapSiz
8382 } ,
8483 } ) ;
8584 // wait for emulator to complete booting
86- yield waitForDevice ( ) ;
85+ yield waitForDevice ( emulatorBootTimeout ) ;
8786 yield exec . exec ( `adb shell input keyevent 82` ) ;
8887 if ( disableAnimations ) {
8988 console . log ( 'Disabling animations.' ) ;
@@ -125,12 +124,12 @@ exports.killEmulator = killEmulator;
125124/**
126125 * Wait for emulator to boot.
127126 */
128- function waitForDevice ( ) {
127+ function waitForDevice ( emulatorBootTimeout ) {
129128 return __awaiter ( this , void 0 , void 0 , function * ( ) {
130129 let booted = false ;
131130 let attempts = 0 ;
132131 const retryInterval = 2 ; // retry every 2 seconds
133- const maxAttempts = EMULATOR_BOOT_TIMEOUT_SECONDS / 2 ;
132+ const maxAttempts = emulatorBootTimeout / 2 ;
134133 while ( ! booted ) {
135134 try {
136135 let result = '' ;
0 commit comments