mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-18 06:17:59 +01:00
small tweak to viewpager cursor
This commit is contained in:
parent
6248f0db76
commit
5beadedfe2
1 changed files with 2 additions and 4 deletions
|
@ -73,10 +73,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
try {
|
||||
val proj = arrayOf(MediaStore.Images.Media.DATA)
|
||||
cursor = contentResolver.query(uri, proj, null, null, null)
|
||||
if (cursor != null) {
|
||||
val dataIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA)
|
||||
cursor.moveToFirst()
|
||||
mPath = cursor.getString(dataIndex)
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
mPath = cursor.getStringValue(MediaStore.Images.Media.DATA)
|
||||
}
|
||||
} finally {
|
||||
cursor?.close()
|
||||
|
|
Loading…
Reference in a new issue