Skip to content

Commit aa9ce40

Browse files
committed
Fix linting errors with PreferenceStoreFix and OneSignalImp
1 parent 2883b97 commit aa9ce40

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/preferences/PreferenceStoreFix.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import com.onesignal.debug.internal.logging.Logging
77
import java.io.File
88

99
object PreferenceStoreFix {
10-
1110
/**
1211
* Ensure the OneSignal preference store is not using the v4 obfuscated version, if one
1312
* exists.
@@ -20,15 +19,18 @@ object PreferenceStoreFix {
2019
// up the subscription, we need to copy the shared preferences from the obfuscated
2120
// version to the static "OneSignal" preference name. We only do this
2221
// if there isn't already a "OneSignal" preference store.
23-
val sharedPrefsDir = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
24-
File(context.dataDir, "shared_prefs")
25-
} else {
26-
File(context.filesDir.parentFile, "shared_prefs")
27-
}
22+
val sharedPrefsDir =
23+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
24+
File(context.dataDir, "shared_prefs")
25+
} else {
26+
File(context.filesDir.parentFile, "shared_prefs")
27+
}
28+
2829
val osPrefsFile = File(sharedPrefsDir, "OneSignal.xml")
2930

30-
if (!sharedPrefsDir.exists() || !sharedPrefsDir.isDirectory || osPrefsFile.exists())
31+
if (!sharedPrefsDir.exists() || !sharedPrefsDir.isDirectory || osPrefsFile.exists()) {
3132
return
33+
}
3234

3335
val prefsFileList = sharedPrefsDir.listFiles() ?: return
3436

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/internal/OneSignalImp.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.onesignal.internal
22

33
import android.content.Context
4-
import android.os.Build
54
import com.onesignal.IOneSignal
65
import com.onesignal.common.IDManager
76
import com.onesignal.common.OneSignalUtils

0 commit comments

Comments
 (0)