| BY_OPTIMIZED | 0 | The system obtains the application usage duration statistics in the specified time frame at the interval the system deems appropriate.|
| BY_DAILY | 1 | The system obtains the application usage duration statistics in the specified time frame on a daily basis. |
| egid | number | Yes| No| Effective group identifier (EGID) of a process. This is a system API and cannot be called by third-party applications.|
| euid | number | Yes| No| Effective user identifier (EUID) of a process. This is a system API and cannot be called by third-party applications.|
| gid | number | Yes| No| Group identifier (GID) of a process. This is a system API and cannot be called by third-party applications.|
| egid | number | Yes| No| Effective group identifier (EGID) of a process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| euid | number | Yes| No| Effective user identifier (EUID) of a process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| gid | number | Yes| No| Group identifier (GID) of a process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| uid | number | Yes| No| User identifier (UID) of a process.|
| groups | number[] | Yes| No| Array with supplementary group IDs. This is a system API and cannot be called by third-party applications.|
| groups | number[] | Yes| No| Array with supplementary group IDs.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| pid | number | Yes| No| Process ID (PID) of a process.|
| ppid | number | Yes| No| Parent process ID (PPID) of a process. This is a system API and cannot be called by third-party applications.|
| ppid | number | Yes| No| Parent process ID (PPID) of a process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| tid<sup>8+</sup> | number | Yes| No| Thread ID (TID) of a process.|
...
...
@@ -32,7 +32,7 @@ import process from '@ohos.process';
Provides APIs for throwing exceptions during the addition of a process.
### process.isAppUid<sup>9+</sup>
### isAppUid<sup>9+</sup>
isAppUid(v: number): boolean
...
...
@@ -60,7 +60,7 @@ let result = pro.isAppUid(688);
```
### process.getUidForName<sup>9+</sup>
### getUidForName<sup>9+</sup>
getUidForName(v: string): number
...
...
@@ -88,7 +88,7 @@ let pres = pro .getUidForName("tool");
```
### process.getThreadPriority<sup>9+</sup>
### getThreadPriority<sup>9+</sup>
getThreadPriority(v: number): number
...
...
@@ -117,7 +117,7 @@ let pres = pro.getThreadPriority(tid);
```
### process.getSystemConfig<sup>9+</sup>
### getSystemConfig<sup>9+</sup>
getSystemConfig(name: number): number
...
...
@@ -146,7 +146,7 @@ let pres = pro.getSystemConfig(_SC_ARG_MAX);
```
### process.getEnvironmentVar<sup>9+</sup>
### getEnvironmentVar<sup>9+</sup>
getEnvironmentVar(name: string): string
...
...
@@ -174,7 +174,7 @@ let pres = pro.getEnvironmentVar("PATH");
```
### process.exit<sup>9+</sup>
### exit<sup>9+</sup>
exit(code: number): void
...
...
@@ -198,7 +198,7 @@ pro.exit(0);
```
### process.kill<sup>9+</sup>
### kill<sup>9+</sup>
kill(signal: number, pid: number): boolean
...
...
@@ -238,10 +238,10 @@ Allows a process to obtain the standard input and output of its child processes,
| pid | number | Yes| No| PID of the child process. This is a system API and cannot be called by third-party applications.|
| ppid | number | Yes| No| PPID of the child process. This is a system API and cannot be called by third-party applications.|
| exitCode | number | Yes| No| Exit code of the child process. This is a system API and cannot be called by third-party applications.|
| killed | boolean | Yes| No| Whether the parent process successfully sends a signal to the child process to terminate it. This is a system API and cannot be called by third-party applications.|
| pid | number | Yes| No| PID of the child process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| ppid | number | Yes| No| PPID of the child process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| exitCode | number | Yes| No| Exit code of the child process.<br>**System API**: This is a system API.<br>It is used only to test applications.|
| killed | boolean | Yes| No| Whether the parent process successfully sends a signal to the child process to terminate it.<br>**System API**: This is a system API.<br>It is used only to test applications.|
### wait
...
...
@@ -250,7 +250,9 @@ wait(): Promise<number>
Waits until the child process ends. This method uses a promise to return the exit code of the child process.
This is a system API and cannot be called by third-party applications.
@@ -609,7 +621,7 @@ This is a system API and cannot be called by third-party applications.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| timeout | number | No| Maximum running time (in ms) of the child process. When the running time of the child process exceeds the value of this parameter, the parent process sends a **killSignal** to the child process to terminate it. The default value is **0**.|
| killSignal | number\|string | No| Signal sent to the child process when the running time of a child process exceeds the timeout period. The default value is **SIGTERM**.|
| killSignal | number \| string | No| Signal sent to the child process when the running time of a child process exceeds the timeout period. The default value is **SIGTERM**.|
| maxBuffer | number | No| Maximum buffer size for the standard input and output of the child process. When the size is exceeded, the child process will be terminated. The default value is **1024 \* 1024**.|
| callback | AsyncCallback<Array<[HapModuleInfo](#hapmoduleinfo)>> | Yes | Callback used to return a maximum of 1000 FA usage records.|
| callback | AsyncCallback<Array<[HapModuleInfo](#hapmoduleinfo)>> | Yes | Callback used to return a maximum of **maxNum** FA usage records.|
A constructor used to create a **URLSearchParams** instance.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>](#constructor9) instead.
@@ -398,14 +528,14 @@ let params = new Url.URLSearchParams(urlObject.search);
### append<sup>(deprecated)</sup>
> **NOTE**
>
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.append<sup>9+</sup>](#append9) instead.
append(name: string, value: string): void
Appends a key-value pair into the query string.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.append<sup>9+</sup>](#append9) instead.
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.delete<sup>9+</sup>](#delete9) instead.
delete(name: string): void
Deletes key-value pairs of the specified key.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.delete<sup>9+</sup>](#delete9) instead.
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.getAll<sup>9+</sup>](#getall9) instead.
getAll(name: string): string[]
Obtains all the key-value pairs based on the specified key.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.getAll<sup>9+</sup>](#getall9) instead.
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.entries<sup>9+</sup>](#entries9) instead.
entries(): IterableIterator<[string,string]>
Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and the first and second fields of each array are the key and value respectively.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.entries<sup>9+</sup>](#entries9) instead.
Traverses the key-value pairs in the **URLSearchParams** instance by using a callback.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.forEach<sup>9+</sup>](#foreach9) instead.
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.get<sup>9+</sup>](#get9) instead.
get(name: string): string | null
Obtains the value of the first key-value pair based on the specified key.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.get<sup>9+</sup>](#get9) instead.
@@ -580,14 +712,15 @@ let age = parseInt(paramsObject.get("age"), 10); // is the number 18
### has<sup>(deprecated)</sup>
> **NOTE**
>
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.has<sup>9+</sup>](#has9) instead.
has(name: string): boolean
Checks whether a key has a value.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.has<sup>9+</sup>](#has9) instead.
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.set<sup>9+</sup>](#set9) instead.
set(name: string, value: string): void
Sets the value for a key. If key-value pairs matching the specified key exist, the value of the first key-value pair will be set to the specified value and other key-value pairs will be deleted. Otherwise, the key-value pair will be appended to the query string.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.set<sup>9+</sup>](#set9) instead.
@@ -639,14 +773,15 @@ paramsObject.set('baz', '3'); // Add a third parameter.
### sort<sup>(deprecated)</sup>
> **NOTE**
>
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.sort<sup>9+</sup>](#sort9) instead.
sort(): void
Sorts all key-value pairs contained in this object based on the Unicode code points of the keys and returns undefined. This method uses a stable sorting algorithm, that is, the relative order between key-value pairs with equal keys is retained.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.sort<sup>9+</sup>](#sort9) instead.
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.keys<sup>9+</sup>](#keys9) instead.
keys(): IterableIterator<string>
Obtains an ES6 iterator that contains the keys of all the key-value pairs.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.keys<sup>9+</sup>](#keys9) instead.
@@ -686,14 +822,15 @@ for (var key of searchParamsObject .keys()) { // Output key-value pairs
### values<sup>(deprecated)</sup>
> **NOTE**
>
> This API is deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.values<sup>9+</sup>](#values9) instead.
values(): IterableIterator<string>
Obtains an ES6 iterator that contains the values of all the key-value pairs.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [URLParams<sup>9+</sup>.values<sup>9+</sup>](#values9) instead.
Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and the first and second fields of each array are the key and value respectively.
> **NOTE**
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [Symbol.iterator]<sup>9+</sup>](#symboliterator9) instead.