mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Rename BinaryStreamManager to BinaryDatabaseManager
This commit is contained in:
@@ -41,7 +41,7 @@ import com.kunzisoft.keepass.database.element.Database
|
||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||
import com.kunzisoft.keepass.tasks.BinaryStreamManager
|
||||
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
||||
import com.kunzisoft.keepass.utils.UriUtil
|
||||
import com.kunzisoft.keepass.view.asError
|
||||
import com.kunzisoft.keepass.view.updateLockPaddingLeft
|
||||
@@ -231,7 +231,7 @@ class IconPickerActivity : LockingActivity() {
|
||||
} else {
|
||||
mDatabase?.buildNewCustomIcon(UriUtil.getBinaryDir(this@IconPickerActivity))?.let { customIcon ->
|
||||
iconCustomState.iconCustom = customIcon
|
||||
BinaryStreamManager.resizeBitmapAndStoreDataInBinaryFile(contentResolver,
|
||||
BinaryDatabaseManager.resizeBitmapAndStoreDataInBinaryFile(contentResolver,
|
||||
iconToUploadUri, customIcon.binaryFile)
|
||||
when {
|
||||
customIcon.binaryFile?.length ?: 0 <= 0 -> {}
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.kunzisoft.keepass.R
|
||||
import com.kunzisoft.keepass.activities.lock.LockingActivity
|
||||
import com.kunzisoft.keepass.database.element.Attachment
|
||||
import com.kunzisoft.keepass.database.element.Database
|
||||
import com.kunzisoft.keepass.tasks.BinaryStreamManager
|
||||
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
||||
import kotlin.math.max
|
||||
|
||||
class ImageViewerActivity : LockingActivity() {
|
||||
@@ -66,7 +66,7 @@ class ImageViewerActivity : LockingActivity() {
|
||||
supportActionBar?.title = attachment.name
|
||||
supportActionBar?.subtitle = Formatter.formatFileSize(this, attachment.binaryFile.length)
|
||||
|
||||
BinaryStreamManager.loadBitmap(
|
||||
BinaryDatabaseManager.loadBitmap(
|
||||
attachment.binaryFile,
|
||||
Database.getInstance().loadedCipherKey,
|
||||
mImagePreviewMaxWidth
|
||||
|
||||
@@ -37,7 +37,7 @@ import com.kunzisoft.keepass.database.element.database.CompressionAlgorithm
|
||||
import com.kunzisoft.keepass.model.AttachmentState
|
||||
import com.kunzisoft.keepass.model.EntryAttachmentState
|
||||
import com.kunzisoft.keepass.model.StreamDirection
|
||||
import com.kunzisoft.keepass.tasks.BinaryStreamManager
|
||||
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
||||
import com.kunzisoft.keepass.view.expand
|
||||
import kotlin.math.max
|
||||
|
||||
@@ -82,7 +82,7 @@ class EntryAttachmentsItemsAdapter(context: Context)
|
||||
if (entryAttachmentState.previewState == AttachmentState.NULL) {
|
||||
entryAttachmentState.previewState = AttachmentState.IN_PROGRESS
|
||||
// Load the bitmap image
|
||||
BinaryStreamManager.loadBitmap(
|
||||
BinaryDatabaseManager.loadBitmap(
|
||||
entryAttachmentState.attachment.binaryFile,
|
||||
binaryCipherKey,
|
||||
mImagePreviewMaxWidth
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.kunzisoft.keepass.database.element.Attachment
|
||||
import com.kunzisoft.keepass.model.AttachmentState
|
||||
import com.kunzisoft.keepass.model.EntryAttachmentState
|
||||
import com.kunzisoft.keepass.model.StreamDirection
|
||||
import com.kunzisoft.keepass.tasks.BinaryStreamManager
|
||||
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
||||
import kotlinx.coroutines.*
|
||||
import java.util.*
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
@@ -344,7 +344,7 @@ class AttachmentFileNotificationService: LockNotificationService() {
|
||||
|
||||
when (streamDirection) {
|
||||
StreamDirection.UPLOAD -> {
|
||||
BinaryStreamManager.uploadToDatabase(
|
||||
BinaryDatabaseManager.uploadToDatabase(
|
||||
attachmentNotification.uri,
|
||||
attachment.binaryFile,
|
||||
contentResolver,
|
||||
@@ -357,7 +357,7 @@ class AttachmentFileNotificationService: LockNotificationService() {
|
||||
)
|
||||
}
|
||||
StreamDirection.DOWNLOAD -> {
|
||||
BinaryStreamManager.downloadFromDatabase(
|
||||
BinaryDatabaseManager.downloadFromDatabase(
|
||||
attachmentNotification.uri,
|
||||
attachment.binaryFile,
|
||||
contentResolver,
|
||||
|
||||
@@ -19,7 +19,7 @@ import kotlin.math.ln
|
||||
import kotlin.math.max
|
||||
import kotlin.math.pow
|
||||
|
||||
object BinaryStreamManager {
|
||||
object BinaryDatabaseManager {
|
||||
|
||||
fun downloadFromDatabase(attachmentToUploadUri: Uri,
|
||||
binaryFile: BinaryFile,
|
||||
@@ -186,5 +186,5 @@ object BinaryStreamManager {
|
||||
|
||||
private const val DEFAULT_ICON_WIDTH = 64
|
||||
|
||||
private val TAG = BinaryStreamManager::class.java.name
|
||||
private val TAG = BinaryDatabaseManager::class.java.name
|
||||
}
|
||||
Reference in New Issue
Block a user