mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 03:05:31 +00:00
Prevent crash
This commit is contained in:
parent
27e782f4c1
commit
1a5058eb3f
1 changed files with 5 additions and 4 deletions
|
@ -913,12 +913,13 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
Log.w("Inferring type of value=" + value);
|
||||
if (value instanceof Boolean)
|
||||
editor.putBoolean(key, (Boolean) value);
|
||||
else if (value instanceof Integer)
|
||||
else if (value instanceof Integer) {
|
||||
Integer i = (Integer) value;
|
||||
if (key.endsWith(".account"))
|
||||
editor.putLong(key, (Long) value);
|
||||
editor.putLong(key, Long.valueOf(i));
|
||||
else
|
||||
editor.putInt(key, (Integer) value);
|
||||
else if (value instanceof Long)
|
||||
editor.putInt(key, i);
|
||||
} else if (value instanceof Long)
|
||||
editor.putLong(key, (Long) value);
|
||||
else if (value instanceof String)
|
||||
editor.putString(key, (String) value);
|
||||
|
|
Loading…
Reference in a new issue