File tree Expand file tree Collapse file tree
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,9 +182,8 @@ open class LoginActivity : FragmentActivity() {
182182 // Webview and Clients
183183 protected open val webViewClient = AuthWebViewClient ()
184184 protected open val webChromeClient = WebChromeClient ()
185- open val webView: WebView
186- @SuppressLint(" SetJavaScriptEnabled" )
187- get() = WebView (this .baseContext).apply {
185+ open val webView: WebView by lazy {
186+ WebView (this .baseContext).apply {
188187 layoutParams = ViewGroup .LayoutParams (
189188 ViewGroup .LayoutParams .MATCH_PARENT ,
190189 ViewGroup .LayoutParams .MATCH_PARENT ,
@@ -193,8 +192,10 @@ open class LoginActivity : FragmentActivity() {
193192 webChromeClient = this @LoginActivity.webChromeClient
194193 setBackgroundColor(Color .Transparent .toArgb())
195194 settings.domStorageEnabled = true /* Salesforce Welcome Discovery requires this */
195+ @SuppressLint(" SetJavaScriptEnabled" )
196196 settings.javaScriptEnabled = true
197197 }
198+ }
198199
199200 // Private variables
200201 private var wasBackgrounded = false
You can’t perform that action at this time.
0 commit comments