提交 0cfffe72 编写于 作者: 杜庆泉's avatar 杜庆泉

调整UTSAndroid.getJavaClass 方法实现

上级 09fdc64a
......@@ -25,12 +25,12 @@ export function getAppContextTest() : boolean {
export function getJavaClassTest() : boolean {
let classObj1 = UTSAndroid.getJavaClass(UTSAndroid.getDispatcher())
if("io.dcloud.uts.task.UTSTaskDispatcher" == classObj1.name){
let dispatcherClass = UTSAndroid.getJavaClass(UTSAndroid.getDispatcher())
if("io.dcloud.uts.task.UTSTaskDispatcher" == dispatcherClass.name){
return true
}
let classObj2 = UTSAndroid.getJavaClass(UTSAndroid.getAppContext()!)
if("io.dcloud.uniapp.UniApplication" == classObj2.name){
let applicationClass = UTSAndroid.getJavaClass(UTSAndroid.getAppContext()!)
if("io.dcloud.uniapp.UniApplication" == applicationClass.name){
return true
}
return false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册