use of com.topjohnwu.magisk.FlashActivity in project MagiskManager by topjohnwu.
the class InstallMagisk method onPostExecute.
@Override
protected void onPostExecute(Boolean result) {
FlashActivity activity = (FlashActivity) getActivity();
if (!result) {
Shell.Async.sh("rm -rf " + install);
console.add("! Installation failed");
activity.reboot.setVisibility(View.GONE);
}
activity.buttonPanel.setVisibility(View.VISIBLE);
}
use of com.topjohnwu.magisk.FlashActivity in project MagiskManager by topjohnwu.
the class FlashZip method onPostExecute.
// -1 = error, manual install; 0 = invalid zip; 1 = success
@Override
protected void onPostExecute(Integer result) {
FlashActivity activity = (FlashActivity) getActivity();
Shell.Async.su("rm -rf " + mCachedFile.getParent(), "rm -rf " + Const.TMP_FOLDER_PATH);
switch(result) {
case -1:
console.add("! Installation failed");
Utils.showUriSnack(getActivity(), mUri);
break;
case 0:
console.add("! This zip is not a Magisk Module!");
break;
case 1:
// Success
new LoadModules().exec();
break;
}
activity.reboot.setVisibility(result > 0 ? View.VISIBLE : View.GONE);
activity.buttonPanel.setVisibility(View.VISIBLE);
}
Aggregations