Prevent crash when a smartspace data source errors
This commit is contained in:
@@ -2,6 +2,7 @@ package app.lawnchair.smartspace.provider
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import app.lawnchair.preferences2.PreferenceManager2
|
||||
import app.lawnchair.smartspace.model.SmartspaceTarget
|
||||
import com.patrykmichalik.preferencemanager.Preference
|
||||
@@ -32,7 +33,8 @@ abstract class SmartspaceDataSource(
|
||||
requiresSetup = listOf(this@SmartspaceDataSource))
|
||||
)
|
||||
} else {
|
||||
throw it
|
||||
Log.d("SmartspaceDataSource", "data source errored", it)
|
||||
enabledPref.set(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user