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

Commit a780d932 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio Committed by Android (Google) Code Review
Browse files

Merge "Fix bug #13727850 Input values are not visible when setting up the...

Merge "Fix bug #13727850 Input values are not visible when setting up the lockscreen... ...security(PIN/Passwor/Pattern)."
parents 1a9b646c 1cf35941
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
import android.view.View;
@@ -260,13 +261,23 @@ public class LockPatternView extends View {

        mPathPaint.setAntiAlias(true);
        mPathPaint.setDither(true);
        mPathPaint.setColor(Color.WHITE);   // TODO this should be from the style

        int defaultColor = Color.WHITE;
        TypedValue outValue = new TypedValue();
        if (context.getTheme().resolveAttribute(android.R.attr.textColorPrimary, outValue, true)) {
            defaultColor = context.getResources().getColor(outValue.resourceId);
        }

        final int color = a.getColor(R.styleable.LockPatternView_pathColor, defaultColor);
        mPathPaint.setColor(color);

        mPathPaint.setAlpha(mStrokeAlpha);
        mPathPaint.setStyle(Paint.Style.STROKE);
        mPathPaint.setStrokeJoin(Paint.Join.ROUND);
        mPathPaint.setStrokeCap(Paint.Cap.ROUND);

        // lot's of bitmaps!
        // TODO: those bitmaps are hardcoded to the Holo Theme which should not be the case!
        mBitmapBtnDefault = getBitmapFor(R.drawable.btn_code_lock_default_holo);
        mBitmapBtnTouched = getBitmapFor(R.drawable.btn_code_lock_touched_holo);
        mBitmapCircleDefault = getBitmapFor(R.drawable.indicator_code_lock_point_area_default_holo);
+2 −0
Original line number Diff line number Diff line
@@ -6138,6 +6138,8 @@
        <!-- Aspect to use when drawing LockPatternView. Choices are "square"(default), "lock_width"
             or "lock_height" -->
        <attr name="aspect" format="string" />
        <!-- Color to use when drawing LockPatternView paths. -->
        <attr name="pathColor" format="color|reference" />
    </declare-styleable>

    <!-- Use <code>recognition-service</code> as the root tag of the XML resource that