diff options
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/utils')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt b/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt index ff4fab69..68f8df27 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/Extensions.kt @@ -5,7 +5,10 @@ package com.zeapo.pwdstore.utils import android.content.Context +import android.os.Build import android.util.TypedValue +import android.view.autofill.AutofillManager +import androidx.annotation.RequiresApi fun String.splitLines(): Array<String> { return split("\n".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() @@ -16,3 +19,7 @@ fun Context.resolveAttribute(attr: Int): Int { this.theme.resolveAttribute(attr, typedValue, true) return typedValue.data } + +val Context.autofillManager: AutofillManager? + @RequiresApi(Build.VERSION_CODES.O) + get() = getSystemService(AutofillManager::class.java) |
