File tree 3 files changed +7
-5
lines changed
common_component/src/main/java/com/xyoye/common_component/weight/binding
download_component/src/main/java/com/xyoye/download_component/ui/dialog
stream_component/src/main/java/com/xyoye/stream_component/utils
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ object BindingEncode {
12
12
13
13
@InverseMethod(" stringDecode" )
14
14
@JvmStatic
15
- fun stringEncode (value : String ): String {
15
+ fun stringEncode (value : String? ): String {
16
+ value ? : return " "
16
17
return URLEncoder .encode(value, Charsets .UTF_8 .name())
17
18
}
18
19
19
20
@JvmStatic
20
- fun stringDecode (value : String ): String {
21
+ fun stringDecode (value : String? ): String {
22
+ value ? : return " "
21
23
return URLDecoder .decode(value, Charsets .UTF_8 .name())
22
24
}
23
25
}
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class PlaySelectionDialog : BaseBottomDialog<DialogPlaySelectionBinding> {
89
89
}
90
90
91
91
val torrentInfo = XLTaskHelper .getInstance().getTorrentInfo(filePath)
92
- if (torrentInfo?.mSubFileInfo == null ) {
92
+ if (torrentInfo?.mSubFileInfo.isNullOrEmpty() ) {
93
93
dismiss()
94
94
mOwnerActivity?.finish()
95
95
ToastCenter .showError(" 解析种子文件失败" )
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ object FileHashUtils {
42
42
}
43
43
outputStream.flush()
44
44
return getStreamHash(FileInputStream (cacheFile))
45
- } catch (e : Exception ) {
46
- e .printStackTrace()
45
+ } catch (t : Throwable ) {
46
+ t .printStackTrace()
47
47
return null
48
48
} finally {
49
49
IOUtils .closeIO(inputStream)
You can’t perform that action at this time.
0 commit comments