Warn on backup creation for MIUI users
This commit is contained in:
parent
b2d58e04d2
commit
697b082591
@ -63,6 +63,11 @@ class SettingsBackupController : SettingsController() {
|
|||||||
summaryRes = R.string.pref_create_backup_summ
|
summaryRes = R.string.pref_create_backup_summ
|
||||||
|
|
||||||
onClick {
|
onClick {
|
||||||
|
if (MiuiUtil.isMiui() && MiuiUtil.isMiuiOptimizationDisabled()) {
|
||||||
|
context.toast(R.string.restore_miui_warning, Toast.LENGTH_LONG)
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
|
||||||
if (!BackupCreateService.isRunning(context)) {
|
if (!BackupCreateService.isRunning(context)) {
|
||||||
val ctrl = CreateBackupDialog()
|
val ctrl = CreateBackupDialog()
|
||||||
ctrl.targetController = this@SettingsBackupController
|
ctrl.targetController = this@SettingsBackupController
|
||||||
|
@ -422,7 +422,7 @@
|
|||||||
<string name="backup_choice">What do you want to backup?</string>
|
<string name="backup_choice">What do you want to backup?</string>
|
||||||
<string name="creating_backup">Creating backup</string>
|
<string name="creating_backup">Creating backup</string>
|
||||||
<string name="creating_backup_error">Backup failed</string>
|
<string name="creating_backup_error">Backup failed</string>
|
||||||
<string name="restore_miui_warning">MIUI Optimization must be enabled for restore to work correctly.</string>
|
<string name="restore_miui_warning">MIUI Optimization must be enabled for backup/restore to work correctly.</string>
|
||||||
<string name="restore_in_progress">Restore is already in progress</string>
|
<string name="restore_in_progress">Restore is already in progress</string>
|
||||||
<string name="restoring_backup">Restoring backup</string>
|
<string name="restoring_backup">Restoring backup</string>
|
||||||
<string name="restoring_backup_error">Restoring backup failed</string>
|
<string name="restoring_backup_error">Restoring backup failed</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user