mirror of https://github.com/M66B/FairEmail.git
Added fail-safe
This commit is contained in:
parent
389f2acfb6
commit
fde0e11769
|
@ -512,8 +512,13 @@ public class ConnectionHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean airplaneMode(Context context) {
|
static boolean airplaneMode(Context context) {
|
||||||
return Settings.Global.getInt(context.getContentResolver(),
|
try {
|
||||||
Settings.Global.AIRPLANE_MODE_ON, 0) != 0;
|
return (Settings.Global.getInt(context.getContentResolver(),
|
||||||
|
Settings.Global.AIRPLANE_MODE_ON, 0) != 0);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static InetAddress from6to4(InetAddress addr) {
|
static InetAddress from6to4(InetAddress addr) {
|
||||||
|
|
Loading…
Reference in New Issue