pull/208/head
M66B 3 years ago
parent 4f034b157e
commit 8cd0a811b4

@ -119,7 +119,6 @@ import androidx.constraintlayout.widget.Group;
import androidx.core.content.FileProvider; import androidx.core.content.FileProvider;
import androidx.core.content.pm.ShortcutInfoCompat; import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.graphics.ColorUtils; import androidx.core.graphics.ColorUtils;
import androidx.core.os.BuildCompat;
import androidx.core.view.MenuCompat; import androidx.core.view.MenuCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
@ -879,7 +878,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvSignedData = vsBody.findViewById(R.id.tvSignedData); tvSignedData = vsBody.findViewById(R.id.tvSignedData);
tvBody = vsBody.findViewById(R.id.tvBody); tvBody = vsBody.findViewById(R.id.tvBody);
if (BuildConfig.DEBUG && BuildCompat.isAtLeastT()) { if (BuildConfig.DEBUG &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
tvBody.setHyphenationFrequency(Layout.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);
} }

@ -125,7 +125,6 @@ import androidx.appcompat.widget.PopupMenu;
import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import androidx.constraintlayout.widget.Group; import androidx.constraintlayout.widget.Group;
import androidx.core.content.FileProvider; import androidx.core.content.FileProvider;
import androidx.core.os.BuildCompat;
import androidx.core.view.MenuCompat; import androidx.core.view.MenuCompat;
import androidx.core.view.WindowInsetsCompat; import androidx.core.view.WindowInsetsCompat;
import androidx.cursoradapter.widget.SimpleCursorAdapter; import androidx.cursoradapter.widget.SimpleCursorAdapter;
@ -3047,7 +3046,8 @@ public class FragmentCompose extends FragmentBase {
// 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(MediaStore.ACTION_PICK_IMAGES); Intent picker = new Intent(MediaStore.ACTION_PICK_IMAGES);
picker.setType("image/*"); picker.setType("image/*");
if (BuildCompat.isAtLeastT() && picker.resolveActivity(pm) != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
picker.resolveActivity(pm) != null) {
Log.i("Using photo picker"); Log.i("Using photo picker");
picker.putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, MediaStore.getPickImagesMaxLimit()); picker.putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, MediaStore.getPickImagesMaxLimit());
startActivityForResult(picker, REQUEST_IMAGE_FILE); startActivityForResult(picker, REQUEST_IMAGE_FILE);

@ -62,7 +62,6 @@ import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.PopupMenu; import androidx.appcompat.widget.PopupMenu;
import androidx.cardview.widget.CardView; import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.Group; import androidx.constraintlayout.widget.Group;
import androidx.core.os.BuildCompat;
import androidx.core.view.MenuCompat; import androidx.core.view.MenuCompat;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Lifecycle; import androidx.lifecycle.Lifecycle;
@ -970,7 +969,7 @@ public class FragmentSetup extends FragmentBase {
private List<String> getDesiredPermissions() { private List<String> getDesiredPermissions() {
List<String> permissions = new ArrayList<>(); List<String> permissions = new ArrayList<>();
permissions.add(Manifest.permission.READ_CONTACTS); permissions.add(Manifest.permission.READ_CONTACTS);
if (BuildCompat.isAtLeastT()) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
permissions.add(Manifest.permission.POST_NOTIFICATIONS); permissions.add(Manifest.permission.POST_NOTIFICATIONS);
return permissions; return permissions;
} }

Loading…
Cancel
Save