Skip to content

Commit

Permalink
fix(capture-sdk): Fix detekt issues
Browse files Browse the repository at this point in the history
BAC-1531
  • Loading branch information
danicretu committed Aug 26, 2024
1 parent 53a2618 commit 9909f11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import net.gini.android.capture.internal.util.DeviceHelper;
import net.gini.android.capture.internal.util.UriReaderAsyncTask;
import net.gini.android.capture.util.IntentHelper;
import net.gini.android.capture.util.UploadMetadataBuilder;
import net.gini.android.capture.util.UploadMetadata;

import java.util.Arrays;
import java.util.UUID;
Expand Down Expand Up @@ -223,7 +223,7 @@ public String getParcelableMemoryCacheTag() {

@Override
public String generateUploadMetadata(Context context) {
return UploadMetadataBuilder.INSTANCE
return UploadMetadata.INSTANCE
.setSource(mSource.getName())
.setDeviceType(DeviceHelper.getDeviceType(context))
.setDeviceOrientation(DeviceHelper.getDeviceOrientation(context))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import net.gini.android.capture.BuildConfig
import net.gini.android.capture.EntryPoint
import net.gini.android.capture.GiniCapture

internal object UploadMetadataBuilder {
internal object UploadMetadata {

private const val USER_COMMENT_PLATFORM = "Platform"
private const val USER_COMMENT_OS_VERSION = "OSVer"
Expand Down Expand Up @@ -37,15 +37,15 @@ internal object UploadMetadataBuilder {
return csvBuilder.toString()
}

fun setDeviceOrientation(deviceOrientation: String): UploadMetadataBuilder =
fun setDeviceOrientation(deviceOrientation: String): UploadMetadata =
this.also { it.deviceOrientation = deviceOrientation }

fun setDeviceType(deviceType: String): UploadMetadataBuilder =
fun setDeviceType(deviceType: String): UploadMetadata =
this.also { it.deviceType = deviceType }

fun setSource(source: String): UploadMetadataBuilder = this.also { it.source = source }
fun setSource(source: String): UploadMetadata = this.also { it.source = source }

fun setImportMethod(importMethod: String): UploadMetadataBuilder = this.also { it.importMethod = importMethod }
fun setImportMethod(importMethod: String): UploadMetadata = this.also { it.importMethod = importMethod }

fun build(): String {
val metadataMap = mutableMapOf<String, String>()
Expand Down Expand Up @@ -81,4 +81,4 @@ internal object UploadMetadataBuilder {
EntryPoint.FIELD -> "field"
EntryPoint.BUTTON -> "button"
}
}
}

0 comments on commit 9909f11

Please sign in to comment.