diff options
| author | Harsh Shandilya <msfjarvis@gmail.com> | 2020-06-12 14:58:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-12 20:28:15 +0530 |
| commit | d8231e112afb501c43041a6f839ab8285f400f77 (patch) | |
| tree | 6785a8d0c6a70a3017ce5d62fe6b8234d5564f07 /app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt | |
| parent | bf33fb2c88a208931340201e95a524b274d70b31 (diff) | |
| download | HardenedPass-d8231e112afb501c43041a6f839ab8285f400f77.tar.gz HardenedPass-d8231e112afb501c43041a6f839ab8285f400f77.zip | |
Break down PGP Activity into focused sections (#776)
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt b/app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt deleted file mode 100644 index 2e408bfd..00000000 --- a/app/src/main/java/com/zeapo/pwdstore/utils/ClipboardUtils.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved. - * SPDX-License-Identifier: GPL-3.0-only - */ -package com.zeapo.pwdstore.utils - -import android.content.ClipData -import android.content.ClipboardManager -import com.github.ajalt.timberkt.d -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.withContext - -object ClipboardUtils { - - suspend fun clearClipboard(clipboard: ClipboardManager, deepClear: Boolean = false) { - d { "Clearing the clipboard" } - val clip = ClipData.newPlainText("pgp_handler_result_pm", "") - clipboard.setPrimaryClip(clip) - if (deepClear) { - withContext(Dispatchers.IO) { - repeat(20) { - val count = (it * 500).toString() - clipboard.setPrimaryClip(ClipData.newPlainText(count, count)) - } - } - } - } -} |
