Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 268ed36b authored by Fred Quintana's avatar Fred Quintana
Browse files

fix a crash when adding a group back to the sync set

in the contacts display groups UI

Change-Id: I9a24b02701628bf8d7495a6734e35a9a4731029e
http://b/issue?id=2522758
parent 6985dd8f
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -505,9 +505,15 @@ public final class ContactsPreferencesActivity extends ExpandableListActivity im
     */
    private static Comparator<GroupDelta> sIdComparator = new Comparator<GroupDelta>() {
        public int compare(GroupDelta object1, GroupDelta object2) {
            final long id1 = object1.getId();
            final long id2 = object2.getId();
            if (id1 < id2) {
            final Long id1 = object1.getId();
            final Long id2 = object2.getId();
            if (id1 == null && id2 == null) {
                return 0;
            } else if (id1 == null) {
                return -1;
            } else if (id2 == null) {
                return 1;
            } else if (id1 < id2) {
                return -1;
            } else if (id1 > id2) {
                return 1;