diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 45243eeb900775f0b6992fbdaf454c5bc68506fe..e181d079fc6db7fab1b21fcc706f5135087a29d3 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -718,20 +718,6 @@ <item>26</item> <!-- MOUTH_COVERING_DETECTED --> </integer-array> - <!-- Which face help messages to surface when fingerprint is enrolled and device is unfolded. - Message ids correspond with the acquired ids in BiometricFaceConstants --> - <integer-array name="config_face_help_msgs_when_fingerprint_enrolled_unfolded"> - <item>3</item> <!-- TOO_DARK --> - <item>4</item> <!-- TOO_CLOSE --> - <item>5</item> <!-- TOO_FAR --> - <item>6</item> <!-- TOO_HIGH --> - <item>7</item> <!-- TOO_LOW --> - <item>8</item> <!-- TOO_RIGHT --> - <item>9</item> <!-- TOO_LEFT --> - <item>25</item> <!-- DARK_GLASSES --> - <item>26</item> <!-- MOUTH_COVERING_DETECTED --> - </integer-array> - <!-- Which device wake-ups will trigger passive auth. These values correspond with PowerManager#WakeReason. --> <integer-array name="config_face_auth_wake_up_triggers"> diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractor.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractor.kt index 9919f09935c37e1a62ba8e3552f922c44a47eb4d..846013cef326ca7611f963896aa7c4379aff1d6f 100644 --- a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractor.kt @@ -30,20 +30,17 @@ import com.android.systemui.deviceentry.shared.model.FingerprintFailureMessage import com.android.systemui.deviceentry.shared.model.FingerprintLockoutMessage import com.android.systemui.deviceentry.shared.model.FingerprintMessage import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus -import com.android.systemui.keyguard.domain.interactor.DevicePostureInteractor -import com.android.systemui.keyguard.shared.model.DevicePosture import com.android.systemui.keyguard.shared.model.ErrorFingerprintAuthenticationStatus import com.android.systemui.res.R +import com.android.systemui.util.kotlin.Utils.Companion.toTriple import com.android.systemui.util.kotlin.sample import javax.inject.Inject import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.filterIsInstance import kotlinx.coroutines.flow.filterNot import kotlinx.coroutines.flow.flatMapLatest -import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge @@ -62,7 +59,6 @@ constructor( faceAuthInteractor: DeviceEntryFaceAuthInteractor, private val biometricSettingsInteractor: DeviceEntryBiometricSettingsInteractor, faceHelpMessageDeferralInteractor: FaceHelpMessageDeferralInteractor, - devicePostureInteractor: DevicePostureInteractor, ) { private val faceHelp: Flow<HelpFaceAuthenticationStatus> = faceAuthInteractor.authenticationStatus.filterIsInstance<HelpFaceAuthenticationStatus>() @@ -75,18 +71,9 @@ constructor( * The acquisition message ids to show message when both fingerprint and face are enrolled and * enabled for device entry. */ - private val coExFaceAcquisitionMsgIdsToShowDefault: Set<Int> = + private val coExFaceAcquisitionMsgIdsToShow: Set<Int> = resources.getIntArray(R.array.config_face_help_msgs_when_fingerprint_enrolled).toSet() - /** - * The acquisition message ids to show message when both fingerprint and face are enrolled and - * enabled for device entry and the device is unfolded. - */ - private val coExFaceAcquisitionMsgIdsToShowUnfolded: Set<Int> = - resources - .getIntArray(R.array.config_face_help_msgs_when_fingerprint_enrolled_unfolded) - .toSet() - private fun ErrorFingerprintAuthenticationStatus.shouldSuppressError(): Boolean { return isCancellationError() || isPowerPressedError() } @@ -135,17 +122,6 @@ constructor( } } - val coExFaceAcquisitionMsgIdsToShow: Flow<Set<Int>> = - devicePostureInteractor.posture.map { devicePosture -> - when (devicePosture) { - DevicePosture.OPENED -> coExFaceAcquisitionMsgIdsToShowUnfolded - DevicePosture.UNKNOWN, // Devices without posture support (non-foldable) use UNKNOWN - DevicePosture.CLOSED, - DevicePosture.HALF_OPENED, - DevicePosture.FLIPPED -> coExFaceAcquisitionMsgIdsToShowDefault - } - } - val fingerprintMessage: Flow<FingerprintMessage> = merge( fingerprintErrorMessage, @@ -153,38 +129,25 @@ constructor( fingerprintHelpMessage, ) - private val filterConditionForFaceHelpMessages: - Flow<(HelpFaceAuthenticationStatus) -> Boolean> = - combine( - biometricSettingsInteractor.isFingerprintAuthEnrolledAndEnabled, - biometricSettingsInteractor.faceAuthCurrentlyAllowed, - ::Pair - ) - .flatMapLatest { (fingerprintEnrolled, faceAuthCurrentlyAllowed) -> - if (fingerprintEnrolled && faceAuthCurrentlyAllowed) { - // Show only some face help messages if fingerprint is also enrolled - coExFaceAcquisitionMsgIdsToShow.map { msgIdsToShow -> - { helpStatus: HelpFaceAuthenticationStatus -> - msgIdsToShow.contains(helpStatus.msgId) - } - } - } else if (faceAuthCurrentlyAllowed) { - // Show all face help messages if only face is enrolled and currently allowed - flowOf { _: HelpFaceAuthenticationStatus -> true } - } else { - flowOf { _: HelpFaceAuthenticationStatus -> false } - } - } - private val faceHelpMessage: Flow<FaceMessage> = faceHelp .filterNot { // Message deferred to potentially show at face timeout error instead faceHelpMessageDeferralInteractor.shouldDefer(it.msgId) } - .sample(filterConditionForFaceHelpMessages, ::Pair) - .filter { (helpMessage, filterCondition) -> filterCondition(helpMessage) } - .map { (status, _) -> FaceMessage(status.msg) } + .sample(biometricSettingsInteractor.fingerprintAndFaceEnrolledAndEnabled, ::Pair) + .filter { (faceAuthHelpStatus, fingerprintAndFaceEnrolledAndEnabled) -> + if (fingerprintAndFaceEnrolledAndEnabled) { + // Show only some face help messages if fingerprint is also enrolled + coExFaceAcquisitionMsgIdsToShow.contains(faceAuthHelpStatus.msgId) + } else { + // Show all face help messages if only face is enrolled + true + } + } + .sample(biometricSettingsInteractor.faceAuthCurrentlyAllowed, ::toTriple) + .filter { (_, _, faceAuthCurrentlyAllowed) -> faceAuthCurrentlyAllowed } + .map { (status, _, _) -> FaceMessage(status.msg) } private val faceFailureMessage: Flow<FaceMessage> = faceFailure diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DevicePostureInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DevicePostureInteractor.kt deleted file mode 100644 index e48cddb33aa46af8bf5febb9ee0751bf3312b095..0000000000000000000000000000000000000000 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DevicePostureInteractor.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -package com.android.systemui.keyguard.domain.interactor - -import com.android.systemui.dagger.SysUISingleton -import com.android.systemui.keyguard.data.repository.DevicePostureRepository -import javax.inject.Inject -import kotlinx.coroutines.ExperimentalCoroutinesApi - -/** DevicePosture business logic. */ -@ExperimentalCoroutinesApi -@SysUISingleton -class DevicePostureInteractor -@Inject -constructor(devicePostureRepository: DevicePostureRepository) { - val posture = devicePostureRepository.currentDevicePosture -} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 0d2b3e10711d17f8050470f073d8e439d207bff7..1963d641702a4910efe1be4d5f6bc6fdbd9fcc29 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -97,7 +97,6 @@ import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; -import com.android.systemui.deviceentry.domain.interactor.BiometricMessageInteractor; import com.android.systemui.dock.DockManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.keyguard.KeyguardIndication; @@ -121,6 +120,7 @@ import com.android.systemui.util.wakelock.WakeLock; import java.io.PrintWriter; import java.text.NumberFormat; +import java.util.HashSet; import java.util.Set; import java.util.function.Consumer; @@ -181,7 +181,6 @@ public class KeyguardIndicationController { private BroadcastReceiver mBroadcastReceiver; private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private KeyguardInteractor mKeyguardInteractor; - private final BiometricMessageInteractor mBiometricMessageInteractor; private String mPersistentUnlockMessage; private String mAlignmentIndication; private boolean mForceIsDismissible; @@ -210,7 +209,7 @@ public class KeyguardIndicationController { private boolean mBatteryPresent = true; protected long mChargingTimeRemaining; private Pair<String, BiometricSourceType> mBiometricErrorMessageToShowOnScreenOn; - private Set<Integer> mCoExFaceAcquisitionMsgIdsToShow; + private final Set<Integer> mCoExFaceAcquisitionMsgIdsToShow; private final FaceHelpMessageDeferral mFaceAcquiredMessageDeferral; private boolean mInited; @@ -228,10 +227,6 @@ public class KeyguardIndicationController { mIsActiveDreamLockscreenHosted = isLockscreenHosted; updateDeviceEntryIndication(false); }; - @VisibleForTesting - final Consumer<Set<Integer>> mCoExAcquisitionMsgIdsToShowCallback = - (Set<Integer> coExFaceAcquisitionMsgIdsToShow) -> mCoExFaceAcquisitionMsgIdsToShow = - coExFaceAcquisitionMsgIdsToShow; private final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() { @Override public void onScreenTurnedOn() { @@ -291,8 +286,7 @@ public class KeyguardIndicationController { BouncerMessageInteractor bouncerMessageInteractor, FeatureFlags flags, IndicationHelper indicationHelper, - KeyguardInteractor keyguardInteractor, - BiometricMessageInteractor biometricMessageInteractor + KeyguardInteractor keyguardInteractor ) { mContext = context; mBroadcastDispatcher = broadcastDispatcher; @@ -321,9 +315,14 @@ public class KeyguardIndicationController { mFeatureFlags = flags; mIndicationHelper = indicationHelper; mKeyguardInteractor = keyguardInteractor; - mBiometricMessageInteractor = biometricMessageInteractor; mFaceAcquiredMessageDeferral = faceHelpMessageDeferral.create(); + mCoExFaceAcquisitionMsgIdsToShow = new HashSet<>(); + int[] msgIds = context.getResources().getIntArray( + com.android.systemui.res.R.array.config_face_help_msgs_when_fingerprint_enrolled); + for (int msgId : msgIds) { + mCoExFaceAcquisitionMsgIdsToShow.add(msgId); + } mHandler = new Handler(mainLooper) { @Override @@ -370,7 +369,7 @@ public class KeyguardIndicationController { mIndicationArea = indicationArea; mTopIndicationView = indicationArea.findViewById(R.id.keyguard_indication_text); mLockScreenIndicationView = indicationArea.findViewById( - R.id.keyguard_indication_text_bottom); + R.id.keyguard_indication_text_bottom); mInitialTextColorState = mTopIndicationView != null ? mTopIndicationView.getTextColors() : ColorStateList.valueOf(Color.WHITE); if (mRotateTextViewController != null) { @@ -402,10 +401,6 @@ public class KeyguardIndicationController { collectFlow(mIndicationArea, mKeyguardInteractor.isActiveDreamLockscreenHosted(), mIsActiveDreamLockscreenHostedCallback); } - - collectFlow(mIndicationArea, - mBiometricMessageInteractor.getCoExFaceAcquisitionMsgIdsToShow(), - mCoExAcquisitionMsgIdsToShowCallback); } /** diff --git a/packages/SystemUI/src/com/android/systemui/util/kotlin/Utils.kt b/packages/SystemUI/src/com/android/systemui/util/kotlin/Utils.kt index 405b57a1a04d440386d59293c2545abd6dc4535c..a88be065d72286e36faf0b5ca173c783c4e3acc8 100644 --- a/packages/SystemUI/src/com/android/systemui/util/kotlin/Utils.kt +++ b/packages/SystemUI/src/com/android/systemui/util/kotlin/Utils.kt @@ -28,8 +28,6 @@ class Utils { fun <A, B, C, D> toQuad(a: A, b: B, c: C, d: D) = Quad(a, b, c, d) fun <A, B, C, D> toQuad(a: A, bcd: Triple<B, C, D>) = Quad(a, bcd.first, bcd.second, bcd.third) - fun <A, B, C, D> toQuad(abc: Triple<A, B, C>, d: D) = - Quad(abc.first, abc.second, abc.third, d) fun <A, B, C, D, E> toQuint(a: A, b: B, c: C, d: D, e: E) = Quint(a, b, c, d, e) fun <A, B, C, D, E> toQuint(a: A, bcde: Quad<B, C, D, E>) = diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java index fe066ca2c3186ec9654cfbd393d4f6691e29215d..2bd0d7963593aa6529222c498e9287ff316e7bcd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java @@ -32,8 +32,6 @@ import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static java.util.Collections.emptySet; - import android.app.AlarmManager; import android.app.Instrumentation; import android.app.admin.DevicePolicyManager; @@ -64,7 +62,6 @@ import com.android.systemui.biometrics.FaceHelpMessageDeferralFactory; import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor; import com.android.systemui.bouncer.domain.interactor.BouncerMessageInteractor; import com.android.systemui.broadcast.BroadcastDispatcher; -import com.android.systemui.deviceentry.domain.interactor.BiometricMessageInteractor; import com.android.systemui.dock.DockManager; import com.android.systemui.flags.FakeFeatureFlags; import com.android.systemui.keyguard.KeyguardIndication; @@ -84,8 +81,6 @@ import com.android.systemui.util.concurrency.FakeExecutor; import com.android.systemui.util.time.FakeSystemClock; import com.android.systemui.util.wakelock.WakeLockFake; -import kotlinx.coroutines.flow.StateFlow; - import org.junit.After; import org.junit.Before; import org.mockito.ArgumentCaptor; @@ -148,8 +143,6 @@ public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { @Mock protected AlternateBouncerInteractor mAlternateBouncerInteractor; @Mock - protected BiometricMessageInteractor mBiometricMessageInteractor; - @Mock protected ScreenLifecycle mScreenLifecycle; @Mock protected AuthController mAuthController; @@ -233,8 +226,6 @@ public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { when(mDevicePolicyResourcesManager.getString(anyString(), any(), anyString())) .thenReturn(mDisclosureWithOrganization); when(mUserTracker.getUserId()).thenReturn(mCurrentUserId); - when(mBiometricMessageInteractor.getCoExFaceAcquisitionMsgIdsToShow()) - .thenReturn(mock(StateFlow.class)); when(mFaceHelpMessageDeferralFactory.create()).thenReturn(mFaceHelpMessageDeferral); @@ -278,12 +269,10 @@ public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { mock(BouncerMessageInteractor.class), mFlags, mIndicationHelper, - KeyguardInteractorFactory.create(mFlags).getKeyguardInteractor(), - mBiometricMessageInteractor + KeyguardInteractorFactory.create(mFlags).getKeyguardInteractor() ); mController.init(); mController.setIndicationArea(mIndicationArea); - mController.mCoExAcquisitionMsgIdsToShowCallback.accept(emptySet()); verify(mStatusBarStateController).addCallback(mStatusBarStateListenerCaptor.capture()); mStatusBarStateListener = mStatusBarStateListenerCaptor.getValue(); verify(mBroadcastDispatcher).registerReceiver(mBroadcastReceiverCaptor.capture(), any()); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java index 13b521bd32d3eb76de2a1c5e67b421a18767aade..1504d4c1f033561e8a1620907653095c8dd78296 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java @@ -88,8 +88,8 @@ import java.util.List; import java.util.Set; @SmallTest -@RunWith(AndroidJUnit4.class) -@TestableLooper.RunWithLooper(setAsMainLooper = true) +@RunWith(AndroidTestingRunner.class) +@TestableLooper.RunWithLooper public class KeyguardIndicationControllerTest extends KeyguardIndicationControllerBaseTest { @Test public void afterFaceLockout_skipShowingFaceNotRecognized() { @@ -131,11 +131,14 @@ public class KeyguardIndicationControllerTest extends KeyguardIndicationControll @Test public void onAlignmentStateChanged_showsSlowChargingIndication() { - createController(); - verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); - mController.setVisible(true); - - mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_POOR); + mInstrumentation.runOnMainSync(() -> { + createController(); + verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); + mController.setVisible(true); + + mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_POOR); + }); + mInstrumentation.waitForIdleSync(); mTestableLooper.processAllMessages(); verifyIndicationMessage(INDICATION_TYPE_ALIGNMENT, @@ -146,11 +149,14 @@ public class KeyguardIndicationControllerTest extends KeyguardIndicationControll @Test public void onAlignmentStateChanged_showsNotChargingIndication() { - createController(); - verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); - mController.setVisible(true); - - mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_TERRIBLE); + mInstrumentation.runOnMainSync(() -> { + createController(); + verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); + mController.setVisible(true); + + mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_TERRIBLE); + }); + mInstrumentation.waitForIdleSync(); mTestableLooper.processAllMessages(); verifyIndicationMessage(INDICATION_TYPE_ALIGNMENT, @@ -162,12 +168,15 @@ public class KeyguardIndicationControllerTest extends KeyguardIndicationControll @FlakyTest(bugId = 279944472) @Test public void onAlignmentStateChanged_whileDozing_showsSlowChargingIndication() { - createController(); - verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); - mController.setVisible(true); - mStatusBarStateListener.onDozingChanged(true); - - mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_POOR); + mInstrumentation.runOnMainSync(() -> { + createController(); + verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); + mController.setVisible(true); + mStatusBarStateListener.onDozingChanged(true); + + mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_POOR); + }); + mInstrumentation.waitForIdleSync(); mTestableLooper.processAllMessages(); assertThat(mTextView.getText()).isEqualTo( @@ -178,12 +187,15 @@ public class KeyguardIndicationControllerTest extends KeyguardIndicationControll @Test public void onAlignmentStateChanged_whileDozing_showsNotChargingIndication() { - createController(); - verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); - mController.setVisible(true); - mStatusBarStateListener.onDozingChanged(true); - - mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_TERRIBLE); + mInstrumentation.runOnMainSync(() -> { + createController(); + verify(mDockManager).addAlignmentStateListener(mAlignmentListener.capture()); + mController.setVisible(true); + mStatusBarStateListener.onDozingChanged(true); + + mAlignmentListener.getValue().onAlignmentStateChanged(DockManager.ALIGN_STATE_TERRIBLE); + }); + mInstrumentation.waitForIdleSync(); mTestableLooper.processAllMessages(); assertThat(mTextView.getText()).isEqualTo( @@ -630,12 +642,6 @@ public class KeyguardIndicationControllerTest extends KeyguardIndicationControll @Test public void sendFaceHelpMessages_fingerprintEnrolled() { createController(); - mController.mCoExAcquisitionMsgIdsToShowCallback.accept( - Set.of( - BiometricFaceConstants.FACE_ACQUIRED_MOUTH_COVERING_DETECTED, - BiometricFaceConstants.FACE_ACQUIRED_DARK_GLASSES_DETECTED - ) - ); // GIVEN unlocking with fingerprint is possible and allowed fingerprintUnlockIsPossibleAndAllowed(); diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorKosmos.kt index 77d39f066e08b944cb8d52c52635aef2e47b74e7..3ea46872ebcf5278614614c696f74373f65f5d21 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorKosmos.kt @@ -18,7 +18,6 @@ package com.android.systemui.deviceentry.domain.interactor import android.content.res.mainResources import com.android.systemui.biometrics.domain.interactor.fingerprintPropertyInteractor -import com.android.systemui.keyguard.domain.interactor.devicePostureInteractor import com.android.systemui.kosmos.Kosmos import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -32,6 +31,5 @@ val Kosmos.biometricMessageInteractor by faceAuthInteractor = deviceEntryFaceAuthInteractor, biometricSettingsInteractor = deviceEntryBiometricSettingsInteractor, faceHelpMessageDeferralInteractor = faceHelpMessageDeferralInteractor, - devicePostureInteractor = devicePostureInteractor, ) } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/DevicePostureRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/DevicePostureRepositoryKosmos.kt deleted file mode 100644 index 9bbb34c970d024c4ef2f07f89f6e92d68855aa65..0000000000000000000000000000000000000000 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/DevicePostureRepositoryKosmos.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ - -package com.android.systemui.keyguard.data.repository - -import com.android.systemui.kosmos.Kosmos - -val Kosmos.devicePostureRepository: DevicePostureRepository by - Kosmos.Fixture { FakeDevicePostureRepository() } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/DevicePostureInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/DevicePostureInteractorKosmos.kt deleted file mode 100644 index 75eb3c9ad7ad016d8ead225fa450d3593310e008..0000000000000000000000000000000000000000 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/DevicePostureInteractorKosmos.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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. - */ - -package com.android.systemui.keyguard.domain.interactor - -import com.android.systemui.keyguard.data.repository.devicePostureRepository -import com.android.systemui.kosmos.Kosmos -import kotlinx.coroutines.ExperimentalCoroutinesApi - -@ExperimentalCoroutinesApi -val Kosmos.devicePostureInteractor by - Kosmos.Fixture { - DevicePostureInteractor( - devicePostureRepository = devicePostureRepository, - ) - }