Skip to content

Commit

Permalink
Lower minSdk to 21
Browse files Browse the repository at this point in the history
  • Loading branch information
iwb-florien-flament authored and saket committed Jul 2, 2024
1 parent f0201b8 commit 08d564e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
minSdk = "23"
minSdk = "21"
compileSdk = "34"
kotlin = "1.9.24"
agp = "8.4.0" # https://maven.google.com/web/index.html?q=gradle.plugin#com.android.library:com.android.library.gradle.plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ internal actual fun CompositionLocalConsumerModifierNode.hapticFeedbackPerformer
currentValueOf(LocalView).performHapticFeedback(
if (Build.VERSION.SDK_INT >= 30) {
HapticFeedbackConstants.GESTURE_END
} else {
} else if (Build.VERSION.SDK_INT >= 23) {
// PhoneWindowManager#getVibrationEffect() maps
// GESTURE_END and CONTEXT_CLICK to the same effect.
HapticFeedbackConstants.CONTEXT_CLICK
} else {
// PhoneWindowManager#getVibrationEffect() maps
// GESTURE_END and CLOCK_TICK to the same effect.
HapticFeedbackConstants.CLOCK_TICK
}
)
}
Expand Down

0 comments on commit 08d564e

Please sign in to comment.