Skip to content

Remove obsoleted code #907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions lib/services/usb-livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand All @@ -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<void> => {
let platformSpecificUsbLiveSyncService = this.resolveUsbLiveSyncService(platform || this.$devicesServices.platform, device);
return platformSpecificUsbLiveSyncService.restartApplication(deviceAppData, localToDevicePaths);
};

let notInstalledAppOnDeviceAction = (device: Mobile.IDevice): IFuture<void> => {
return this.$platformService.deployOnDevice(platform);
};
Expand All @@ -76,7 +70,7 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer

let beforeLiveSyncAction = (device: Mobile.IDevice, deviceAppData: Mobile.IDeviceAppData): IFuture<void> => {
let platformSpecificUsbLiveSyncService = this.resolveUsbLiveSyncService(platform || this.$devicesServices.platform, device);
if(platformSpecificUsbLiveSyncService.beforeLiveSyncAction) {
if (platformSpecificUsbLiveSyncService.beforeLiveSyncAction) {
return platformSpecificUsbLiveSyncService.beforeLiveSyncAction(deviceAppData);
}
return Future.fromResult();
Expand Down Expand Up @@ -109,7 +103,6 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
this.excludedProjectDirsAndFiles,
watchGlob,
platformSpecificLiveSyncServices,
restartAppOnDeviceAction,
notInstalledAppOnDeviceAction,
notRunningiOSSimulatorAction,
localProjectRootPath,
Expand Down