use of com.moro.mtweaks.utils.tools.Backup in project MTweaks-KernelAdiutorMOD by morogoku.
the class BackupFragment method showBackupFlashingDialog.
private void showBackupFlashingDialog(final File file) {
final LinkedHashMap<String, Backup.PARTITION> menu = getPartitionMenu();
mBackupFlashingDialog = new Dialog(getActivity()).setItems(menu.keySet().toArray(new String[menu.size()]), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Backup.PARTITION partition = menu.values().toArray(new Backup.PARTITION[menu.size()])[i];
if (file != null) {
restore(partition, file, true);
} else {
backup(partition);
}
}
}).setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
mBackupFlashingDialog = null;
}
});
mBackupFlashingDialog.show();
}
Aggregations