fix #181, add fingerprint protection to hidden folder showing
This commit is contained in:
parent
80f6df5e29
commit
dfdfd88941
5 changed files with 9 additions and 4 deletions
|
@ -37,7 +37,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.simplemobiletools:commons:2.28.5'
|
||||
compile 'com.simplemobiletools:commons:2.28.7'
|
||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
package com.simplemobiletools.gallery
|
||||
|
||||
import android.app.Application
|
||||
import com.github.ajalt.reprint.core.Reprint
|
||||
import com.squareup.leakcanary.LeakCanary
|
||||
|
||||
class App : Application() {
|
||||
val USE_LEAK_CANARY = false
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
Reprint.initialize(this)
|
||||
if (USE_LEAK_CANARY) {
|
||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||
return
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
|||
import com.simplemobiletools.commons.dialogs.SecurityDialog
|
||||
import com.simplemobiletools.commons.extensions.handleHiddenFolderPasswordProtection
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT
|
||||
import com.simplemobiletools.commons.helpers.SHOW_ALL_TABS
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.gallery.R
|
||||
|
@ -169,7 +170,9 @@ class SettingsActivity : SimpleActivity() {
|
|||
config.protectionType = type
|
||||
|
||||
if (config.isPasswordProtectionOn) {
|
||||
ConfirmationDialog(this, "", R.string.protection_setup_successfully, R.string.ok, 0) { }
|
||||
val confirmationTextId = if (config.protectionType == PROTECTION_FINGERPRINT)
|
||||
R.string.fingerprint_setup_successfully else R.string.protection_setup_successfully
|
||||
ConfirmationDialog(this, "", confirmationTextId, R.string.ok, 0) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ data class Directory(val path: String, val tmb: String, val name: String, var me
|
|||
override fun compareTo(other: Directory): Int {
|
||||
var result: Int
|
||||
when {
|
||||
sorting and SORT_BY_NAME != 0 -> result = AlphanumComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
sorting and SORT_BY_SIZE != 0 -> result = when {
|
||||
size == other.size -> 0
|
||||
size > other.size -> 1
|
||||
|
|
|
@ -26,7 +26,7 @@ data class Medium(var name: String, var path: String, val video: Boolean, val mo
|
|||
override fun compareTo(other: Medium): Int {
|
||||
var result: Int
|
||||
when {
|
||||
sorting and SORT_BY_NAME != 0 -> result = AlphanumComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
sorting and SORT_BY_NAME != 0 -> result = AlphanumericComparator().compare(name.toLowerCase(), other.name.toLowerCase())
|
||||
sorting and SORT_BY_SIZE != 0 -> result = when {
|
||||
size == other.size -> 0
|
||||
size > other.size -> 1
|
||||
|
|
Loading…
Reference in a new issue