mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-12-02 09:18:00 +01:00
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 {
|
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.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
package com.simplemobiletools.gallery
|
package com.simplemobiletools.gallery
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
|
import com.github.ajalt.reprint.core.Reprint
|
||||||
import com.squareup.leakcanary.LeakCanary
|
import com.squareup.leakcanary.LeakCanary
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
val USE_LEAK_CANARY = false
|
val USE_LEAK_CANARY = false
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
Reprint.initialize(this)
|
||||||
if (USE_LEAK_CANARY) {
|
if (USE_LEAK_CANARY) {
|
||||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
if (LeakCanary.isInAnalyzerProcess(this)) {
|
||||||
return
|
return
|
||||||
|
|
|
@ -8,6 +8,7 @@ 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
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
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.helpers.SHOW_ALL_TABS
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
|
@ -169,7 +170,9 @@ class SettingsActivity : SimpleActivity() {
|
||||||
config.protectionType = type
|
config.protectionType = type
|
||||||
|
|
||||||
if (config.isPasswordProtectionOn) {
|
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 {
|
override fun compareTo(other: Directory): Int {
|
||||||
var result: Int
|
var result: Int
|
||||||
when {
|
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 {
|
sorting and SORT_BY_SIZE != 0 -> result = when {
|
||||||
size == other.size -> 0
|
size == other.size -> 0
|
||||||
size > other.size -> 1
|
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 {
|
override fun compareTo(other: Medium): Int {
|
||||||
var result: Int
|
var result: Int
|
||||||
when {
|
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 {
|
sorting and SORT_BY_SIZE != 0 -> result = when {
|
||||||
size == other.size -> 0
|
size == other.size -> 0
|
||||||
size > other.size -> 1
|
size > other.size -> 1
|
||||||
|
|
Loading…
Reference in a new issue