File tree 2 files changed +5
-4
lines changed
android/src/main/java/com/amplitude/android/storage
core/src/main/java/com/amplitude/core/utilities
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.amplitude.android.storage
2
2
3
3
import android.content.Context
4
4
import android.content.SharedPreferences
5
+ import androidx.core.content.edit
5
6
import com.amplitude.android.utilities.AndroidKVS
6
7
import com.amplitude.common.Logger
7
8
import com.amplitude.core.Amplitude
@@ -21,7 +22,6 @@ import kotlinx.coroutines.CoroutineDispatcher
21
22
import kotlinx.coroutines.CoroutineScope
22
23
import org.json.JSONArray
23
24
import java.io.File
24
- import androidx.core.content.edit
25
25
26
26
class AndroidStorageV2 (
27
27
/* *
@@ -141,7 +141,8 @@ class AndroidEventsStorageProviderV2 : StorageProvider {
141
141
): Storage {
142
142
val configuration = amplitude.configuration as com.amplitude.android.Configuration
143
143
val sharedPreferencesName = " amplitude-events-${configuration.instanceName} "
144
- val sharedPreferences = configuration.context.getSharedPreferences(sharedPreferencesName, Context .MODE_PRIVATE )
144
+ val sharedPreferences =
145
+ configuration.context.getSharedPreferences(sharedPreferencesName, Context .MODE_PRIVATE )
145
146
return AndroidStorageV2 (
146
147
configuration.instanceName,
147
148
configuration.loggerProvider.getLogger(amplitude),
Original file line number Diff line number Diff line change @@ -100,8 +100,8 @@ class EventsFileManager(
100
100
fun read (): List <String > {
101
101
// we need to filter out .temp file, since it's operating on the writing thread
102
102
val fileList = directory.listFiles { _, name ->
103
- name.contains(storageKey) && ! name.endsWith(" .tmp" ) && ! name.endsWith(" .properties" )
104
- } ? : emptyArray()
103
+ name.contains(storageKey) && ! name.endsWith(" .tmp" ) && ! name.endsWith(" .properties" )
104
+ } ? : emptyArray()
105
105
106
106
fun getSortKeyForFile (file : File ): String {
107
107
val name = file.nameWithoutExtension.replace(" $storageKey -" , " " )
You can’t perform that action at this time.
0 commit comments