diff options
author | Allan Wang <me@allanwang.ca> | 2019-05-01 17:07:18 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-05-01 17:07:18 -0700 |
commit | e0bea89b0897d741634098c33bf2aedc5e5fc88e (patch) | |
tree | dc9999e87af09f629ec758bd721cbb01a21dd660 /app/src/main/kotlin/com/pitchedapps/frost/utils | |
parent | 3e768c23b3130d8a9f74baaba0f1f247f0036f84 (diff) | |
parent | e7a499f6314f8d6345b19c3e221f3cd9cd176d4f (diff) | |
download | frost-e0bea89b0897d741634098c33bf2aedc5e5fc88e.tar.gz frost-e0bea89b0897d741634098c33bf2aedc5e5fc88e.tar.bz2 frost-e0bea89b0897d741634098c33bf2aedc5e5fc88e.zip |
Apply spotless and update changelog
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt | 18 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 5 |
2 files changed, 20 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt index 9a9f4082..db901073 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/BiometricUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Allan Wang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package com.pitchedapps.frost.utils import android.content.Context @@ -91,4 +107,4 @@ object BiometricUtils { pool?.shutdown() pool = null } -}
\ No newline at end of file +} diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt index 76ffd8cd..557980af 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -186,7 +186,8 @@ fun MaterialDialog.Builder.theme(): MaterialDialog.Builder { } fun Activity.setFrostTheme(forceTransparent: Boolean = false) { - val isTransparent = (Color.alpha(Prefs.bgColor) != 255) || (Color.alpha(Prefs.headerColor) != 255) || forceTransparent + val isTransparent = + (Color.alpha(Prefs.bgColor) != 255) || (Color.alpha(Prefs.headerColor) != 255) || forceTransparent if (Prefs.bgColor.isColorDark) setTheme(if (isTransparent) R.style.FrostTheme_Transparent else R.style.FrostTheme) else @@ -357,7 +358,7 @@ val dependentSegments = arrayOf( ) inline val String?.isExplicitIntent - get() = this != null && startsWith("intent://") + get() = this != null && (startsWith("intent://") || startsWith("market://")) fun Context.frostChangelog() = showChangelog(R.xml.frost_changelog, Prefs.textColor) { theme() |