From 19f98f3d509d06624e3463cbe67f4bd19171216f Mon Sep 17 00:00:00 2001 From: "izaaz.yunus" Date: Wed, 25 Sep 2024 16:19:00 -0700 Subject: [PATCH] chore: fix lint issues --- .../src/main/java/com/amplitude/android/Amplitude.kt | 1 - .../android/migration/IdentityStorageMigration.kt | 2 +- .../amplitude/android/migration/MigrationManager.kt | 2 +- .../android/storage/AndroidStorageContextV1.kt | 3 +-- .../android/storage/AndroidStorageContextV2.kt | 11 +++++------ .../main/java/com/amplitude/id/FileIdentityStorage.kt | 1 - 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/android/src/main/java/com/amplitude/android/Amplitude.kt b/android/src/main/java/com/amplitude/android/Amplitude.kt index f3612429..f46b5b7d 100644 --- a/android/src/main/java/com/amplitude/android/Amplitude.kt +++ b/android/src/main/java/com/amplitude/android/Amplitude.kt @@ -8,7 +8,6 @@ import com.amplitude.android.plugins.AndroidContextPlugin import com.amplitude.android.plugins.AndroidLifecyclePlugin import com.amplitude.android.plugins.AndroidNetworkConnectivityCheckerPlugin import com.amplitude.android.storage.AndroidStorageContextV3 -import com.amplitude.android.storage.LegacySdkStorageContext import com.amplitude.core.Amplitude import com.amplitude.core.events.BaseEvent import com.amplitude.core.platform.plugins.AmplitudeDestination diff --git a/android/src/main/java/com/amplitude/android/migration/IdentityStorageMigration.kt b/android/src/main/java/com/amplitude/android/migration/IdentityStorageMigration.kt index b88c0745..11fcdc72 100644 --- a/android/src/main/java/com/amplitude/android/migration/IdentityStorageMigration.kt +++ b/android/src/main/java/com/amplitude/android/migration/IdentityStorageMigration.kt @@ -23,4 +23,4 @@ class IdentityStorageMigration( logger.error("Unable to migrate file identity storage: ${e.message}") } } -} \ No newline at end of file +} diff --git a/android/src/main/java/com/amplitude/android/migration/MigrationManager.kt b/android/src/main/java/com/amplitude/android/migration/MigrationManager.kt index a53973e9..b5d23b99 100644 --- a/android/src/main/java/com/amplitude/android/migration/MigrationManager.kt +++ b/android/src/main/java/com/amplitude/android/migration/MigrationManager.kt @@ -52,4 +52,4 @@ internal class MigrationManager(private val amplitude: Amplitude) { logger.error("Failed to migrate storage: ${ex.message}") } } -} \ No newline at end of file +} diff --git a/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV1.kt b/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV1.kt index e190e7b2..f77700b6 100644 --- a/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV1.kt +++ b/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV1.kt @@ -1,7 +1,6 @@ package com.amplitude.android.storage import android.content.Context -import android.content.SharedPreferences import com.amplitude.android.Amplitude import com.amplitude.android.Configuration import com.amplitude.android.migration.AndroidStorageMigration @@ -125,4 +124,4 @@ internal class AndroidStorageContextV1( } } } -} \ No newline at end of file +} diff --git a/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV2.kt b/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV2.kt index 7333a099..7795b451 100644 --- a/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV2.kt +++ b/android/src/main/java/com/amplitude/android/storage/AndroidStorageContextV2.kt @@ -1,12 +1,10 @@ package com.amplitude.android.storage import android.content.Context -import android.content.SharedPreferences import com.amplitude.android.Amplitude import com.amplitude.android.Configuration import com.amplitude.android.migration.AndroidStorageMigration import com.amplitude.android.migration.IdentityStorageMigration -import com.amplitude.android.utilities.AndroidStorage import com.amplitude.core.utilities.FileStorage import com.amplitude.id.FileIdentityStorage import com.amplitude.id.IdentityConfiguration @@ -50,12 +48,14 @@ internal class AndroidStorageContextV2( eventsStorage = createAndroidStorage( configuration, "amplitude-disk-queue", - "amplitude-android-${configuration.instanceName}") + "amplitude-android-${configuration.instanceName}" + ) identifyInterceptStorage = createAndroidStorage( configuration, "amplitude-identify-intercept-disk-queue", - "amplitude-identify-intercept-${configuration.instanceName}") + "amplitude-identify-intercept-${configuration.instanceName}" + ) val identityConfiguration = generateIdentityConfiguration(amplitude, configuration) storageDirectories.add(identityConfiguration.storageDirectory) @@ -81,7 +81,6 @@ internal class AndroidStorageContextV2( ) } - private fun createAndroidStorage( configuration: Configuration, storageDirName: String, @@ -123,4 +122,4 @@ internal class AndroidStorageContextV2( } } } -} \ No newline at end of file +} diff --git a/id/src/main/java/com/amplitude/id/FileIdentityStorage.kt b/id/src/main/java/com/amplitude/id/FileIdentityStorage.kt index cf8caa50..d535af08 100644 --- a/id/src/main/java/com/amplitude/id/FileIdentityStorage.kt +++ b/id/src/main/java/com/amplitude/id/FileIdentityStorage.kt @@ -2,7 +2,6 @@ package com.amplitude.id import com.amplitude.id.utilities.PropertiesFile import com.amplitude.id.utilities.createDirectory -import java.io.File class FileIdentityStorage(val configuration: IdentityConfiguration) : IdentityStorage { private val propertiesFile: PropertiesFile