@@ -6,7 +6,7 @@ import { CONNECTED_STATUS } from "../common/constants";
6
6
import { DebugTools , TrackActionNames } from "../constants" ;
7
7
8
8
export class DebugService extends EventEmitter implements IDebugService {
9
- private _platformDebugServices : IDictionary < IPlatformDebugService > ;
9
+ private _platformDebugServices : IDictionary < IDeviceDebugService > ;
10
10
constructor ( private $devicesService : Mobile . IDevicesService ,
11
11
private $errors : IErrors ,
12
12
private $injector : IInjector ,
@@ -51,7 +51,7 @@ export class DebugService extends EventEmitter implements IDebugService {
51
51
this . $errors . failWithoutHelp ( `Unsupported device OS: ${ device . deviceInfo . platform } . You can debug your applications only on iOS or Android.` ) ;
52
52
}
53
53
54
- // TODO: Consider to move this code to ios-debug-service
54
+ // TODO: Consider to move this code to ios-device- debug-service
55
55
if ( this . $mobileHelper . isiOSPlatform ( device . deviceInfo . platform ) ) {
56
56
if ( device . isEmulator && ! debugData . pathToAppPackage && debugOptions . debugBrk ) {
57
57
this . $errors . failWithoutHelp ( "To debug on iOS simulator you need to provide path to the app package." ) ;
@@ -72,13 +72,13 @@ export class DebugService extends EventEmitter implements IDebugService {
72
72
return debugService . debugStop ( ) ;
73
73
}
74
74
75
- protected getDebugService ( device : Mobile . IDevice ) : IPlatformDebugService {
75
+ protected getDebugService ( device : Mobile . IDevice ) : IDeviceDebugService {
76
76
if ( ! this . _platformDebugServices [ device . deviceInfo . identifier ] ) {
77
77
const platform = device . deviceInfo . platform ;
78
78
if ( this . $mobileHelper . isiOSPlatform ( platform ) ) {
79
- this . _platformDebugServices [ device . deviceInfo . identifier ] = this . $injector . resolve ( "iOSDebugService " , { device } ) ;
79
+ this . _platformDebugServices [ device . deviceInfo . identifier ] = this . $injector . resolve ( "iOSDeviceDebugService " , { device } ) ;
80
80
} else if ( this . $mobileHelper . isAndroidPlatform ( platform ) ) {
81
- this . _platformDebugServices [ device . deviceInfo . identifier ] = this . $injector . resolve ( "androidDebugService " , { device } ) ;
81
+ this . _platformDebugServices [ device . deviceInfo . identifier ] = this . $injector . resolve ( "androidDeviceDebugService " , { device } ) ;
82
82
} else {
83
83
this . $errors . failWithoutHelp ( DebugCommandErrors . UNSUPPORTED_DEVICE_OS_FOR_DEBUGGING ) ;
84
84
}
@@ -89,12 +89,12 @@ export class DebugService extends EventEmitter implements IDebugService {
89
89
return this . _platformDebugServices [ device . deviceInfo . identifier ] ;
90
90
}
91
91
92
- private getDebugServiceByIdentifier ( deviceIdentifier : string ) : IPlatformDebugService {
92
+ private getDebugServiceByIdentifier ( deviceIdentifier : string ) : IDeviceDebugService {
93
93
const device = this . $devicesService . getDeviceByIdentifier ( deviceIdentifier ) ;
94
94
return this . getDebugService ( device ) ;
95
95
}
96
96
97
- private attachConnectionErrorHandlers ( platformDebugService : IPlatformDebugService ) {
97
+ private attachConnectionErrorHandlers ( platformDebugService : IDeviceDebugService ) {
98
98
let connectionErrorHandler = ( e : Error ) => this . emit ( CONNECTION_ERROR_EVENT_NAME , e ) ;
99
99
connectionErrorHandler = connectionErrorHandler . bind ( this ) ;
100
100
platformDebugService . on ( CONNECTION_ERROR_EVENT_NAME , connectionErrorHandler ) ;
0 commit comments