Skip to content

Commit

Permalink
🐛 [Android] Use RELATIVE_PATH only on Android Q+ (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Aug 4, 2022
1 parent 98ef9fd commit d29f4c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ that can be found in the LICENSE file. -->

# CHANGELOG

## 2.2.0-dev.5

### Fixes

- Fix invalid `RELATIVE_PATH` obtains with cursors on Android Q-. (#810)

## 2.2.0-dev.4

### Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ interface IDBUtils {
val displayName = getString(MediaStore.MediaColumns.DISPLAY_NAME)
val modifiedDate = getLong(MediaStore.MediaColumns.DATE_MODIFIED)
val orientation: Int = getInt(MediaStore.MediaColumns.ORIENTATION)
val relativePath: String = getString(MediaStore.MediaColumns.RELATIVE_PATH)
val relativePath: String? = if (isAndroidQ) getString(MediaStore.MediaColumns.RELATIVE_PATH) else null
if ((width == 0 || height == 0) && !mimeType.contains("svg")) {
try {
val uri = getUri(id, getMediaType(type))
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: photo_manager
description: A Flutter plugin that provides assets abstraction management APIs on Android, iOS, and macOS.
version: 2.2.0-dev.4
homepage: https://github.com/fluttercandies/flutter_photo_manager
repository: https://github.com/fluttercandies/flutter_photo_manager
version: 2.2.0-dev.5

environment:
sdk: ">=2.13.0 <3.0.0"
Expand Down

0 comments on commit d29f4c6

Please sign in to comment.