Skip to content

Commit

Permalink
chore: use VERSION_CODE vs number for searching ease
Browse files Browse the repository at this point in the history
these were the only non-VERSION_CODE entries I could see
  • Loading branch information
mikehardy authored and david-allison committed Nov 11, 2024
1 parent b29c064 commit 230d705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/main/java/com/ichi2/anki/api/AddContentApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ public class AddContentApi(context: Context) {
// PackageManager#resolveContentProvider docs suggest flags should be 0 (but that gives null metadata)
// GET_META_DATA seems to work anyway
val info =
if (Build.VERSION.SDK_INT >= 33) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.packageManager.resolveContentProvider(
FlashCardsContract.AUTHORITY,
PackageManager.ComponentInfoFlags.of(
Expand Down Expand Up @@ -771,7 +771,7 @@ public class AddContentApi(context: Context) {
@JvmStatic // required for API
public fun getAnkiDroidPackageName(context: Context): String? {
val manager = context.packageManager
return if (Build.VERSION.SDK_INT >= 33) {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
manager.resolveContentProvider(
FlashCardsContract.AUTHORITY,
PackageManager.ComponentInfoFlags.of(0L)
Expand Down

0 comments on commit 230d705

Please sign in to comment.