File tree Expand file tree Collapse file tree
app/src/main/java/com/tomclaw/appsend_rb/screen/apps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,12 +148,12 @@ class AppsInteractorImpl(
148148 APPS_DIR_NAME
149149 )
150150 if (! (directory.exists() || directory.mkdirs())) {
151- emitter.onError(IOException (" unable to create directory" ))
151+ emitter.onError(IOException (" unable to create directory " + directory.name ))
152152 return @create
153153 }
154154 val destination = File (directory, getApkName(entity))
155155 if (destination.exists() && ! destination.delete()) {
156- emitter.onError(IOException (" unable to delete destination file" ))
156+ emitter.onError(IOException (" unable to delete destination file " + destination.name ))
157157 return @create
158158 }
159159 val buffer = ByteArray (524288 )
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ class AppsPresenterImpl(
189189 .subscribe({ file ->
190190 router?.shareApk(file)
191191 }, {
192- view?.showAppExportError()
192+ view?.showAppExportError(it.message.toString() )
193193 })
194194 }
195195
@@ -202,7 +202,7 @@ class AppsPresenterImpl(
202202 .subscribe({ file ->
203203 view?.showExtractSuccess(file.path)
204204 }, {
205- view?.showAppExportError()
205+ view?.showAppExportError(it.message.toString() )
206206 })
207207 }
208208
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ interface AppsView {
4747
4848 fun showAppLaunchError ()
4949
50- fun showAppExportError ()
50+ fun showAppExportError (msg : String )
5151
5252 fun showNoRequestedPermissionsMessage ()
5353
@@ -183,8 +183,8 @@ class AppsViewImpl(
183183 Snackbar .make(recycler, R .string.non_launchable_package, Snackbar .LENGTH_LONG ).show()
184184 }
185185
186- override fun showAppExportError () {
187- Snackbar .make(recycler, R .string.app_extract_failed , Snackbar .LENGTH_LONG ).show()
186+ override fun showAppExportError (msg : String ) {
187+ Snackbar .make(recycler, msg , Snackbar .LENGTH_LONG ).show()
188188 }
189189
190190 override fun showNoRequestedPermissionsMessage () {
You can’t perform that action at this time.
0 commit comments