@@ -6,7 +6,10 @@ export class AndroidApplicationManager implements Mobile.IDeviceApplicationManag
6
6
private _installedApplications : string [ ] ;
7
7
8
8
constructor ( private adb : Mobile . IAndroidDebugBridge ,
9
- private $staticConfig : Config . IStaticConfig ) { }
9
+ private identifier : string ,
10
+ private $staticConfig : Config . IStaticConfig ,
11
+ private $options : ICommonOptions ,
12
+ private $logcatHelper : Mobile . ILogcatHelper ) { }
10
13
11
14
public getInstalledApplications ( ) : IFuture < string [ ] > {
12
15
return ( ( ) => {
@@ -41,10 +44,15 @@ export class AndroidApplicationManager implements Mobile.IDeviceApplicationManag
41
44
}
42
45
43
46
public startApplication ( appIdentifier : string ) : IFuture < void > {
44
- return this . adb . executeShellCommand ( [ "am" , "start" ,
45
- "-a" , "android.intent.action.MAIN" ,
46
- "-n" , `${ appIdentifier } /${ this . $staticConfig . START_PACKAGE_ACTIVITY_NAME } ` ,
47
- "-c" , "android.intent.category.LAUNCHER" ] ) ;
47
+ return ( ( ) => {
48
+ this . adb . executeShellCommand ( [ "am" , "start" ,
49
+ "-a" , "android.intent.action.MAIN" ,
50
+ "-n" , `${ appIdentifier } /${ this . $staticConfig . START_PACKAGE_ACTIVITY_NAME } ` ,
51
+ "-c" , "android.intent.category.LAUNCHER" ] ) . wait ( ) ;
52
+ if ( ! this . $options . justlaunch ) {
53
+ this . $logcatHelper . start ( this . identifier ) ;
54
+ }
55
+ } ) . future < void > ( ) ( ) ;
48
56
}
49
57
50
58
public stopApplication ( appIdentifier : string ) : IFuture < void > {
0 commit comments