Skip to content

Commit 3e78847

Browse files
chore: typo
1 parent 139bf8f commit 3e78847

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/device-manager.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export declare class DeviceManager implements IDeviceManager {
1111
static kill(device: IDevice): Promise<void>;
1212
private static getDefaultDevice;
1313
static setDontKeepActivities(args: INsCapabilities, driver: any, value: any): Promise<void>;
14-
static executeShellCommand(driver: any, commandAndargs: {
14+
static executeShellCommand(driver: IDevice, commandAndargs: {
1515
command: string;
1616
"args": Array<any>;
1717
}): Promise<any>;

lib/device-manager.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class DeviceManager implements IDeviceManager {
136136
public static async setDontKeepActivities(args: INsCapabilities, driver, value) {
137137
if (args.isAndroid) {
138138
if (!args.ignoreDeviceController) {
139-
AndroidController.setDontKeepActivities(<any>args.device, value);
139+
AndroidController.setDontKeepActivities(value, args.device);
140140
} else if (args.relaxedSecurity) {
141141
const status = value ? 1 : 0;
142142
const output = await DeviceManager.executeShellCommand(driver, { command: "settings", args: ['put', 'global', 'always_finish_activities', status] });
@@ -149,7 +149,7 @@ export class DeviceManager implements IDeviceManager {
149149
}
150150
}
151151

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> }) {
153153
if (driver.platform.toLowerCase() === Platform.ANDROID) {
154154
const output = await driver.execute("mobile: shell", commandAndargs);
155155
return output;
@@ -192,7 +192,7 @@ export class DeviceManager implements IDeviceManager {
192192
if (density) {
193193
console.log(`Get density from appium session: ${density}`);
194194
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);
196196
}
197197

198198
if (!density) {

0 commit comments

Comments
 (0)