parse color in try/catch block

This commit is contained in:
tobiasKaminsky 2017-06-14 09:29:42 +02:00
parent 6ab67f9c9d
commit 350d54f614
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -779,9 +779,9 @@ public class DisplayUtils {
public static int primaryColor() {
OCCapability capability = getCapability();
if (!capability.getServerColor().isEmpty()) {
try {
return Color.parseColor(capability.getServerColor());
} else {
} catch (Exception e) {
return MainApp.getAppContext().getResources().getColor(R.color.primary);
}
}