mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-15 19:50:47 +00:00
Download Magisk Manager via new service
This commit is contained in:
@@ -9,6 +9,10 @@ import java.io.File;
|
||||
|
||||
public class APKInstall {
|
||||
public static void install(Context c, File apk) {
|
||||
c.startActivity(installIntent(c, apk));
|
||||
}
|
||||
|
||||
public static Intent installIntent(Context c, File apk) {
|
||||
Intent install = new Intent(Intent.ACTION_INSTALL_PACKAGE);
|
||||
install.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
@@ -18,6 +22,6 @@ public class APKInstall {
|
||||
apk.setReadable(true, false);
|
||||
install.setData(Uri.fromFile(apk));
|
||||
}
|
||||
c.startActivity(install);
|
||||
return install;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user