From c9dba5ac5b2d3438f884d3f2b75e4879012a4b80 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 13 Mar 2018 23:41:21 +0100 Subject: [PATCH] update commons to 3.15.16 --- app/build.gradle | 2 +- .../gallery/activities/SetWallpaperActivity.kt | 2 +- .../com/simplemobiletools/gallery/extensions/Activity.kt | 6 +++--- .../simplemobiletools/gallery/fragments/VideoFragment.kt | 3 ++- .../com/simplemobiletools/gallery/helpers/MediaFetcher.kt | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c21621d37..15ddff8ce 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.14.12' + implementation 'com.simplemobiletools:commons:3.15.16' implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0' implementation 'com.android.support:multidex:1.0.3' implementation 'com.google.code.gson:gson:2.8.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt index 9f149647c..763ec25c8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt @@ -11,8 +11,8 @@ import android.view.Menu import android.view.MenuItem import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.isActivityDestroyed -import com.simplemobiletools.commons.extensions.isNougatPlus import com.simplemobiletools.commons.extensions.toast +import com.simplemobiletools.commons.helpers.isNougatPlus import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.gallery.R import com.theartofdev.edmodo.cropper.CropImageView diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt index 87a1b6971..fd6b2fc35 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -73,7 +73,6 @@ fun Activity.launchCamera() { fun SimpleActivity.launchAbout() { val faqItems = arrayListOf( - FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons), FAQItem(R.string.faq_3_title_commons, R.string.faq_3_text_commons), FAQItem(R.string.faq_1_title, R.string.faq_1_text), FAQItem(R.string.faq_2_title, R.string.faq_2_text), @@ -83,9 +82,10 @@ fun SimpleActivity.launchAbout() { FAQItem(R.string.faq_6_title, R.string.faq_6_text), FAQItem(R.string.faq_7_title, R.string.faq_7_text), FAQItem(R.string.faq_8_title, R.string.faq_8_text), - FAQItem(R.string.faq_9_title, R.string.faq_9_text)) + FAQItem(R.string.faq_9_title, R.string.faq_9_text), + FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons)) - startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_MULTISELECT or LICENSE_RTL + startAboutActivity(R.string.app_name, LICENSE_GLIDE or LICENSE_CROPPER or LICENSE_MULTISELECT or LICENSE_RTL or LICENSE_SUBSAMPLING or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GIF_DRAWABLE or LICENSE_PHOTOVIEW, BuildConfig.VERSION_NAME, faqItems) } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index f704912b6..af1cfc27d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -14,6 +14,7 @@ import android.view.animation.AnimationUtils import android.widget.SeekBar import android.widget.TextView import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.isJellyBean1Plus import com.simplemobiletools.gallery.BuildConfig import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.VideoActivity @@ -433,7 +434,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee val screenWidth: Int val screenHeight: Int - if (activity!!.isJellyBean1Plus()) { + if (isJellyBean1Plus()) { val realMetrics = DisplayMetrics() display.getRealMetrics(realMetrics) screenWidth = realMetrics.widthPixels diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt index c4ae2a234..22e81776e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -104,7 +104,7 @@ class MediaFetcher(val context: Context) { private fun getSelectionQuery(path: String): String? { val dataQuery = "${MediaStore.Images.Media.DATA} LIKE ?" return if (path.isEmpty()) { - if (context.isAndroidFour()) + if (isAndroidFour()) return null var query = "($dataQuery)" @@ -119,7 +119,7 @@ class MediaFetcher(val context: Context) { private fun getSelectionArgsQuery(path: String): Array? { return if (path.isEmpty()) { - if (context.isAndroidFour()) { + if (isAndroidFour()) { return null }