From ea94f9d777414a50c8fb87108f929fb98f06ad4f Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 27 Feb 2020 21:52:22 +0800 Subject: [PATCH] replace --- .../RN/A/VersionUpgrade/DownLoadBroadcastReceiver.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/android/src/main/java/top/jerryyan/RN/A/VersionUpgrade/DownLoadBroadcastReceiver.java b/android/src/main/java/top/jerryyan/RN/A/VersionUpgrade/DownLoadBroadcastReceiver.java index 03f3451..521403d 100644 --- a/android/src/main/java/top/jerryyan/RN/A/VersionUpgrade/DownLoadBroadcastReceiver.java +++ b/android/src/main/java/top/jerryyan/RN/A/VersionUpgrade/DownLoadBroadcastReceiver.java @@ -9,8 +9,6 @@ import android.database.Cursor; import android.net.Uri; import android.os.Build; -import androidx.core.content.FileProvider; - import java.io.File; public class DownLoadBroadcastReceiver extends BroadcastReceiver { @@ -39,7 +37,7 @@ public class DownLoadBroadcastReceiver extends BroadcastReceiver { if(filePath == null) return; File file = new File(filePath); if (Build.VERSION.SDK_INT >= 24) { - Uri apkUri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID.concat(".J_FileProvider"), file); + Uri apkUri = J_FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID.concat(".J_FileProvider"), file); install.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); install.setDataAndType(apkUri, "application/vnd.android.package-archive"); } else {