io.appium.settings 6.0.4 → 6.0.6
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 +12 -0
- package/README.md +1 -1
- package/apks/settings_apk-debug.apk +0 -0
- package/build/lib/client.d.ts +2 -2
- package/build/lib/client.js +25 -21
- package/build/lib/client.js.map +1 -1
- package/build/lib/commands/bluetooth.d.ts +1 -1
- package/build/lib/commands/bluetooth.js +1 -1
- package/build/lib/commands/clipboard.d.ts +2 -2
- package/build/lib/commands/clipboard.js +3 -3
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +1 -1
- package/build/lib/commands/media-projection.js +1 -1
- package/build/lib/commands/notifications.d.ts +1 -1
- package/build/lib/commands/notifications.js +1 -1
- package/lib/client.js +2 -2
- package/lib/commands/bluetooth.js +1 -1
- package/lib/commands/clipboard.js +3 -3
- package/lib/commands/media-projection.js +1 -1
- package/lib/commands/notifications.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [6.0.6](https://github.com/appium/io.appium.settings/compare/v6.0.5...v6.0.6) (2025-09-27)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* fix typos ([#238](https://github.com/appium/io.appium.settings/issues/238)) ([87d64b3](https://github.com/appium/io.appium.settings/commit/87d64b3a164ca1d64b482e744e9985cbd49cbeed))
|
|
6
|
+
|
|
7
|
+
## [6.0.5](https://github.com/appium/io.appium.settings/compare/v6.0.4...v6.0.5) (2025-09-25)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* **deps:** bump org.apache.commons:commons-lang3 from 3.18.0 to 3.19.0 ([#237](https://github.com/appium/io.appium.settings/issues/237)) ([289db1f](https://github.com/appium/io.appium.settings/commit/289db1f7a2cbabcc08ea6a37b8ee64c77778ebf5))
|
|
12
|
+
|
|
1
13
|
## [6.0.4](https://github.com/appium/io.appium.settings/compare/v6.0.3...v6.0.4) (2025-09-04)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ import { SettingsApp } from 'io.appium.settings';
|
|
|
64
64
|
|
|
65
65
|
async function main() {
|
|
66
66
|
// It is expected 'io.appium.settings' is already installed on the device
|
|
67
|
-
// and the
|
|
67
|
+
// and the necessary permissions are granted to it.
|
|
68
68
|
// Check https://github.com/appium/appium-android-driver/blob/master/lib/helpers/android.ts
|
|
69
69
|
// if you are looking on how to automate this process.
|
|
70
70
|
const app = new SettingsApp({
|
|
Binary file
|
package/build/lib/client.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export class SettingsApp {
|
|
|
48
48
|
/**
|
|
49
49
|
* If the io.appium.settings package has running foreground service.
|
|
50
50
|
* It returns the io.appium.settings's process existence for api level 25 and lower
|
|
51
|
-
*
|
|
51
|
+
* because the concept of foreground services has only been introduced since API 26
|
|
52
52
|
*
|
|
53
53
|
* @throws {Error} If the method gets an error in the adb shell execution.
|
|
54
54
|
* @returns {Promise<boolean>} Return true if the device Settings app has a servicve running in foreground.
|
|
@@ -57,7 +57,7 @@ export class SettingsApp {
|
|
|
57
57
|
/**
|
|
58
58
|
* Performs broadcast and verifies the result of it
|
|
59
59
|
*
|
|
60
|
-
* @param {string[]} args Arguments passed to the `am broadcast`
|
|
60
|
+
* @param {string[]} args Arguments passed to the `am broadcast` command
|
|
61
61
|
* @param {string} action The exception message in case of broadcast failure
|
|
62
62
|
* @param {boolean} [requireRunningApp=true] Whether to run a check for a running Appium Settings app
|
|
63
63
|
* @returns {Promise<string>}
|
package/build/lib/client.js
CHANGED
|
@@ -24,29 +24,14 @@ const media_projection_1 = require("./commands/media-projection");
|
|
|
24
24
|
* @property {import('appium-adb').ADB} adb
|
|
25
25
|
*/
|
|
26
26
|
class SettingsApp {
|
|
27
|
+
/** @type {import('appium-adb').ADB} */
|
|
28
|
+
adb;
|
|
29
|
+
/** @type {import('@appium/logger').Logger} */
|
|
30
|
+
log;
|
|
27
31
|
/**
|
|
28
32
|
* @param {SettingsAppOpts} opts
|
|
29
33
|
*/
|
|
30
34
|
constructor(opts) {
|
|
31
|
-
this.setAnimationState = animation_1.setAnimationState;
|
|
32
|
-
this.setBluetoothState = bluetooth_1.setBluetoothState;
|
|
33
|
-
this.unpairAllBluetoothDevices = bluetooth_1.unpairAllBluetoothDevices;
|
|
34
|
-
this.getClipboard = clipboard_1.getClipboard;
|
|
35
|
-
this.setGeoLocation = geolocation_1.setGeoLocation;
|
|
36
|
-
this.getGeoLocation = geolocation_1.getGeoLocation;
|
|
37
|
-
this.refreshGeoLocationCache = geolocation_1.refreshGeoLocationCache;
|
|
38
|
-
this.listSupportedLocales = locale_1.listSupportedLocales;
|
|
39
|
-
this.setDeviceLocale = locale_1.setDeviceLocale;
|
|
40
|
-
this.scanMedia = media_1.scanMedia;
|
|
41
|
-
this.setDataState = network_1.setDataState;
|
|
42
|
-
this.setWifiState = network_1.setWifiState;
|
|
43
|
-
this.getNotifications = notifications_1.getNotifications;
|
|
44
|
-
this.adjustNotificationsPermissions = notifications_1.adjustNotificationsPermissions;
|
|
45
|
-
this.getSmsList = sms_1.getSmsList;
|
|
46
|
-
this.performEditorAction = typing_1.performEditorAction;
|
|
47
|
-
this.typeUnicode = typing_1.typeUnicode;
|
|
48
|
-
this.makeMediaProjectionRecorder = media_projection_1.makeMediaProjectionRecorder;
|
|
49
|
-
this.adjustMediaProjectionServicePermissions = media_projection_1.adjustMediaProjectionServicePermissions;
|
|
50
35
|
this.adb = opts.adb;
|
|
51
36
|
this.log = logger_1.log;
|
|
52
37
|
}
|
|
@@ -115,7 +100,7 @@ class SettingsApp {
|
|
|
115
100
|
/**
|
|
116
101
|
* If the io.appium.settings package has running foreground service.
|
|
117
102
|
* It returns the io.appium.settings's process existence for api level 25 and lower
|
|
118
|
-
*
|
|
103
|
+
* because the concept of foreground services has only been introduced since API 26
|
|
119
104
|
*
|
|
120
105
|
* @throws {Error} If the method gets an error in the adb shell execution.
|
|
121
106
|
* @returns {Promise<boolean>} Return true if the device Settings app has a servicve running in foreground.
|
|
@@ -133,7 +118,7 @@ class SettingsApp {
|
|
|
133
118
|
/**
|
|
134
119
|
* Performs broadcast and verifies the result of it
|
|
135
120
|
*
|
|
136
|
-
* @param {string[]} args Arguments passed to the `am broadcast`
|
|
121
|
+
* @param {string[]} args Arguments passed to the `am broadcast` command
|
|
137
122
|
* @param {string} action The exception message in case of broadcast failure
|
|
138
123
|
* @param {boolean} [requireRunningApp=true] Whether to run a check for a running Appium Settings app
|
|
139
124
|
* @returns {Promise<string>}
|
|
@@ -188,6 +173,25 @@ class SettingsApp {
|
|
|
188
173
|
'Check the server log for more details');
|
|
189
174
|
}
|
|
190
175
|
}
|
|
176
|
+
setAnimationState = animation_1.setAnimationState;
|
|
177
|
+
setBluetoothState = bluetooth_1.setBluetoothState;
|
|
178
|
+
unpairAllBluetoothDevices = bluetooth_1.unpairAllBluetoothDevices;
|
|
179
|
+
getClipboard = clipboard_1.getClipboard;
|
|
180
|
+
setGeoLocation = geolocation_1.setGeoLocation;
|
|
181
|
+
getGeoLocation = geolocation_1.getGeoLocation;
|
|
182
|
+
refreshGeoLocationCache = geolocation_1.refreshGeoLocationCache;
|
|
183
|
+
listSupportedLocales = locale_1.listSupportedLocales;
|
|
184
|
+
setDeviceLocale = locale_1.setDeviceLocale;
|
|
185
|
+
scanMedia = media_1.scanMedia;
|
|
186
|
+
setDataState = network_1.setDataState;
|
|
187
|
+
setWifiState = network_1.setWifiState;
|
|
188
|
+
getNotifications = notifications_1.getNotifications;
|
|
189
|
+
adjustNotificationsPermissions = notifications_1.adjustNotificationsPermissions;
|
|
190
|
+
getSmsList = sms_1.getSmsList;
|
|
191
|
+
performEditorAction = typing_1.performEditorAction;
|
|
192
|
+
typeUnicode = typing_1.typeUnicode;
|
|
193
|
+
makeMediaProjectionRecorder = media_projection_1.makeMediaProjectionRecorder;
|
|
194
|
+
adjustMediaProjectionServicePermissions = media_projection_1.adjustMediaProjectionServicePermissions;
|
|
191
195
|
}
|
|
192
196
|
exports.SettingsApp = SettingsApp;
|
|
193
197
|
//# sourceMappingURL=client.js.map
|
package/build/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.js"],"names":[],"mappings":";;;;;;AAAA,qCAA2C;AAC3C,oDAAuB;AACvB,uCAA4C;AAC5C,iDAAmF;AACnF,oDAAyD;AACzD,oDAAoF;AACpF,oDAAoD;AACpD,wDAAiG;AACjG,8CAA0E;AAC1E,4CAA6C;AAC7C,gDAAgE;AAChE,4DAA4F;AAC5F,wCAA4C;AAC5C,8CAAqE;AACrE,kEAGqC;AAErC;;;GAGG;AAGH,MAAa,WAAW;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.js"],"names":[],"mappings":";;;;;;AAAA,qCAA2C;AAC3C,oDAAuB;AACvB,uCAA4C;AAC5C,iDAAmF;AACnF,oDAAyD;AACzD,oDAAoF;AACpF,oDAAoD;AACpD,wDAAiG;AACjG,8CAA0E;AAC1E,4CAA6C;AAC7C,gDAAgE;AAChE,4DAA4F;AAC5F,wCAA4C;AAC5C,8CAAqE;AACrE,kEAGqC;AAErC;;;GAGG;AAGH,MAAa,WAAW;IACtB,uCAAuC;IACvC,GAAG,CAAC;IAEJ,8CAA8C;IAC9C,GAAG,CAAC;IAEJ;;OAEG;IACH,YAAa,IAAI;QACf,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,GAAG,GAAG,YAAG,CAAC;IACjB,CAAC;IAED;;;;;;;;OAQG;IAEH;;;;;;;OAOG;IACH,KAAK,CAAC,cAAc,CAAE,IAAI,GAAG,EAAE;QAC7B,MAAM,EACJ,OAAO,GAAG,IAAI,EACd,uBAAuB,GAAG,KAAK,EA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AE5B,cAAc,GAAG,4BAAc,CAAC;IAChC,cAAc,GAAG,4BAAc,CAAC;IAChC,uBAAuB,GAAG,qCAAuB,CAAC;IAElD,oBAAoB,GAAG,6BAAoB,CAAC;IAC5C,eAAe,GAAG,wBAAe,CAAC;IAElC,SAAS,GAAG,iBAAS,CAAC;IAEtB,YAAY,GAAG,sBAAY,CAAC;IAC5B,YAAY,GAAG,sBAAY,CAAC;IAE5B,gBAAgB,GAAG,gCAAgB,CAAC;IACpC,8BAA8B,GAAG,8CAA8B,CAAC;IAChE,UAAU,GAAG,gBAAU,CAAC;IAExB,mBAAmB,GAAG,4BAAmB,CAAC;IAC1C,WAAW,GAAG,oBAAW,CAAC;IAE1B,2BAA2B,GAAG,8CAA2B,CAAC;IAC1D,uCAAuC,GAAG,0DAAuC,CAAC;CACnF;AAnMD,kCAmMC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export function setBluetoothState(this: import("../client").SettingsApp, on: boolean): Promise<void>;
|
|
8
8
|
/**
|
|
9
|
-
* Unpairs all
|
|
9
|
+
* Unpairs all previously paired bluetooth devices if any exist
|
|
10
10
|
*
|
|
11
11
|
* @this {import('../client').SettingsApp}
|
|
12
12
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Retrieves the text content of the device's clipboard.
|
|
3
3
|
* The method works for Android below and above 29.
|
|
4
|
-
* It
|
|
4
|
+
* It temporarily enforces the IME setting in order to workaround
|
|
5
5
|
* security limitations if needed.
|
|
6
6
|
* This method only works if Appium Settings v. 2.15+ is installed
|
|
7
7
|
* on the device under test
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @returns {Promise<string>} The actual content of the main clipboard as
|
|
11
11
|
* base64-encoded string or an empty string if the clipboard is empty
|
|
12
12
|
* @throws {Error} If there was a problem while getting the
|
|
13
|
-
* clipboard
|
|
13
|
+
* clipboard content
|
|
14
14
|
*/
|
|
15
15
|
export function getClipboard(this: import("../client").SettingsApp): Promise<string>;
|
|
16
16
|
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -10,7 +10,7 @@ const constants_1 = require("../constants");
|
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves the text content of the device's clipboard.
|
|
12
12
|
* The method works for Android below and above 29.
|
|
13
|
-
* It
|
|
13
|
+
* It temporarily enforces the IME setting in order to workaround
|
|
14
14
|
* security limitations if needed.
|
|
15
15
|
* This method only works if Appium Settings v. 2.15+ is installed
|
|
16
16
|
* on the device under test
|
|
@@ -19,7 +19,7 @@ const constants_1 = require("../constants");
|
|
|
19
19
|
* @returns {Promise<string>} The actual content of the main clipboard as
|
|
20
20
|
* base64-encoded string or an empty string if the clipboard is empty
|
|
21
21
|
* @throws {Error} If there was a problem while getting the
|
|
22
|
-
* clipboard
|
|
22
|
+
* clipboard content
|
|
23
23
|
*/
|
|
24
24
|
async function getClipboard() {
|
|
25
25
|
this.log.debug(logger_1.LOG_PREFIX, 'Getting the clipboard content');
|
|
@@ -41,7 +41,7 @@ async function getClipboard() {
|
|
|
41
41
|
}
|
|
42
42
|
const match = /data="([^"]*)"/.exec(output);
|
|
43
43
|
if (!match) {
|
|
44
|
-
throw new Error(`Cannot parse the actual
|
|
44
|
+
throw new Error(`Cannot parse the actual clipboard content from the command output: ${output}`);
|
|
45
45
|
}
|
|
46
46
|
return lodash_1.default.trim(match[1]);
|
|
47
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;;;;AAsBA,oCAuBC;AA7CD,oDAAuB;AACvB,sCAAuC;AACvC,4CAIsB;AAEtB;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,YAAY;IAChC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,+BAA+B,CAAC,CAAC;IAC5D,MAAM,IAAI,CAAC,cAAc,CAAC,EAAC,uBAAuB,EAAE,IA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,8BAAkB;QACxB,IAAI,EAAE,sCAA0B;KACjC,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAChC,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;YAC3C,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,sBAAU,EAAE,iBAAiB,CAAC,CAAC;YACjE,CAAC,CAAC,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,iEAAiE;YAC/E,2DAA2D;YAC3D,mBAAmB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,sEAAsE,MAAM,EAAE,CAAC,CAAC;IAClG,CAAC;IACD,OAAO,gBAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -11,7 +11,7 @@ export function makeMediaProjectionRecorder(this: import("../client").SettingsAp
|
|
|
11
11
|
* Media Projection-based recording service
|
|
12
12
|
*
|
|
13
13
|
* @this {import('../client').SettingsApp}
|
|
14
|
-
* @returns {Promise<boolean>} If the
|
|
14
|
+
* @returns {Promise<boolean>} If the permissions adjustment has actually been made
|
|
15
15
|
*/
|
|
16
16
|
export function adjustMediaProjectionServicePermissions(this: import("../client").SettingsApp): Promise<boolean>;
|
|
17
17
|
export type StartMediaProjectionRecordingOpts = {
|
|
@@ -149,7 +149,7 @@ function makeMediaProjectionRecorder() {
|
|
|
149
149
|
* Media Projection-based recording service
|
|
150
150
|
*
|
|
151
151
|
* @this {import('../client').SettingsApp}
|
|
152
|
-
* @returns {Promise<boolean>} If the
|
|
152
|
+
* @returns {Promise<boolean>} If the permissions adjustment has actually been made
|
|
153
153
|
*/
|
|
154
154
|
async function adjustMediaProjectionServicePermissions() {
|
|
155
155
|
if (await this.adb.getApiLevel() >= 29) {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
export function getNotifications(this: import("../client").SettingsApp): Promise<Record<string, any>>;
|
|
50
50
|
/**
|
|
51
51
|
* Adjusts the necessary permissions for the
|
|
52
|
-
* Notifications
|
|
52
|
+
* Notifications retrieval service for Android API level 29+
|
|
53
53
|
*
|
|
54
54
|
* @this {import('../client').SettingsApp}
|
|
55
55
|
* @returns {Promise<boolean>} If permissions adjustment has been actually made
|
|
@@ -62,7 +62,7 @@ async function getNotifications() {
|
|
|
62
62
|
;
|
|
63
63
|
/**
|
|
64
64
|
* Adjusts the necessary permissions for the
|
|
65
|
-
* Notifications
|
|
65
|
+
* Notifications retrieval service for Android API level 29+
|
|
66
66
|
*
|
|
67
67
|
* @this {import('../client').SettingsApp}
|
|
68
68
|
* @returns {Promise<boolean>} If permissions adjustment has been actually made
|
package/lib/client.js
CHANGED
|
@@ -107,7 +107,7 @@ export class SettingsApp {
|
|
|
107
107
|
/**
|
|
108
108
|
* If the io.appium.settings package has running foreground service.
|
|
109
109
|
* It returns the io.appium.settings's process existence for api level 25 and lower
|
|
110
|
-
*
|
|
110
|
+
* because the concept of foreground services has only been introduced since API 26
|
|
111
111
|
*
|
|
112
112
|
* @throws {Error} If the method gets an error in the adb shell execution.
|
|
113
113
|
* @returns {Promise<boolean>} Return true if the device Settings app has a servicve running in foreground.
|
|
@@ -127,7 +127,7 @@ export class SettingsApp {
|
|
|
127
127
|
/**
|
|
128
128
|
* Performs broadcast and verifies the result of it
|
|
129
129
|
*
|
|
130
|
-
* @param {string[]} args Arguments passed to the `am broadcast`
|
|
130
|
+
* @param {string[]} args Arguments passed to the `am broadcast` command
|
|
131
131
|
* @param {string} action The exception message in case of broadcast failure
|
|
132
132
|
* @param {boolean} [requireRunningApp=true] Whether to run a check for a running Appium Settings app
|
|
133
133
|
* @returns {Promise<string>}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
/**
|
|
10
10
|
* Retrieves the text content of the device's clipboard.
|
|
11
11
|
* The method works for Android below and above 29.
|
|
12
|
-
* It
|
|
12
|
+
* It temporarily enforces the IME setting in order to workaround
|
|
13
13
|
* security limitations if needed.
|
|
14
14
|
* This method only works if Appium Settings v. 2.15+ is installed
|
|
15
15
|
* on the device under test
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
* @returns {Promise<string>} The actual content of the main clipboard as
|
|
19
19
|
* base64-encoded string or an empty string if the clipboard is empty
|
|
20
20
|
* @throws {Error} If there was a problem while getting the
|
|
21
|
-
* clipboard
|
|
21
|
+
* clipboard content
|
|
22
22
|
*/
|
|
23
23
|
export async function getClipboard () {
|
|
24
24
|
this.log.debug(LOG_PREFIX, 'Getting the clipboard content');
|
|
@@ -40,7 +40,7 @@ export async function getClipboard () {
|
|
|
40
40
|
|
|
41
41
|
const match = /data="([^"]*)"/.exec(output);
|
|
42
42
|
if (!match) {
|
|
43
|
-
throw new Error(`Cannot parse the actual
|
|
43
|
+
throw new Error(`Cannot parse the actual clipboard content from the command output: ${output}`);
|
|
44
44
|
}
|
|
45
45
|
return _.trim(match[1]);
|
|
46
46
|
}
|
|
@@ -166,7 +166,7 @@ export function makeMediaProjectionRecorder() {
|
|
|
166
166
|
* Media Projection-based recording service
|
|
167
167
|
*
|
|
168
168
|
* @this {import('../client').SettingsApp}
|
|
169
|
-
* @returns {Promise<boolean>} If the
|
|
169
|
+
* @returns {Promise<boolean>} If the permissions adjustment has actually been made
|
|
170
170
|
*/
|
|
171
171
|
export async function adjustMediaProjectionServicePermissions() {
|
|
172
172
|
if (await this.adb.getApiLevel() >= 29) {
|
|
@@ -62,7 +62,7 @@ export async function getNotifications () {
|
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Adjusts the necessary permissions for the
|
|
65
|
-
* Notifications
|
|
65
|
+
* Notifications retrieval service for Android API level 29+
|
|
66
66
|
*
|
|
67
67
|
* @this {import('../client').SettingsApp}
|
|
68
68
|
* @returns {Promise<boolean>} If permissions adjustment has been actually made
|