From a6e62ddc1ba19563d87f24a61ea7d895f4f3752e Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 6 Mar 2017 22:57:23 +0100 Subject: [PATCH] add the nougat check back at thumbnail activity --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 1 - .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index e7f6caf0a..b600d1ae1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -7,7 +7,6 @@ import android.content.pm.PackageManager import android.os.Bundle import android.provider.MediaStore import android.support.v4.app.ActivityCompat -import android.support.v4.content.FileProvider import android.support.v7.widget.GridLayoutManager import android.view.Menu import android.view.MenuItem diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 48f818bcd..3fc11f4aa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -5,6 +5,7 @@ import android.app.WallpaperManager import android.content.Intent import android.graphics.Bitmap import android.net.Uri +import android.os.Build import android.os.Bundle import android.support.v7.widget.GridLayoutManager import android.util.Log @@ -332,7 +333,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } else { val file = File(path) val isVideo = file.isVideoFast() - if (isVideo) { + val isNougat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N + if (isVideo && !isNougat) { openWith(file, false) } else { Intent(this, ViewPagerActivity::class.java).apply {