Skip to content

Commit dd27d53

Browse files
committed
Remove getPlatform. Initialize is called before live sync in the livesync-service
1 parent 8490606 commit dd27d53

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

lib/services/livesync/livesync-service-base.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ class LiveSyncServiceBase extends EventEmitter implements ILiveSyncServiceBase {
3232
this.fileHashes = Object.create(null);
3333
}
3434

35-
public getPlatform(platform?: string): IFuture<string> { // gets the platform and ensures that the devicesService is initialized
36-
return (() => {
37-
this.$devicesService.initialize({ platform: platform, deviceId: this.$options.device }).wait();
38-
return platform || this.$devicesService.platform;
39-
}).future<string>()();
40-
}
41-
4235
public sync(data: ILiveSyncData[], filePaths?: string[]): IFuture<void> {
4336
return (() => {
4437
this.syncCore(data, filePaths).wait();

lib/services/livesync/livesync-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class LiveSyncService implements ILiveSyncService {
7272
}
7373

7474
private prepareLiveSyncData(platform: string): ILiveSyncData {
75-
platform = this.$liveSyncServiceBase.getPlatform(platform).wait();
75+
platform = platform || this.$devicesService.platform;
7676
if (!this.$platformService.preparePlatform(platform.toLowerCase()).wait()) {
7777
this.$errors.failWithoutHelp("Verify that listed files are well-formed and try again the operation.");
7878
}

0 commit comments

Comments
 (0)