Always calculate textSize in CalculatorText#onMeasure

Bug: 26934901

- Don't gate the minimum height and variable text size calculations
  based on the width constraint. That constraint may remain constant
  even though other configuration parameters are changing. It's
  sufficient to just not invoke the text size change listener in
  onMeasure to prevent unnecessary animations.
- Also suppressed unchecked cast warning in CalculatorExpr.

Change-Id: Ia402cdabdf7b0864fcbb3017ab85bb4038409da8
diff --git a/src/com/android/calculator2/CalculatorExpr.java b/src/com/android/calculator2/CalculatorExpr.java
index 14d9236..e2f6bee 100644
--- a/src/com/android/calculator2/CalculatorExpr.java
+++ b/src/com/android/calculator2/CalculatorExpr.java
@@ -619,9 +619,9 @@
      * The caller supplies the value, degree mode, and short string representation, which must
      * have been previously computed.  Thus this is guaranteed to terminate reasonably quickly.
      */
-    public CalculatorExpr abbreviate(CR val, BoundedRational ratVal,
-                              boolean dm, String sr) {
+    public CalculatorExpr abbreviate(CR val, BoundedRational ratVal, boolean dm, String sr) {
         CalculatorExpr result = new CalculatorExpr();
+        @SuppressWarnings("unchecked")
         Token t = new PreEval(val, ratVal, new CalculatorExpr((ArrayList<Token>) mExpr.clone()),
                 new EvalContext(dm, mExpr.size()), sr);
         result.mExpr.add(t);