Fixed crashes caused by file exposure beyond app bounds

This commit is contained in:
Viktor De Pasquale
2019-07-10 18:08:18 +02:00
committed by John Wu
parent b2048379af
commit 51e40dd98c
2 changed files with 5 additions and 5 deletions
@@ -91,9 +91,8 @@ fun ApplicationInfo.findAppLabel(pm: PackageManager): String {
fun Intent.startActivity(context: Context) = context.startActivity(this)
fun File.provide(): Uri {
val context: Context by inject()
return FileProvider.getUriForFile(context, "com.topjohnwu.magisk.fileprovider", this)
fun File.provide(context: Context = get()): Uri {
return FileProvider.getUriForFile(context, context.packageName + ".provider", this)
}
fun File.mv(destination: File) {