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

Commit ba7369ab authored by Hans Boehm's avatar Hans Boehm Committed by Android (Google) Code Review
Browse files

Merge "Only set erroneous result of "required" evaluations." into ub-calculator-euler

parents b699be3e 03b3451e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ public class Evaluator implements CalculatorExpr.ExprResolver {

    public static final int INVALID_MSD = Integer.MAX_VALUE;

    // Used to represent an error result. Not displayed.
    // Used to represent an erroneous result or a required evaluation. Not displayed.
    public static final String ERRONEOUS_RESULT = "ERR";

    /**
@@ -616,7 +616,9 @@ public class Evaluator implements CalculatorExpr.ExprResolver {
                    }
                    mListener.onCancelled(mIndex);
                } else {
                    if (mRequired) {
                        mExprInfo.mResultString = ERRONEOUS_RESULT;
                    }
                    mListener.onError(mIndex, result.errorResourceId);
                }
                return;