mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-10 11:35:11 -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 val = address.hashCode();
|
||||||
int rgb = CONTACT_DUMMY_COLORS_ARGB[Math.abs(val) % CONTACT_DUMMY_COLORS_ARGB.length];
|
int colorIndex = (val & Integer.MAX_VALUE) % CONTACT_DUMMY_COLORS_ARGB.length;
|
||||||
return rgb;
|
return CONTACT_DUMMY_COLORS_ARGB[colorIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
private String calcUnknownContactLetter(Address address) {
|
private String calcUnknownContactLetter(Address address) {
|
||||||
|
Loading…
Reference in New Issue
Block a user