@@ -117,6 +117,11 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
117117 return transferredFiles ;
118118 }
119119
120+ public getDeviceHashService ( appIdentifier : string ) : Mobile . IAndroidDeviceHashService {
121+ const adb = this . $injector . resolve ( DeviceAndroidDebugBridge , { identifier : this . device . deviceInfo . identifier } ) ;
122+ return this . $injector . resolve ( AndroidDeviceHashService , { adb, appIdentifier } ) ;
123+ }
124+
120125 private async _transferFiles ( deviceAppData : Mobile . IDeviceAppData , localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ) : Promise < Mobile . ILocalToDevicePathData [ ] > {
121126 await this . livesyncTool . sendFiles ( localToDevicePaths . map ( localToDevicePathData => localToDevicePathData . getLocalPath ( ) ) ) ;
122127
@@ -132,19 +137,24 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
132137 private async _transferDirectory ( deviceAppData : Mobile . IDeviceAppData , localToDevicePaths : Mobile . ILocalToDevicePathData [ ] , projectFilesPath : string ) : Promise < Mobile . ILocalToDevicePathData [ ] > {
133138 let transferredLocalToDevicePaths : Mobile . ILocalToDevicePathData [ ] ;
134139 const deviceHashService = this . getDeviceHashService ( deviceAppData . appIdentifier ) ;
135- const currentShasums : IStringDictionary = await deviceHashService . generateHashesFromLocalToDevicePaths ( localToDevicePaths ) ;
136- const oldShasums = await deviceHashService . getShasumsFromDevice ( ) ;
140+ const currentHashes = await deviceHashService . generateHashesFromLocalToDevicePaths ( localToDevicePaths ) ;
141+ const oldHashes = await deviceHashService . getShasumsFromDevice ( ) ;
142+ console . log ( "!!!!! OLD HASHES!!!!!!" ) ;
143+ console . log ( oldHashes ) ;
137144
138- if ( this . $options . force || ! oldShasums ) {
145+ if ( this . $options . force || ! oldHashes ) {
146+ console . log ( "!!!!!!!!! NO OLD HASHES!!!!! THIS SHOULD NOT HAPPEN!!!!!!!" ) ;
139147 await this . livesyncTool . sendDirectory ( projectFilesPath ) ;
140- await deviceHashService . uploadHashFileToDevice ( currentShasums ) ;
148+ await deviceHashService . uploadHashFileToDevice ( currentHashes ) ;
141149 transferredLocalToDevicePaths = localToDevicePaths ;
142150 } else {
143- const changedShasums = deviceHashService . getChangedShasums ( oldShasums , currentShasums ) ;
151+ const changedShasums = deviceHashService . getChangedShasums ( oldHashes , currentHashes ) ;
152+ console . log ( "CHANGEDSHASUMS!!!!!!!!!!!!!!!" ) ;
153+ console . log ( changedShasums ) ;
144154 const changedFiles = _ . keys ( changedShasums ) ;
145155 if ( changedFiles . length ) {
146156 await this . livesyncTool . sendFiles ( changedFiles ) ;
147- await deviceHashService . uploadHashFileToDevice ( currentShasums ) ;
157+ await deviceHashService . uploadHashFileToDevice ( currentHashes ) ;
148158 transferredLocalToDevicePaths = localToDevicePaths . filter ( localToDevicePathData => changedFiles . indexOf ( localToDevicePathData . getLocalPath ( ) ) >= 0 ) ;
149159 } else {
150160 transferredLocalToDevicePaths = [ ] ;
@@ -165,9 +175,4 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
165175 } ) ;
166176 }
167177 }
168-
169- public getDeviceHashService ( appIdentifier : string ) : Mobile . IAndroidDeviceHashService {
170- const adb = this . $injector . resolve ( DeviceAndroidDebugBridge , { identifier : this . device . deviceInfo . identifier } ) ;
171- return this . $injector . resolve ( AndroidDeviceHashService , { adb, appIdentifier } ) ;
172- }
173178}
0 commit comments