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

!20292 示例代码版本更新适配

Merge pull request !20292 from ZhengJiangliang/master
...@@ -3236,15 +3236,10 @@ bindDialogTarget(requestInfo: dialogRequest.RequestInfo, deathCallback: Callback ...@@ -3236,15 +3236,10 @@ bindDialogTarget(requestInfo: dialogRequest.RequestInfo, deathCallback: Callback
```js ```js
import ServiceExtensionAbility from '@ohos.app.ability.ServiceExtensionAbility'; import ServiceExtensionAbility from '@ohos.app.ability.ServiceExtensionAbility';
import rpc from '@ohos.rpc';
import dialogRequest from '@ohos.app.ability.dialogRequest'; import dialogRequest from '@ohos.app.ability.dialogRequest';
import window from '@ohos.window'; import window from '@ohos.window';
export default class ServiceExtAbility extends ServiceExtensionAbility { export default class ServiceExtAbility extends ServiceExtensionAbility {
onCreate(want) {
console.info('onCreate');
}
onRequest(want, startId) { onRequest(want, startId) {
console.info('onRequest'); console.info('onRequest');
try { try {
...@@ -3262,18 +3257,6 @@ export default class ServiceExtAbility extends ServiceExtensionAbility { ...@@ -3262,18 +3257,6 @@ export default class ServiceExtAbility extends ServiceExtensionAbility {
console.error('getRequestInfo err = ' + JSON.stringify(err)) console.error('getRequestInfo err = ' + JSON.stringify(err))
} }
} }
onConnect(want) {
console.info('onConnect');
}
onDisconnect(want) {
console.info('onDisconnect');
}
onDestroy() {
console.info('onDestroy');
}
} }
``` ```
...@@ -3313,15 +3296,10 @@ bindDialogTarget(requestInfo: dialogRequest.RequestInfo, deathCallback: Callback ...@@ -3313,15 +3296,10 @@ bindDialogTarget(requestInfo: dialogRequest.RequestInfo, deathCallback: Callback
```js ```js
import ServiceExtensionAbility from '@ohos.app.ability.ServiceExtensionAbility'; import ServiceExtensionAbility from '@ohos.app.ability.ServiceExtensionAbility';
import rpc from '@ohos.rpc';
import dialogRequest from '@ohos.app.ability.dialogRequest'; import dialogRequest from '@ohos.app.ability.dialogRequest';
import window from '@ohos.window'; import window from '@ohos.window';
export default class ServiceExtAbility extends ServiceExtensionAbility { export default class ServiceExtAbility extends ServiceExtensionAbility {
onCreate(want) {
console.info('onCreate');
}
onRequest(want, startId) { onRequest(want, startId) {
console.info('onRequest'); console.info('onRequest');
try { try {
...@@ -3338,18 +3316,6 @@ export default class ServiceExtAbility extends ServiceExtensionAbility { ...@@ -3338,18 +3316,6 @@ export default class ServiceExtAbility extends ServiceExtensionAbility {
console.error('getRequestInfo err = ' + JSON.stringify(err)) console.error('getRequestInfo err = ' + JSON.stringify(err))
} }
} }
onConnect(want) {
console.info('onConnect');
}
onDisconnect(want) {
console.info('onDisconnect');
}
onDestroy() {
console.info('onDestroy');
}
} }
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册