generated from bitwarden/template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
BitwardenClipboardManager.kt
42 lines (37 loc) · 1.27 KB
/
BitwardenClipboardManager.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.bitwarden.authenticator.data.platform.manager.clipboard
import androidx.compose.ui.text.AnnotatedString
import com.bitwarden.authenticator.ui.platform.base.util.Text
/**
* Wrapper class for using the clipboard.
*/
interface BitwardenClipboardManager {
/**
* Places the given [text] into the device's clipboard. Setting the data to [isSensitive] will
* obfuscate the displayed data on the default popup (true by default). A toast will be
* displayed on devices that do not have a default popup (pre-API 32) and will not be displayed
* on newer APIs. If a toast is displayed, it will be formatted as "[text] copied" or if a
* [toastDescriptorOverride] is provided, it will be formatted as
* "[toastDescriptorOverride] copied".
*/
fun setText(
text: AnnotatedString,
isSensitive: Boolean = true,
toastDescriptorOverride: String? = null,
)
/**
* See [setText] for more details.
*/
fun setText(
text: String,
isSensitive: Boolean = true,
toastDescriptorOverride: String? = null,
)
/**
* See [setText] for more details.
*/
fun setText(
text: Text,
isSensitive: Boolean = true,
toastDescriptorOverride: String? = null,
)
}