Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fornewid committed Dec 8, 2023
1 parent f9e4453 commit b8e7337
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package soup.movie.feature.notification.impl

import android.app.PendingIntent
import android.content.Context
import android.os.Build
import dagger.hilt.android.qualifiers.ApplicationContext
import soup.movie.feature.navigator.AppNavigator
import soup.movie.feature.notification.ShowPushNotificationUseCase
Expand Down Expand Up @@ -64,7 +65,12 @@ class ShowPushNotificationUseCaseImpl @Inject constructor(

private fun createLauncherIntent(): PendingIntent {
val intent = navigator.createIntentToMain()
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT)
val flags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
PendingIntent.FLAG_ONE_SHOT or PendingIntent.FLAG_MUTABLE
} else {
PendingIntent.FLAG_ONE_SHOT
}
return PendingIntent.getActivity(context, 0, intent, flags)
}

companion object {
Expand Down
3 changes: 0 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true

# Allow data binding to be incremental
android.databinding.incremental=true

# Allow kapt to use workers, incremental processing
kapt.incremental.apt=true
kapt.include.compile.classpath=false
Expand Down

0 comments on commit b8e7337

Please sign in to comment.