show a dialog mentioning app reinstall in case the password is forgotten

This commit is contained in:
tibbi 2017-08-28 22:54:27 +02:00
parent 3876000f17
commit c48fef5bb8

View file

@ -3,6 +3,7 @@ package com.simplemobiletools.gallery.activities
import android.content.Intent import android.content.Intent
import android.content.res.Resources import android.content.res.Resources
import android.os.Bundle import android.os.Bundle
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.dialogs.SecurityDialog import com.simplemobiletools.commons.dialogs.SecurityDialog
import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection
@ -164,6 +165,10 @@ class SettingsActivity : SimpleActivity() {
config.isPasswordProtectionOn = !hasPasswordProtection config.isPasswordProtectionOn = !hasPasswordProtection
config.passwordHash = if (hasPasswordProtection) "" else hash config.passwordHash = if (hasPasswordProtection) "" else hash
config.protectionType = type config.protectionType = type
if (config.isPasswordProtectionOn) {
ConfirmationDialog(this, "", R.string.protection_setup_successfully, R.string.ok, 0) { }
}
} }
} }
} }