mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
Remove now obsolete suppress lint annotations
They are no longer needed as the update in Simple-Common project.
This commit is contained in:
parent
d4bf065cb5
commit
55499815c3
6 changed files with 13 additions and 18 deletions
|
@ -1,6 +1,5 @@
|
||||||
package com.simplemobiletools.gallery.pro.activities
|
package com.simplemobiletools.gallery.pro.activities
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.WallpaperManager
|
import android.app.WallpaperManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
@ -100,7 +99,6 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete
|
||||||
setupAspectRatio()
|
setupAspectRatio()
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("InlinedApi")
|
|
||||||
private fun confirmWallpaper() {
|
private fun confirmWallpaper() {
|
||||||
if (isNougatPlus()) {
|
if (isNougatPlus()) {
|
||||||
val items = arrayListOf(
|
val items = arrayListOf(
|
||||||
|
@ -118,7 +116,6 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
|
||||||
override fun onCropImageComplete(view: CropImageView?, result: CropImageView.CropResult) {
|
override fun onCropImageComplete(view: CropImageView?, result: CropImageView.CropResult) {
|
||||||
if (isDestroyed)
|
if (isDestroyed)
|
||||||
return
|
return
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.simplemobiletools.gallery.pro.activities
|
package com.simplemobiletools.gallery.pro.activities
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.database.ContentObserver
|
import android.database.ContentObserver
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.provider.MediaStore.Images
|
import android.provider.MediaStore.Images
|
||||||
|
@ -56,7 +55,6 @@ open class SimpleActivity : BaseSimpleActivity() {
|
||||||
|
|
||||||
override fun getAppLauncherName() = getString(R.string.app_launcher_name)
|
override fun getAppLauncherName() = getString(R.string.app_launcher_name)
|
||||||
|
|
||||||
@SuppressLint("InlinedApi")
|
|
||||||
protected fun checkNotchSupport() {
|
protected fun checkNotchSupport() {
|
||||||
if (isPiePlus()) {
|
if (isPiePlus()) {
|
||||||
val cutoutMode = when {
|
val cutoutMode = when {
|
||||||
|
|
|
@ -27,6 +27,7 @@ import android.view.View
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import android.view.animation.DecelerateInterpolator
|
import android.view.animation.DecelerateInterpolator
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.exifinterface.media.ExifInterface
|
import androidx.exifinterface.media.ExifInterface
|
||||||
import androidx.print.PrintHelper
|
import androidx.print.PrintHelper
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
@ -238,7 +239,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
R.id.menu_force_landscape -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
|
R.id.menu_force_landscape -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
|
||||||
R.id.menu_default_orientation -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
|
R.id.menu_default_orientation -> toggleOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
|
||||||
R.id.menu_save_as -> saveImageAs()
|
R.id.menu_save_as -> saveImageAs()
|
||||||
R.id.menu_create_shortcut -> createShortcut()
|
R.id.menu_create_shortcut -> if (isOreoPlus()) createShortcut()
|
||||||
R.id.menu_resize -> resizeImage()
|
R.id.menu_resize -> resizeImage()
|
||||||
R.id.menu_settings -> launchSettings()
|
R.id.menu_settings -> launchSettings()
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
|
@ -333,7 +334,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
|
||||||
private fun initContinue() {
|
private fun initContinue() {
|
||||||
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
||||||
if (isShowHiddenFlagNeeded()) {
|
if (isShowHiddenFlagNeeded()) {
|
||||||
|
@ -716,7 +716,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
private fun createShortcut() {
|
private fun createShortcut() {
|
||||||
val manager = getSystemService(ShortcutManager::class.java)
|
val manager = getSystemService(ShortcutManager::class.java)
|
||||||
if (manager.isRequestPinShortcutSupported) {
|
if (manager.isRequestPinShortcutSupported) {
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
package com.simplemobiletools.gallery.pro.adapters
|
package com.simplemobiletools.gallery.pro.adapters
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.ShortcutInfo
|
import android.content.pm.ShortcutInfo
|
||||||
import android.content.pm.ShortcutManager
|
import android.content.pm.ShortcutManager
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.graphics.drawable.Icon
|
import android.graphics.drawable.Icon
|
||||||
|
import android.os.Build
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
|
@ -156,7 +157,7 @@ class DirectoryAdapter(
|
||||||
R.id.cab_copy_to -> copyMoveTo(true)
|
R.id.cab_copy_to -> copyMoveTo(true)
|
||||||
R.id.cab_move_to -> moveFilesTo()
|
R.id.cab_move_to -> moveFilesTo()
|
||||||
R.id.cab_select_all -> selectAll()
|
R.id.cab_select_all -> selectAll()
|
||||||
R.id.cab_create_shortcut -> tryCreateShortcut()
|
R.id.cab_create_shortcut -> if (isOreoPlus()) tryCreateShortcut()
|
||||||
R.id.cab_delete -> askConfirmDelete()
|
R.id.cab_delete -> askConfirmDelete()
|
||||||
R.id.cab_select_photo -> tryChangeAlbumCover(false)
|
R.id.cab_select_photo -> tryChangeAlbumCover(false)
|
||||||
R.id.cab_use_default -> tryChangeAlbumCover(true)
|
R.id.cab_use_default -> tryChangeAlbumCover(true)
|
||||||
|
@ -539,6 +540,7 @@ class DirectoryAdapter(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
private fun tryCreateShortcut() {
|
private fun tryCreateShortcut() {
|
||||||
activity.handleLockedFolderOpening(getFirstSelectedItemPath() ?: "") { success ->
|
activity.handleLockedFolderOpening(getFirstSelectedItemPath() ?: "") { success ->
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -547,7 +549,7 @@ class DirectoryAdapter(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
private fun createShortcut() {
|
private fun createShortcut() {
|
||||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||||
if (manager.isRequestPinShortcutSupported) {
|
if (manager.isRequestPinShortcutSupported) {
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
package com.simplemobiletools.gallery.pro.adapters
|
package com.simplemobiletools.gallery.pro.adapters
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.ShortcutInfo
|
import android.content.pm.ShortcutInfo
|
||||||
import android.content.pm.ShortcutManager
|
import android.content.pm.ShortcutManager
|
||||||
import android.graphics.drawable.Icon
|
import android.graphics.drawable.Icon
|
||||||
|
import android.os.Build
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
|
import com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
|
||||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||||
|
@ -34,8 +35,8 @@ import com.simplemobiletools.gallery.pro.models.ThumbnailSection
|
||||||
import kotlinx.android.synthetic.main.photo_item_grid.view.*
|
import kotlinx.android.synthetic.main.photo_item_grid.view.*
|
||||||
import kotlinx.android.synthetic.main.thumbnail_section.view.*
|
import kotlinx.android.synthetic.main.thumbnail_section.view.*
|
||||||
import kotlinx.android.synthetic.main.video_item_grid.view.*
|
import kotlinx.android.synthetic.main.video_item_grid.view.*
|
||||||
import kotlinx.android.synthetic.main.video_item_grid.view.media_item_holder
|
|
||||||
import kotlinx.android.synthetic.main.video_item_grid.view.favorite
|
import kotlinx.android.synthetic.main.video_item_grid.view.favorite
|
||||||
|
import kotlinx.android.synthetic.main.video_item_grid.view.media_item_holder
|
||||||
import kotlinx.android.synthetic.main.video_item_grid.view.medium_check
|
import kotlinx.android.synthetic.main.video_item_grid.view.medium_check
|
||||||
import kotlinx.android.synthetic.main.video_item_grid.view.medium_name
|
import kotlinx.android.synthetic.main.video_item_grid.view.medium_name
|
||||||
import kotlinx.android.synthetic.main.video_item_grid.view.medium_thumbnail
|
import kotlinx.android.synthetic.main.video_item_grid.view.medium_thumbnail
|
||||||
|
@ -174,7 +175,7 @@ class MediaAdapter(
|
||||||
R.id.cab_rotate_one_eighty -> rotateSelection(180)
|
R.id.cab_rotate_one_eighty -> rotateSelection(180)
|
||||||
R.id.cab_copy_to -> copyMoveTo(true)
|
R.id.cab_copy_to -> copyMoveTo(true)
|
||||||
R.id.cab_move_to -> moveFilesTo()
|
R.id.cab_move_to -> moveFilesTo()
|
||||||
R.id.cab_create_shortcut -> createShortcut()
|
R.id.cab_create_shortcut -> if (isOreoPlus()) createShortcut()
|
||||||
R.id.cab_select_all -> selectAll()
|
R.id.cab_select_all -> selectAll()
|
||||||
R.id.cab_open_with -> openPath()
|
R.id.cab_open_with -> openPath()
|
||||||
R.id.cab_fix_date_taken -> fixDateTaken()
|
R.id.cab_fix_date_taken -> fixDateTaken()
|
||||||
|
@ -386,7 +387,7 @@ class MediaAdapter(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
private fun createShortcut() {
|
private fun createShortcut() {
|
||||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||||
if (manager.isRequestPinShortcutSupported) {
|
if (manager.isRequestPinShortcutSupported) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.simplemobiletools.gallery.pro.helpers
|
package com.simplemobiletools.gallery.pro.helpers
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.content.ContentResolver
|
import android.content.ContentResolver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.database.Cursor
|
import android.database.Cursor
|
||||||
|
@ -119,7 +118,6 @@ class MediaFetcher(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
|
||||||
private fun getLatestFileFolders(): LinkedHashSet<String> {
|
private fun getLatestFileFolders(): LinkedHashSet<String> {
|
||||||
val uri = Files.getContentUri("external")
|
val uri = Files.getContentUri("external")
|
||||||
val projection = arrayOf(Images.ImageColumns.DATA)
|
val projection = arrayOf(Images.ImageColumns.DATA)
|
||||||
|
@ -408,7 +406,6 @@ class MediaFetcher(val context: Context) {
|
||||||
return media
|
return media
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("InlinedApi")
|
|
||||||
fun getAndroid11FolderMedia(
|
fun getAndroid11FolderMedia(
|
||||||
isPickImage: Boolean, isPickVideo: Boolean, favoritePaths: ArrayList<String>
|
isPickImage: Boolean, isPickVideo: Boolean, favoritePaths: ArrayList<String>
|
||||||
): HashMap<String, ArrayList<Medium>> {
|
): HashMap<String, ArrayList<Medium>> {
|
||||||
|
|
Loading…
Reference in a new issue