diff --git a/app/src/main/java/com/todoroo/astrid/api/CustomFilter.java b/app/src/main/java/com/todoroo/astrid/api/CustomFilter.java index 0090c065e..f370b2d12 100644 --- a/app/src/main/java/com/todoroo/astrid/api/CustomFilter.java +++ b/app/src/main/java/com/todoroo/astrid/api/CustomFilter.java @@ -5,7 +5,7 @@ import static com.todoroo.andlib.utility.AndroidUtilities.mapToSerializedString; import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.NonNull; -import org.tasks.Objects; +import com.google.common.base.Objects; import org.tasks.R; public class CustomFilter extends Filter { @@ -88,6 +88,6 @@ public class CustomFilter extends Filter { @Override public boolean areContentsTheSame(@NonNull FilterListItem other) { return super.areContentsTheSame(other) - && Objects.equals(criterion, ((CustomFilter) other).criterion); + && Objects.equal(criterion, ((CustomFilter) other).criterion); } } diff --git a/app/src/main/java/com/todoroo/astrid/api/Filter.java b/app/src/main/java/com/todoroo/astrid/api/Filter.java index 0d7b28a30..ae84f8282 100644 --- a/app/src/main/java/com/todoroo/astrid/api/Filter.java +++ b/app/src/main/java/com/todoroo/astrid/api/Filter.java @@ -10,11 +10,11 @@ import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.MenuRes; import androidx.annotation.NonNull; +import com.google.common.base.Objects; import com.todoroo.andlib.sql.QueryTemplate; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import org.tasks.Objects; /** * A FilterListFilter allows users to display tasks that have something in common. @@ -213,12 +213,12 @@ public class Filter extends FilterListItem { @Override public boolean areItemsTheSame(@NonNull FilterListItem other) { - return other instanceof Filter && Objects.equals(sqlQuery, ((Filter) other).sqlQuery); + return other instanceof Filter && Objects.equal(sqlQuery, ((Filter) other).sqlQuery); } @Override public boolean areContentsTheSame(@NonNull FilterListItem other) { return super.areContentsTheSame(other) - && Objects.equals(sqlQuery, ((Filter) other).sqlQuery); + && Objects.equal(sqlQuery, ((Filter) other).sqlQuery); } } diff --git a/app/src/main/java/com/todoroo/astrid/api/FilterListItem.java b/app/src/main/java/com/todoroo/astrid/api/FilterListItem.java index d91150268..a57bf05ed 100644 --- a/app/src/main/java/com/todoroo/astrid/api/FilterListItem.java +++ b/app/src/main/java/com/todoroo/astrid/api/FilterListItem.java @@ -10,7 +10,7 @@ import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; -import org.tasks.Objects; +import com.google.common.base.Objects; import org.tasks.R; /** @@ -56,7 +56,7 @@ public abstract class FilterListItem implements Parcelable { public abstract boolean areItemsTheSame(@NonNull FilterListItem other); public boolean areContentsTheSame(@NonNull FilterListItem other) { - return Objects.equals(listingTitle, other.listingTitle) + return Objects.equal(listingTitle, other.listingTitle) && icon == other.icon && tint == other.tint && count == other.count; diff --git a/app/src/main/java/org/tasks/Objects.java b/app/src/main/java/org/tasks/Objects.java deleted file mode 100644 index 042e6c22b..000000000 --- a/app/src/main/java/org/tasks/Objects.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.tasks; - -public class Objects { - private Objects() {} - - public static boolean equals(Object a, Object b) { - return (a == b) || (a != null && a.equals(b)); - } -}