Skip to content

Commit 401a934

Browse files
committed
* Updated to snips 0.60.2
* Removed "lazy" loading of assistant file
1 parent 1ea8eed commit 401a934

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

app/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ repositories {
2727

2828
def versionMajor = 0
2929
def versionMinor = 1
30-
def versionPatch = 0
31-
def versionBuild = 4 // bump for dog food builds, public betas, etc.
30+
def versionPatch = 1
31+
def versionBuild = 0 // bump for dog food builds, public betas, etc.
3232

3333
def ALARM_CODE() {
3434
Properties properties = new Properties()
@@ -135,7 +135,7 @@ dependencies {
135135
implementation 'com.google.android.gms:play-services-vision:16.2.0'
136136

137137
// Snips
138-
implementation('ai.snips:snips-platform-android:0.58.3@aar') {
138+
implementation('ai.snips:snips-platform-android:0.60.2@aar') {
139139
transitive = true
140140
}
141141

app/src/main/java/com/thanksmister/iot/voicepanel/modules/SnipsModule.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class SnipsModule (base: Context?, private var options: SnipsOptions, var listen
229229
snipsClient!!.startNotification("Sorry, I didn't understand.", null)
230230
} else if (SessionTermination.Type.TIMEOUT == sessionEndedMessage.termination.type
231231
&& !manuallyListening && !lowProbability) {
232-
snipsClient!!.startNotification("Sorry, I don't know how to do that.", null)
232+
snipsClient!!.startNotification("Sorry, I may not have heard you in time.", null)
233233
} else if (SessionTermination.Type.NOMINAL == sessionEndedMessage.termination.type) {
234234
//snipsClient!!.startNotification("Assistant initialized and ready.", null)
235235
}

app/src/main/java/com/thanksmister/iot/voicepanel/utils/FileUtils.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,25 @@ class FileUtils {
2929
companion object {
3030

3131
fun getAssistantDirectory(appContext: Context): File {
32-
val rootDir: File by lazy { appContext.filesDir }
33-
val assistantDir by lazy { File(rootDir, "assistant") }
32+
val rootDir: File = appContext.filesDir
33+
val assistantDir = File(rootDir, "assistant")
3434
Timber.d("Rood Dir: " + rootDir.path)
3535
Timber.d("Assistant Dir: " + assistantDir.path)
3636
return assistantDir
3737
}
3838

3939
fun unzipAssistantDirectory(appContext: Context, version: String):Boolean {
4040
val assistantDir = getAssistantDirectory(appContext)
41-
val versionFile by lazy { File(assistantDir, "android_version_$version") }
41+
val versionFile = File(assistantDir, "android_version_$version")
4242
Timber.d("Unzip File Version Name: " + versionFile.name)
4343
return !versionFile.exists()
4444
}
4545

4646
fun doUnzipAssistantDirectory(appContext: Context, version: String): Boolean {
4747
Timber.d("doUnzipAssistantDirectory")
48-
val rootDir: File by lazy { appContext.filesDir }
49-
val assistantDir by lazy { File(rootDir, "assistant") }
50-
val versionFile by lazy { File(assistantDir, "android_version_$version") }
48+
val rootDir: File = appContext.filesDir
49+
val assistantDir: File = File(rootDir, "assistant")
50+
val versionFile: File = File(assistantDir, "android_version_$version")
5151
try {
5252
assistantDir.deleteRecursively()
5353
} catch (e: Exception) {

0 commit comments

Comments
 (0)