Search in sources :

Example 1 with Backup

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();
}
Also used : DialogInterface(android.content.DialogInterface) Dialog(com.moro.mtweaks.views.dialog.Dialog) ProgressDialog(android.app.ProgressDialog) Backup(com.moro.mtweaks.utils.tools.Backup)

Aggregations

ProgressDialog (android.app.ProgressDialog)1 DialogInterface (android.content.DialogInterface)1 Backup (com.moro.mtweaks.utils.tools.Backup)1 Dialog (com.moro.mtweaks.views.dialog.Dialog)1