We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7e6d4b commit 35170e0Copy full SHA for 35170e0
android/src/main/java/com/segment/analytics/kotlin/android/Storage.kt
@@ -71,6 +71,17 @@ class AndroidStorage(
71
Storage.Constants.Events -> {
72
eventsFile.read().joinToString()
73
}
74
+ Storage.Constants.LegacyAppBuild -> {
75
+ // The legacy app build number was stored as an integer so we have to get it
76
+ // as an integer and convert it to a String.
77
+ val noBuild = -1
78
+ val build = sharedPreferences.getInt(key.rawVal, noBuild)
79
+ if (build != noBuild) {
80
+ return build.toString()
81
+ } else {
82
+ return null
83
+ }
84
85
else -> {
86
sharedPreferences.getString(key.rawVal, null)
87
0 commit comments