Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9dc4bbfe
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9dc4bbfe
编写于
6月 22, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
compilation problem
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
80c34241
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
153 addition
and
75 deletion
+153
-75
aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets
...temcallentrytest/entry/src/main/ets/test/Ability.test.ets
+14
-6
aafwk/aafwk_standard/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.ets
...temcallfeature/entry/src/main/ets/pages/second/second.ets
+1
-1
aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
...dcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
+1
-1
aafwk/aafwk_standard/actsusers/ActsAmsUsersApi7AppA/entry/src/main/ets/MainAbility/pages/index.ets
...rsApi7AppA/entry/src/main/ets/MainAbility/pages/index.ets
+0
-10
aafwk/aafwk_standard/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
...est/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
+2
-0
aafwk/aafwk_standard/actsusers/ActsAmsUsersSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...mTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+2
-0
aafwk/aafwk_standard/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...ytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+94
-6
aafwk/aafwk_standard/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...lehap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+4
-2
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...fohap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+6
-2
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...otest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+5
-3
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets
...xtensioninfotest/entry/src/main/ets/test/Ability.test.ets
+1
-1
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticquerytesttwohap/entry/src/main/ets/pages/index/index.ets
...cquerytesttwohap/entry/src/main/ets/pages/index/index.ets
+3
-31
aafwk/aafwk_standard/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...ttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+5
-3
aafwk/aafwk_standard/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...lyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+5
-3
aafwk/aafwk_standard/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...ttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+3
-2
aafwk/aafwk_standard/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
...est/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
+3
-2
aafwk/aafwk_standard/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...rvice/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+2
-1
aafwk/aafwk_standard/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
...ice/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
+2
-1
未找到文件。
aafwk/aafwk_standard/actscalltest/systemcallentrytest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
9dc4bbfe
...
...
@@ -45,6 +45,7 @@ var subscriberInfo = {
events
:
[
"CallTest"
],
};
var
caseDepBundles
=
[];
var
subscriber
=
null
;
class
MySequenceable
{
num
:
number
=
0
;
...
...
@@ -134,6 +135,13 @@ export default function abilityTest(abilityContext) {
afterEach
(
async
(
done
)
=>
{
var
testMissionId
;
if
(
subscriber
!=
null
)
{
commonEvent
.
unsubscribe
(
subscriber
,
()
=>
{
console
.
log
(
'======>afterEach unsubscribe<======='
);
});
subscriber
=
null
;
}
testMissionId
=
await
getMissionId
(
sysAMainAbilityName
,
0
);
console
.
log
(
'======>afterEach test missionId<======='
+
testMissionId
);
if
(
testMissionId
!=
-
1
)
{
...
...
@@ -158,10 +166,10 @@ export default function abilityTest(abilityContext) {
*/
it
(
'ACTS_CommonComponent_Call_0100'
,
0
,
async
function
(
done
)
{
console
.
log
(
'ACTS_CommonComponent_Call_0100 begin'
);
var
subscriber
;
function
unSubscribeCallBack
()
{
console
.
log
(
'ACTS_CommonComponent_Call_0100 unSubscribeCallBack'
)
subscriber
=
null
;
done
();
}
...
...
@@ -241,11 +249,11 @@ export default function abilityTest(abilityContext) {
*/
it
(
'ACTS_CommonComponent_Call_0300'
,
0
,
async
function
(
done
)
{
console
.
log
(
'ACTS_CommonComponent_Call_0300 begin'
);
var
subscriber
;
caseDepBundles
=
[
systemAppCalleeABundleName
];
function
unSubscribeCallBack
()
{
console
.
log
(
'ACTS_CommonComponent_Call_0300 unSubscribeCallBack'
)
subscriber
=
null
;
done
();
}
...
...
@@ -327,13 +335,13 @@ export default function abilityTest(abilityContext) {
*/
it
(
'ACTS_CommonComponent_Call_0500'
,
0
,
async
function
(
done
)
{
console
.
log
(
'ACTS_CommonComponent_Call_0500 begin'
);
var
subscriber
;
var
caller1
;
var
caller2
;
caseDepBundles
=
[
systemAppCalleeABundleName
];
function
unSubscribeCallBack
()
{
console
.
log
(
'ACTS_CommonComponent_Call_0500 unSubscribeCallBack'
)
subscriber
=
null
;
caller1
.
release
();
done
();
}
...
...
@@ -426,12 +434,12 @@ export default function abilityTest(abilityContext) {
*/
it
(
'ACTS_CommonComponent_Call_0700'
,
0
,
async
function
(
done
)
{
console
.
log
(
'ACTS_CommonComponent_Call_0700 begin'
);
var
subscriber
;
var
caller
;
caseDepBundles
=
[
systemAppCalleeABundleName
];
function
unSubscribeCallBack
()
{
console
.
log
(
'ACTS_CommonComponent_Call_0700 unSubscribeCallBack'
)
subscriber
=
null
;
done
();
}
...
...
@@ -549,12 +557,12 @@ export default function abilityTest(abilityContext) {
*/
it
(
'ACTS_CommonComponent_Call_0900'
,
0
,
async
function
(
done
)
{
console
.
log
(
'ACTS_CommonComponent_Call_0900 begin'
);
var
subscriber
;
caseDepBundles
=
[
thirdAppABundleName
];
var
caller
;
function
unSubscribeCallBack
()
{
console
.
log
(
'ACTS_CommonComponent_Call_0900 unSubscribeCallBack'
)
subscriber
=
null
;
done
();
}
...
...
@@ -660,7 +668,6 @@ export default function abilityTest(abilityContext) {
*/
it
(
'ACTS_CommonComponent_Call_1900'
,
0
,
async
function
(
done
)
{
console
.
log
(
'ACTS_CommonComponent_Call_1900 begin'
);
var
subscriber
;
var
callBackCnt
=
0
;
function
checkFinish
()
{
...
...
@@ -672,6 +679,7 @@ export default function abilityTest(abilityContext) {
function
unSubscribeCallBack
()
{
console
.
log
(
'ACTS_CommonComponent_Call_1900 unSubscribeCallBack'
)
subscriber
=
null
;
done
();
}
...
...
aafwk/aafwk_standard/actscalltest/systemcallfeature/entry/src/main/ets/pages/second/second.ets
浏览文件 @
9dc4bbfe
...
...
@@ -14,7 +14,7 @@
*/
@Entry
@Component
struct
Index
{
struct
Second
{
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('SystemCallTest SecondAbility)')
...
...
aafwk/aafwk_standard/actscalltest/thirdcalltest/entry/src/main/ets/ThirdAbility/ThirdAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -64,7 +64,7 @@ function testCall(data) {
commonEvent
.
publish
(
'
CallTest
'
,
commonEventData
,
(
err
)
=>
{
console
.
log
(
'
======>CallTestSysA ThirdAbility Call_Finish<======
'
)
})
return
;
return
recvSequence
;
}
function
testCallWithResult
(
data
)
{
...
...
aafwk/aafwk_standard/actsusers/ActsAmsUsersApi7AppA/entry/src/main/ets/MainAbility/pages/index.ets
浏览文件 @
9dc4bbfe
...
...
@@ -12,20 +12,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Core} from 'deccjsunit/index'
@Entry
@Component
struct Index {
aboutToAppear() {
console.info('onShow finish')
const core = Core.getInstance()
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
core.execute()
}
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('Hello World')
...
...
aafwk/aafwk_standard/actsusers/ActsAmsUsersExtensionSystemTest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
浏览文件 @
9dc4bbfe
...
...
@@ -15,6 +15,7 @@
import
ServiceExtensionAbility
from
'
@ohos.application.ServiceExtensionAbility
'
import
commonEvent
from
"
@ohos.commonEvent
"
import
rpc
from
'
@ohos.rpc
'
;
export
default
class
ServiceAbility2
extends
ServiceExtensionAbility
{
onCreate
(
want
)
{
...
...
@@ -39,6 +40,7 @@ export default class ServiceAbility2 extends ServiceExtensionAbility {
onConnect
(
want
)
{
console
.
log
(
'
ServiceAbility2 onConnect
'
);
return
new
rpc
.
RemoteObject
(
'
connect
'
);
}
onDisconnect
(
want
)
{
...
...
aafwk/aafwk_standard/actsusers/ActsAmsUsersSystemTest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -15,6 +15,7 @@
import
ServiceExtensionAbility
from
'
@ohos.application.ServiceExtensionAbility
'
import
commonEvent
from
"
@ohos.commonEvent
"
import
rpc
from
'
@ohos.rpc
'
;
export
default
class
ServiceAbility
extends
ServiceExtensionAbility
{
onCreate
(
want
)
{
...
...
@@ -35,6 +36,7 @@ export default class ServiceAbility extends ServiceExtensionAbility {
onConnect
(
want
)
{
console
.
log
(
'
ServiceAbility onConnect
'
);
return
new
rpc
.
RemoteObject
(
'
connect
'
);
}
onDisconnect
(
want
)
{
...
...
aafwk/aafwk_standard/actsusers/actsconnectabilitysystemabilitytest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -13,6 +13,7 @@
* limitations under the License.
*/
import
commonEvent
from
'
@ohos.commonEvent
'
import
rpc
from
'
@ohos.rpc
'
;
import
ServiceExtensionAbility
from
'
@ohos.application.ServiceExtensionAbility
'
var
conn
=
-
1
;
...
...
@@ -41,6 +42,51 @@ function publishCallBackttwo () {
console
.
log
(
"
========Publish CallBack AMSc_disonnectAbility_0200_commonEvent========
"
);
}
class
Stub
extends
rpc
.
RemoteObject
{
constructor
(
des
)
{
super
(
des
);
}
onRemoteRequest
(
code
,
data
,
reply
,
option
)
{
reply
.
writeNoException
();
reply
.
writeString
(
"
success
"
);
return
true
;
}
}
function
onConnectCallback
(
element
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onConnect element.bundleName :
'
+
element
.
bundleName
)
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onConnect element.abilityName :
'
+
element
.
abilityName
)
}
function
onDisconnectCallback1
(
element
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.bundleName :
'
+
element
.
bundleName
)
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.abilityName :
'
+
element
.
abilityName
)
}
function
onDisconnectCallback2
(
element
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.bundleName :
'
+
element
.
bundleName
)
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.abilityName :
'
+
element
.
abilityName
)
}
function
onDisconnectCallback3
(
element
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.bundleName :
'
+
element
.
bundleName
)
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.abilityName :
'
+
element
.
abilityName
)
}
function
onDisconnectCallback4
(
element
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.bundleName :
'
+
element
.
bundleName
)
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.abilityName :
'
+
element
.
abilityName
)
}
function
onDisconnectCallback5
(
element
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.bundleName :
'
+
element
.
bundleName
)
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.abilityName :
'
+
element
.
abilityName
)
}
function
onDisconnectCallback6
(
element
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.bundleName :
'
+
element
.
bundleName
)
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onDisconnect element.abilityName :
'
+
element
.
abilityName
)
}
function
onFailedCallback
(
code
)
{
console
.
log
(
'
ACTS_ConnectAbility_0100 ConnectAbility onFailed errCode :
'
+
code
)
}
export
default
class
ServiceAbility
extends
ServiceExtensionAbility
{
onCreate
(
want
)
{
console
.
log
(
'
ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
...
...
@@ -85,16 +131,30 @@ export default class ServiceAbility extends ServiceExtensionAbility {
{
bundleName
:
"
com.example.actsconnectabilitysystemabilitytest
"
,
abilityName
:
"
com.example.actsconnectabilitysystemabilitytest.ServiceAbility2
"
,
}
},
{
onConnect
:
onConnectCallback
,
onDisconnect
:
onDisconnectCallback1
,
onFailed
:
onFailedCallback
,
},
);
var
myStub4
=
new
Stub
(
"
com.example.actsconnectabilitysystemabilitytest.MainAbility
"
);
return
myStub4
;
};
if
(
want
.
action
==
"
Eight
"
)
{
extensionContext
.
connectAbility
(
{
bundleName
:
"
com.example.actsconnectabilitysystemabilitytest
"
,
abilityName
:
"
com.example.actsconnectabilitysystemabilitytest.ServiceAbility3
"
,
}
},
{
onConnect
:
onConnectCallback
,
onDisconnect
:
onDisconnectCallback6
,
onFailed
:
onFailedCallback
,
},
);
var
myStub1
=
new
Stub
(
"
com.example.actsconnectabilitysystemabilitytest.MainAbility
"
);
return
myStub1
;
};
if
(
want
.
action
==
"
Nine
"
)
{
console
.
log
(
'
connectAbility 111
'
);
...
...
@@ -102,12 +162,19 @@ export default class ServiceAbility extends ServiceExtensionAbility {
{
bundleName
:
'
com.example.actsconnectabilitysystemabilitytest
'
,
abilityName
:
'
com.example.actsconnectabilitysystemabilitytest.ServiceAbility2
'
})
},
{
onConnect
:
onConnectCallback
,
onDisconnect
:
onDisconnectCallback2
,
onFailed
:
onFailedCallback
,
},)
setTimeout
(()
=>
{
extensionContext
.
disconnectAbility
(
num
).
then
(()
=>
{
console
.
log
(
'
in disconnectAbility
'
);
})
},
1000
)
var
myStub2
=
new
Stub
(
"
com.example.actsconnectabilitysystemabilitytest.MainAbility
"
);
return
myStub2
;
};
if
(
want
.
action
==
"
Ten
"
)
{
...
...
@@ -116,12 +183,19 @@ export default class ServiceAbility extends ServiceExtensionAbility {
{
bundleName
:
'
com.example.actsconnectabilitysystemabilitytest
'
,
abilityName
:
'
com.example.actsconnectabilitysystemabilitytest.ServiceAbility2
'
})
},
{
onConnect
:
onConnectCallback
,
onDisconnect
:
onDisconnectCallback3
,
onFailed
:
onFailedCallback
,
},)
setTimeout
(()
=>
{
extensionContext
.
disconnectAbility
(
num
).
then
(()
=>
{
console
.
log
(
'
in disconnectAbility2
'
);
})
},
1000
)
var
myStub3
=
new
Stub
(
"
com.example.actsconnectabilitysystemabilitytest.MainAbility
"
);
return
myStub3
;
};
if
(
want
.
action
==
"
Ten one
"
)
{
...
...
@@ -130,12 +204,19 @@ export default class ServiceAbility extends ServiceExtensionAbility {
{
bundleName
:
'
com.example.actsconnectabilitysystemabilitytest
'
,
abilityName
:
'
com.example.actsconnectabilitysystemabilitytest.ServiceAbility2
'
})
},
{
onConnect
:
onConnectCallback
,
onDisconnect
:
onDisconnectCallback4
,
onFailed
:
onFailedCallback
,
},)
setTimeout
(()
=>
{
extensionContext
.
disconnectAbility
(
2222
).
then
(()
=>
{
console
.
log
(
'
in disconnectAbility3
'
);
})
},
1000
)
var
myStub5
=
new
Stub
(
"
com.example.actsconnectabilitysystemabilitytest.MainAbility
"
);
return
myStub5
;
};
if
(
want
.
action
==
"
Ten two
"
)
{
...
...
@@ -144,12 +225,19 @@ export default class ServiceAbility extends ServiceExtensionAbility {
{
bundleName
:
'
com.example.actsconnectabilitysystemabilitytest
'
,
abilityName
:
'
com.example.actsconnectabilitysystemabilitytest.ServiceAbility2
'
})
},
{
onConnect
:
onConnectCallback
,
onDisconnect
:
onDisconnectCallback5
,
onFailed
:
onFailedCallback
,
},)
setTimeout
(()
=>
{
extensionContext
.
disconnectAbility
(
2222
).
then
(()
=>
{
console
.
log
(
'
in disconnectAbility4
'
);
})
},
1000
)
var
myStub6
=
new
Stub
(
"
com.example.actsconnectabilitysystemabilitytest.MainAbility
"
);
return
myStub6
;
};
}
...
...
aafwk/aafwk_standard/amscontextualinforquery/actsamsextensionmodulehap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -14,7 +14,8 @@
*/
import
Extension
from
'
@ohos.application.ServiceExtensionAbility
'
import
commonEvent
from
'
@ohos.commonEvent
'
import
Want
from
'
@ohos.application.Want
'
;
import
rpc
from
'
@ohos.rpc
'
;
export
default
class
ServiceExtAbility
extends
Extension
{
onCreate
(
want
)
{
...
...
@@ -26,7 +27,7 @@ export default class ServiceExtAbility extends Extension {
console
.
info
(
'
mxh ServiceAbility onRequest**
'
);
}
onConnect
(
want
)
{
onConnect
(
want
:
Want
)
{
console
.
info
(
'
mxh ServiceAbility onConnect**
'
);
commonEvent
.
publish
(
"
ACTS_ConnectAbility_0100_CommonEvent
"
,
{
parameters
:
{
...
...
@@ -36,6 +37,7 @@ export default class ServiceExtAbility extends Extension {
console
.
log
(
"
Demo Publish CallBack MainAbility_Start_CommonEvent
"
)
});
console
.
log
(
'
Demo SerivceAbilityServer OnConnect start 1
'
);
return
new
rpc
.
RemoteObject
(
'
connect
'
);
}
onDisconnect
(
want
)
{
...
...
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -14,10 +14,12 @@
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
import
commonEvent
from
"
@ohos.commonEvent
"
import
commonEvent
from
"
@ohos.commonEvent
"
;
import
Want
from
'
@ohos.application.Want
'
;
import
rpc
from
'
@ohos.rpc
'
;
export
default
class
ServiceAbility
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
}
...
...
@@ -40,7 +42,9 @@ export default class ServiceAbility extends ServiceExtension {
console
.
log
(
"
MainAbility Publish CallBack MainAbility_Start_CommonEvent
"
)
});
console
.
log
(
'
stub SerivceAbilityServer OnConnect start 2
'
);
}
return
new
rpc
.
RemoteObject
(
'
connect
'
);
}
onDisconnect
(
want
)
{
...
...
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -14,10 +14,12 @@
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
import
commonEvent
from
"
@ohos.commonEvent
"
import
commonEvent
from
"
@ohos.commonEvent
"
;
import
Want
from
'
@ohos.application.Want
'
;
import
rpc
from
'
@ohos.rpc
'
;
export
default
class
ServiceAbility
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
}
...
...
@@ -41,7 +43,7 @@ export default class ServiceAbility extends ServiceExtension {
});
console
.
log
(
'
stub SerivceAbilityServer OnConnect start 1
'
);
}
return
new
rpc
.
RemoteObject
(
'
connect
'
);
}
onDisconnect
(
want
)
{
...
...
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
9dc4bbfe
...
...
@@ -237,7 +237,7 @@ export default function abilityTest(abilityContext) {
commonEvent.createSubscriber(subscriberInfoStartAbility_0200).then(async (data) => {
console.debug("====>ACTS_getExtensionInfo_0200_Create Subscriber====>");
subscriber = data;
await commonEvent.subscribe(subscriber, subscribeCallBack);
.
await commonEvent.subscribe(subscriber, subscribeCallBack);
connId = await abilityContext.connectAbility(
{
bundleName: "com.example.staticextensioninfotest",
...
...
aafwk/aafwk_standard/amscontextualinforquery/actsamsstaticquerytesttwohap/entry/src/main/ets/pages/index/index.ets
浏览文件 @
9dc4bbfe
...
...
@@ -14,50 +14,22 @@
*/
import file from '@system.file';
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index"
@Entry
@Component
struct Index {
aboutToAppear(){
aboutToAppear()
{
console.info("start run testcase!!!!")
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
const reportExtend = new ReportExtend(file)
core.addService('report', reportExtend)
core.init()
core.subscribeEvent('task', reportExtend)
const configService = core.getDefaultService('config')
console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters))
globalThis.abilityWant.parameters.timeout = 70000;
configService.setConfig(globalThis.abilityWant.parameters)
testsuite(globalThis.abilityContext)
core.execute()
}
build() {
Flex({ direction:
FlexDirection.Column, alignItems:
ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('
Hello World
')
Flex({ direction:
FlexDirection.Column, alignItems:
ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('
querytesttwo
')
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('next page')
.fontSize(25)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
})
}
.width('100%')
.height('100%')
...
...
aafwk/aafwk_standard/amsdisplayIdtest/actsamsstartabilityforresulttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -13,10 +13,12 @@
* limitations under the License.
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
;
import
Want
from
'
@ohos.application.Want
'
;
import
rpc
from
'
@ohos.rpc
'
;
export
default
class
ServiceAbility
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
}
...
...
@@ -43,7 +45,7 @@ export default class ServiceAbility extends ServiceExtension {
})
console
.
log
(
'
stub SerivceAbilityServer OnConnect start 2
'
);
}
return
new
rpc
.
RemoteObject
(
'
connect
'
);
}
onDisconnect
(
want
)
{
...
...
aafwk/aafwk_standard/newwant/actsnewwantrelyhap/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -13,11 +13,12 @@
* limitations under the License.
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
// import commonEvent from '@ohos.commonEvent'
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
;
import
Want
from
'
@ohos.application.Want
'
;
import
rpc
from
"
@ohos.rpc
"
;
export
default
class
ServiceAbility
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ACTS_NewWant ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
}
...
...
@@ -40,6 +41,7 @@ export default class ServiceAbility extends ServiceExtension {
},
)
}
return
new
rpc
.
RemoteObject
(
'
connect
'
);
}
onDisconnect
(
want
)
{
...
...
aafwk/aafwk_standard/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -12,7 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
;
import
Want
from
'
@ohos.application.Want
'
;
import
{
voidOutStringCallback
}
from
"
./zidlTool/i_zidl_tool_test
"
;
import
{
voidOutIntCallback
}
from
"
./zidlTool/i_zidl_tool_test
"
;
import
{
voidOutMapStringIntCallback
}
from
"
./zidlTool/i_zidl_tool_test
"
;
...
...
@@ -408,7 +409,7 @@ class ZidlTestImp extends ZidlTestServiceStub {
}
export
default
class
ServiceAbility
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ZidlClientTest ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
}
...
...
aafwk/aafwk_standard/zidltest/actsamszidlclienttest/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
浏览文件 @
9dc4bbfe
...
...
@@ -12,7 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
;
import
Want
from
'
@ohos.application.Want
'
;
import
ZidlTestServiceStubOneway
from
'
./zidlToolOneWay/interface_attribute_declaratoin_oneway_stub
'
;
import
{
voidVoidFirstCallback
}
from
'
./zidlToolOneWay/i_interface_attribute_declaratoin_oneway
'
import
{
voidVoidSecondCallback
}
from
'
./zidlToolOneWay/i_interface_attribute_declaratoin_oneway
'
...
...
@@ -39,7 +40,7 @@ class ZidlTestImpOneway extends ZidlTestServiceStubOneway {
}
export
default
class
ServiceAbility2
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ZidlClientTest ServiceAbility2 onCreate, want:
'
+
want
.
abilityName
);
}
...
...
aafwk/aafwk_standard/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
9dc4bbfe
...
...
@@ -13,6 +13,7 @@
* limitations under the License.
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
import
Want
from
'
@ohos.application.Want
'
;
import
{
voidOutStringCallback
}
from
"
./zidlTool/i_zidl_tool_test
"
;
import
{
voidOutIntCallback
}
from
"
./zidlTool/i_zidl_tool_test
"
;
import
{
voidOutMapStringIntCallback
}
from
"
./zidlTool/i_zidl_tool_test
"
;
...
...
@@ -408,7 +409,7 @@ class ZidlTestImp extends ZidlTestServiceStub {
}
export
default
class
ServiceAbility
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ZidlService ServiceAbility onCreate, want:
'
+
want
.
abilityName
);
}
...
...
aafwk/aafwk_standard/zidltest/actsamszidlservice/entry/src/main/ets/ServiceAbility2/ServiceAbility2.ts
浏览文件 @
9dc4bbfe
...
...
@@ -13,6 +13,7 @@
* limitations under the License.
*/
import
ServiceExtension
from
'
@ohos.application.ServiceExtensionAbility
'
import
Want
from
'
@ohos.application.Want
'
;
import
ZidlTestServiceStubOneway
from
'
./zidlToolOneWay/interface_attribute_declaratoin_oneway_stub
'
;
import
{
voidVoidFirstCallback
}
from
'
./zidlToolOneWay/i_interface_attribute_declaratoin_oneway
'
import
{
voidVoidSecondCallback
}
from
'
./zidlToolOneWay/i_interface_attribute_declaratoin_oneway
'
...
...
@@ -39,7 +40,7 @@ class ZidlTestImpOneway extends ZidlTestServiceStubOneway {
}
export
default
class
ServiceAbility2
extends
ServiceExtension
{
onCreate
(
want
,
startId
)
{
onCreate
(
want
:
Want
)
{
globalThis
.
abilityWant
=
want
;
console
.
log
(
'
ZidlService ServiceAbility2 onCreate, want:
'
+
want
.
abilityName
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录