appium-android-driver 9.15.0 → 10.0.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.
Files changed (135) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/build/lib/commands/app-management.d.ts +39 -26
  3. package/build/lib/commands/app-management.d.ts.map +1 -1
  4. package/build/lib/commands/app-management.js +59 -42
  5. package/build/lib/commands/app-management.js.map +1 -1
  6. package/build/lib/commands/appearance.d.ts +10 -4
  7. package/build/lib/commands/appearance.d.ts.map +1 -1
  8. package/build/lib/commands/appearance.js +10 -7
  9. package/build/lib/commands/appearance.js.map +1 -1
  10. package/build/lib/commands/bluetooth.d.ts +2 -2
  11. package/build/lib/commands/bluetooth.d.ts.map +1 -1
  12. package/build/lib/commands/bluetooth.js +2 -3
  13. package/build/lib/commands/bluetooth.js.map +1 -1
  14. package/build/lib/commands/context/exports.d.ts +2 -2
  15. package/build/lib/commands/context/exports.d.ts.map +1 -1
  16. package/build/lib/commands/context/exports.js +3 -3
  17. package/build/lib/commands/context/exports.js.map +1 -1
  18. package/build/lib/commands/device/emulator-actions.d.ts +25 -18
  19. package/build/lib/commands/device/emulator-actions.d.ts.map +1 -1
  20. package/build/lib/commands/device/emulator-actions.js +38 -40
  21. package/build/lib/commands/device/emulator-actions.js.map +1 -1
  22. package/build/lib/commands/device/emulator-console.d.ts +9 -2
  23. package/build/lib/commands/device/emulator-console.d.ts.map +1 -1
  24. package/build/lib/commands/device/emulator-console.js +9 -3
  25. package/build/lib/commands/device/emulator-console.js.map +1 -1
  26. package/build/lib/commands/deviceidle.d.ts +3 -2
  27. package/build/lib/commands/deviceidle.d.ts.map +1 -1
  28. package/build/lib/commands/deviceidle.js +3 -3
  29. package/build/lib/commands/deviceidle.js.map +1 -1
  30. package/build/lib/commands/execute.d.ts +6 -15
  31. package/build/lib/commands/execute.d.ts.map +1 -1
  32. package/build/lib/commands/execute.js +36 -93
  33. package/build/lib/commands/execute.js.map +1 -1
  34. package/build/lib/commands/file-actions.d.ts +13 -24
  35. package/build/lib/commands/file-actions.d.ts.map +1 -1
  36. package/build/lib/commands/file-actions.js +13 -38
  37. package/build/lib/commands/file-actions.js.map +1 -1
  38. package/build/lib/commands/geolocation.d.ts +9 -4
  39. package/build/lib/commands/geolocation.d.ts.map +1 -1
  40. package/build/lib/commands/geolocation.js +14 -6
  41. package/build/lib/commands/geolocation.js.map +1 -1
  42. package/build/lib/commands/image-injection.d.ts +2 -2
  43. package/build/lib/commands/image-injection.d.ts.map +1 -1
  44. package/build/lib/commands/image-injection.js +2 -3
  45. package/build/lib/commands/image-injection.js.map +1 -1
  46. package/build/lib/commands/intent.d.ts +70 -8
  47. package/build/lib/commands/intent.d.ts.map +1 -1
  48. package/build/lib/commands/intent.js +118 -16
  49. package/build/lib/commands/intent.js.map +1 -1
  50. package/build/lib/commands/keyboard.d.ts +2 -2
  51. package/build/lib/commands/keyboard.d.ts.map +1 -1
  52. package/build/lib/commands/keyboard.js +2 -4
  53. package/build/lib/commands/keyboard.js.map +1 -1
  54. package/build/lib/commands/lock/exports.d.ts +12 -8
  55. package/build/lib/commands/lock/exports.d.ts.map +1 -1
  56. package/build/lib/commands/lock/exports.js +12 -13
  57. package/build/lib/commands/lock/exports.js.map +1 -1
  58. package/build/lib/commands/media-projection.d.ts +41 -4
  59. package/build/lib/commands/media-projection.d.ts.map +1 -1
  60. package/build/lib/commands/media-projection.js +52 -11
  61. package/build/lib/commands/media-projection.js.map +1 -1
  62. package/build/lib/commands/memory.d.ts +4 -2
  63. package/build/lib/commands/memory.d.ts.map +1 -1
  64. package/build/lib/commands/memory.js +4 -3
  65. package/build/lib/commands/memory.js.map +1 -1
  66. package/build/lib/commands/network.d.ts +10 -4
  67. package/build/lib/commands/network.d.ts.map +1 -1
  68. package/build/lib/commands/network.js +17 -14
  69. package/build/lib/commands/network.js.map +1 -1
  70. package/build/lib/commands/nfc.d.ts +2 -2
  71. package/build/lib/commands/nfc.d.ts.map +1 -1
  72. package/build/lib/commands/nfc.js +2 -3
  73. package/build/lib/commands/nfc.js.map +1 -1
  74. package/build/lib/commands/performance.d.ts +3 -2
  75. package/build/lib/commands/performance.d.ts.map +1 -1
  76. package/build/lib/commands/performance.js +3 -4
  77. package/build/lib/commands/performance.js.map +1 -1
  78. package/build/lib/commands/permissions.d.ts +23 -5
  79. package/build/lib/commands/permissions.d.ts.map +1 -1
  80. package/build/lib/commands/permissions.js +27 -8
  81. package/build/lib/commands/permissions.js.map +1 -1
  82. package/build/lib/commands/shell.d.ts +3 -9
  83. package/build/lib/commands/shell.d.ts.map +1 -1
  84. package/build/lib/commands/shell.js +3 -10
  85. package/build/lib/commands/shell.js.map +1 -1
  86. package/build/lib/commands/streamscreen.d.ts +56 -6
  87. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  88. package/build/lib/commands/streamscreen.js +28 -4
  89. package/build/lib/commands/streamscreen.js.map +1 -1
  90. package/build/lib/commands/system-bars.d.ts +6 -2
  91. package/build/lib/commands/system-bars.d.ts.map +1 -1
  92. package/build/lib/commands/system-bars.js +7 -7
  93. package/build/lib/commands/system-bars.js.map +1 -1
  94. package/build/lib/commands/time.d.ts +2 -2
  95. package/build/lib/commands/time.d.ts.map +1 -1
  96. package/build/lib/commands/time.js +3 -3
  97. package/build/lib/commands/time.js.map +1 -1
  98. package/build/lib/commands/types.d.ts +0 -588
  99. package/build/lib/commands/types.d.ts.map +1 -1
  100. package/build/lib/driver.d.ts +364 -12
  101. package/build/lib/driver.d.ts.map +1 -1
  102. package/build/lib/driver.js +2 -8
  103. package/build/lib/driver.js.map +1 -1
  104. package/build/lib/execute-method-map.d.ts +361 -0
  105. package/build/lib/execute-method-map.d.ts.map +1 -0
  106. package/build/lib/execute-method-map.js +437 -0
  107. package/build/lib/execute-method-map.js.map +1 -0
  108. package/lib/commands/app-management.js +68 -42
  109. package/lib/commands/appearance.js +10 -8
  110. package/lib/commands/bluetooth.js +2 -3
  111. package/lib/commands/context/exports.js +3 -3
  112. package/lib/commands/device/emulator-actions.js +28 -30
  113. package/lib/commands/device/emulator-console.js +9 -4
  114. package/lib/commands/deviceidle.js +3 -4
  115. package/lib/commands/execute.js +42 -124
  116. package/lib/commands/file-actions.js +13 -38
  117. package/lib/commands/geolocation.js +14 -6
  118. package/lib/commands/image-injection.js +2 -3
  119. package/lib/commands/intent.js +174 -16
  120. package/lib/commands/keyboard.js +2 -4
  121. package/lib/commands/lock/exports.js +12 -13
  122. package/lib/commands/media-projection.js +62 -11
  123. package/lib/commands/memory.js +4 -4
  124. package/lib/commands/network.js +14 -10
  125. package/lib/commands/nfc.js +2 -3
  126. package/lib/commands/performance.js +3 -4
  127. package/lib/commands/permissions.js +33 -14
  128. package/lib/commands/{shell.js → shell.ts} +8 -11
  129. package/lib/commands/streamscreen.js +39 -15
  130. package/lib/commands/system-bars.js +7 -9
  131. package/lib/commands/time.js +3 -3
  132. package/lib/commands/types.ts +0 -646
  133. package/lib/driver.ts +4 -16
  134. package/lib/execute-method-map.ts +464 -0
  135. package/package.json +2 -2
@@ -1,109 +1,21 @@
1
1
  import type {HTTPMethod, StringRecord} from '@appium/types';
2
- import type {InstallOptions, UninstallOptions} from 'appium-adb';
3
2
  import type {AndroidDriverCaps} from '../driver';
4
3
 
5
- export interface SwipeOpts {
6
- startX: number;
7
- startY: number;
8
- endX: number;
9
- endY: number;
10
- steps: number;
11
- elementId?: string | number;
12
- }
13
-
14
- export interface DragOpts {
15
- elementId?: string | number;
16
- destElId?: string | number;
17
- startX: number;
18
- startY: number;
19
- endX: number;
20
- endY: number;
21
- steps: number;
22
- }
23
-
24
4
  /**
25
5
  * @privateRemarks probably better defined in `appium-adb`
26
6
  */
27
7
  export type GsmAction = 'call' | 'accept' | 'cancel' | 'hold';
28
8
 
29
- export interface GsmCallOpts {
30
- /**
31
- * The phone number to call to
32
- */
33
- phoneNumber: string;
34
- /**
35
- * Action to take
36
- */
37
- action: GsmAction;
38
- }
39
-
40
9
  /**
41
10
  * One of possible signal strength values, where 4 is the best signal.
42
11
  * @privateRemarks maybe should be an enum?
43
12
  */
44
13
  export type GsmSignalStrength = 0 | 1 | 2 | 3 | 4;
45
14
 
46
- export interface GsmSignalStrengthOpts {
47
- /**
48
- * The signal strength value
49
- */
50
- strength: GsmSignalStrength;
51
- }
52
-
53
- export interface SendSMSOpts {
54
- /**
55
- * The phone number to send SMS to
56
- */
57
- phoneNumber: string;
58
- /**
59
- * The message payload
60
- */
61
- message: string;
62
- }
63
-
64
- export interface FingerprintOpts {
65
- /**
66
- * The value is the `finger_id` for the finger that was "scanned". It is a
67
- * unique integer that you assign for each virtual fingerprint. When the app
68
- * is running you can run this same command each time the emulator prompts you
69
- * for a fingerprint, you can run the adb command and pass it the `finger_id`
70
- * to simulate the fingerprint scan.
71
- */
72
- fingerprintId: string | number;
73
- }
74
-
75
15
  export type GsmVoiceState = 'on' | 'off';
76
16
 
77
17
  export type PowerACState = 'on' | 'off';
78
18
 
79
- export interface GsmVoiceOpts {
80
- state: GsmVoiceState;
81
- }
82
-
83
- export interface PowerACOpts {
84
- state: PowerACState;
85
- }
86
-
87
- export interface PowerCapacityOpts {
88
- /**
89
- * Percentage value in range `[0, 100]`
90
- */
91
- percent: number;
92
- }
93
-
94
- export interface SensorSetOpts {
95
- /**
96
- * Sensor type as declared in `adb.SENSORS`
97
- * @privateRemarks what is `adb.SENSORS`?
98
- *
99
- */
100
- sensorType: string;
101
- /**
102
- * Value to set to the sensor
103
- */
104
- value: string;
105
- }
106
-
107
19
  export type NetworkSpeed =
108
20
  | 'gsm'
109
21
  | 'scsd'
@@ -115,37 +27,6 @@ export type NetworkSpeed =
115
27
  | 'evdo'
116
28
  | 'full';
117
29
 
118
- export interface NetworkSpeedOpts {
119
- speed: NetworkSpeed;
120
- }
121
-
122
- export interface IsAppInstalledOpts {
123
- /**
124
- * Application package identifier
125
- */
126
- appId: string;
127
-
128
- /**
129
- * The user ID for which the package is installed.
130
- * The `current` user id is used by default.
131
- */
132
- user?: string | number;
133
- }
134
-
135
- export interface ClearAppOpts {
136
- /**
137
- * Application package identifier
138
- */
139
- appId: string;
140
- }
141
-
142
- export interface QueryAppStateOpts {
143
- /**
144
- * Application package identifier
145
- */
146
- appId: string;
147
- }
148
-
149
30
  /**
150
31
  * Returned by `queryAppState`
151
32
  * - `0` - is the app is not installed
@@ -161,26 +42,6 @@ export interface TerminateAppOpts {
161
42
  * @defaultValue 500
162
43
  */
163
44
  timeout?: number | string;
164
- /**
165
- * Application package identifier
166
- */
167
- appId: string;
168
- }
169
-
170
- export interface ActivateAppOpts {
171
- /**
172
- * Application package identifier
173
- */
174
- appId: string;
175
- }
176
-
177
- export interface RemoveAppOpts extends UninstallOptions {
178
- appId: string;
179
- }
180
-
181
- export interface InstallAppOpts extends InstallOptions {
182
- appPath: string;
183
- checkVersion: boolean;
184
45
  }
185
46
 
186
47
  export interface WebviewsMapping {
@@ -267,70 +128,6 @@ export interface DoSetElementValueOpts {
267
128
  replace: boolean;
268
129
  }
269
130
 
270
- export interface ExecOptions {
271
- /**
272
- * The actual command to execute.
273
- *
274
- * @see {@link https://developer.android.com/studio/run/emulator-console}
275
- */
276
- command: string | string[];
277
- /**
278
- * A timeout used to wait for a server reply to the given command in
279
- * milliseconds
280
- * @defaultValue 60000
281
- */
282
- execTimeout?: number;
283
- /**
284
- * Console connection timeout in milliseconds
285
- * @defaultValue 5000
286
- */
287
- connTimeout?: number;
288
- /**
289
- * Telnet console initialization timeout in milliseconds (the time between the
290
- * connection happens and the command prompt is available)
291
- */
292
- initTimeout?: number;
293
- }
294
-
295
- export interface PullFileOpts {
296
- /**
297
- * The full path to the remote file or a specially formatted path, which
298
- * points to an item inside an app bundle, for example `@my.app.id/my/path`.
299
- * It is mandatory for the app bundle to have debugging enabled in order to
300
- * use the latter `remotePath` format.
301
- */
302
- remotePath: string;
303
- }
304
-
305
- export interface PushFileOpts {
306
- /**
307
- * The full path to the remote file or a specially formatted path, which
308
- * points to an item inside an app bundle, for example `@my.app.id/my/path`.
309
- * It is mandatory for the app bundle to have debugging enabled in order to
310
- * use the latter `remotePath` format.
311
- */
312
- remotePath: string;
313
- /**
314
- * Base64-encoded content of the file to be pushed.
315
- */
316
- payload: string;
317
- }
318
-
319
- export interface PullFolderOpts {
320
- /**
321
- * The full path to the remote folder
322
- */
323
- remotePath: string;
324
- }
325
-
326
- export interface DeleteFileOpts {
327
- /**
328
- * The full path to the remote file or a file inside an application bundle
329
- * (for example `@my.app.id/path/in/bundle`)
330
- */
331
- remotePath: string;
332
- }
333
-
334
131
  export interface FindElementOpts {
335
132
  strategy: string;
336
133
  selector: string;
@@ -344,17 +141,6 @@ export interface SendKeysOpts {
344
141
  replace?: boolean;
345
142
  }
346
143
 
347
- export interface DeviceTimeOpts {
348
- /**
349
- * @defaultValue 'YYYY-MM-DDTHH:mm:ssZ'
350
- */
351
- format?: string;
352
- }
353
-
354
- export interface PerformEditorActionOpts {
355
- action: string | number;
356
- }
357
-
358
144
  export interface ListSmsOpts {
359
145
  /**
360
146
  * Maximum count of recent SMS messages
@@ -367,35 +153,6 @@ export type UnlockType = 'pin' | 'pinWithKeyEvent' | 'password' | 'pattern';
367
153
 
368
154
  export type UnlockStrategy = 'locksettings' | 'uiautomator';
369
155
 
370
- export interface UnlockOptions {
371
- /**
372
- * The unlock key. The value of this key depends on the actual unlock type and
373
- * could be a pin/password/pattern value or a biometric finger id.
374
- *
375
- * If not provided then the corresponding value from session capabilities is
376
- * used.
377
- */
378
- key?: string;
379
- /**
380
- * The unlock type.
381
- *
382
- * If not provided then the corresponding value from session capabilities is
383
- * used.
384
- */
385
- type?: UnlockType;
386
- /**
387
- * Setting it to 'uiautomator' will enforce the driver to avoid using special
388
- * ADB shortcuts in order to speed up the unlock procedure.
389
- * @defaultValue 'uiautomator'
390
- */
391
- strategy?: UnlockStrategy;
392
- /**
393
- * The maximum time in milliseconds to wait until the screen gets unlocked
394
- * @defaultValue 2000
395
- */
396
- timeoutMs?: number;
397
- }
398
-
399
156
  export interface IntentOpts {
400
157
  /**
401
158
  * The user ID for which the service is started.
@@ -482,148 +239,6 @@ export interface IntentOpts {
482
239
  flags?: string;
483
240
  }
484
241
 
485
- export interface StartActivityOpts extends IntentOpts {
486
- /**
487
- * Set it to `true` if you want to block the method call
488
- * until the activity manager's process returns the control to the system.
489
- * @defaultValue false
490
- */
491
- wait?: boolean;
492
- /**
493
- * Set it to `true` to force stop the target
494
- * app before starting the activity
495
- * @defaultValue false
496
- */
497
- stop?: boolean;
498
- /**
499
- * The windowing mode to launch the activity into.
500
- *
501
- * Check
502
- * https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
503
- * for more details on possible windowing modes (constants starting with
504
- * `WINDOWING_MODE_`).
505
- */
506
- windowingMode?: number | string;
507
- /**
508
- * The activity type to launch the activity as.
509
- *
510
- * Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
511
- * for more details on possible activity types (constants starting with `ACTIVITY_TYPE_`).
512
- */
513
- activityType?: number | string;
514
- /**
515
- * The display identifier to launch the activity into.
516
- */
517
- display?: number | string;
518
- }
519
-
520
- export interface BroadcastOpts extends IntentOpts {
521
- /**
522
- * The user ID for which the broadcast is sent.
523
- *
524
- * The `current` alias assumes the current user ID.
525
- * @defaultValue `all`
526
- */
527
- user?: string | number;
528
- /**
529
- * Require receiver to hold the given permission.
530
- */
531
- receiverPermission?: string;
532
- /**
533
- * Whether the receiver may start activities even if in the background.
534
- */
535
- allowBackgroundActivityStarts?: boolean;
536
- }
537
-
538
- export interface StartServiceOpts extends IntentOpts {
539
- /**
540
- * Set it to `true` if your service must be started as foreground service.
541
- *
542
- * This option is ignored if the API level of the device under test is below
543
- * 26 (Android 8).
544
- */
545
- foreground?: boolean;
546
- }
547
-
548
- export type StopServiceOpts = IntentOpts;
549
-
550
- export interface StartMediaProjectionRecordingOpts {
551
- /**
552
- * Maximum supported resolution on-device (Detected automatically by the app
553
- * itself), which usually equals to Full HD 1920x1080 on most phones however
554
- * you can change it to following supported resolutions as well: "1920x1080",
555
- * "1280x720", "720x480", "320x240", "176x144".
556
- */
557
- resolution?: string;
558
- /**
559
- * Maximum allowed duration is 15 minutes; you can increase it if your test
560
- * takes longer than that.
561
- * @defaultValue 900
562
- */
563
- maxDurationSec?: number;
564
- /**
565
- * Recording thread priority.
566
- *
567
- * If you face performance drops during testing with recording enabled, you
568
- * can reduce recording priority
569
- *
570
- * @defaultValue 'high'
571
- */
572
- priority?: 'high' | 'normal' | 'low';
573
- /**
574
- * You can type recording video file name as you want, but recording currently
575
- * supports only "mp4" format so your filename must end with ".mp4". An
576
- * invalid file name will fail to start the recording. If not provided then
577
- * the current timestamp will be used as file name.
578
- */
579
- filename?: string;
580
- }
581
-
582
- export interface StopMediaProjectionRecordingOpts {
583
- /**
584
- * The path to the remote location, where the resulting video should be
585
- * uploaded. The following protocols are supported: http/https, ftp. Null or
586
- * empty string value (the default setting) means the content of resulting
587
- * file should be encoded as Base64 and passed as the endpoont response value.
588
- * An exception will be thrown if the generated media file is too big to fit
589
- * into the available process memory.
590
- */
591
- remotePath?: string;
592
- /**
593
- * The name of the user for the remote authentication.
594
- */
595
- user?: string;
596
- /**
597
- * The password for the remote authentication.
598
- */
599
- pass?: string;
600
- /**
601
- * The http multipart upload method name.
602
- * @defaultValue 'PUT'
603
- */
604
- method?: HTTPMethod;
605
- /**
606
- * Additional headers mapping for multipart http(s) uploads
607
- */
608
- headers?: StringRecord;
609
- /**
610
- * The name of the form field, where the file content BLOB should be stored
611
- * for http(s) uploads
612
- * @defaultValue 'file'
613
- */
614
- fileFieldName?: string;
615
- /**
616
- * Additional form fields for multipart http(s) uploads
617
- */
618
- formFields?: FormFields;
619
- /**
620
- * The actual media upload request timeout in milliseconds.
621
- *
622
- * Defaults to `@appium/support.net.DEFAULT_TIMEOUT_MS`
623
- */
624
- uploadTimeout?: number;
625
- }
626
-
627
242
  export type FormFields = StringRecord | [key: string, value: any][];
628
243
 
629
244
  export interface GetConnectivityResult {
@@ -643,101 +258,8 @@ export interface GetConnectivityResult {
643
258
 
644
259
  export type ServiceType = 'wifi' | 'data' | 'airplaneMode';
645
260
 
646
- export interface GetConnectivityOpts {
647
- /**
648
- * one or more services to get the connectivity for.
649
- */
650
- services?: ServiceType[] | ServiceType;
651
- }
652
-
653
- export interface SetConnectivityOpts {
654
- /**
655
- * Either to enable or disable Wi-Fi.
656
- * An unset value means to not change the state for the given service.
657
- */
658
- wifi?: boolean;
659
-
660
- /**
661
- * Either to enable or disable mobile data connection.
662
- * An unset value means to not change the state for the given service.
663
- */
664
- data?: boolean;
665
-
666
- /**
667
- * Either to enable to disable the Airplane Mode
668
- * An unset value means to not change the state for the given service.
669
- */
670
- airplaneMode?: boolean;
671
- }
672
-
673
- export interface GpsCacheRefreshOpts {
674
- /**
675
- * The maximum number of milliseconds
676
- * to block until GPS cache is refreshed. Providing zero or a negative
677
- * value to it skips waiting completely.
678
- * @defaultValue 20000
679
- */
680
- timeoutMs?: number;
681
- }
682
-
683
- export interface PerformanceDataOpts {
684
- /**
685
- * The name of the package identifier to fetch the data for
686
- */
687
- packageName: string;
688
- /**
689
- * One of supported subsystem to fetch the data for.
690
- */
691
- dataType: PerformanceDataType;
692
- }
693
-
694
261
  export type PerformanceDataType = 'batteryinfo' | 'cpuinfo' | 'memoryinfo' | 'networkinfo';
695
262
 
696
- export interface GetPermissionsOpts {
697
- /**
698
- * One of possible permission types to get.
699
- * @defaultValue 'requested'
700
- */
701
- type?: string;
702
- /**
703
- * The application package to set change permissions on. Defaults to the
704
- * package name under test
705
- */
706
- appPackage?: string;
707
- }
708
-
709
- export interface ChangePermissionsOpts {
710
- /**
711
- * If `target` is set to 'pm':
712
- * The full name of the permission to be changed
713
- * or a list of permissions. Check https://developer.android.com/reference/android/Manifest.permission
714
- * to get the full list of standard Android permssion names. Mandatory argument.
715
- * If 'all' magic string is passed then the chosen action is going to be applied to all
716
- * permisisons requested/granted by 'appPackage'.
717
- * If `target` is set to 'appops':
718
- * The full name of the appops permission to be changed
719
- * or a list of permissions. Check AppOpsManager.java sources to get the full list of
720
- * available appops permission names. Mandatory argument.
721
- * Examples: 'ACTIVITY_RECOGNITION', 'SMS_FINANCIAL_TRANSACTIONS', 'READ_SMS', 'ACCESS_NOTIFICATIONS'.
722
- * The 'all' magic string is unsupported.
723
- */
724
- permissions: string | string[];
725
- /**
726
- * The application package to set change permissions on. Defaults to the
727
- * package name under test
728
- */
729
- appPackage?: string;
730
- /**
731
- * One of `PM_ACTION` values if `target` is set to 'pm', otherwise one of `APPOPS_ACTION` values
732
- */
733
- action?: string;
734
- /**
735
- * Either 'pm' or 'appops'. The 'appops' one requires 'adb_shell' server security option to be enabled.
736
- * @defaultValue 'pm'
737
- */
738
- target?: 'pm' | 'appops';
739
- }
740
-
741
263
  export interface StartScreenRecordingOpts {
742
264
  /**
743
265
  * The path to the remote location, where the captured video should be
@@ -867,95 +389,6 @@ export interface StopScreenRecordingOpts {
867
389
  formFields?: FormFields;
868
390
  }
869
391
 
870
- /**
871
- * @privateRemarks inferred from usage
872
- */
873
- export interface ShellOpts {
874
- command: string;
875
- args?: string[];
876
- timeout?: number;
877
- includeStderr?: boolean;
878
- }
879
-
880
- export interface StartScreenStreamingOpts {
881
- /**
882
- * The scaled width of the device's screen.
883
- *
884
- * If unset then the script will assign it to the actual screen width measured
885
- * in pixels.
886
- */
887
- width?: number;
888
- /**
889
- * The scaled height of the device's screen.
890
- *
891
- * If unset then the script will assign it to the actual screen height
892
- * measured in pixels.
893
- */
894
- height?: number;
895
- /**
896
- * The video bit rate for the video, in bits per second.
897
- *
898
- * The default value is 4 Mb/s. You can increase the bit rate to improve video
899
- * quality, but doing so results in larger movie files.
900
- * @defaultValue 4000000
901
- */
902
- bitRate?: number;
903
- /**
904
- * The IP address/host name to start the MJPEG server on.
905
- *
906
- * You can set it to `0.0.0.0` to trigger the broadcast on all available
907
- * network interfaces.
908
- *
909
- * @defaultValue '127.0.0.1'
910
- */
911
- host?: string;
912
- /**
913
- * The HTTP request path the MJPEG server should be available on.
914
- *
915
- * If unset, then any pathname on the given `host`/`port` combination will
916
- * work. Note that the value should always start with a single slash: `/`
917
- */
918
- pathname?: string;
919
- /**
920
- * The port number to start the internal TCP MJPEG broadcast on.
921
- *
922
- * This type of broadcast always starts on the loopback interface
923
- * (`127.0.0.1`).
924
- *
925
- * @defaultValue 8094
926
- */
927
- tcpPort?: number;
928
- /**
929
- * The port number to start the MJPEG server on.
930
- *
931
- * @defaultValue 8093
932
- */
933
- port?: number;
934
- /**
935
- * The quality value for the streamed JPEG images.
936
- *
937
- * This number should be in range `[1,100]`, where `100` is the best quality.
938
- *
939
- * @defaultValue 70
940
- */
941
- quality?: number;
942
- /**
943
- * If set to `true` then GStreamer pipeline will increase the dimensions of
944
- * the resulting images to properly fit images in both landscape and portrait
945
- * orientations.
946
- *
947
- * Set it to `true` if the device rotation is not going to be the same during
948
- * the broadcasting session.
949
- */
950
- considerRotation?: boolean;
951
- /**
952
- * Whether to log GStreamer pipeline events into the standard log output.
953
- *
954
- * Might be useful for debugging purposes.
955
- */
956
- logPipelineDetails?: boolean;
957
- }
958
-
959
392
  export interface DeviceInfo {
960
393
  width: number;
961
394
  height: number;
@@ -1017,77 +450,6 @@ export type StatusBarCommand =
1017
450
  | 'clickTile'
1018
451
  | 'getStatusIcons';
1019
452
 
1020
- export interface StatusBarCommandOpts {
1021
- /**
1022
- * Each list item must separated with a new line (`\n`) character.
1023
- */
1024
- command: StatusBarCommand;
1025
- /**
1026
- * The name of the tile component.
1027
- *
1028
- * It is only required for `(add|remove|click)Tile` commands.
1029
- * Example value: `com.package.name/.service.QuickSettingsTileComponent`
1030
- */
1031
- component?: string;
1032
- }
1033
-
1034
- export interface LockOpts {
1035
- /**
1036
- * The number to keep the locked.
1037
- * 0 or empty value will keep the device locked.
1038
- */
1039
- seconds?: number;
1040
- }
1041
-
1042
- export interface DeviceidleOpts {
1043
- /** The action name to execute */
1044
- action: 'whitelistAdd' | 'whitelistRemove';
1045
- /** Either a single package or multiple packages to add or remove from the idle whitelist */
1046
- packages?: string | string[];
1047
- }
1048
-
1049
- export interface SendTrimMemoryOpts {
1050
- /** The package name to send the `trimMemory` event to */
1051
- pkg: string;
1052
- /** The actual memory trim level to be sent */
1053
- level:
1054
- | 'COMPLETE'
1055
- | 'MODERATE'
1056
- | 'BACKGROUND'
1057
- | 'UI_HIDDEN'
1058
- | 'RUNNING_CRITICAL'
1059
- | 'RUNNING_LOW'
1060
- | 'RUNNING_MODERATE';
1061
- }
1062
-
1063
- export interface ImageInjectionOpts {
1064
- /** Base64-encoded payload of a .png image to be injected */
1065
- payload: string;
1066
- }
1067
-
1068
- export interface SetUiModeOpts {
1069
- /**
1070
- * The UI mode to set the value for.
1071
- * Supported values are: 'night' and 'car'
1072
- */
1073
- mode: string;
1074
- /**
1075
- * The actual mode value to set.
1076
- * Supported value for different UI modes are:
1077
- * - night: yes|no|auto|custom_schedule|custom_bedtime
1078
- * - car: yes|no
1079
- */
1080
- value: string;
1081
- }
1082
-
1083
- export interface GetUiModeOpts {
1084
- /**
1085
- * The UI mode to set the value for.
1086
- * Supported values are: 'night' and 'car'
1087
- */
1088
- mode: string;
1089
- }
1090
-
1091
453
  export interface SmsListResultItem {
1092
454
  id: string;
1093
455
  address: string;
@@ -1226,14 +588,6 @@ export type ADBLaunchInfo = Pick<
1226
588
  'appPackage' | 'appWaitActivity' | 'appActivity' | 'appWaitPackage'
1227
589
  >;
1228
590
 
1229
- export interface BluetoothOptions {
1230
- action: 'enable' | 'disable' | 'unpairAll';
1231
- }
1232
-
1233
- export interface NfcOptions {
1234
- action: 'enable' | 'disable';
1235
- }
1236
-
1237
591
  export interface InjectedImageSize {
1238
592
  /** X scale value in range (0..) */
1239
593
  scaleX?: number;