@@ -15,6 +15,7 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
15
15
private $injector : IInjector ,
16
16
protected $platformsData : IPlatformsData ,
17
17
protected $staticConfig : Config . IStaticConfig ,
18
+ private $logger : ILogger ,
18
19
protected device : Mobile . IAndroidDevice ,
19
20
private $options : ICommonOptions ) {
20
21
super ( $platformsData , device ) ;
@@ -33,7 +34,21 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
33
34
( localToDevicePath : Mobile . ILocalToDevicePathData ) => ! this . canExecuteFastSync ( localToDevicePath . getLocalPath ( ) , projectData , this . device . deviceInfo . platform ) ) ;
34
35
35
36
if ( liveSyncInfo . modifiedFilesData . length ) {
36
- await this . livesyncTool . sendDoSyncOperation ( ) ;
37
+ const operationUid = this . livesyncTool . generateOperationUid ( ) ;
38
+ const doSyncPromise = this . livesyncTool . sendDoSyncOperation ( operationUid ) ;
39
+
40
+ //TODO clear interval on exit sygnals/stopLivesync
41
+ const syncInterval : NodeJS . Timer = setInterval ( ( ) => {
42
+ if ( this . livesyncTool . isOperationInProgress ( operationUid ) ) {
43
+ this . $logger . info ( "Sync operation in progress..." ) ;
44
+ }
45
+ } , 10000 ) ;
46
+
47
+ const clearSyncInterval = ( ) => {
48
+ clearInterval ( syncInterval ) ;
49
+ }
50
+ doSyncPromise . then ( clearSyncInterval , clearSyncInterval ) ;
51
+ await doSyncPromise ;
37
52
38
53
if ( ! canExecuteFastSync ) {
39
54
await this . device . applicationManager . restartApplication ( { appId : liveSyncInfo . deviceAppData . appIdentifier , projectName : projectData . projectName } ) ;
0 commit comments