Target SDK 31

pull/200/head
M66B 4 years ago
parent 4580720856
commit 69fd709718

@ -12,12 +12,12 @@ def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android { android {
compileSdkVersion 30 compileSdkVersion 31
defaultConfig { defaultConfig {
applicationId "eu.faircode.email" applicationId "eu.faircode.email"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 31
versionCode getVersionCode() versionCode getVersionCode()
versionName "1." + getVersionCode() versionName "1." + getVersionCode()
archivesBaseName = "FairEmail-v$versionName" archivesBaseName = "FairEmail-v$versionName"
@ -279,7 +279,7 @@ dependencies {
def requery_version = "3.36.0" def requery_version = "3.36.0"
def paging_version = "2.1.2" // 3.0.0 def paging_version = "2.1.2" // 3.0.0
def preference_version = "1.1.1" def preference_version = "1.1.1"
def work_version = "2.6.0-beta01" def work_version = "2.7.0-alpha04"
def exif_version = "1.3.2" def exif_version = "1.3.2"
def biometric_version = "1.2.0-alpha03" def biometric_version = "1.2.0-alpha03"
def billingclient_version = "3.0.3" def billingclient_version = "3.0.3"

@ -52,9 +52,8 @@ public class AlarmManagerCompatEx {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R)
return true; return true;
else { else {
//AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
//return am.canScheduleExactAlarms(); return am.canScheduleExactAlarms();
return true;
} }
} }
} }

@ -1698,6 +1698,10 @@ public class Log {
.append(" night=").append(Helper.isNight(context)) .append(" night=").append(Helper.isNight(context))
.append("\r\n"); .append("\r\n");
sb.append("canScheduleExactAlarms=")
.append(AlarmManagerCompatEx.canScheduleExactAlarms(context))
.append("\r\n");
sb.append("Transliterate: ") sb.append("Transliterate: ")
.append(TextHelper.canTransliterate()) .append(TextHelper.canTransliterate())
.append("\r\n"); .append("\r\n");

@ -30,8 +30,6 @@ public class PendingIntentCompat {
private PendingIntentCompat() { private PendingIntentCompat() {
} }
public static int FLAG_MUTABLE = 0x02000000;
public static PendingIntent getActivity(Context context, int requestCode, Intent intent, int flags) { public static PendingIntent getActivity(Context context, int requestCode, Intent intent, int flags) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
return PendingIntent.getActivity(context, requestCode, intent, flags); return PendingIntent.getActivity(context, requestCode, intent, flags);

@ -91,7 +91,7 @@ public class WidgetUnified extends AppWidgetProvider {
thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(type)); thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(type));
thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent piItem = PendingIntent.getActivity( PendingIntent piItem = PendingIntent.getActivity(
context, ActivityView.PI_WIDGET, thread, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntentCompat.FLAG_MUTABLE); context, ActivityView.PI_WIDGET, thread, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
views.setPendingIntentTemplate(R.id.lv, piItem); views.setPendingIntentTemplate(R.id.lv, piItem);

Loading…
Cancel
Save