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

Commit 486f04c0 authored by Joshua Mokut's avatar Joshua Mokut Committed by Android (Google) Code Review
Browse files

Merge "Added styled focus outline to password input field" into main

parents aed78ff2 3869c3cb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -24,11 +24,13 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.util.LatencyTracker
import com.android.internal.widget.LockPatternUtils
import com.android.keyguard.domain.interactor.KeyguardKeyboardInteractor
import com.android.systemui.Flags as AconfigFlags
import com.android.systemui.SysuiTestCase
import com.android.systemui.classifier.FalsingCollector
import com.android.systemui.flags.FakeFeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.keyboard.data.repository.FakeKeyboardRepository
import com.android.systemui.res.R
import com.android.systemui.statusbar.policy.DevicePostureController
import com.android.systemui.user.domain.interactor.SelectedUserInteractor
@@ -90,6 +92,8 @@ class KeyguardPasswordViewControllerTest : SysuiTestCase() {
        whenever(keyguardPasswordView.findViewById<ImageView>(R.id.switch_ime_button))
            .thenReturn(mock(ImageView::class.java))
        `when`(keyguardPasswordView.resources).thenReturn(context.resources)

        val keyguardKeyboardInteractor = KeyguardKeyboardInteractor(FakeKeyboardRepository())
        val fakeFeatureFlags = FakeFeatureFlags()
        fakeFeatureFlags.set(Flags.LOCKSCREEN_ENABLE_LANDSCAPE, false)
        mSetFlagsRule.enableFlags(AconfigFlags.FLAG_REVAMPED_BOUNCER_MESSAGES)
@@ -111,6 +115,7 @@ class KeyguardPasswordViewControllerTest : SysuiTestCase() {
                postureController,
                fakeFeatureFlags,
                mSelectedUserInteractor,
                keyguardKeyboardInteractor,
            )
    }

+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import com.android.internal.logging.UiEventLogger
import com.android.internal.widget.LockPatternUtils
import com.android.keyguard.KeyguardSecurityContainer.UserSwitcherViewMode.UserSwitcherCallback
import com.android.keyguard.KeyguardSecurityModel.SecurityMode
import com.android.keyguard.domain.interactor.KeyguardKeyboardInteractor
import com.android.systemui.Flags as AConfigFlags
import com.android.systemui.SysuiTestCase
import com.android.systemui.biometrics.FaceAuthAccessibilityDelegate
@@ -51,6 +52,7 @@ import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
import com.android.systemui.flags.FakeFeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.keyboard.data.repository.FakeKeyboardRepository
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
import com.android.systemui.kosmos.Kosmos
@@ -202,6 +204,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
        whenever(keyguardStateController.canDismissLockScreen()).thenReturn(true)
        whenever(deviceProvisionedController.isUserSetup(anyInt())).thenReturn(true)

        val keyguardKeyboardInteractor = KeyguardKeyboardInteractor(FakeKeyboardRepository())
        featureFlags = FakeFeatureFlags()
        featureFlags.set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
        featureFlags.set(Flags.LOCKSCREEN_ENABLE_LANDSCAPE, false)
@@ -232,6 +235,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
                postureController,
                featureFlags,
                mSelectedUserInteractor,
                keyguardKeyboardInteractor,
            )

        kosmos = testKosmos()
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 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.
  ~ 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.
  -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true">
        <shape android:shape="oval">
            <stroke android:width="3dp" android:color="@color/bouncer_password_focus_color"/>
        </shape>
    </item>
</selector>
 No newline at end of file
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 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.
  ~ 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.
  -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true">
        <shape android:shape="rectangle">
            <corners android:radius="16dp" />
            <stroke android:width="3dp"
                android:color="@color/bouncer_password_focus_color" />
            <padding android:bottom="8dp" android:left="8dp" android:right="8dp" android:top="8dp"/>
        </shape>
    </item>
    <item>
        <inset android:insetLeft="-4dp"
            android:insetRight="-4dp"
            android:insetTop="-4dp">
            <shape android:shape="rectangle">
                <stroke android:width="3dp" android:color="@color/bouncer_password_focus_color"/>
            </shape>
        </inset>
    </item>
</selector>
 No newline at end of file
Loading