diff --git a/geotabdrivesdk/build.gradle.kts b/geotabdrivesdk/build.gradle.kts index 80391eb..b588dcc 100644 --- a/geotabdrivesdk/build.gradle.kts +++ b/geotabdrivesdk/build.gradle.kts @@ -1,6 +1,6 @@ import java.util.Properties -val versionName = "6.7.1_72850" +val versionName = "6.7.1_72920" plugins { id("com.android.library") diff --git a/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/DriveFragment.kt b/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/DriveFragment.kt index 30caeb7..d269293 100644 --- a/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/DriveFragment.kt +++ b/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/DriveFragment.kt @@ -157,6 +157,7 @@ class DriveFragment : private val mustacheFactory by lazy { DefaultMustacheFactory() } private lateinit var preference: SharedPreferences + private var appPreferences: SharedPreferences? = null private val userAgentUtil: UserAgentUtil by lazy { UserAgentUtil(requireContext()) @@ -226,7 +227,7 @@ class DriveFragment : } private val ssoModule: SSOModule by lazy { - SSOModule(this.parentFragmentManager, preference) + SSOModule(this.parentFragmentManager, appPreferences) } private val secureStorageModule: SecureStorageModule by lazy { @@ -392,10 +393,12 @@ class DriveFragment : @JvmStatic fun newInstance( modules: ArrayList = arrayListOf(), - logger: Logging = Logger.shared + logger: Logging = Logger.shared, + appPreferences: SharedPreferences? = null ): DriveFragment = DriveFragment().apply { this.logger = logger + this.appPreferences = appPreferences arguments = Bundle().apply { putSerializable(ARG_MODULES, modules) } diff --git a/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/MyGeotabFragment.kt b/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/MyGeotabFragment.kt index 0301b8a..31b9ced 100644 --- a/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/MyGeotabFragment.kt +++ b/geotabdrivesdk/src/main/java/com/geotab/mobile/sdk/MyGeotabFragment.kt @@ -57,6 +57,7 @@ class MyGeotabFragment : private val myGeotabUrl = "https://${MyGeotabConfig.serverAddress}" private val mustacheFactory by lazy { DefaultMustacheFactory() } private lateinit var preference: SharedPreferences + private var appPreferences: SharedPreferences? = null private val pushScriptUtil: PushScriptUtil by lazy { PushScriptUtil() @@ -94,7 +95,7 @@ class MyGeotabFragment : } private val ssoModule: SSOModule by lazy { - SSOModule(this.parentFragmentManager, preference) + SSOModule(this.parentFragmentManager, appPreferences) } private val cookieManager: CookieManager by lazy { @@ -137,8 +138,12 @@ class MyGeotabFragment : */ @Keep @JvmStatic - fun newInstance(modules: ArrayList = arrayListOf()) = + fun newInstance( + modules: ArrayList = arrayListOf(), + appPreferences: SharedPreferences? = null + ) = MyGeotabFragment().apply { + this.appPreferences = appPreferences arguments = Bundle().apply { putSerializable(ARG_MODULES, modules) }