1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-13 20:24:14 +02:00

should fixed issue #952 with old Android smartphones which don't know BLUETOOTH_SCAN permission.

This commit is contained in:
oliexdev
2023-07-22 18:12:17 +02:00
parent 60bcfd8d30
commit c085a6a097

View File

@@ -199,7 +199,7 @@ public class BluetoothSettingsFragment extends Fragment {
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
} else if (shouldShowRequestPermissionRationale(Manifest.permission.BLUETOOTH_SCAN)) {
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && targetSdkVersion >= Build.VERSION_CODES.S && shouldShowRequestPermissionRationale(Manifest.permission.BLUETOOTH_SCAN)) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
Timber.d("No access Bluetooth scan permission granted");