Loading build.gradle +6 −6 Original line number Diff line number Diff line Loading @@ -2,13 +2,13 @@ buildscript { ext { propCompileSdkVersion = 27 propBuildToolsVersion = "27.0.3" propCompileSdkVersion = 28 propBuildToolsVersion = "28.0.2" propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '4.5.10' kotlin_version = '1.2.51' propVersionName = '4.6.15' kotlin_version = '1.2.60' support_libs = '27.1.1' } Loading @@ -18,8 +18,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" Loading commons/build.gradle +3 −2 Original line number Diff line number Diff line apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion propCompileSdkVersion Loading Loading @@ -29,7 +30,7 @@ android { dependencies { compile "com.android.support:design:$support_libs" compile "com.android.support:appcompat-v7:$support_libs" implementation 'com.github.bumptech.glide:glide:4.7.1' implementation 'com.github.bumptech.glide:glide:4.8.0' implementation 'com.booking:rtlviewpager:1.0.1' implementation 'com.andrognito.patternlockview:patternlockview:1.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" Loading @@ -37,7 +38,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.8.2' compile 'com.github.ajalt.reprint:core:3.2.1@aar' annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1' kapt 'com.github.bumptech.glide:compiler:4.8.0' } apply from: '../bintray-upload.gradle' commons/proguard-rules.pro +7 −0 Original line number Diff line number Diff line Loading @@ -15,3 +15,10 @@ -dontwarn org.joda.time.** -keep class org.joda.time.** { *; } -keep interface org.joda.time.** { *; } -keep public class * implements com.bumptech.glide.module.GlideModule -keep public class * extends com.bumptech.glide.module.AppGlideModule -keep public enum com.bumptech.glide.load.ImageHeaderParser$** { **[] $VALUES; public *; } commons/src/main/kotlin/com/simplemobiletools/commons/activities/AboutActivity.kt +14 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.text.Html import android.text.method.LinkMovementMethod import android.view.View import com.simplemobiletools.commons.R import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.FAQItem Loading Loading @@ -61,8 +62,20 @@ class AboutActivity : BaseSimpleActivity() { val body = "$appVersion$newline$deviceOS$newline$separator$newline$newline$newline" val href = "$label<br><a href=\"mailto:$email?subject=$appName&body=$body\">$email</a>" about_email.text = Html.fromHtml(href) if (intent.getBooleanExtra(SHOW_FAQ_BEFORE_MAIL, false) && !baseConfig.wasBeforeAskingShown) { about_email.setOnClickListener { baseConfig.wasBeforeAskingShown = true about_email.movementMethod = LinkMovementMethod.getInstance() about_email.setOnClickListener(null) ConfirmationDialog(this, "", R.string.before_asking_question_read_faq, R.string.read_it, R.string.skip) { about_faq_label.performClick() } } } else { about_email.movementMethod = LinkMovementMethod.getInstance() } } private fun setupFAQ() { val faqItems = intent.getSerializableExtra(APP_FAQ) as ArrayList<FAQItem> Loading commons/src/main/kotlin/com/simplemobiletools/commons/activities/BaseSimpleActivity.kt +10 −5 Original line number Diff line number Diff line Loading @@ -210,7 +210,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() { private fun isExternalStorageDocument(uri: Uri) = "com.android.externalstorage.documents" == uri.authority fun startAboutActivity(appNameId: Int, licenseMask: Int, versionName: String, faqItems: ArrayList<FAQItem> = arrayListOf()) { fun startAboutActivity(appNameId: Int, licenseMask: Int, versionName: String, faqItems: ArrayList<FAQItem>, showFAQBeforeMail: Boolean) { Intent(applicationContext, AboutActivity::class.java).apply { putExtra(APP_ICON_IDS, getAppIconIDs()) putExtra(APP_LAUNCHER_NAME, getAppLauncherName()) Loading @@ -218,6 +218,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() { putExtra(APP_LICENSES, licenseMask) putExtra(APP_VERSION_NAME, versionName) putExtra(APP_FAQ, faqItems) putExtra(SHOW_FAQ_BEFORE_MAIL, showFAQBeforeMail) startActivity(this) } } Loading Loading @@ -257,14 +258,13 @@ abstract class BaseSimpleActivity : AppCompatActivity() { if (isCopyOperation) { startCopyMove(fileDirItems, destination, isCopyOperation, copyPhotoVideoOnly, copyHidden) } else { if (source.startsWith(OTG_PATH) || destination.startsWith(OTG_PATH) || isPathOnSD(source) || isPathOnSD(destination) || fileDirItems.first().isDirectory || isNougatPlus()) { if (source.startsWith(OTG_PATH) || destination.startsWith(OTG_PATH) || isPathOnSD(source) || isPathOnSD(destination) || fileDirItems.first().isDirectory) { handleSAFDialog(source) { startCopyMove(fileDirItems, destination, isCopyOperation, copyPhotoVideoOnly, copyHidden) } } else { toast(R.string.moving) val updatedFiles = ArrayList<FileDirItem>(fileDirItems.size * 2) updatedFiles.addAll(fileDirItems) try { val destinationFolder = File(destination) for (oldFileDirItem in fileDirItems) { Loading @@ -278,11 +278,15 @@ abstract class BaseSimpleActivity : AppCompatActivity() { } val updatedPaths = updatedFiles.map { it.path } as ArrayList<String> scanPathsRecursively(updatedPaths) { rescanPaths(updatedPaths) { runOnUiThread { copyMoveListener.copySucceeded(false, fileDirItems.size * 2 == updatedFiles.size, destination) copyMoveListener.copySucceeded(false, fileDirItems.size == updatedFiles.size, destination) } } if (updatedPaths.isEmpty()) { copyMoveListener.copySucceeded(false, false, destination) } } catch (e: Exception) { showErrorToast(e) } Loading Loading @@ -350,6 +354,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() { } else { toast(if (copiedAll) R.string.moving_success else R.string.moving_success_partial) } copyMoveCallback?.invoke(destinationPath) copyMoveCallback = null } Loading Loading
build.gradle +6 −6 Original line number Diff line number Diff line Loading @@ -2,13 +2,13 @@ buildscript { ext { propCompileSdkVersion = 27 propBuildToolsVersion = "27.0.3" propCompileSdkVersion = 28 propBuildToolsVersion = "28.0.2" propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '4.5.10' kotlin_version = '1.2.51' propVersionName = '4.6.15' kotlin_version = '1.2.60' support_libs = '27.1.1' } Loading @@ -18,8 +18,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" Loading
commons/build.gradle +3 −2 Original line number Diff line number Diff line apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion propCompileSdkVersion Loading Loading @@ -29,7 +30,7 @@ android { dependencies { compile "com.android.support:design:$support_libs" compile "com.android.support:appcompat-v7:$support_libs" implementation 'com.github.bumptech.glide:glide:4.7.1' implementation 'com.github.bumptech.glide:glide:4.8.0' implementation 'com.booking:rtlviewpager:1.0.1' implementation 'com.andrognito.patternlockview:patternlockview:1.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" Loading @@ -37,7 +38,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.8.2' compile 'com.github.ajalt.reprint:core:3.2.1@aar' annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1' kapt 'com.github.bumptech.glide:compiler:4.8.0' } apply from: '../bintray-upload.gradle'
commons/proguard-rules.pro +7 −0 Original line number Diff line number Diff line Loading @@ -15,3 +15,10 @@ -dontwarn org.joda.time.** -keep class org.joda.time.** { *; } -keep interface org.joda.time.** { *; } -keep public class * implements com.bumptech.glide.module.GlideModule -keep public class * extends com.bumptech.glide.module.AppGlideModule -keep public enum com.bumptech.glide.load.ImageHeaderParser$** { **[] $VALUES; public *; }
commons/src/main/kotlin/com/simplemobiletools/commons/activities/AboutActivity.kt +14 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.text.Html import android.text.method.LinkMovementMethod import android.view.View import com.simplemobiletools.commons.R import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.FAQItem Loading Loading @@ -61,8 +62,20 @@ class AboutActivity : BaseSimpleActivity() { val body = "$appVersion$newline$deviceOS$newline$separator$newline$newline$newline" val href = "$label<br><a href=\"mailto:$email?subject=$appName&body=$body\">$email</a>" about_email.text = Html.fromHtml(href) if (intent.getBooleanExtra(SHOW_FAQ_BEFORE_MAIL, false) && !baseConfig.wasBeforeAskingShown) { about_email.setOnClickListener { baseConfig.wasBeforeAskingShown = true about_email.movementMethod = LinkMovementMethod.getInstance() about_email.setOnClickListener(null) ConfirmationDialog(this, "", R.string.before_asking_question_read_faq, R.string.read_it, R.string.skip) { about_faq_label.performClick() } } } else { about_email.movementMethod = LinkMovementMethod.getInstance() } } private fun setupFAQ() { val faqItems = intent.getSerializableExtra(APP_FAQ) as ArrayList<FAQItem> Loading
commons/src/main/kotlin/com/simplemobiletools/commons/activities/BaseSimpleActivity.kt +10 −5 Original line number Diff line number Diff line Loading @@ -210,7 +210,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() { private fun isExternalStorageDocument(uri: Uri) = "com.android.externalstorage.documents" == uri.authority fun startAboutActivity(appNameId: Int, licenseMask: Int, versionName: String, faqItems: ArrayList<FAQItem> = arrayListOf()) { fun startAboutActivity(appNameId: Int, licenseMask: Int, versionName: String, faqItems: ArrayList<FAQItem>, showFAQBeforeMail: Boolean) { Intent(applicationContext, AboutActivity::class.java).apply { putExtra(APP_ICON_IDS, getAppIconIDs()) putExtra(APP_LAUNCHER_NAME, getAppLauncherName()) Loading @@ -218,6 +218,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() { putExtra(APP_LICENSES, licenseMask) putExtra(APP_VERSION_NAME, versionName) putExtra(APP_FAQ, faqItems) putExtra(SHOW_FAQ_BEFORE_MAIL, showFAQBeforeMail) startActivity(this) } } Loading Loading @@ -257,14 +258,13 @@ abstract class BaseSimpleActivity : AppCompatActivity() { if (isCopyOperation) { startCopyMove(fileDirItems, destination, isCopyOperation, copyPhotoVideoOnly, copyHidden) } else { if (source.startsWith(OTG_PATH) || destination.startsWith(OTG_PATH) || isPathOnSD(source) || isPathOnSD(destination) || fileDirItems.first().isDirectory || isNougatPlus()) { if (source.startsWith(OTG_PATH) || destination.startsWith(OTG_PATH) || isPathOnSD(source) || isPathOnSD(destination) || fileDirItems.first().isDirectory) { handleSAFDialog(source) { startCopyMove(fileDirItems, destination, isCopyOperation, copyPhotoVideoOnly, copyHidden) } } else { toast(R.string.moving) val updatedFiles = ArrayList<FileDirItem>(fileDirItems.size * 2) updatedFiles.addAll(fileDirItems) try { val destinationFolder = File(destination) for (oldFileDirItem in fileDirItems) { Loading @@ -278,11 +278,15 @@ abstract class BaseSimpleActivity : AppCompatActivity() { } val updatedPaths = updatedFiles.map { it.path } as ArrayList<String> scanPathsRecursively(updatedPaths) { rescanPaths(updatedPaths) { runOnUiThread { copyMoveListener.copySucceeded(false, fileDirItems.size * 2 == updatedFiles.size, destination) copyMoveListener.copySucceeded(false, fileDirItems.size == updatedFiles.size, destination) } } if (updatedPaths.isEmpty()) { copyMoveListener.copySucceeded(false, false, destination) } } catch (e: Exception) { showErrorToast(e) } Loading Loading @@ -350,6 +354,7 @@ abstract class BaseSimpleActivity : AppCompatActivity() { } else { toast(if (copiedAll) R.string.moving_success else R.string.moving_success_partial) } copyMoveCallback?.invoke(destinationPath) copyMoveCallback = null } Loading