@@ -102,8 +102,8 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
102
102
}
103
103
104
104
private async refreshApplication ( projectData : IProjectData , liveSyncResultInfo : ILiveSyncResultInfo , debugOpts ?: IDebugOptions , outputPath ?: string ) : Promise < void > {
105
- const liveSyncProcessInfo = this . liveSyncProcessesInfo [ projectData . projectDir ] ;
106
- const deviceDescriptor = _ . find ( liveSyncProcessInfo . deviceDescriptors , dd => dd . identifier === liveSyncResultInfo . deviceAppData . device . deviceInfo . identifier ) ;
105
+ const deviceDescriptor = this . getDeviceDescriptor ( liveSyncResultInfo . deviceAppData . device . deviceInfo . identifier , projectData . projectDir ) ;
106
+
107
107
return deviceDescriptor && deviceDescriptor . debugggingEnabled ?
108
108
this . refreshApplicationWithDebug ( projectData , liveSyncResultInfo , debugOpts , outputPath ) :
109
109
this . refreshApplicationWithoutDebug ( projectData , liveSyncResultInfo , debugOpts , outputPath ) ;
@@ -118,13 +118,13 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
118
118
const msg = `Unable to start application ${ projectData . projectId } on device ${ liveSyncResultInfo . deviceAppData . device . deviceInfo . identifier } . Try starting it manually.` ;
119
119
this . $logger . warn ( msg ) ;
120
120
if ( ! settings || ! settings . shouldSkipEmitLiveSyncNotification ) {
121
- this . emit ( LiveSyncEvents . liveSyncNotification , {
122
- projectDir : projectData . projectDir ,
123
- applicationIdentifier : projectData . projectId ,
124
- deviceIdentifier : liveSyncResultInfo . deviceAppData . device . deviceInfo . identifier ,
125
- notification : msg
126
- } ) ;
127
- }
121
+ this . emit ( LiveSyncEvents . liveSyncNotification , {
122
+ projectDir : projectData . projectDir ,
123
+ applicationIdentifier : projectData . projectId ,
124
+ deviceIdentifier : liveSyncResultInfo . deviceAppData . device . deviceInfo . identifier ,
125
+ notification : msg
126
+ } ) ;
127
+ }
128
128
}
129
129
130
130
this . emit ( LiveSyncEvents . liveSyncExecuted , {
@@ -228,9 +228,9 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
228
228
}
229
229
230
230
private getDeviceDescriptor ( deviceIdentifier : string , projectDir : string ) {
231
- const liveSyncProcessInfo : ILiveSyncProcessInfo = this . liveSyncProcessesInfo [ projectDir ] || < ILiveSyncProcessInfo > { } ;
231
+ const deviceDescriptors = this . getLiveSyncDeviceDescriptors ( projectDir ) ;
232
232
233
- return _ . find ( liveSyncProcessInfo . deviceDescriptors , d => d . identifier === deviceIdentifier ) ;
233
+ return _ . find ( deviceDescriptors , d => d . identifier === deviceIdentifier ) ;
234
234
}
235
235
236
236
private async enableDebuggingCoreWithoutWaitingCurrentAction ( deviceOption : IEnableDebuggingDeviceOptions , debuggingAdditionalOptions : IDebuggingAdditionalOptions ) : Promise < void > {
0 commit comments