未验证 提交 9f98f8a6 编写于 作者: O openharmony_ci 提交者: Gitee

!19720 【翻译完成】#I76U45

Merge pull request !19720 from Annie_wang/cherry-pick-1686790140
......@@ -5452,6 +5452,7 @@ Marshals this **Parcelable** object into a **MessageSequence** object.
| Type | Description |
| ------- | -------------------------------- |
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
**Example**
```ts
......@@ -5557,6 +5558,7 @@ Marshals the sequenceable object into a **MessageParcel** object.
| Type | Description |
| ------- | -------------------------------- |
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
**Example**
```ts
......@@ -6689,7 +6691,7 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode
}
```
### addDeathRecippient<sup>(deprecated)</sup>
### addDeathRecipient<sup>(deprecated)</sup>
>This API is no longer maintained since API version 9. You are advised to use [registerDeathRecipient](#registerdeathrecipient9).
......@@ -6744,7 +6746,7 @@ Adds a callback for receiving the death notifications of the remote object, incl
globalThis.context.connectServiceExtensionAbility(want, connect);
```
The proxy object in the **onConnect** callback can be assigned a value only after the ability is connected asynchronously. Then, **addDeathRecippient()** of the proxy object is called to add a callback for receiving the death notification of the remove object.
The proxy object in the **onConnect** callback can be assigned a value only after the ability is connected asynchronously. Then, **addDeathRecipient()** of the proxy object is called to add a callback for receiving the death notification of the remove object.
```ts
class MyDeathRecipient {
......@@ -7095,9 +7097,9 @@ A constructor used to create a **MessageOption** object.
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | ------ | ---- | -------------------------------------- |
| syncFlags | number | No | Call flag, which can be synchronous or asynchronous. The default value is **synchronous**.|
| Name| Type | Mandatory| Description |
| ------ | ------- | ---- | -------------------------------------- |
| async | boolean | No | Call flag, which can be synchronous or asynchronous. The default value is **synchronous**.|
**Example**
......@@ -7146,7 +7148,7 @@ Checks whether **SendMessageRequest** is called synchronously or asynchronously.
| Type | Description |
| ------- | ---------------------------------------- |
| boolean | Returns **true** if **SendMessageRequest** is called synchronously; returns **false** if **SendMessageRequest** is called asynchronously.|
| boolean | Returns **true** if **SendMessageRequest** is called asynchronously; returns **false** if it is called synchronously.|
**Example**
......@@ -7825,7 +7827,7 @@ Sends a **MessageSequence** message to the remote process in synchronous or asyn
| Type | Description |
| ---------------------------- | --------------------------------------------- |
| Promise&lt;RequestResult&gt; | Promise used to return the **sendRequestResult** object.|
| Promise&lt;RequestResult&gt; | Promise used to return the **RequestResult** instance. |
**Example**
......@@ -9101,6 +9103,7 @@ Reads data from the shared file associated with this **Ashmem** object.
```ts
import Ability from '@ohos.app.ability.UIAbility';
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
console.log("[Demo] MainAbility onCreate");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册