File tree 3 files changed +7
-7
lines changed
app/src/main/java/com/tomclaw/appsend_rb/screen/apps
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -148,12 +148,12 @@ class AppsInteractorImpl(
148
148
APPS_DIR_NAME
149
149
)
150
150
if (! (directory.exists() || directory.mkdirs())) {
151
- emitter.onError(IOException (" unable to create directory" ))
151
+ emitter.onError(IOException (" unable to create directory " + directory.name ))
152
152
return @create
153
153
}
154
154
val destination = File (directory, getApkName(entity))
155
155
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 ))
157
157
return @create
158
158
}
159
159
val buffer = ByteArray (524288 )
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ class AppsPresenterImpl(
189
189
.subscribe({ file ->
190
190
router?.shareApk(file)
191
191
}, {
192
- view?.showAppExportError()
192
+ view?.showAppExportError(it.message.toString() )
193
193
})
194
194
}
195
195
@@ -202,7 +202,7 @@ class AppsPresenterImpl(
202
202
.subscribe({ file ->
203
203
view?.showExtractSuccess(file.path)
204
204
}, {
205
- view?.showAppExportError()
205
+ view?.showAppExportError(it.message.toString() )
206
206
})
207
207
}
208
208
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ interface AppsView {
47
47
48
48
fun showAppLaunchError ()
49
49
50
- fun showAppExportError ()
50
+ fun showAppExportError (msg : String )
51
51
52
52
fun showNoRequestedPermissionsMessage ()
53
53
@@ -183,8 +183,8 @@ class AppsViewImpl(
183
183
Snackbar .make(recycler, R .string.non_launchable_package, Snackbar .LENGTH_LONG ).show()
184
184
}
185
185
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()
188
188
}
189
189
190
190
override fun showNoRequestedPermissionsMessage () {
You can’t perform that action at this time.
0 commit comments