Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ad81e7b authored by tibbi's avatar tibbi
Browse files

really properly catch TransactionTooLargeException

parent 08a76216
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.12.2'
        propVersionName = '3.12.3'
        kotlin_version = '1.2.21'
        support_libs = '27.0.2'
    }
+12 −4
Original line number Diff line number Diff line
@@ -141,8 +141,12 @@ fun Activity.sharePathIntent(path: String, applicationId: String) {
                } else {
                    toast(R.string.no_app_found)
                }
            } catch (e: TransactionTooLargeException) {
            } catch (e: RuntimeException) {
                if (e.cause is TransactionTooLargeException) {
                    toast(R.string.maximum_share_reached)
                } else {
                    showErrorToast(e)
                }
            }
        }
    }.start()
@@ -177,8 +181,12 @@ fun Activity.sharePathsIntent(paths: ArrayList<String>, applicationId: String) {
                    } else {
                        toast(R.string.no_app_found)
                    }
                } catch (e: TransactionTooLargeException) {
                } catch (e: RuntimeException) {
                    if (e.cause is TransactionTooLargeException) {
                        toast(R.string.maximum_share_reached)
                    } else {
                        showErrorToast(e)
                    }
                }
            }
        }