mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Fix bug caused by edge case of Math.abs()
This commit is contained in:
parent
928c7f33a3
commit
65d2de0fcc
@ -156,8 +156,8 @@ public class ContactPictureLoader {
|
||||
}
|
||||
|
||||
int val = address.hashCode();
|
||||
int rgb = CONTACT_DUMMY_COLORS_ARGB[Math.abs(val) % CONTACT_DUMMY_COLORS_ARGB.length];
|
||||
return rgb;
|
||||
int colorIndex = (val & Integer.MAX_VALUE) % CONTACT_DUMMY_COLORS_ARGB.length;
|
||||
return CONTACT_DUMMY_COLORS_ARGB[colorIndex];
|
||||
}
|
||||
|
||||
private String calcUnknownContactLetter(Address address) {
|
||||
|
Loading…
Reference in New Issue
Block a user