File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
OneSignalSDK/onesignal/core/src/main/java/com/onesignal
core/internal/preferences Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import com.onesignal.debug.internal.logging.Logging
77import java.io.File
88
99object 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
Original file line number Diff line number Diff line change 11package com.onesignal.internal
22
33import android.content.Context
4- import android.os.Build
54import com.onesignal.IOneSignal
65import com.onesignal.common.IDManager
76import com.onesignal.common.OneSignalUtils
You can’t perform that action at this time.
0 commit comments