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

Commit e7c3232a authored by Annie Chin's avatar Annie Chin
Browse files

Annotate Evaluator.getInstance as NonNull

Change-Id: If72961d61d4c0ba948288ab77fb50fc9973c2ccd
parent be39140d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.annotation.VisibleForTesting;
import android.text.Spannable;
@@ -100,6 +101,7 @@ public class Evaluator implements CalculatorExpr.ExprResolver {

    public static String TIMEOUT_DIALOG_TAG = "timeout";

    @NonNull
    public static Evaluator getInstance(Context context) {
        if (evaluator == null) {
            evaluator = new Evaluator(context.getApplicationContext());
+25 −27
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ public class HistoryFragment extends Fragment implements DragLayout.DragCallback
        final boolean isResultLayout = activity.isResultLayout();
        final boolean isOneLine = activity.isOneLine();

        if (mEvaluator != null) {
        initializeController(isResultLayout, isOneLine);

        final long maxIndex = mEvaluator.getMaxIndex();
@@ -143,7 +142,6 @@ public class HistoryFragment extends Fragment implements DragLayout.DragCallback
        mAdapter.setDataSet(mDataSet);
        mAdapter.setIsResultLayout(isResultLayout);
        mAdapter.setIsOneLine(activity.isOneLine());
        }

        mAdapter.notifyDataSetChanged();
    }