File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/src/main/java/com/duckduckgo/app/browser/serviceworker Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import androidx.lifecycle.LifecycleObserver
2323import androidx.lifecycle.OnLifecycleEvent
2424import com.duckduckgo.app.browser.RequestInterceptor
2525import com.duckduckgo.app.global.exception.UncaughtExceptionRepository
26+ import timber.log.Timber
2627import javax.inject.Inject
2728import javax.inject.Singleton
2829
@@ -35,9 +36,13 @@ class ServiceWorkerLifecycleObserver @Inject constructor(
3536 @OnLifecycleEvent(Lifecycle .Event .ON_START )
3637 fun setServiceWorkerClient () {
3738 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .N ) {
38- ServiceWorkerController .getInstance().setServiceWorkerClient(
39- BrowserServiceWorkerClient (requestInterceptor, uncaughtExceptionRepository)
40- )
39+ try {
40+ ServiceWorkerController .getInstance().setServiceWorkerClient(
41+ BrowserServiceWorkerClient (requestInterceptor, uncaughtExceptionRepository)
42+ )
43+ } catch (e: Exception ) {
44+ Timber .w(e.localizedMessage)
45+ }
4146 }
4247 }
4348}
You can’t perform that action at this time.
0 commit comments