mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
parse color in try/catch block
This commit is contained in:
parent
6ab67f9c9d
commit
350d54f614
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue