mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 10:33:41 +02:00
@@ -4520,9 +4520,6 @@ class Core {
|
||||
String sound = prefs.getString("sound", null);
|
||||
boolean alert_once = prefs.getBoolean("alert_once", true);
|
||||
|
||||
if (Helper.inCar(context))
|
||||
notify_messaging = true;
|
||||
|
||||
// Get contact info
|
||||
Map<Long, Address[]> messageFrom = new HashMap<>();
|
||||
Map<Long, ContactInfo[]> messageInfo = new HashMap<>();
|
||||
|
||||
@@ -26,7 +26,6 @@ import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.KeyguardManager;
|
||||
import android.app.UiModeManager;
|
||||
import android.app.usage.UsageStatsManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ComponentName;
|
||||
@@ -1042,17 +1041,6 @@ public class Helper {
|
||||
return (Build.VERSION.SDK_INT > Build.VERSION_CODES.R && false);
|
||||
}
|
||||
|
||||
static boolean inCar(Context context) {
|
||||
try {
|
||||
UiModeManager uimm =
|
||||
(UiModeManager) context.getSystemService(Context.UI_MODE_SERVICE);
|
||||
return (uimm.getCurrentModeType() == Configuration.UI_MODE_TYPE_CAR);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void reportNoViewer(Context context, Uri uri) {
|
||||
reportNoViewer(context, new Intent().setData(uri));
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import android.app.Dialog;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.UiModeManager;
|
||||
import android.app.usage.UsageStatsManager;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
@@ -1762,17 +1761,6 @@ public class Log {
|
||||
.append(" night=").append(Helper.isNight(context))
|
||||
.append("\r\n");
|
||||
|
||||
int mode;
|
||||
try {
|
||||
UiModeManager uimm =
|
||||
(UiModeManager) context.getSystemService(Context.UI_MODE_SERVICE);
|
||||
mode = uimm.getCurrentModeType();
|
||||
} catch (Throwable ex) {
|
||||
mode = -1;
|
||||
Log.w(ex);
|
||||
}
|
||||
sb.append(String.format("In car=%b mode=%d\r\n", Helper.inCar(context), mode));
|
||||
|
||||
sb.append("ExactAlarms")
|
||||
.append(" can=")
|
||||
.append(AlarmManagerCompatEx.canScheduleExactAlarms(context))
|
||||
|
||||
Reference in New Issue
Block a user