adding some crashfixes

This commit is contained in:
tibbi 2020-11-27 11:53:33 +01:00
parent 7b564f9368
commit 92168ab3f0
3 changed files with 9 additions and 3 deletions

View File

@ -58,7 +58,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.32.1'
implementation 'com.simplemobiletools:commons:5.32.2'
implementation 'com.github.Stericson:RootTools:df729dcb13'
implementation 'com.github.Stericson:RootShell:1.6'
implementation 'com.alexvasilkov:gesture-views:2.5.2'

View File

@ -148,7 +148,13 @@ class DecompressActivity : SimpleActivity() {
@SuppressLint("NewApi")
private fun fillAllListItems(uri: Uri) {
val inputStream = contentResolver.openInputStream(uri)
val inputStream = try {
contentResolver.openInputStream(uri)
} catch (e: Exception) {
showErrorToast(e)
return
}
val zipInputStream = ZipInputStream(BufferedInputStream(inputStream))
var zipEntry: ZipEntry?
while (true) {

View File

@ -156,7 +156,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
activity?.runOnUiThread {
activity?.invalidateOptionsMenu()
addItems(listItems, forceRefresh)
if (currentViewType != context?.config?.getFolderViewType(currentPath)) {
if (context != null && currentViewType != context!!.config.getFolderViewType(currentPath)) {
setupLayoutManager()
}
}