diff --git a/catroid/src/main/java/org/catrobat/catroid/ui/runtimepermissions/PermissionRequestActivityExtension.java b/catroid/src/main/java/org/catrobat/catroid/ui/runtimepermissions/PermissionRequestActivityExtension.java index 4cb7b5bdfd9..7fab45f577e 100644 --- a/catroid/src/main/java/org/catrobat/catroid/ui/runtimepermissions/PermissionRequestActivityExtension.java +++ b/catroid/src/main/java/org/catrobat/catroid/ui/runtimepermissions/PermissionRequestActivityExtension.java @@ -1,6 +1,6 @@ /* * Catroid: An on-device visual programming system for Android devices - * Copyright (C) 2010-2022 The Catrobat Team + * Copyright (C) 2010-2024 The Catrobat Team * () * * This program is free software: you can redistribute it and/or modify @@ -23,12 +23,10 @@ package org.catrobat.catroid.ui.runtimepermissions; -import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface.OnClickListener; import android.content.pm.PackageManager; -import android.os.Build; import android.view.ContextThemeWrapper; import org.catrobat.catroid.R; @@ -84,9 +82,8 @@ private RequiresPermissionTask popAllWithSameIdRequiredPermissionTask(int reques return matchedTask; } - @TargetApi(23) private void showPermissionRationale(final Activity activity, final RequiresPermissionTask task) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && activity.shouldShowRequestPermissionRationale(task.getPermissions().get(0))) { + if (activity.shouldShowRequestPermissionRationale(task.getPermissions().get(0))) { String message = activity.getResources().getString(task.getRationaleString()); OnClickListener okListener = (dialog, whichButton) -> {