Loading packages/SystemUI/Android.bp +22 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,24 @@ filegroup { "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt", // Biometric "tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt", "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt", "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt", "tests/src/com/android/systemui/biometrics/AuthControllerTest.java", "tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java", "tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt", "tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java", "tests/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapterTest.java", "tests/src/com/android/systemui/biometrics/UdfpsDisplayModeTest.java", "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerBaseTest.java", "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerTest.java", "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerWithCoroutinesTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsShellTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt", ], path: "tests/src", } Loading Loading @@ -403,6 +421,10 @@ android_app { privileged: true, resource_dirs: [], kotlincflags: ["-Xjvm-default=all"], optimize: { shrink_resources: false, proguard_flags_files: ["proguard.flags"], }, plugins: ["dagger2-compiler"], } Loading packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt +2 −3 Original line number Diff line number Diff line Loading @@ -144,8 +144,7 @@ constructor( orientationListener.enable() } } @VisibleForTesting internal var overlayOffsets: SensorLocationInternal = SensorLocationInternal.DEFAULT @VisibleForTesting var overlayOffsets: SensorLocationInternal = SensorLocationInternal.DEFAULT private val overlayViewParams = WindowManager.LayoutParams( Loading Loading @@ -297,7 +296,7 @@ constructor( } @VisibleForTesting internal fun updateOverlayParams(display: Display, bounds: Rect) { fun updateOverlayParams(display: Display, bounds: Rect) { val isNaturalOrientation = display.isNaturalOrientation() val isDefaultOrientation = if (isReverseDefaultRotation) !isNaturalOrientation else isNaturalOrientation Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -257,7 +257,7 @@ constructor( } @VisibleForTesting internal suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job { suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job { return scope.launch { primaryBouncerInteractor.bouncerExpansion.collect { bouncerExpansion: Float -> inputBouncerExpansion = bouncerExpansion Loading @@ -268,7 +268,7 @@ constructor( } @VisibleForTesting internal suspend fun listenForAlternateBouncerVisibility(scope: CoroutineScope): Job { suspend fun listenForAlternateBouncerVisibility(scope: CoroutineScope): Job { return scope.launch { alternateBouncerInteractor.isVisible.collect { isVisible: Boolean -> showUdfpsBouncer(isVisible) Loading packages/SystemUI/tests/robolectric/config/robolectric.properties +4 −1 Original line number Diff line number Diff line Loading @@ -14,3 +14,6 @@ # limitations under the License. # sdk=NEWEST_SDK shadows=\ com.android.systemui.testutils.shadow.ShadowLockPatternUtils \ com.android.systemui.testutils.shadow.ShadowTestableLooper No newline at end of file packages/SystemUI/tests/robolectric/src/com/android/systemui/testutils/shadow/ShadowLockPatternUtils.java 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package com.android.systemui.testutils.shadow; import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_NONE; import com.android.internal.widget.LockPatternUtils; import org.robolectric.annotation.Implementation; import org.robolectric.annotation.Implements; @Implements(LockPatternUtils.class) public class ShadowLockPatternUtils { @Implementation protected int getCredentialTypeForUser(int userHandle) { return CREDENTIAL_TYPE_NONE; } } Loading
packages/SystemUI/Android.bp +22 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,24 @@ filegroup { "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt", // Biometric "tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt", "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt", "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt", "tests/src/com/android/systemui/biometrics/AuthControllerTest.java", "tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java", "tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt", "tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java", "tests/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapterTest.java", "tests/src/com/android/systemui/biometrics/UdfpsDisplayModeTest.java", "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerBaseTest.java", "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerTest.java", "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerWithCoroutinesTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsShellTest.kt", "tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt", ], path: "tests/src", } Loading Loading @@ -403,6 +421,10 @@ android_app { privileged: true, resource_dirs: [], kotlincflags: ["-Xjvm-default=all"], optimize: { shrink_resources: false, proguard_flags_files: ["proguard.flags"], }, plugins: ["dagger2-compiler"], } Loading
packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt +2 −3 Original line number Diff line number Diff line Loading @@ -144,8 +144,7 @@ constructor( orientationListener.enable() } } @VisibleForTesting internal var overlayOffsets: SensorLocationInternal = SensorLocationInternal.DEFAULT @VisibleForTesting var overlayOffsets: SensorLocationInternal = SensorLocationInternal.DEFAULT private val overlayViewParams = WindowManager.LayoutParams( Loading Loading @@ -297,7 +296,7 @@ constructor( } @VisibleForTesting internal fun updateOverlayParams(display: Display, bounds: Rect) { fun updateOverlayParams(display: Display, bounds: Rect) { val isNaturalOrientation = display.isNaturalOrientation() val isDefaultOrientation = if (isReverseDefaultRotation) !isNaturalOrientation else isNaturalOrientation Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -257,7 +257,7 @@ constructor( } @VisibleForTesting internal suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job { suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job { return scope.launch { primaryBouncerInteractor.bouncerExpansion.collect { bouncerExpansion: Float -> inputBouncerExpansion = bouncerExpansion Loading @@ -268,7 +268,7 @@ constructor( } @VisibleForTesting internal suspend fun listenForAlternateBouncerVisibility(scope: CoroutineScope): Job { suspend fun listenForAlternateBouncerVisibility(scope: CoroutineScope): Job { return scope.launch { alternateBouncerInteractor.isVisible.collect { isVisible: Boolean -> showUdfpsBouncer(isVisible) Loading
packages/SystemUI/tests/robolectric/config/robolectric.properties +4 −1 Original line number Diff line number Diff line Loading @@ -14,3 +14,6 @@ # limitations under the License. # sdk=NEWEST_SDK shadows=\ com.android.systemui.testutils.shadow.ShadowLockPatternUtils \ com.android.systemui.testutils.shadow.ShadowTestableLooper No newline at end of file
packages/SystemUI/tests/robolectric/src/com/android/systemui/testutils/shadow/ShadowLockPatternUtils.java 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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. */ package com.android.systemui.testutils.shadow; import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_NONE; import com.android.internal.widget.LockPatternUtils; import org.robolectric.annotation.Implementation; import org.robolectric.annotation.Implements; @Implements(LockPatternUtils.class) public class ShadowLockPatternUtils { @Implementation protected int getCredentialTypeForUser(int userHandle) { return CREDENTIAL_TYPE_NONE; } }