Fix some of the StrictMode violations (#1931)
Mostly it's disk reads/writes. Conscrypt reads own version on startup which reads from disk multiple times. There's no solution for it right now. SharedPreferences which are used in BaseActivity also read from disk and pretty early but it shouldn't be a problem.
This commit is contained in:
parent
9ea2557148
commit
ef1ae581b4
2 changed files with 32 additions and 12 deletions
|
|
@ -81,6 +81,7 @@ import com.uber.autodispose.android.lifecycle.autoDispose
|
|||
import dagger.android.DispatchingAndroidInjector
|
||||
import dagger.android.HasAndroidInjector
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
@ -227,8 +228,10 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
|||
}
|
||||
}
|
||||
|
||||
// Flush old media that was cached for sharing
|
||||
deleteStaleCachedMedia(applicationContext.getExternalFilesDir("Tusky"))
|
||||
Schedulers.io().scheduleDirect {
|
||||
// Flush old media that was cached for sharing
|
||||
deleteStaleCachedMedia(applicationContext.getExternalFilesDir("Tusky"))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue