From e67ea0892ee896d85fa04bdd2e357886ad582dc2 Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Thu, 26 May 2022 23:57:36 -0400 Subject: [PATCH] Fix minor compiler warnings Signed-off-by: Andrew Gunnerson --- app/build.gradle.kts | 2 +- app/magisk/updates/release/changelog.txt | 3 +++ .../main/java/com/chiller3/bcr/CodecBottomSheetFragment.kt | 2 +- app/src/main/java/com/chiller3/bcr/codec/Codecs.kt | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a2235297b..9e7bbe0d3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -85,7 +85,7 @@ fun getVersionName(git: Git, triple: VersionTriple): String { } } -val git = Git.open(File(rootDir, ".git")) +val git = Git.open(File(rootDir, ".git"))!! val gitVersionTriple = describeVersion(git) val gitVersionCode = getVersionCode(gitVersionTriple) val gitVersionName = getVersionName(git, gitVersionTriple) diff --git a/app/magisk/updates/release/changelog.txt b/app/magisk/updates/release/changelog.txt index a30f89c49..b45221155 100644 --- a/app/magisk/updates/release/changelog.txt +++ b/app/magisk/updates/release/changelog.txt @@ -4,6 +4,9 @@ * README.md: Remove mention of cloud storage. Android's Storage Access Framework does not support cloud storage when opening folders (Issue: #30, PR: #31, @chenxiaolong) * Add full changelog text for updates from Magisk Manager (PR: #36, @chenxiaolong) +Non-user-facing changes: +* Fix minor compiler warnings (PR: #xx, @chenxiaolong) + ### Version 1.3 * Write audio duration to FLAC metadata after recording is complete (Issue: #19, PR: #20, @chenxiaolong) diff --git a/app/src/main/java/com/chiller3/bcr/CodecBottomSheetFragment.kt b/app/src/main/java/com/chiller3/bcr/CodecBottomSheetFragment.kt index 062da950b..af7ea1cfc 100644 --- a/app/src/main/java/com/chiller3/bcr/CodecBottomSheetFragment.kt +++ b/app/src/main/java/com/chiller3/bcr/CodecBottomSheetFragment.kt @@ -130,6 +130,6 @@ class CodecBottomSheetFragment : BottomSheetDialogFragment(), } companion object { - val TAG = CodecBottomSheetFragment::class.java.simpleName + val TAG: String = CodecBottomSheetFragment::class.java.simpleName } } \ No newline at end of file diff --git a/app/src/main/java/com/chiller3/bcr/codec/Codecs.kt b/app/src/main/java/com/chiller3/bcr/codec/Codecs.kt index 9789b1e93..d89633c98 100644 --- a/app/src/main/java/com/chiller3/bcr/codec/Codecs.kt +++ b/app/src/main/java/com/chiller3/bcr/codec/Codecs.kt @@ -5,10 +5,10 @@ import com.chiller3.bcr.Preferences object Codecs { val all: Array = arrayOf(OpusCodec, AacCodec, FlacCodec) - val default: Codec = all.first { it.supported } + private val default: Codec = all.first { it.supported } /** Find output codec by name. */ - fun getByName(name: String): Codec? = all.find { it.name == name } + private fun getByName(name: String): Codec? = all.find { it.name == name } /** * Get the saved codec from the preferences or fall back to the default.