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

Commit 0c21d74a authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Fixes in FalsingManager Classifiers and Evaluators and in DragDownHelper"

parents b5b990ff 52af6b64
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@ public class AnglesPercentageEvaluator {
    public static float evaluate(float value) {
        float evaluation = 0.0f;
        if (value < 1.00) evaluation++;
        if (value < 0.95) evaluation++;
        if (value < 0.90) evaluation++;
        if (value < 0.70) evaluation++;
        return evaluation;
    }
}
+5 −3
Original line number Diff line number Diff line
@@ -27,10 +27,12 @@ public class EndPointRatioClassifier extends StrokeClassifier {

    @Override
    public float getFalseTouchEvaluation(int type, Stroke stroke) {
        float ratio;
        if (stroke.getTotalLength() == 0.0f) {
            return 1.0f;
            ratio = 1.0f;
        } else {
            ratio = stroke.getEndPointLength() / stroke.getTotalLength();
        }
        return EndPointRatioEvaluator.evaluate(
                stroke.getEndPointLength() / stroke.getTotalLength());
        return EndPointRatioEvaluator.evaluate(ratio);
    }
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ public class HumanInteractionClassifier extends Classifier {
    private final float mDpi;

    private HistoryEvaluator mHistoryEvaluator;
    private boolean mEnableClassifier = true;
    private boolean mEnableClassifier = false;
    private int mCurrentType = Classifier.GENERIC;

    protected final ContentObserver mSettingsObserver = new ContentObserver(mHandler) {
+1 −1
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@ public class SpeedAnglesPercentageEvaluator {
    public static float evaluate(float value) {
        float evaluation = 0.0f;
        if (value < 1.00) evaluation++;
        if (value < 0.95) evaluation++;
        if (value < 0.90) evaluation++;
        if (value < 0.70) evaluation++;
        return evaluation;
    }
}
+4 −3
Original line number Diff line number Diff line
@@ -19,9 +19,10 @@ package com.android.systemui.classifier;
public class SpeedEvaluator {
    public static float evaluate(float value) {
        float evaluation = 0.0f;
        if (value < 4.0 || value > 35.0) evaluation += 1.0;
        if (value < 2.2) evaluation += 1.0;
        if (value > 50.0) evaluation += 1.0;
        if (value < 4.0) evaluation++;
        if (value < 2.2) evaluation++;
        if (value > 35.0) evaluation++;
        if (value > 50.0) evaluation++;
        return evaluation;
    }
}
Loading