diff --git a/CHANGLOG.md b/CHANGLOG.md index 10020de2ba014c9d4b20f82b37b576661421374d..b58461e6c9eab5dfc79e348dc54fbd9004f265fa 100644 --- a/CHANGLOG.md +++ b/CHANGLOG.md @@ -1,3 +1,5 @@ +## 1.0.0 +正式版 ## 0.0.2-SNAPSHOT ohos 第二个版本 * 更新sdk6 diff --git a/README.md b/README.md index 633ecd26dce416f8301f0c55e8e97695f3b9e59d..96c912aa4259cd5289de0bca606fb58440de6b7e 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ allprojects { repositories { maven { - url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + url 'https://s01.oss.sonatype.org/content/repositories/releases/' } } } @@ -31,7 +31,7 @@ 2.在entry模块的build.gradle文件中, ``` dependencies { - implementation('com.gitee.chinasoft_ohos:speechutils:0.0.2-SNAPSHOT') + implementation('com.gitee.chinasoft_ohos:speechutils:1.0.0') ...... } ``` @@ -90,7 +90,8 @@ CloudTest代码测试无异常 病毒安全检测通过 -## 版本迭代- 0.0.2-SNAPSHOT +## 版本迭代 + 1.0.0 ## 版本和许可信息 ``` diff --git a/build.gradle b/build.gradle index a4bbee50c84428507c792bf978676f0ff6fe17a8..9d4eb5c5f398e2c6be801e91e3533114eb16e702 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ buildscript { allprojects { repositories { maven { - url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + url 'https://s01.oss.sonatype.org/content/repositories/releases/' } maven { url 'https://repo.huaweicloud.com/repository/maven/' diff --git a/entry/build.gradle b/entry/build.gradle index b1c73588605186049ca42bc509155a355890689d..2e3df6f391e1ee8d25dbdfe0d068d989a32a2a75 100644 --- a/entry/build.gradle +++ b/entry/build.gradle @@ -18,7 +18,7 @@ ohos { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) - implementation('com.gitee.chinasoft_ohos:speechutils:0.0.2-SNAPSHOT') + implementation('com.gitee.chinasoft_ohos:speechutils:1.0.0') testImplementation 'junit:junit:4.13' //本地依赖提示 // implementation project(path: ':speechutils') diff --git a/speechutils/src/main/java/ee/ioc/phon/ohos/speechutils/abilityslice/TtsBaseAbilitySlice.java b/speechutils/src/main/java/ee/ioc/phon/ohos/speechutils/abilityslice/TtsBaseAbilitySlice.java index e04687d8f634b91b10926ab9c486dc8bdb7763d4..e04cb9cefe9d2a18e47aa804540d14ef0d8da496 100644 --- a/speechutils/src/main/java/ee/ioc/phon/ohos/speechutils/abilityslice/TtsBaseAbilitySlice.java +++ b/speechutils/src/main/java/ee/ioc/phon/ohos/speechutils/abilityslice/TtsBaseAbilitySlice.java @@ -104,17 +104,10 @@ public abstract class TtsBaseAbilitySlice extends AbilitySlice implements TtsSho @Override public void onSpeechStart(String utteranceId) { HiLog.info(LABEL_LOG, "onSpeechStart..."); - if (timer == null && timerTask == null) { - timer = new Timer(); - timerTask = new TimerTask() { - public void run() { - handler.sendEvent(EVENT_MSG_TIME_COUNT); - } - }; - timer.schedule(timerTask, 0, Define.YIQIAN); - } + initTimer(); } + @Override public void onSpeechProgressChanged(String utteranceId, int progress) { } @@ -130,6 +123,21 @@ public abstract class TtsBaseAbilitySlice extends AbilitySlice implements TtsSho } }; + /** + * 初始化timer + */ + private void initTimer() { + if (timer == null && timerTask == null) { + timer = new Timer(); + timerTask = new TimerTask() { + public void run() { + handler.sendEvent(EVENT_MSG_TIME_COUNT); + } + }; + timer.schedule(timerTask, 0, Define.YIQIAN); + } + } + @Override protected void onStart(Intent intent) { super.onStart(intent);