Compile with SDK 33

pull/208/head
M66B 3 years ago
parent 86ed20a1bd
commit 6b5de123e8

@ -16,7 +16,7 @@ if (rootProject.file("local.properties").exists())
localProperties.load(new FileInputStream(rootProject.file("local.properties"))) localProperties.load(new FileInputStream(rootProject.file("local.properties")))
android { android {
compileSdkVersion 32 compileSdkVersion 33
namespace 'eu.faircode.email' namespace 'eu.faircode.email'
// https://apilevels.com/ // https://apilevels.com/

@ -58,6 +58,7 @@ import android.provider.CalendarContract;
import android.provider.ContactsContract; import android.provider.ContactsContract;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.provider.Settings; import android.provider.Settings;
import android.text.Layout;
import android.text.Spannable; import android.text.Spannable;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
@ -879,7 +880,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvBody = vsBody.findViewById(R.id.tvBody); tvBody = vsBody.findViewById(R.id.tvBody);
if (BuildConfig.DEBUG && BuildCompat.isAtLeastT()) { if (BuildConfig.DEBUG && BuildCompat.isAtLeastT()) {
tvBody.setHyphenationFrequency(4 /* HYPHENATION_FREQUENCY_FULL_FAST */); tvBody.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL_FAST);
tvBody.setBreakStrategy(LineBreaker.BREAK_STRATEGY_HIGH_QUALITY); tvBody.setBreakStrategy(LineBreaker.BREAK_STRATEGY_HIGH_QUALITY);
} }
wvBody = vsBody.findViewById(R.id.wvBody); wvBody = vsBody.findViewById(R.id.wvBody);

@ -3045,13 +3045,14 @@ public class FragmentCompose extends FragmentBase {
} else { } else {
// https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES // https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES
// Android 12: cmd device_config put storage_native_boot picker_intent_enabled true // Android 12: cmd device_config put storage_native_boot picker_intent_enabled true
Intent picker = new Intent("android.provider.action.PICK_IMAGES"); Intent picker = new Intent(MediaStore.ACTION_PICK_IMAGES);
picker.putExtra("android.provider.extra.PICK_IMAGES_MAX", 10);
picker.setType("image/*"); picker.setType("image/*");
if (BuildCompat.isAtLeastT() && if (BuildCompat.isAtLeastT() && picker.resolveActivity(pm) != null) {
picker.resolveActivity(pm) != null) Log.i("Using photo picker");
picker.putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, MediaStore.getPickImagesMaxLimit());
startActivityForResult(picker, REQUEST_IMAGE_FILE); startActivityForResult(picker, REQUEST_IMAGE_FILE);
else { } else {
Log.i("Using file picker");
Intent intent = new Intent(Intent.ACTION_GET_CONTENT); Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.addCategory(Intent.CATEGORY_OPENABLE); intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("image/*"); intent.setType("image/*");

Loading…
Cancel
Save