未验证 提交 69b1c919 编写于 作者: O openharmony_ci 提交者: Gitee

!12760 翻译完成:11985+12023+12047+12134 接口文档一致性扫描修改

Merge pull request !12760 from wusongqing/TR11985
# Device Usage Statistics
# @ohos.deviceUsageStatistics (Device Usage Statistics)
This module provides APIs for collecting statistics on device usage.
......@@ -487,7 +487,7 @@ Enumerates the interval types for querying the application usage duration.
**System capability**: SystemCapability.ResourceSchedule.UsageStatistics.App
| Name | Default Value | Description |
| Name | Value | Description |
| ------------ | ---- | ---------------------------------------- |
| 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. |
......
# Obtaining Process Information
# @ohos.process (Obtaining Process Information)
> **NOTE**
>
......@@ -18,13 +18,13 @@ import process from '@ohos.process';
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| 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,
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| 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&lt;number&gt;
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.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -277,7 +279,9 @@ getOutput(): Promise&lt;Uint8Array&gt;
Obtains the standard output of the child process.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -304,7 +308,9 @@ getErrorOutput(): Promise&lt;Uint8Array&gt;
Obtains the standard error output of the child process.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -331,7 +337,9 @@ close(): void
Closes the child process in running.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -349,7 +357,9 @@ kill(signal: number | string): void
Sends a signal to the specified child process to terminate it.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -593,7 +603,9 @@ runCmd(command: string, options?: { timeout?: number, killSignal?: number | stri
Forks a new process to run a shell command and returns the **ChildProcess** object.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -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&nbsp;\|&nbsp;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**.|
**Return value**
......@@ -650,7 +662,9 @@ on(type: string, listener: EventListener): void
Stores the events triggered by the user.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -682,7 +696,9 @@ off(type: string): boolean
Deletes the event stored by the user.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -737,7 +753,9 @@ cwd(): string
Obtains the working directory of this process.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......@@ -754,7 +772,9 @@ chdir(dir: string): void
Changes the working directory of this process.
This is a system API and cannot be called by third-party applications.
**System API**: This is a system API.
It is used only to test applications.
**System capability**: SystemCapability.Utils.Lang
......
# Device Usage Statistics
# @ohos.resourceschedule.usageStatistics (Device Usage Statistics)
This module provides APIs for collecting statistics on device usage.
......@@ -703,7 +703,7 @@ Queries FA usage records. This API uses an asynchronous callback to return a max
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ----------------------------------- |
| callback | AsyncCallback&lt;Array&lt;[HapModuleInfo](#hapmoduleinfo)&gt;&gt; | Yes | Callback used to return a maximum of 1000 FA usage records.|
| callback | AsyncCallback&lt;Array&lt;[HapModuleInfo](#hapmoduleinfo)&gt;&gt; | Yes | Callback used to return a maximum of **maxNum** FA usage records.|
**Error codes**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册