mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-03-17 17:10:04 +01:00
Fix some lint errors
This commit is contained in:
parent
8347e680a8
commit
54ace84249
2 changed files with 7 additions and 8 deletions
|
@ -401,7 +401,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
if (mCurrentPathPrefix.isEmpty()) {
|
if (mCurrentPathPrefix.isEmpty()) {
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
} else {
|
} else {
|
||||||
mOpenedSubfolders.removeLast()
|
mOpenedSubfolders.removeAt(mOpenedSubfolders.lastIndex)
|
||||||
mCurrentPathPrefix = mOpenedSubfolders.last()
|
mCurrentPathPrefix = mOpenedSubfolders.last()
|
||||||
setupAdapter(mDirs)
|
setupAdapter(mDirs)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
package org.fossify.gallery.activities
|
package org.fossify.gallery.activities
|
||||||
|
|
||||||
import android.app.Activity
|
|
||||||
import android.app.WallpaperManager
|
import android.app.WallpaperManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
|
import androidx.core.net.toUri
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
@ -318,7 +317,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||||
if (requestCode == REQUEST_EDIT_IMAGE) {
|
if (requestCode == REQUEST_EDIT_IMAGE) {
|
||||||
if (resultCode == Activity.RESULT_OK && resultData != null) {
|
if (resultCode == RESULT_OK && resultData != null) {
|
||||||
mMedia.clear()
|
mMedia.clear()
|
||||||
refreshItems()
|
refreshItems()
|
||||||
}
|
}
|
||||||
|
@ -944,7 +943,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
WallpaperManager.getInstance(applicationContext).setBitmap(resource)
|
WallpaperManager.getInstance(applicationContext).setBitmap(resource)
|
||||||
setResult(Activity.RESULT_OK)
|
setResult(RESULT_OK)
|
||||||
} catch (ignored: IOException) {
|
} catch (ignored: IOException) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -953,8 +952,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
})
|
})
|
||||||
} else if (mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent) {
|
} else if (mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent) {
|
||||||
Intent().apply {
|
Intent().apply {
|
||||||
data = Uri.parse(path)
|
data = path.toUri()
|
||||||
setResult(Activity.RESULT_OK, this)
|
setResult(RESULT_OK, this)
|
||||||
}
|
}
|
||||||
finish()
|
finish()
|
||||||
} else {
|
} else {
|
||||||
|
@ -1091,7 +1090,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
override fun selectedPaths(paths: ArrayList<String>) {
|
override fun selectedPaths(paths: ArrayList<String>) {
|
||||||
Intent().apply {
|
Intent().apply {
|
||||||
putExtra(PICKED_PATHS, paths)
|
putExtra(PICKED_PATHS, paths)
|
||||||
setResult(Activity.RESULT_OK, this)
|
setResult(RESULT_OK, this)
|
||||||
}
|
}
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue