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

Commit ec37102e authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Bouncer animation" into pi-dev am: 560b26a9

am: 266226b3

Change-Id: Ic8303e6ddfa78190648c75e1319042f0e7d7f7e5
parents e5826fd1 266226b3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2014 The Android Open Source Project
  ~ Copyright (C) 2018 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
@@ -15,5 +15,6 @@
  -->

<resources>
    <dimen name="keyguard_clock_notifications_margin">32dp</dimen>
    <!-- Minimum margin between clock and top of screen or ambient indication -->
    <dimen name="keyguard_clock_top_margin">76dp</dimen>
</resources>
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -443,8 +443,8 @@

    <!-- The margin between the clock and the notifications on Keyguard.-->
    <dimen name="keyguard_clock_notifications_margin">30dp</dimen>
    <!-- Minimum margin between clock and top of screen or ambient indication -->
    <dimen name="keyguard_clock_top_margin">26dp</dimen>
    <!-- Minimum margin between clock and status bar -->
    <dimen name="keyguard_clock_top_margin">36dp</dimen>
    <dimen name="heads_up_scrim_height">250dp</dimen>

    <item name="scrim_behind_alpha" format="float" type="dimen">0.62</item>
+0 −1
Original line number Diff line number Diff line
@@ -149,7 +149,6 @@ public class KeyguardHostView extends FrameLayout implements SecurityCallback {
        mSecurityContainer.setLockPatternUtils(mLockPatternUtils);
        mSecurityContainer.setSecurityCallback(this);
        mSecurityContainer.showPrimarySecurityScreen(false);
        // mSecurityContainer.updateSecurityViews(false /* not bouncing */);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -87,8 +87,8 @@ public class AnglesClassifier extends StrokeClassifier {
    @Override
    public float getFalseTouchEvaluation(int type, Stroke stroke) {
        Data data = mStrokeMap.get(stroke);
        return AnglesVarianceEvaluator.evaluate(data.getAnglesVariance())
                + AnglesPercentageEvaluator.evaluate(data.getAnglesPercentage());
        return AnglesVarianceEvaluator.evaluate(data.getAnglesVariance(), type)
                + AnglesPercentageEvaluator.evaluate(data.getAnglesPercentage(), type);
    }

    private static class Data {
+4 −3
Original line number Diff line number Diff line
@@ -17,10 +17,11 @@
package com.android.systemui.classifier;

public class AnglesPercentageEvaluator {
    public static float evaluate(float value) {
    public static float evaluate(float value, int type) {
        final boolean secureUnlock = type == Classifier.BOUNCER_UNLOCK;
        float evaluation = 0.0f;
        if (value < 1.00) evaluation++;
        if (value < 0.90) evaluation++;
        if (value < 1.00 && !secureUnlock) evaluation++;
        if (value < 0.90 && !secureUnlock) evaluation++;
        if (value < 0.70) evaluation++;
        return evaluation;
    }
Loading