From 5c3d5e837fe9029b6ff803fcdad34953759831b9 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Fri, 11 Sep 2015 20:21:05 +0300 Subject: [PATCH] Remove obsoleted code --- lib/common | 2 +- lib/services/usb-livesync-service.ts | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/common b/lib/common index 39d7d7a77c..93a73565fa 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 39d7d7a77ce8a07c8e65aa6de4dc674c290a7b2d +Subproject commit 93a73565fae071838c6cb2a1bc2af6523ac6a868 diff --git a/lib/services/usb-livesync-service.ts b/lib/services/usb-livesync-service.ts index 6017f7f9fc..42814b1f17 100644 --- a/lib/services/usb-livesync-service.ts +++ b/lib/services/usb-livesync-service.ts @@ -13,8 +13,7 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer "app_resources" ]; - constructor(private $commandsService: ICommandsService, - $devicesServices: Mobile.IDevicesServices, + constructor($devicesServices: Mobile.IDevicesServices, $fs: IFileSystem, $mobileHelper: Mobile.IMobileHelper, $localToDevicePathDataFactory: Mobile.ILocalToDevicePathDataFactory, @@ -42,10 +41,10 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer let platformLowerCase = platform ? platform.toLowerCase() : null; let platformData = this.$platformsData.getPlatformData(platformLowerCase); - if(platformLowerCase === this.$devicePlatformsConstants.Android.toLowerCase()) { + if (platformLowerCase === this.$devicePlatformsConstants.Android.toLowerCase()) { this.$projectDataService.initialize(this.$projectData.projectDir); let frameworkVersion = this.$projectDataService.getValue(platformData.frameworkPackageName).wait().version; - if(semver.lt(frameworkVersion, "1.2.1")) { + if (semver.lt(frameworkVersion, "1.2.1")) { let shouldUpdate = this.$prompter.confirm( "You need Android Runtime 1.2.1 or later for LiveSync to work properly. Do you want to update your runtime now?" ).wait(); @@ -61,11 +60,6 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer let projectFilesPath = path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME); - let restartAppOnDeviceAction = (device: Mobile.IDevice, deviceAppData: Mobile.IDeviceAppData, localToDevicePaths?: Mobile.ILocalToDevicePathData[]): IFuture => { - let platformSpecificUsbLiveSyncService = this.resolveUsbLiveSyncService(platform || this.$devicesServices.platform, device); - return platformSpecificUsbLiveSyncService.restartApplication(deviceAppData, localToDevicePaths); - }; - let notInstalledAppOnDeviceAction = (device: Mobile.IDevice): IFuture => { return this.$platformService.deployOnDevice(platform); }; @@ -76,7 +70,7 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer let beforeLiveSyncAction = (device: Mobile.IDevice, deviceAppData: Mobile.IDeviceAppData): IFuture => { let platformSpecificUsbLiveSyncService = this.resolveUsbLiveSyncService(platform || this.$devicesServices.platform, device); - if(platformSpecificUsbLiveSyncService.beforeLiveSyncAction) { + if (platformSpecificUsbLiveSyncService.beforeLiveSyncAction) { return platformSpecificUsbLiveSyncService.beforeLiveSyncAction(deviceAppData); } return Future.fromResult(); @@ -109,7 +103,6 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer this.excludedProjectDirsAndFiles, watchGlob, platformSpecificLiveSyncServices, - restartAppOnDeviceAction, notInstalledAppOnDeviceAction, notRunningiOSSimulatorAction, localProjectRootPath,