@@ -136,7 +136,7 @@ export class DeviceManager implements IDeviceManager {
136
136
public static async setDontKeepActivities ( args : INsCapabilities , driver , value ) {
137
137
if ( args . isAndroid ) {
138
138
if ( ! args . ignoreDeviceController ) {
139
- AndroidController . setDontKeepActivities ( < any > args . device , value ) ;
139
+ AndroidController . setDontKeepActivities ( value , args . device ) ;
140
140
} else if ( args . relaxedSecurity ) {
141
141
const status = value ? 1 : 0 ;
142
142
const output = await DeviceManager . executeShellCommand ( driver , { command : "settings" , args : [ 'put' , 'global' , 'always_finish_activities' , status ] } ) ;
@@ -149,7 +149,7 @@ export class DeviceManager implements IDeviceManager {
149
149
}
150
150
}
151
151
152
- public static async executeShellCommand ( driver , commandAndargs : { command : string , "args" : Array < any > } ) {
152
+ public static async executeShellCommand ( driver : IDevice , commandAndargs : { command : string , "args" : Array < any > } ) {
153
153
if ( driver . platform . toLowerCase ( ) === Platform . ANDROID ) {
154
154
const output = await driver . execute ( "mobile: shell" , commandAndargs ) ;
155
155
return output ;
@@ -192,7 +192,7 @@ export class DeviceManager implements IDeviceManager {
192
192
if ( density ) {
193
193
console . log ( `Get density from appium session: ${ density } ` ) ;
194
194
args . device . config [ 'density' ] = density ;
195
- args . device . config [ 'offsetPixels' ] = AndroidController . calculateScreenOffset ( args . device . config . density ) ;
195
+ args . device . config [ 'offsetPixels' ] = AndroidController . calculateScreenOffset ( args . device . config . density ) ;
196
196
}
197
197
198
198
if ( ! density ) {
0 commit comments