Skip to content

Commit

Permalink
fix crash on Android 12
Browse files Browse the repository at this point in the history
  • Loading branch information
sal0max committed Jan 5, 2022
1 parent 397095b commit 95f87df
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v2.4.2
* Fix crash on Android 12

## v2.4.1
* Updated library dependencies

Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/20402.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
• Fix crash on Android 12
6 changes: 3 additions & 3 deletions muzei-nationalgeographic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3'
// misc
implementation 'android.arch.work:work-runtime-ktx:1.0.1'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.github.sisyphsu:dateparser:1.0.9'
// test
Expand All @@ -50,8 +50,8 @@ android {
minSdkVersion 21
targetSdkVersion 31
// SemVer
versionName = "2.4.1"
versionCode = 20401
versionName = "2.4.2"
versionCode = 20402
archivesBaseName = "$applicationId-v$versionCode"
//
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class NationalGeographicArtProvider : MuzeiArtProvider() {
override fun getArtworkInfo(artwork: Artwork): PendingIntent? {
val context = context ?: return null
val intent = createPhotoDescriptionIntent(context, artwork)
return PendingIntent.getActivity(context, Random.nextInt(), intent, 0)
return PendingIntent.getActivity(context, Random.nextInt(), intent, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
}

private fun createPhotoDescriptionIntent(
Expand Down

0 comments on commit 95f87df

Please sign in to comment.