appium-android-driver 12.5.0 → 12.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [12.6.0](https://github.com/appium/appium-android-driver/compare/v12.5.0...v12.6.0) (2025-12-21)
2
+
3
+ ### Features
4
+
5
+ * Migrate device extensions to typescript ([#1044](https://github.com/appium/appium-android-driver/issues/1044)) ([b6b3a3c](https://github.com/appium/appium-android-driver/commit/b6b3a3c731dc243f1cedfaa4f8bd4615240ff9b1))
6
+
1
7
  ## [12.5.0](https://github.com/appium/appium-android-driver/compare/v12.4.11...v12.5.0) (2025-12-20)
2
8
 
3
9
  ### Features
@@ -1,22 +1,26 @@
1
+ import type { AndroidDriver } from '../../driver';
2
+ import type { ADBDeviceInfo, ADBLaunchInfo } from '../types';
3
+ import type { ADB } from 'appium-adb';
1
4
  /**
2
- * @this {AndroidDriver}
3
- * @returns {Promise<import('../types').ADBDeviceInfo>}
5
+ * Gets device information from capabilities, including UDID and emulator port.
6
+ *
7
+ * @returns Device information with UDID and emulator port
4
8
  */
5
- export function getDeviceInfoFromCaps(this: import("../../driver").AndroidDriver): Promise<import("../types").ADBDeviceInfo>;
9
+ export declare function getDeviceInfoFromCaps(this: AndroidDriver): Promise<ADBDeviceInfo>;
6
10
  /**
7
- * @this {AndroidDriver}
8
- * @returns {Promise<import('appium-adb').ADB>}
11
+ * Creates an ADB instance configured with the device UDID and emulator port from options.
12
+ *
13
+ * @returns A configured ADB instance
9
14
  */
10
- export function createADB(this: import("../../driver").AndroidDriver): Promise<import("appium-adb").ADB>;
15
+ export declare function createADB(this: AndroidDriver): Promise<ADB>;
11
16
  /**
12
- * @this {AndroidDriver}
13
- * @returns {Promise<import('../types').ADBLaunchInfo | undefined>}
17
+ * Gets launch information (package and activity) from the app manifest or options.
18
+ *
19
+ * @returns Launch information with package and activity names, or undefined if not needed
14
20
  */
15
- export function getLaunchInfo(this: import("../../driver").AndroidDriver): Promise<import("../types").ADBLaunchInfo | undefined>;
21
+ export declare function getLaunchInfo(this: AndroidDriver): Promise<ADBLaunchInfo | undefined>;
16
22
  /**
17
- * @this {AndroidDriver}
18
- * @returns {Promise<void>}
23
+ * Initializes the device with various settings like locale, keyboard, logcat, etc.
19
24
  */
20
- export function initDevice(this: import("../../driver").AndroidDriver): Promise<void>;
21
- export type AndroidDriver = import("../../driver").AndroidDriver;
25
+ export declare function initDevice(this: AndroidDriver): Promise<void>;
22
26
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../lib/commands/device/common.js"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,mFAFa,OAAO,CAAC,OAAO,UAAU,EAAE,aAAa,CAAC,CA8GrD;AAED;;;GAGG;AACH,uEAFa,OAAO,CAAC,OAAO,YAAY,EAAE,GAAG,CAAC,CAW7C;AAED;;;GAGG;AACH,2EAFa,OAAO,CAAC,OAAO,UAAU,EAAE,aAAa,GAAG,SAAS,CAAC,CAgCjE;AAED;;;GAGG;AACH,wEAFa,OAAO,CAAC,IAAI,CAAC,CA4GzB;4BAGY,OAAO,cAAc,EAAE,aAAa"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../lib/commands/device/common.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAEpC;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CA2GvF;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAQjE;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAyC3F;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAyGnE"}
@@ -52,8 +52,9 @@ const time_1 = require("../time");
52
52
  const asyncbox_1 = require("asyncbox");
53
53
  const utils_2 = require("../../utils");
54
54
  /**
55
- * @this {AndroidDriver}
56
- * @returns {Promise<import('../types').ADBDeviceInfo>}
55
+ * Gets device information from capabilities, including UDID and emulator port.
56
+ *
57
+ * @returns Device information with UDID and emulator port
57
58
  */
58
59
  async function getDeviceInfoFromCaps() {
59
60
  // we can create a throwaway ADB instance here, so there is no dependency
@@ -93,7 +94,6 @@ async function getDeviceInfoFromCaps() {
93
94
  for (const device of devices) {
94
95
  // direct adb calls to the specific device
95
96
  adb.setDeviceId(device.udid);
96
- /** @type {string} */
97
97
  const rawDeviceOS = await adb.getPlatformVersion();
98
98
  // The device OS could either be a number, like `6.0`
99
99
  // or an abbreviation, like `R`
@@ -107,8 +107,8 @@ async function getDeviceInfoFromCaps() {
107
107
  const bothVersionsCanBeCoerced = semver.valid(deviceOS) && semver.valid(platformVersion);
108
108
  const bothVersionsAreStrings = lodash_1.default.isString(deviceOS) && lodash_1.default.isString(platformVersion);
109
109
  if ((bothVersionsCanBeCoerced &&
110
- /** @type {semver.SemVer} */ (semverDO).version ===
111
- /** @type {semver.SemVer} */ (semverPV).version) ||
110
+ semverDO.version ===
111
+ semverPV.version) ||
112
112
  (bothVersionsAreStrings && lodash_1.default.toLower(deviceOS) === lodash_1.default.toLower(platformVersion))) {
113
113
  // Got an exact match - proceed immediately
114
114
  udid = device.udid;
@@ -118,10 +118,10 @@ async function getDeviceInfoFromCaps() {
118
118
  // There is no point to check for partial match if either of version numbers is not coercible
119
119
  continue;
120
120
  }
121
- const pvMajor = /** @type {semver.SemVer} */ (semverPV).major;
122
- const pvMinor = /** @type {semver.SemVer} */ (semverPV).minor;
123
- const dvMajor = /** @type {semver.SemVer} */ (semverDO).major;
124
- const dvMinor = /** @type {semver.SemVer} */ (semverDO).minor;
121
+ const pvMajor = semverPV.major;
122
+ const pvMinor = semverPV.minor;
123
+ const dvMajor = semverDO.major;
124
+ const dvMinor = semverDO.minor;
125
125
  if (((!lodash_1.default.includes(this.opts.platformVersion, '.') && pvMajor === dvMajor) ||
126
126
  (pvMajor === dvMajor && pvMinor === dvMinor)) &&
127
127
  // Got a partial match - make sure we consider the most recent
@@ -153,11 +153,11 @@ async function getDeviceInfoFromCaps() {
153
153
  return { udid: String(udid), emPort: emPort ?? false };
154
154
  }
155
155
  /**
156
- * @this {AndroidDriver}
157
- * @returns {Promise<import('appium-adb').ADB>}
156
+ * Creates an ADB instance configured with the device UDID and emulator port from options.
157
+ *
158
+ * @returns A configured ADB instance
158
159
  */
159
160
  async function createADB() {
160
- // @ts-expect-error do not put arbitrary properties on opts
161
161
  const { udid, emPort } = this.opts;
162
162
  const adb = await utils_1.createBaseADB.bind(this)();
163
163
  adb.setDeviceId(udid ?? '');
@@ -167,19 +167,24 @@ async function createADB() {
167
167
  return adb;
168
168
  }
169
169
  /**
170
- * @this {AndroidDriver}
171
- * @returns {Promise<import('../types').ADBLaunchInfo | undefined>}
170
+ * Gets launch information (package and activity) from the app manifest or options.
171
+ *
172
+ * @returns Launch information with package and activity names, or undefined if not needed
172
173
  */
173
174
  async function getLaunchInfo() {
174
- let { appPackage, appActivity, appWaitPackage, appWaitActivity, app } = this.opts;
175
- if (appPackage && appActivity || (!app && !appPackage)) {
175
+ const { app: appOpt, appPackage: appPackageOpt, appActivity: appActivityOpt, appWaitPackage: appWaitPackageOpt, appWaitActivity: appWaitActivityOpt } = this.opts;
176
+ let appPackage = appPackageOpt;
177
+ let appActivity = appActivityOpt;
178
+ let appWaitPackage = appWaitPackageOpt;
179
+ let appWaitActivity = appWaitActivityOpt;
180
+ if ((appPackage && appActivity) || (!appOpt && !appPackage)) {
176
181
  return;
177
182
  }
178
183
  let apkPackage;
179
184
  let apkActivity;
180
- if (app) {
181
- this.log.debug(`Parsing package and activity from the '${node_path_1.default.basename(app)}' file manifest`);
182
- ({ apkPackage, apkActivity } = await this.adb.packageAndLaunchActivityFromManifest(app));
185
+ if (appOpt) {
186
+ this.log.debug(`Parsing package and activity from the '${node_path_1.default.basename(appOpt)}' file manifest`);
187
+ ({ apkPackage, apkActivity } = await this.adb.packageAndLaunchActivityFromManifest(appOpt));
183
188
  }
184
189
  else if (appPackage) {
185
190
  this.log.debug(`Parsing activity from the installed '${appPackage}' package manifest`);
@@ -202,8 +207,7 @@ async function getLaunchInfo() {
202
207
  return { appPackage, appWaitPackage, appActivity, appWaitActivity };
203
208
  }
204
209
  /**
205
- * @this {AndroidDriver}
206
- * @returns {Promise<void>}
210
+ * Initializes the device with various settings like locale, keyboard, logcat, etc.
207
211
  */
208
212
  async function initDevice() {
209
213
  const { skipDeviceInitialization, locale, language, localeScript, unicodeKeyboard, hideKeyboard, disableWindowAnimation, skipUnlock, mockLocationApp, skipLogcatCapture, logcatFormat, logcatFilterSpecs, timeZone, } = this.opts;
@@ -229,7 +233,6 @@ async function initDevice() {
229
233
  !skipUnlock);
230
234
  await utils_1.pushSettingsApp.bind(this)(shouldThrowError);
231
235
  }
232
- /** @type {Promise[]} */
233
236
  const setupPromises = [];
234
237
  if (!this.isEmulator()) {
235
238
  setupPromises.push((async () => {
@@ -292,7 +295,4 @@ async function initDevice() {
292
295
  }
293
296
  await bluebird_1.default.all(setupPromises);
294
297
  }
295
- /**
296
- * @typedef {import('../../driver').AndroidDriver} AndroidDriver
297
- */
298
298
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../lib/commands/device/common.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,sDA4GC;AAMD,8BASC;AAMD,sCA8BC;AAMD,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K,KAAK,EAAE,CAAC;YAClC,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;QACzC,CAAC;IACH,CAAC,CAAC,EAAE,CAAC,CAAC;IACN,IAAI,eAAe,EAAE,CAAC;QACpB,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE;YAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,CACX,4EAA4E;gBAC1E,gGAAgG,CACnG,CAAC;YACF,MAAM,8BAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,CAAC,CAAC,EAAE,CAAC,CAAC;IACR,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,aAAa,CAAC,IAAI,CAAC,qBAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,IAAI,CAAC,gBAAgB,CAAC,+BAAuB,CAAC,EAAE,CAAC;QACnD,CAAC,EAAE,IAAI,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAC1D,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,KAAK;YACnB,gBAAgB,EAAE,qCAA6B;SAChD,CACF,CAAC;IACJ,CAAC;IAED,MAAM,kBAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,121 +1,97 @@
1
+ import type { AndroidDriver } from '../../driver';
2
+ import type { GsmAction, GsmSignalStrength, GsmVoiceState, PowerACState, NetworkSpeed } from '../types';
1
3
  /**
2
4
  * @deprecated Use mobile: extension
3
- * @this {import('../../driver').AndroidDriver}
4
- * @param {string|number} fingerprintId
5
- * @returns {Promise<void>}
6
5
  */
7
- export function fingerprint(this: import("../../driver").AndroidDriver, fingerprintId: string | number): Promise<void>;
6
+ export declare function fingerprint(this: AndroidDriver, fingerprintId: string | number): Promise<void>;
8
7
  /**
9
- * @this {import('../../driver').AndroidDriver}
10
- * @param {string | number} fingerprintId The value is the `finger_id` for the finger that was "scanned". It is a
8
+ * Simulates a fingerprint scan on the emulator.
9
+ *
10
+ * @param fingerprintId - The value is the `finger_id` for the finger that was "scanned". It is a
11
11
  * unique integer that you assign for each virtual fingerprint. When the app
12
12
  * is running you can run this same command each time the emulator prompts you
13
13
  * for a fingerprint, you can run the adb command and pass it the `finger_id`
14
14
  * to simulate the fingerprint scan.
15
- * @returns {Promise<void>}
16
15
  */
17
- export function mobileFingerprint(this: import("../../driver").AndroidDriver, fingerprintId: string | number): Promise<void>;
16
+ export declare function mobileFingerprint(this: AndroidDriver, fingerprintId: string | number): Promise<void>;
18
17
  /**
19
18
  * @deprecated Use mobile: extension
20
- * @this {import('../../driver').AndroidDriver}
21
- * @param {string} phoneNumber
22
- * @param {string} message
23
- * @returns {Promise<void>}
24
19
  */
25
- export function sendSMS(this: import("../../driver").AndroidDriver, phoneNumber: string, message: string): Promise<void>;
20
+ export declare function sendSMS(this: AndroidDriver, phoneNumber: string, message: string): Promise<void>;
26
21
  /**
27
- * @this {import('../../driver').AndroidDriver}
28
- * @param {string} phoneNumber The phone number to send SMS to
29
- * @param {string} message The message payload
30
- * @returns {Promise<void>}
22
+ * Sends an SMS message to the emulator.
23
+ *
24
+ * @param phoneNumber - The phone number to send SMS to
25
+ * @param message - The message payload
31
26
  */
32
- export function mobileSendSms(this: import("../../driver").AndroidDriver, phoneNumber: string, message: string): Promise<void>;
27
+ export declare function mobileSendSms(this: AndroidDriver, phoneNumber: string, message: string): Promise<void>;
33
28
  /**
34
29
  * @deprecated Use mobile: extension
35
- * @this {import('../../driver').AndroidDriver}
36
- * @param {string} phoneNumber
37
- * @param {string} action
38
- * @returns {Promise<void>}
39
30
  */
40
- export function gsmCall(this: import("../../driver").AndroidDriver, phoneNumber: string, action: string): Promise<void>;
31
+ export declare function gsmCall(this: AndroidDriver, phoneNumber: string, action: GsmAction): Promise<void>;
41
32
  /**
42
- * @this {import('../../driver').AndroidDriver}
43
- * @param {string} phoneNumber The phone number to call to
44
- * @param {import('../types').GsmAction} action Action to take
45
- * @returns {Promise<void>}
33
+ * Simulates a GSM call on the emulator.
34
+ *
35
+ * @param phoneNumber - The phone number to call to
36
+ * @param action - Action to take
46
37
  */
47
- export function mobileGsmCall(this: import("../../driver").AndroidDriver, phoneNumber: string, action: import("../types").GsmAction): Promise<void>;
38
+ export declare function mobileGsmCall(this: AndroidDriver, phoneNumber: string, action: GsmAction): Promise<void>;
48
39
  /**
49
40
  * @deprecated Use mobile: extension
50
- * @this {import('../../driver').AndroidDriver}
51
- * @param {import('../types').GsmSignalStrength} signalStrengh
52
- * @returns {Promise<void>}
53
41
  */
54
- export function gsmSignal(this: import("../../driver").AndroidDriver, signalStrengh: import("../types").GsmSignalStrength): Promise<void>;
42
+ export declare function gsmSignal(this: AndroidDriver, signalStrength: GsmSignalStrength): Promise<void>;
55
43
  /**
56
- * @this {import('../../driver').AndroidDriver}
57
- * @param {import('../types').GsmSignalStrength} strength The signal strength value
58
- * @returns {Promise<void>}
44
+ * Sets the GSM signal strength on the emulator.
45
+ *
46
+ * @param strength - The signal strength value
59
47
  */
60
- export function mobileGsmSignal(this: import("../../driver").AndroidDriver, strength: import("../types").GsmSignalStrength): Promise<void>;
48
+ export declare function mobileGsmSignal(this: AndroidDriver, strength: GsmSignalStrength): Promise<void>;
61
49
  /**
62
50
  * @deprecated Use mobile: extension
63
- * @this {import('../../driver').AndroidDriver}
64
- * @param {import('../types').GsmVoiceState} state
65
- * @returns {Promise<void>}
66
51
  */
67
- export function gsmVoice(this: import("../../driver").AndroidDriver, state: import("../types").GsmVoiceState): Promise<void>;
52
+ export declare function gsmVoice(this: AndroidDriver, state: GsmVoiceState): Promise<void>;
68
53
  /**
69
- * @this {import('../../driver').AndroidDriver}
70
- * @param {import('../types').GsmVoiceState} state
71
- * @returns {Promise<void>}
54
+ * Sets the GSM voice state on the emulator.
55
+ *
56
+ * @param state - The voice state
72
57
  */
73
- export function mobileGsmVoice(this: import("../../driver").AndroidDriver, state: import("../types").GsmVoiceState): Promise<void>;
58
+ export declare function mobileGsmVoice(this: AndroidDriver, state: GsmVoiceState): Promise<void>;
74
59
  /**
75
60
  * @deprecated Use mobile: extension
76
- * @this {import('../../driver').AndroidDriver}
77
- * @param {import('../types').PowerACState} state
78
- * @returns {Promise<void>}
79
61
  */
80
- export function powerAC(this: import("../../driver").AndroidDriver, state: import("../types").PowerACState): Promise<void>;
62
+ export declare function powerAC(this: AndroidDriver, state: PowerACState): Promise<void>;
81
63
  /**
82
- * @this {import('../../driver').AndroidDriver}
83
- * @param {import('../types').PowerACState} state
84
- * @returns {Promise<void>}
64
+ * Sets the power AC state on the emulator.
65
+ *
66
+ * @param state - The AC power state
85
67
  */
86
- export function mobilePowerAc(this: import("../../driver").AndroidDriver, state: import("../types").PowerACState): Promise<void>;
68
+ export declare function mobilePowerAc(this: AndroidDriver, state: PowerACState): Promise<void>;
87
69
  /**
88
70
  * @deprecated Use mobile: extension
89
- * @this {import('../../driver').AndroidDriver}
90
- * @param {number} batteryPercent
91
- * @returns {Promise<void>}
92
71
  */
93
- export function powerCapacity(this: import("../../driver").AndroidDriver, batteryPercent: number): Promise<void>;
72
+ export declare function powerCapacity(this: AndroidDriver, batteryPercent: number): Promise<void>;
94
73
  /**
95
- * @this {import('../../driver').AndroidDriver}
96
- * @param {number} percent Percentage value in range `[0, 100]`
97
- * @return {Promise<void>}
74
+ * Sets the battery capacity on the emulator.
75
+ *
76
+ * @param percent - Percentage value in range `[0, 100]`
98
77
  */
99
- export function mobilePowerCapacity(this: import("../../driver").AndroidDriver, percent: number): Promise<void>;
78
+ export declare function mobilePowerCapacity(this: AndroidDriver, percent: number): Promise<void>;
100
79
  /**
101
80
  * @deprecated Use mobile: extension
102
- * @this {import('../../driver').AndroidDriver}
103
- * @param {import('../types').NetworkSpeed} networkSpeed
104
- * @returns {Promise<void>}
105
81
  */
106
- export function networkSpeed(this: import("../../driver").AndroidDriver, networkSpeed: import("../types").NetworkSpeed): Promise<void>;
82
+ export declare function networkSpeed(this: AndroidDriver, networkSpeed: NetworkSpeed): Promise<void>;
107
83
  /**
108
- * @this {import('../../driver').AndroidDriver}
109
- * @param {import('../types').NetworkSpeed} speed
110
- * @returns {Promise<void>}
84
+ * Sets the network speed on the emulator.
85
+ *
86
+ * @param speed - The network speed value
111
87
  */
112
- export function mobileNetworkSpeed(this: import("../../driver").AndroidDriver, speed: import("../types").NetworkSpeed): Promise<void>;
88
+ export declare function mobileNetworkSpeed(this: AndroidDriver, speed: NetworkSpeed): Promise<void>;
113
89
  /**
114
- * @this {import('../../driver').AndroidDriver}
115
- * @param {string} sensorType Sensor type as declared in `adb.SENSORS`
116
- * @param {string} value Value to set to the sensor
117
- * @returns {Promise<void>}
90
+ * Sets a sensor value on the emulator.
91
+ *
92
+ * @param sensorType - Sensor type as declared in `adb.SENSORS`
93
+ * @param value - Value to set to the sensor
94
+ * @throws {errors.InvalidArgumentError} If sensorType or value is not provided
118
95
  */
119
- export function sensorSet(this: import("../../driver").AndroidDriver, sensorType: string, value: string): Promise<void>;
120
- export type ADB = import("appium-adb").ADB;
96
+ export declare function sensorSet(this: AndroidDriver, sensorType: string, value: string | number): Promise<void>;
121
97
  //# sourceMappingURL=emulator-actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emulator-actions.d.ts","sourceRoot":"","sources":["../../../../lib/commands/device/emulator-actions.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,uFAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAKzB;AAED;;;;;;;;GAQG;AACH,6FAPW,MAAM,GAAG,MAAM,GAKb,OAAO,CAAC,IAAI,CAAC,CAIzB;AAED;;;;;;GAMG;AACH,iFAJW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAKzB;AAED;;;;;GAKG;AACH,uFAJW,MAAM,WAC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EACnB,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,aAAa,EACnB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,aAAa,EACnB,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CASf"}
@@ -22,161 +22,136 @@ const utils_1 = require("./utils");
22
22
  const driver_1 = require("appium/driver");
23
23
  /**
24
24
  * @deprecated Use mobile: extension
25
- * @this {import('../../driver').AndroidDriver}
26
- * @param {string|number} fingerprintId
27
- * @returns {Promise<void>}
28
25
  */
29
26
  async function fingerprint(fingerprintId) {
30
27
  utils_1.requireEmulator.bind(this)('fingerprint is only available for emulators');
31
28
  await this.adb.fingerprint(String(fingerprintId));
32
29
  }
33
30
  /**
34
- * @this {import('../../driver').AndroidDriver}
35
- * @param {string | number} fingerprintId The value is the `finger_id` for the finger that was "scanned". It is a
31
+ * Simulates a fingerprint scan on the emulator.
32
+ *
33
+ * @param fingerprintId - The value is the `finger_id` for the finger that was "scanned". It is a
36
34
  * unique integer that you assign for each virtual fingerprint. When the app
37
35
  * is running you can run this same command each time the emulator prompts you
38
36
  * for a fingerprint, you can run the adb command and pass it the `finger_id`
39
37
  * to simulate the fingerprint scan.
40
- * @returns {Promise<void>}
41
38
  */
42
39
  async function mobileFingerprint(fingerprintId) {
43
40
  await this.fingerprint(fingerprintId);
44
41
  }
45
42
  /**
46
43
  * @deprecated Use mobile: extension
47
- * @this {import('../../driver').AndroidDriver}
48
- * @param {string} phoneNumber
49
- * @param {string} message
50
- * @returns {Promise<void>}
51
44
  */
52
45
  async function sendSMS(phoneNumber, message) {
53
46
  utils_1.requireEmulator.bind(this)('sendSMS is only available for emulators');
54
47
  await this.adb.sendSMS(phoneNumber, message);
55
48
  }
56
49
  /**
57
- * @this {import('../../driver').AndroidDriver}
58
- * @param {string} phoneNumber The phone number to send SMS to
59
- * @param {string} message The message payload
60
- * @returns {Promise<void>}
50
+ * Sends an SMS message to the emulator.
51
+ *
52
+ * @param phoneNumber - The phone number to send SMS to
53
+ * @param message - The message payload
61
54
  */
62
55
  async function mobileSendSms(phoneNumber, message) {
63
56
  await this.sendSMS(phoneNumber, message);
64
57
  }
65
58
  /**
66
59
  * @deprecated Use mobile: extension
67
- * @this {import('../../driver').AndroidDriver}
68
- * @param {string} phoneNumber
69
- * @param {string} action
70
- * @returns {Promise<void>}
71
60
  */
72
61
  async function gsmCall(phoneNumber, action) {
73
62
  utils_1.requireEmulator.bind(this)('gsmCall is only available for emulators');
74
- await this.adb.gsmCall(phoneNumber, /** @type {any} */ (action));
63
+ await this.adb.gsmCall(phoneNumber, action);
75
64
  }
76
65
  /**
77
- * @this {import('../../driver').AndroidDriver}
78
- * @param {string} phoneNumber The phone number to call to
79
- * @param {import('../types').GsmAction} action Action to take
80
- * @returns {Promise<void>}
66
+ * Simulates a GSM call on the emulator.
67
+ *
68
+ * @param phoneNumber - The phone number to call to
69
+ * @param action - Action to take
81
70
  */
82
71
  async function mobileGsmCall(phoneNumber, action) {
83
72
  await this.gsmCall(phoneNumber, action);
84
73
  }
85
74
  /**
86
75
  * @deprecated Use mobile: extension
87
- * @this {import('../../driver').AndroidDriver}
88
- * @param {import('../types').GsmSignalStrength} signalStrengh
89
- * @returns {Promise<void>}
90
76
  */
91
- async function gsmSignal(signalStrengh) {
77
+ async function gsmSignal(signalStrength) {
92
78
  utils_1.requireEmulator.bind(this)('gsmSignal is only available for emulators');
93
- await this.adb.gsmSignal(signalStrengh);
79
+ await this.adb.gsmSignal(signalStrength);
94
80
  }
95
81
  /**
96
- * @this {import('../../driver').AndroidDriver}
97
- * @param {import('../types').GsmSignalStrength} strength The signal strength value
98
- * @returns {Promise<void>}
82
+ * Sets the GSM signal strength on the emulator.
83
+ *
84
+ * @param strength - The signal strength value
99
85
  */
100
86
  async function mobileGsmSignal(strength) {
101
87
  await this.gsmSignal(strength);
102
88
  }
103
89
  /**
104
90
  * @deprecated Use mobile: extension
105
- * @this {import('../../driver').AndroidDriver}
106
- * @param {import('../types').GsmVoiceState} state
107
- * @returns {Promise<void>}
108
91
  */
109
92
  async function gsmVoice(state) {
110
93
  utils_1.requireEmulator.bind(this)('gsmVoice is only available for emulators');
111
94
  await this.adb.gsmVoice(state);
112
95
  }
113
96
  /**
114
- * @this {import('../../driver').AndroidDriver}
115
- * @param {import('../types').GsmVoiceState} state
116
- * @returns {Promise<void>}
97
+ * Sets the GSM voice state on the emulator.
98
+ *
99
+ * @param state - The voice state
117
100
  */
118
101
  async function mobileGsmVoice(state) {
119
102
  await this.gsmVoice(state);
120
103
  }
121
104
  /**
122
105
  * @deprecated Use mobile: extension
123
- * @this {import('../../driver').AndroidDriver}
124
- * @param {import('../types').PowerACState} state
125
- * @returns {Promise<void>}
126
106
  */
127
107
  async function powerAC(state) {
128
108
  utils_1.requireEmulator.bind(this)('powerAC is only available for emulators');
129
109
  await this.adb.powerAC(state);
130
110
  }
131
111
  /**
132
- * @this {import('../../driver').AndroidDriver}
133
- * @param {import('../types').PowerACState} state
134
- * @returns {Promise<void>}
112
+ * Sets the power AC state on the emulator.
113
+ *
114
+ * @param state - The AC power state
135
115
  */
136
116
  async function mobilePowerAc(state) {
137
117
  await this.powerAC(state);
138
118
  }
139
119
  /**
140
120
  * @deprecated Use mobile: extension
141
- * @this {import('../../driver').AndroidDriver}
142
- * @param {number} batteryPercent
143
- * @returns {Promise<void>}
144
121
  */
145
122
  async function powerCapacity(batteryPercent) {
146
123
  utils_1.requireEmulator.bind(this)('powerCapacity is only available for emulators');
147
124
  await this.adb.powerCapacity(batteryPercent);
148
125
  }
149
126
  /**
150
- * @this {import('../../driver').AndroidDriver}
151
- * @param {number} percent Percentage value in range `[0, 100]`
152
- * @return {Promise<void>}
127
+ * Sets the battery capacity on the emulator.
128
+ *
129
+ * @param percent - Percentage value in range `[0, 100]`
153
130
  */
154
131
  async function mobilePowerCapacity(percent) {
155
132
  await this.powerCapacity(percent);
156
133
  }
157
134
  /**
158
135
  * @deprecated Use mobile: extension
159
- * @this {import('../../driver').AndroidDriver}
160
- * @param {import('../types').NetworkSpeed} networkSpeed
161
- * @returns {Promise<void>}
162
136
  */
163
137
  async function networkSpeed(networkSpeed) {
164
138
  utils_1.requireEmulator.bind(this)('networkSpeed is only available for emulators');
165
139
  await this.adb.networkSpeed(networkSpeed);
166
140
  }
167
141
  /**
168
- * @this {import('../../driver').AndroidDriver}
169
- * @param {import('../types').NetworkSpeed} speed
170
- * @returns {Promise<void>}
142
+ * Sets the network speed on the emulator.
143
+ *
144
+ * @param speed - The network speed value
171
145
  */
172
146
  async function mobileNetworkSpeed(speed) {
173
147
  await this.networkSpeed(speed);
174
148
  }
175
149
  /**
176
- * @this {import('../../driver').AndroidDriver}
177
- * @param {string} sensorType Sensor type as declared in `adb.SENSORS`
178
- * @param {string} value Value to set to the sensor
179
- * @returns {Promise<void>}
150
+ * Sets a sensor value on the emulator.
151
+ *
152
+ * @param sensorType - Sensor type as declared in `adb.SENSORS`
153
+ * @param value - Value to set to the sensor
154
+ * @throws {errors.InvalidArgumentError} If sensorType or value is not provided
180
155
  */
181
156
  async function sensorSet(sensorType, value) {
182
157
  utils_1.requireEmulator.bind(this)('sensorSet is only available for emulators');
@@ -186,9 +161,6 @@ async function sensorSet(sensorType, value) {
186
161
  if (!support_1.util.hasValue(value)) {
187
162
  throw new driver_1.errors.InvalidArgumentError(`'value' argument is required`);
188
163
  }
189
- await this.adb.sensorSet(sensorType, /** @type {any} */ (value));
164
+ await this.adb.sensorSet(sensorType, value);
190
165
  }
191
- /**
192
- * @typedef {import('appium-adb').ADB} ADB
193
- */
194
166
  //# sourceMappingURL=emulator-actions.js.map