Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
252ee0dd
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看板
提交
252ee0dd
编写于
4月 04, 2023
作者:
Z
zhangyushuai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
input test optrine 001
Signed-off-by:
N
zhangyushuai
<
zhangyushuai1@huawei.com
>
上级
351c4369
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
3 deletion
+35
-3
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodAbility/InputStageService.ts
...ntry/src/main/ets/InputMethodAbility/InputStageService.ts
+0
-1
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodAbility/KeyboardDelegate.ts
...entry/src/main/ets/InputMethodAbility/KeyboardDelegate.ts
+10
-0
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodEngine/InputDemoService.ts
.../entry/src/main/ets/InputMethodEngine/InputDemoService.ts
+0
-1
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodEngine/KeyboardController.ts
...ntry/src/main/ets/InputMethodEngine/KeyboardController.ts
+10
-0
inputmethod/InputMethodEngine/entry/src/main/ets/test/List.test.ets
...d/InputMethodEngine/entry/src/main/ets/test/List.test.ets
+2
-1
inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodAbility.test.ets
...ngine/entry/src/main/ets/test/inputMethodAbility.test.ets
+13
-0
未找到文件。
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodAbility/InputStageService.ts
浏览文件 @
252ee0dd
...
@@ -25,6 +25,5 @@ export default class InputDemoService extends InputMethodExtensionAbility {
...
@@ -25,6 +25,5 @@ export default class InputDemoService extends InputMethodExtensionAbility {
onDestroy
()
{
onDestroy
()
{
console
.
log
(
"
onDestroy inputStageService**
"
);
console
.
log
(
"
onDestroy inputStageService**
"
);
this
.
context
.
destroy
();
}
}
}
}
\ No newline at end of file
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodAbility/KeyboardDelegate.ts
浏览文件 @
252ee0dd
...
@@ -38,6 +38,16 @@ export class KeyboardDelegate {
...
@@ -38,6 +38,16 @@ export class KeyboardDelegate {
public
onCreate
():
void
{
public
onCreate
():
void
{
this
.
initWindow
();
this
.
initWindow
();
let
that
=
this
;
let
that
=
this
;
inputMethodAbility
.
on
(
"
inputStop
"
,
()
=>
{
try
{
that
.
mContext
.
destroy
((
err
)
=>
{
console
.
info
(
TAG
+
'
====>inputMethodAbility destroy err:
'
+
JSON
.
stringify
(
err
));
})
}
catch
(
err
){
console
.
info
(
TAG
+
'
====>inputMethodAbility destroy catch err:
'
+
JSON
.
stringify
(
err
));
console
.
info
(
TAG
+
'
====>inputMethodAbility destroy catch err:
'
+
err
);
}
})
function
subscriberCallback
(
err
,
data
)
{
function
subscriberCallback
(
err
,
data
)
{
console
.
debug
(
TAG
+
'
====>receive event err:
'
+
JSON
.
stringify
(
err
));
console
.
debug
(
TAG
+
'
====>receive event err:
'
+
JSON
.
stringify
(
err
));
...
...
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodEngine/InputDemoService.ts
浏览文件 @
252ee0dd
...
@@ -25,6 +25,5 @@ export default class InputDemoService extends InputMethodExtensionAbility {
...
@@ -25,6 +25,5 @@ export default class InputDemoService extends InputMethodExtensionAbility {
onDestroy
()
{
onDestroy
()
{
console
.
log
(
"
onDestroy inputMethodEngine**
"
);
console
.
log
(
"
onDestroy inputMethodEngine**
"
);
this
.
context
.
destroy
();
}
}
}
}
\ No newline at end of file
inputmethod/InputMethodEngine/entry/src/main/ets/InputMethodEngine/KeyboardController.ts
浏览文件 @
252ee0dd
...
@@ -21,6 +21,7 @@ import commoneventmanager from '@ohos.commonEventManager';
...
@@ -21,6 +21,7 @@ import commoneventmanager from '@ohos.commonEventManager';
let
inputMethodEngine
=
inputmethodengine
.
getInputMethodEngine
();
let
inputMethodEngine
=
inputmethodengine
.
getInputMethodEngine
();
let
inputKeyboardDelegate
=
inputmethodengine
.
createKeyboardDelegate
();
let
inputKeyboardDelegate
=
inputmethodengine
.
createKeyboardDelegate
();
let
inputMethodAbility
=
inputmethodengine
.
getInputMethodAbility
();
const
TAG
=
"
keyboardController
"
;
const
TAG
=
"
keyboardController
"
;
export
class
KeyboardController
{
export
class
KeyboardController
{
...
@@ -38,6 +39,15 @@ export class KeyboardController {
...
@@ -38,6 +39,15 @@ export class KeyboardController {
public
onCreate
():
void
{
public
onCreate
():
void
{
this
.
initWindow
();
this
.
initWindow
();
let
that
=
this
;
let
that
=
this
;
inputMethodAbility
.
on
(
"
inputStop
"
,
()
=>
{
try
{
that
.
mContext
.
destroy
((
err
)
=>
{
console
.
info
(
TAG
+
'
====>inputMethodEngine destroy err:
'
+
JSON
.
stringify
(
err
));
})
}
catch
(
err
){
console
.
info
(
TAG
+
'
====>inputMethodEngine destroy catch err:
'
+
JSON
.
stringify
(
err
));
}
})
function
subscriberCallback
(
err
,
data
)
{
function
subscriberCallback
(
err
,
data
)
{
console
.
debug
(
TAG
+
'
====>receive event err:
'
+
JSON
.
stringify
(
err
));
console
.
debug
(
TAG
+
'
====>receive event err:
'
+
JSON
.
stringify
(
err
));
...
...
inputmethod/InputMethodEngine/entry/src/main/ets/test/List.test.ets
浏览文件 @
252ee0dd
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
import inputMethodEngine from './inputMethodEngine.test'
import inputMethodEngine from './inputMethodEngine.test'
import inputMethodAbility from './inputMethodAbility.test'
import inputMethodAbility from './inputMethodAbility.test'
export default function testsuite() {
export default function testsuite() {
inputMethodEngine();
inputMethodEngine();
inputMethodAbility()
inputMethodAbility()
;
}
}
\ No newline at end of file
inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodAbility.test.ets
浏览文件 @
252ee0dd
...
@@ -69,6 +69,19 @@ export default function inputMethodAbility() {
...
@@ -69,6 +69,19 @@ export default function inputMethodAbility() {
}
}
})
})
afterAll
(
async
(
done
)
=>
{
try
{
await
inputMethod
.
switchInputMethod
(
inputServer
);
console
.
info
(
"====>afterAll: inputMethodStageJSUnit switchInputMethod success"
+
JSON
.
stringify
(
inputServer
));
setTimeout
(()
=>
{
console
.
info
(
"====>afterAll: inputMethodStageJSUnit switchInputMethod success"
);
done
();
},
2000
)
}
catch
(
err
)
{
console
.
info
(
"====>afterAll: inputMethodStageJSUnit fail"
+
JSON
.
stringify
(
err
));
}
})
it
(
'inputMethodEngine_test_001'
,
0
,
async
function
(
done
)
{
it
(
'inputMethodEngine_test_001'
,
0
,
async
function
(
done
)
{
let
keyType
=
inputMethodEngine
.
ENTER_KEY_TYPE_UNSPECIFIED
;
let
keyType
=
inputMethodEngine
.
ENTER_KEY_TYPE_UNSPECIFIED
;
console
.
info
(
"====>inputMethodEngine_test_001 result:"
+
keyType
);
console
.
info
(
"====>inputMethodEngine_test_001 result:"
+
keyType
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录