Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e85fa696
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看板
提交
e85fa696
编写于
10月 26, 2022
作者:
Z
zwx1016320
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reduce inputmethod API 3
Signed-off-by:
N
zwx1016320
<
zhangyushuai1@huawei-partners.com
>
上级
48c7ee0f
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
53 addition
and
57 deletion
+53
-57
inputmethod/InputMethodTest_Stage/entry/src/main/ets/ImExtAbility/ImExtAbility.ets
...st_Stage/entry/src/main/ets/ImExtAbility/ImExtAbility.ets
+19
-44
inputmethod/InputMethodTest_Stage/entry/src/main/ets/test/imeAbilityTest.test.ets
...est_Stage/entry/src/main/ets/test/imeAbilityTest.test.ets
+10
-1
inputmethod/InputMethodTest_Stage/entry/src/main/ets/test/inputMethodStageJSUnit.ets
..._Stage/entry/src/main/ets/test/inputMethodStageJSUnit.ets
+11
-5
inputmethod/InputMethodTest_ets/entry/src/main/ets/test/inputMethodJSUnit.ets
...hodTest_ets/entry/src/main/ets/test/inputMethodJSUnit.ets
+10
-4
theme/wallpaper_ets/Test.json
theme/wallpaper_ets/Test.json
+1
-1
theme/wallpaper_ets/entry/src/main/ets/test/wallpaperTest.ets
...e/wallpaper_ets/entry/src/main/ets/test/wallpaperTest.ets
+2
-2
未找到文件。
inputmethod/InputMethodTest_Stage/entry/src/main/ets/ImExtAbility/ImExtAbility.ets
浏览文件 @
e85fa696
...
...
@@ -26,51 +26,26 @@ export default class ImExtAbility extends inputMethodExtensionAbility {
console.info("inputMethodExtensionAbility want.abilityName is: " + want.abilityName);
console.info("---------------------------1-----------------------------");
this.context.startAbility(want, (data)=>{
console.info("startAbility001 inputMethodExtensionAbility start successfully." + JSON.stringify(data));
})
this.context.terminateSelf((err) => {
console.info('startAbility001 terminateSelf success' + JSON.stringify(err));
});
console.info("---------------------------2-----------------------------");
this.context.startAbility(want,options,(data) => {
console.info("startAbility002 inputMethodExtensionAbility start successfully." + JSON.stringify(data));
})
this.context.terminateSelf().then((data) => {
console.info("startAbility002 terminateSelf success:." + JSON.stringify(data));
}).catch((err) => {
console.info('startAbility002 terminateSelf fail: ' + JSON.stringify(err));
})
console.info("---------------------------3-----------------------------");
this.context.startAbility(want).then((data) => {
console.info("startAbility003 inputMethodExtensionAbility start successfully." + JSON.stringify(data));
}).catch((err) => {
console.info('startAbility003 failed:' + JSON.stringify(err));
})
this.context.terminateSelf().then((data) => {
console.info("startAbility003 terminateSelf success:." + JSON.stringify(data));
}).catch((err) => {
console.info('startAbility003 terminateSelf fail: ' + JSON.stringify(err));
})
console.info("---------------------------4-----------------------------");
this.context.startAbility(want, options).then((data) => {
console.info("startAbility004 inputMethodExtensionAbility start successfully." + JSON.stringify(data));
}).catch((err) => {
console.info('startAbility004 failed:' + JSON.stringify(err));
try{
this.context.destroy((err, data)=>{
if(err){
console.info('destroy001 destroy fail: ' + JSON.stringify(err));
}
console.info("destroy001 inputMethodExtensionAbility destroy successfully." + JSON.stringify(data));
})
}catch(error){
console.info('destroy001 destroy catch error: ' + JSON.stringify(error));
}
this.context.terminateSelf().then((data) => {
console.info("startAbility004 terminateSelf success:." + JSON.stringify(data));
try{
this.context.destroy().then((data) => {
console.info("destroy002 terminateSelf success:." + JSON.stringify(data));
}).catch((err) => {
console.info('startAbility004
terminateSelf fail: ' + JSON.stringify(err));
console.info('destroy002
terminateSelf fail: ' + JSON.stringify(err));
})
}catch(error){
console.info('destroy002 destroy catch error: ' + JSON.stringify(error));
}
}
onDestroy() {
...
...
inputmethod/InputMethodTest_Stage/entry/src/main/ets/test/imeAbilityTest.test.ets
浏览文件 @
e85fa696
...
...
@@ -32,7 +32,10 @@ export default function imeAbilityTest(abilityContext) {
console.info('beforeEach: switchInputMethod to kikakeyboard.');
let serviceAbilityProperty = {
packageName: "com.example.kikakeyboard",
methodId: "ServiceExtAbility"
methodId: "ServiceExtAbility",
name:"com.example.kikakeyboard",
id:"ServiceExtAbility",
extra:{}
}
inputMethod.switchInputMethod(serviceAbilityProperty).then((data)=>{
...
...
@@ -61,6 +64,9 @@ export default function imeAbilityTest(abilityContext) {
let imExtAbilityProperty = {
packageName : "com.acts.imeability.test",
methodId : "com.acts.imeability.test.ImExtAbility",
name:"com.acts.imeability.test",
id:"com.acts.imeability.test.ImExtAbility",
extra:{}
}
inputMethod.switchInputMethod(imExtAbilityProperty).then((data)=>{
...
...
@@ -86,6 +92,9 @@ export default function imeAbilityTest(abilityContext) {
let imExtAbilityProperty = {
packageName : "com.acts.imeability.test",
methodId : "com.acts.imeability.test.ImExtAbility",
name:"com.acts.imeability.test",
id:"com.acts.imeability.test.ImExtAbility",
extra:{}
}
inputMethod.switchInputMethod(imExtAbilityProperty).then((data)=>{
...
...
inputmethod/InputMethodTest_Stage/entry/src/main/ets/test/inputMethodStageJSUnit.ets
浏览文件 @
e85fa696
...
...
@@ -314,8 +314,11 @@ export default function inputMethodStageJSUnit() {
it('inputMethod_test_switchCurrentInputMethodAndSubtype_001', 0, async function (done) {
console.info("************* inputMethod_test_switchCurrentInputMethodAndSubtype_001 Test start*************");
let inputMethodProperty = {
packageName:"com.example.kikakeyboard",
methodId:"ServiceExtAbility"
packageName: "com.example.kikakeyboard",
methodId: "ServiceExtAbility",
name:"com.example.kikakeyboard",
id:"ServiceExtAbility",
extra:{}
}
let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard",
...
...
@@ -356,8 +359,11 @@ export default function inputMethodStageJSUnit() {
it('inputMethod_test_switchCurrentInputMethodAndSubtype_002', 0, async function (done) {
console.info("************* inputMethod_test_switchCurrentInputMethodAndSubtype_002 Test start*************");
let inputMethodProperty = {
packageName:"com.example.kikakeyboard",
methodId:"ServiceExtAbility"
packageName: "com.example.kikakeyboard",
methodId: "ServiceExtAbility",
name:"com.example.kikakeyboard",
id:"ServiceExtAbility",
extra:{}
}
let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard",
...
...
@@ -505,7 +511,7 @@ export default function inputMethodStageJSUnit() {
try {
console.info("inputMethod_test_showOptionalInputMethods_002 result:" + JSON.stringify(inputMethodSetting));
inputMethodSetting.showOptionalInputMethods().then((data) => {
console.info("inputMethod_test_showOptionalInputMethods_002 showOptionalInputMethods
catch error
: " + JSON.stringify(data));
console.info("inputMethod_test_showOptionalInputMethods_002 showOptionalInputMethods
success data is
: " + JSON.stringify(data));
expect(true).assertTrue();
done();
}).catch(err => {
...
...
inputmethod/InputMethodTest_ets/entry/src/main/ets/test/inputMethodJSUnit.ets
浏览文件 @
e85fa696
...
...
@@ -114,8 +114,11 @@ export default function inputMethodJSUnit() {
it('inputmethod_test_switchInputMethod_001', 0, async function (done) {
console.info("************* inputmethod_test_switchInputMethod_001 Test start*************");
let inputMethodProperty = {
packageName:"com.example.kikakeyboard",
methodId:"ServiceExtAbility"
packageName: "com.example.kikakeyboard",
methodId: "ServiceExtAbility",
name:"com.example.kikakeyboard",
id:"ServiceExtAbility",
extra:{}
}
inputMethod.switchInputMethod(inputMethodProperty).then(data => {
console.info("inputmethod_test_switchInputMethod_001 data:" + data)
...
...
@@ -137,8 +140,11 @@ export default function inputMethodJSUnit() {
it('inputmethod_test_switchInputMethod_002', 0, async function (done) {
console.info("************* inputmethod_test_switchInputMethod_002 Test start*************");
let inputMethodProperty = {
packageName:"com.example.kikakeyboard",
methodId:"ServiceExtAbility"
packageName: "com.example.kikakeyboard",
methodId: "ServiceExtAbility",
name:"com.example.kikakeyboard",
id:"ServiceExtAbility",
extra:{}
}
inputMethod.switchInputMethod(inputMethodProperty, (err, data)=>{
if(err){
...
...
theme/wallpaper_ets/Test.json
浏览文件 @
e85fa696
...
...
@@ -22,7 +22,7 @@
"mkdir -p /data/app/el2/100/base/com.acts.theme.wallpapertest/haps"
],
"push"
:
[
"./resource
.
/wallpaper/wp.png ->/data/app/el2/100/base/com.acts.theme.wallpapertest/haps/wp.png"
"./resource/wallpaper/wp.png ->/data/app/el2/100/base/com.acts.theme.wallpapertest/haps/wp.png"
]
}
]
...
...
theme/wallpaper_ets/entry/src/main/ets/test/wallpaperTest.ets
浏览文件 @
e85fa696
...
...
@@ -14,7 +14,7 @@
*/
import wallpaper from '@ohos.wallpaper';
import image from '@ohos.multimedia.image';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '
@ohos/hypium
';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '
deccjsunit/index
';
const WALLPAPER_SYSTEM = 0;
const WALLPAPER_LOCKSCREEN = 1;
...
...
@@ -913,7 +913,7 @@ export default function wallpaperJSUnit() {
console.info('------------------testGetMinWidthSync101 start----------------------');
let number = null;
try{
number = wallpaper.getMin
Height
Sync()
number = wallpaper.getMin
Width
Sync()
console.info('wallpaperXTS ===> testGetMinWidthSync101 data : ' + JSON.stringify(number));
if (typeof number == "number") {
expect(true).assertTrue();
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
b33344f3
·
11月 01, 2022
mentioned in commit
b33344f3
mentioned in commit b33344f357c379dc30d407812f358fc5859af07e
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录