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

Commit 0f888de0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Resupport long compare"

parents 3b9999ed bcc71c55
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -233,6 +233,11 @@ bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher,
                    (matcher.eq_int() == values[i].mValue.int_value)) {
                    return true;
                }
                // eq_int covers both int and long.
                if (values[i].mValue.getType() == LONG &&
                    (matcher.eq_int() == values[i].mValue.long_value)) {
                    return true;
                }
            }
            return false;
        case FieldValueMatcher::ValueMatcherCase::kLtInt:
@@ -241,6 +246,11 @@ bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher,
                    (values[i].mValue.int_value < matcher.lt_int())) {
                    return true;
                }
                // lt_int covers both int and long.
                if (values[i].mValue.getType() == LONG &&
                    (values[i].mValue.long_value < matcher.lt_int())) {
                    return true;
                }
            }
            return false;
        case FieldValueMatcher::ValueMatcherCase::kGtInt:
@@ -249,6 +259,11 @@ bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher,
                    (values[i].mValue.int_value > matcher.gt_int())) {
                    return true;
                }
                // gt_int covers both int and long.
                if (values[i].mValue.getType() == LONG &&
                    (values[i].mValue.long_value > matcher.gt_int())) {
                    return true;
                }
            }
            return false;
        case FieldValueMatcher::ValueMatcherCase::kLtFloat:
@@ -273,6 +288,11 @@ bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher,
                    (values[i].mValue.int_value <= matcher.lte_int())) {
                    return true;
                }
                // lte_int covers both int and long.
                if (values[i].mValue.getType() == LONG &&
                    (values[i].mValue.long_value <= matcher.lte_int())) {
                    return true;
                }
            }
            return false;
        case FieldValueMatcher::ValueMatcherCase::kGteInt:
@@ -281,6 +301,11 @@ bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher,
                    (values[i].mValue.int_value >= matcher.gte_int())) {
                    return true;
                }
                // gte_int covers both int and long.
                if (values[i].mValue.getType() == LONG &&
                    (values[i].mValue.long_value >= matcher.gte_int())) {
                    return true;
                }
            }
            return false;
        default: