drake 4 лет назад
Родитель
Сommit
d888bf2380
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      net/src/main/java/com/drake/net/utils/FileUtils.kt

+ 3 - 0
net/src/main/java/com/drake/net/utils/FileUtils.kt

@@ -65,7 +65,10 @@ fun File.toRequestBody(contentType: MediaType? = null): RequestBody {
 
 /**
  * 安装APK
+ * @throws IllegalArgumentException 文件不存在或非apk后缀
+ * @throws UnsupportedOperationException 系统不存在包管理器
  */
+@Throws(IllegalArgumentException::class, UnsupportedOperationException::class)
 fun File.install() {
     val context = NetConfig.app