Brian O'Connor
Committed by Gerrit Code Review

Changing equals in IntentUtils to return false if

intents are different classes.

This replaces the behavior where we throw a runtime exception.

Change-Id: I063621b683af186611b18f87c24e852e80c31977
......@@ -25,8 +25,6 @@ import org.slf4j.LoggerFactory;
import java.util.Objects;
import static com.google.common.base.Preconditions.checkArgument;
/**
* Utilities for dealing with intents.
*/
......@@ -50,8 +48,9 @@ public final class IntentUtils {
* @return true if the two intents represent the same value, otherwise false
*/
public static boolean equals(Intent one, Intent two) {
checkArgument(one.getClass() == two.getClass(),
"Intents are not the same type");
if (one.getClass() != two.getClass()) {
return false;
}
if (!(Objects.equals(one.appId(), two.appId()) &&
Objects.equals(one.key(), two.key()))) {
......