Skip to content

Commit 92800a4

Browse files
author
Bitrise Buildbot
committed
Bitrise build 11920
1 parent d54b2f3 commit 92800a4

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

geotabdrivesdk/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import java.util.Properties
22

3-
val versionName = "6.7.1_72850"
3+
val versionName = "6.7.1_72920"
44

55
plugins {
66
id("com.android.library")

geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/DriveFragment.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ class DriveFragment :
157157

158158
private val mustacheFactory by lazy { DefaultMustacheFactory() }
159159
private lateinit var preference: SharedPreferences
160+
private var appPreferences: SharedPreferences? = null
160161

161162
private val userAgentUtil: UserAgentUtil by lazy {
162163
UserAgentUtil(requireContext())
@@ -226,7 +227,7 @@ class DriveFragment :
226227
}
227228

228229
private val ssoModule: SSOModule by lazy {
229-
SSOModule(this.parentFragmentManager, preference)
230+
SSOModule(this.parentFragmentManager, appPreferences)
230231
}
231232

232233
private val secureStorageModule: SecureStorageModule by lazy {
@@ -392,10 +393,12 @@ class DriveFragment :
392393
@JvmStatic
393394
fun newInstance(
394395
modules: ArrayList<Module> = arrayListOf(),
395-
logger: Logging = Logger.shared
396+
logger: Logging = Logger.shared,
397+
appPreferences: SharedPreferences? = null
396398
): DriveFragment =
397399
DriveFragment().apply {
398400
this.logger = logger
401+
this.appPreferences = appPreferences
399402
arguments = Bundle().apply {
400403
putSerializable(ARG_MODULES, modules)
401404
}

geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/MyGeotabFragment.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class MyGeotabFragment :
5757
private val myGeotabUrl = "https://${MyGeotabConfig.serverAddress}"
5858
private val mustacheFactory by lazy { DefaultMustacheFactory() }
5959
private lateinit var preference: SharedPreferences
60+
private var appPreferences: SharedPreferences? = null
6061

6162
private val pushScriptUtil: PushScriptUtil by lazy {
6263
PushScriptUtil()
@@ -94,7 +95,7 @@ class MyGeotabFragment :
9495
}
9596

9697
private val ssoModule: SSOModule by lazy {
97-
SSOModule(this.parentFragmentManager, preference)
98+
SSOModule(this.parentFragmentManager, appPreferences)
9899
}
99100

100101
private val cookieManager: CookieManager by lazy {
@@ -137,8 +138,12 @@ class MyGeotabFragment :
137138
*/
138139
@Keep
139140
@JvmStatic
140-
fun newInstance(modules: ArrayList<Module> = arrayListOf()) =
141+
fun newInstance(
142+
modules: ArrayList<Module> = arrayListOf(),
143+
appPreferences: SharedPreferences? = null
144+
) =
141145
MyGeotabFragment().apply {
146+
this.appPreferences = appPreferences
142147
arguments = Bundle().apply {
143148
putSerializable(ARG_MODULES, modules)
144149
}

0 commit comments

Comments
 (0)