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

Commit 7b863802 authored by Michael Bestas's avatar Michael Bestas Committed by Arne Coucheron
Browse files

Settings: forward port lock pattern grid size (2/2)



Fingerprint: Forward challenge extras

The forward port of custom pattern sizes introduced a bug that would
cause an NPE when trying to add a fingerprint for security. This patch
forwards the extras associated with the challenge that would have
normally been passed directly in to the ChooseLockPattern fragment.

TICKET: CYNGNOS-1490

Settings: forward decrypt required on boot flag

This wasn't being pass forward and all of the defaults had it set to
true.

Ticket: CYNGNOS-2270
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Settings: allow rotation while setting new pattern

Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Settings: use the actual user id to set pattern size

Ticket: CYNGNOS-2462

Settings: handle decrypting larger pattern sizes

Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

CryptKeeper: pattern unlock displays incorrect pw when correct

fakeUnlockAttempt() gets called when the user inputs any pattern length
< 4 which queues up the 'incorrect error' message. The message needs to
be cleared before trying to actually check the password so it never goes
through in case the password was correct.

Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Settings: fix non lock pattern CryptKeeper crash

Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

CryptKeeper: layout whole screen in bounds

Add flags to make the screen layout properly on devices with the
navigation bar visible

Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

CryptKeeper improvements

- Status text was used enough to warrant it being a field variable
  instead of looking for the view every time

- Display proper text after changing pattern sizes (to input a pattern,
  not a password)

- Disable changing pattern sizes while validaing pattern

REFS: LETTUCE-557, LETTUCE-352
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Change-Id: I7078d703c218cd096d9b77c003a94b52fbce6322
parent 857cfe0b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1938,6 +1938,8 @@
            android:taskAffinity="com.android.wizard"
            android:theme="@style/SetupWizardTheme.Light" />

        <activity android:name="ChooseLockPatternSize" android:exported="false"/>

        <activity android:name="ChooseLockPattern"
            android:exported="false"
            android:theme="@style/SetupWizardTheme.Light" />
+12 −0
Original line number Diff line number Diff line
@@ -36,6 +36,18 @@

    </LinearLayout>

    <LinearLayout
            android:id="@+id/pattern_sizes"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/crypt_keeper_pattern_margin"
            android:layout_marginEnd="@dimen/crypt_keeper_pattern_margin"
            android:orientation="horizontal">

        <include layout="@layout/crypt_keeper_pattern_sizes" />

    </LinearLayout>

    <include layout="@layout/crypt_keeper_emergency_button" />

</LinearLayout>
+69 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 The CyanogenMod Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">

    <Button
            android:id="@+id/lock_pattern_size_3"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textSize="14sp"
            android:fontFamily="sans-serif"
            android:text="@string/lock_pattern_size_3"
            android:textColor="@color/text_color_white"
            android:layout_weight="1"
            style="?android:attr/borderlessButtonStyle"/>

    <Button
            android:id="@+id/lock_pattern_size_4"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textSize="14sp"
            android:fontFamily="sans-serif"
            android:text="@string/lock_pattern_size_4"
            android:textColor="@color/text_color_white"
            android:layout_weight="1"
            style="?android:attr/borderlessButtonStyle"/>

    <Button
            android:id="@+id/lock_pattern_size_5"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textSize="14sp"
            android:fontFamily="sans-serif"
            android:text="@string/lock_pattern_size_5"
            android:textColor="@color/text_color_white"
            android:layout_weight="1"
            style="?android:attr/borderlessButtonStyle"/>

    <Button
            android:id="@+id/lock_pattern_size_6"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textSize="14sp"
            android:fontFamily="sans-serif"
            android:text="@string/lock_pattern_size_6"
            android:textColor="@color/text_color_white"
            android:layout_weight="1"
            style="?android:attr/borderlessButtonStyle"/>


</merge >
+1 −0
Original line number Diff line number Diff line
@@ -17,4 +17,5 @@ limitations under the License.
<resources>
    <!-- Action bar icons -->
    <color name="action_bar_icon_tint">@android:color/white</color>
    <color name="text_color_white">@android:color/white</color>
</resources>
+15 −0
Original line number Diff line number Diff line
@@ -229,6 +229,21 @@

    <string name="ok">OK</string>

    <!-- Sizes for pattern lockscreen -->
    <string name="lock_pattern_size_3">3x3</string>
    <string name="lock_pattern_size_4">4x4</string>
    <string name="lock_pattern_size_5">5x5</string>
    <string name="lock_pattern_size_6">6x6</string>

    <!-- Whether a visible red line will be drawn after the user has drawn the unlock pattern incorrectly -->
    <string name="lockpattern_settings_enable_error_path_title">Show pattern error</string>
    <!-- Whether the dots will be drawn when using the lockscreen pattern -->
    <string name="lockpattern_settings_enable_dots_title">Show pattern dots</string>

    <!-- Lock screen vibrate settings -->
    <string name="lockscreen_vibrate_enabled_title">Vibrate</string>
    <string name="lockscreen_vibrate_enabled_head">Vibrate when unlocking</string>

    <!-- Lights settings -->
    <string name="lights_label">Lights</string>

Loading