mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-10-05 20:43:14 -04:00
Download Magisk Manager via new service
This commit is contained in:
1 parent
3d81f167ea
commit
85f5ff3c14
14 files changed
+170
-128
No files matched your search
@@ -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