diff options
10 files changed, 8 insertions, 187 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java index 00c5577b8017..ce57fe256798 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java +++ b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java @@ -18,8 +18,6 @@ package com.android.keyguard; import static android.view.View.INVISIBLE; -import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; - import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.mock; @@ -171,7 +169,6 @@ public class KeyguardClockSwitchControllerBaseTest extends SysuiTestCase { when(mSmartspaceController.buildAndConnectView(any())).thenReturn(mFakeSmartspaceView); mExecutor = new FakeExecutor(new FakeSystemClock()); mFakeFeatureFlags = new FakeFeatureFlags(); - mFakeFeatureFlags.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false); mController = new KeyguardClockSwitchController( mView, mStatusBarStateController, @@ -188,7 +185,6 @@ public class KeyguardClockSwitchControllerBaseTest extends SysuiTestCase { mLogBuffer, KeyguardInteractorFactory.create(mFakeFeatureFlags).getKeyguardInteractor(), mKeyguardClockInteractor, - mFakeFeatureFlags, mock(InWindowLauncherUnlockAnimationManager.class) ); diff --git a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardClockSwitchControllerWithCoroutinesTest.kt b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardClockSwitchControllerWithCoroutinesTest.kt deleted file mode 100644 index c2c0f5713d9b..000000000000 --- a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardClockSwitchControllerWithCoroutinesTest.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.keyguard - -import android.view.View -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.filters.SmallTest -import com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.runBlocking -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -@SmallTest -class KeyguardClockSwitchControllerWithCoroutinesTest : KeyguardClockSwitchControllerBaseTest() { - - @Test - fun testStatusAreaVisibility_onLockscreenHostedDreamStateChanged() = - runBlocking(IMMEDIATE) { - // GIVEN starting state for the keyguard clock and wallpaper dream enabled - mFakeFeatureFlags.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, true) - init() - - // WHEN dreaming starts - mController.mIsActiveDreamLockscreenHostedCallback.accept( - true /* isActiveDreamLockscreenHosted */ - ) - - // THEN the status area is hidden - mExecutor.runAllReady() - assertEquals(View.INVISIBLE, mStatusArea.visibility) - - // WHEN dreaming stops - mController.mIsActiveDreamLockscreenHostedCallback.accept( - false /* isActiveDreamLockscreenHosted */ - ) - mExecutor.runAllReady() - - // THEN status area view is visible - assertEquals(View.VISIBLE, mStatusArea.visibility) - } - - companion object { - private val IMMEDIATE = Dispatchers.Main.immediate - } -} diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt index 9fe52991c3a0..adc336d18245 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt @@ -42,7 +42,6 @@ import com.android.systemui.dock.DockManager import com.android.systemui.dump.DumpManager import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.flags.FakeFeatureFlagsClassic -import com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED import com.android.systemui.flags.Flags.SPLIT_SHADE_SUBPIXEL_OPTIMIZATION import com.android.systemui.flags.andSceneContainer import com.android.systemui.keyevent.domain.interactor.SysUIKeyEventHandler @@ -128,8 +127,6 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) : private lateinit var lockscreenShadeTransitionController: LockscreenShadeTransitionController @Mock private lateinit var phoneStatusBarViewController: PhoneStatusBarViewController @Mock private lateinit var pulsingGestureListener: PulsingGestureListener - @Mock - private lateinit var mLockscreenHostedDreamGestureListener: LockscreenHostedDreamGestureListener @Mock private lateinit var notificationInsetsController: NotificationInsetsController @Mock private lateinit var mGlanceableHubContainerController: GlanceableHubContainerController @Mock(answer = Answers.RETURNS_DEEP_STUBS) @@ -181,7 +178,6 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) : featureFlagsClassic = FakeFeatureFlagsClassic() featureFlagsClassic.set(SPLIT_SHADE_SUBPIXEL_OPTIMIZATION, true) - featureFlagsClassic.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false) mSetFlagsRule.enableFlags(Flags.FLAG_REVAMPED_BOUNCER_MESSAGES) testScope = TestScope() @@ -213,7 +209,6 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) : shadeLogger, dumpManager, pulsingGestureListener, - mLockscreenHostedDreamGestureListener, keyguardTransitionInteractor, mGlanceableHubContainerController, notificationLaunchAnimationInteractor, diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt index 9093b2bcbbf8..d61320e22e14 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt @@ -111,8 +111,6 @@ class NotificationShadeWindowViewTest : SysuiTestCase() { @Mock private lateinit var dumpManager: DumpManager @Mock private lateinit var pulsingGestureListener: PulsingGestureListener @Mock private lateinit var sysUiUnfoldComponent: SysUIUnfoldComponent - @Mock - private lateinit var mLockscreenHostedDreamGestureListener: LockscreenHostedDreamGestureListener @Mock private lateinit var keyguardBouncerComponentFactory: KeyguardBouncerComponent.Factory @Mock private lateinit var keyguardBouncerComponent: KeyguardBouncerComponent @Mock @@ -156,7 +154,6 @@ class NotificationShadeWindowViewTest : SysuiTestCase() { val featureFlags = FakeFeatureFlags() featureFlags.set(Flags.SPLIT_SHADE_SUBPIXEL_OPTIMIZATION, true) - featureFlags.set(Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false) mSetFlagsRule.enableFlags(AConfigFlags.FLAG_REVAMPED_BOUNCER_MESSAGES) testScope = TestScope() controller = @@ -184,7 +181,6 @@ class NotificationShadeWindowViewTest : SysuiTestCase() { shadeLogger, dumpManager, pulsingGestureListener, - mLockscreenHostedDreamGestureListener, keyguardTransitionInteractor, mGlanceableHubContainerController, NotificationLaunchAnimationInteractor(NotificationLaunchAnimationRepository()), diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java index 59678a2f8c90..44782529e5c3 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/KeyguardIndicationControllerBaseTest.java @@ -19,7 +19,6 @@ package com.android.systemui.statusbar; import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_DEFAULT; import static com.android.systemui.flags.Flags.KEYGUARD_TALKBACK_FIX; -import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_TRANSIENT; import static com.android.systemui.keyguard.ScreenLifecycle.SCREEN_ON; @@ -273,7 +272,6 @@ public class KeyguardIndicationControllerBaseTest extends SysuiTestCase { mFlags = new FakeFeatureFlags(); mFlags.set(KEYGUARD_TALKBACK_FIX, true); - mFlags.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false); mController = new KeyguardIndicationController( mContext, mTestableLooper.getLooper(), diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index 7cba845460ca..ec0f582dcb47 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -22,8 +22,6 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static com.android.keyguard.KeyguardClockSwitch.LARGE; import static com.android.keyguard.KeyguardClockSwitch.SMALL; import static com.android.systemui.Flags.smartspaceRelocateToBottom; -import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; -import static com.android.systemui.util.kotlin.JavaAdapterKt.collectFlow; import android.annotation.Nullable; import android.database.ContentObserver; @@ -36,13 +34,11 @@ import android.widget.FrameLayout; import android.widget.LinearLayout; import androidx.annotation.NonNull; -import androidx.annotation.VisibleForTesting; import com.android.systemui.Dumpable; import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dump.DumpManager; -import com.android.systemui.flags.FeatureFlagsClassic; import com.android.systemui.keyguard.KeyguardUnlockAnimationController; import com.android.systemui.keyguard.MigrateClocksToBlueprint; import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor; @@ -71,7 +67,6 @@ import kotlinx.coroutines.DisposableHandle; import java.io.PrintWriter; import java.util.Locale; import java.util.concurrent.Executor; -import java.util.function.Consumer; import javax.inject.Inject; @@ -114,8 +109,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private boolean mShownOnSecondaryDisplay = false; private boolean mOnlyClock = false; - private boolean mIsActiveDreamLockscreenHosted = false; - private final FeatureFlagsClassic mFeatureFlags; private KeyguardInteractor mKeyguardInteractor; private KeyguardClockInteractor mKeyguardClockInteractor; private final DelayableExecutor mUiExecutor; @@ -124,15 +117,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private DisposableHandle mAodIconsBindHandle; @Nullable private NotificationIconContainer mAodIconContainer; - @VisibleForTesting - final Consumer<Boolean> mIsActiveDreamLockscreenHostedCallback = - (Boolean isLockscreenHosted) -> { - if (mIsActiveDreamLockscreenHosted == isLockscreenHosted) { - return; - } - mIsActiveDreamLockscreenHosted = isLockscreenHosted; - updateKeyguardStatusAreaVisibility(); - }; private final ContentObserver mDoubleLineClockObserver = new ContentObserver(null) { @Override public void onChange(boolean change) { @@ -173,7 +157,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS @KeyguardClockLog LogBuffer logBuffer, KeyguardInteractor keyguardInteractor, KeyguardClockInteractor keyguardClockInteractor, - FeatureFlagsClassic featureFlags, InWindowLauncherUnlockAnimationManager inWindowLauncherUnlockAnimationManager) { super(keyguardClockSwitch); mStatusBarStateController = statusBarStateController; @@ -189,7 +172,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mClockEventController = clockEventController; mLogBuffer = logBuffer; mView.setLogBuffer(mLogBuffer); - mFeatureFlags = featureFlags; mKeyguardInteractor = keyguardInteractor; mKeyguardClockInteractor = keyguardClockInteractor; mInWindowLauncherUnlockAnimationManager = inWindowLauncherUnlockAnimationManager; @@ -251,12 +233,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mDumpManager.unregisterDumpable(getClass().getSimpleName()); // unregister previous mDumpManager.registerDumpable(getClass().getSimpleName(), this); } - - if (mFeatureFlags.isEnabled(LOCKSCREEN_WALLPAPER_DREAM_ENABLED)) { - mStatusArea = mView.findViewById(R.id.keyguard_status_area); - collectFlow(mStatusArea, mKeyguardInteractor.isActiveDreamLockscreenHosted(), - mIsActiveDreamLockscreenHostedCallback); - } } public KeyguardClockSwitch getView() { @@ -668,15 +644,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS } } - private void updateKeyguardStatusAreaVisibility() { - if (mStatusArea != null) { - mUiExecutor.execute(() -> { - mStatusArea.setVisibility( - mIsActiveDreamLockscreenHosted ? View.INVISIBLE : View.VISIBLE); - }); - } - } - /** * Sets the clipChildren property on relevant views, to allow the smartspace to draw out of * bounds during the unlock transition. diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java index 5699557c14e7..36449bee8bf6 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java @@ -16,7 +16,6 @@ package com.android.systemui.shade; -import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; import static com.android.systemui.keyguard.shared.model.KeyguardState.DREAMING; import static com.android.systemui.keyguard.shared.model.KeyguardState.LOCKSCREEN; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; @@ -103,7 +102,6 @@ public class NotificationShadeWindowViewController implements Dumpable { private final KeyguardUnlockAnimationController mKeyguardUnlockAnimationController; private final AmbientState mAmbientState; private final PulsingGestureListener mPulsingGestureListener; - private final LockscreenHostedDreamGestureListener mLockscreenHostedDreamGestureListener; private final NotificationInsetsController mNotificationInsetsController; private final FeatureFlagsClassic mFeatureFlagsClassic; private final SysUIKeyEventHandler mSysUIKeyEventHandler; @@ -114,7 +112,6 @@ public class NotificationShadeWindowViewController implements Dumpable { private final GlanceableHubContainerController mGlanceableHubContainerController; private GestureDetector mPulsingWakeupGestureHandler; - private GestureDetector mDreamingWakeupGestureHandler; private View mBrightnessMirror; private boolean mTouchActive; private boolean mTouchCancelled; @@ -182,7 +179,6 @@ public class NotificationShadeWindowViewController implements Dumpable { ShadeLogger shadeLogger, DumpManager dumpManager, PulsingGestureListener pulsingGestureListener, - LockscreenHostedDreamGestureListener lockscreenHostedDreamGestureListener, KeyguardTransitionInteractor keyguardTransitionInteractor, GlanceableHubContainerController glanceableHubContainerController, NotificationLaunchAnimationInteractor notificationLaunchAnimationInteractor, @@ -212,7 +208,6 @@ public class NotificationShadeWindowViewController implements Dumpable { mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mAmbientState = ambientState; mPulsingGestureListener = pulsingGestureListener; - mLockscreenHostedDreamGestureListener = lockscreenHostedDreamGestureListener; mNotificationInsetsController = notificationInsetsController; mKeyguardTransitionInteractor = keyguardTransitionInteractor; mGlanceableHubContainerController = glanceableHubContainerController; @@ -327,10 +322,6 @@ public class NotificationShadeWindowViewController implements Dumpable { mStackScrollLayout = mView.findViewById(R.id.notification_stack_scroller); mPulsingWakeupGestureHandler = new GestureDetector(mView.getContext(), mPulsingGestureListener); - if (mFeatureFlagsClassic.isEnabled(LOCKSCREEN_WALLPAPER_DREAM_ENABLED)) { - mDreamingWakeupGestureHandler = new GestureDetector(mView.getContext(), - mLockscreenHostedDreamGestureListener); - } mView.setLayoutInsetsController(mNotificationInsetsController); mView.setInteractionEventHandler(new NotificationShadeWindowView.InteractionEventHandler() { boolean mUseDragDownHelperForTouch = false; @@ -402,10 +393,6 @@ public class NotificationShadeWindowViewController implements Dumpable { // GlanceableHubContainerController is only used pre-flexiglass. return logDownDispatch(ev, "dispatched to glanceable hub container", true); } - if (mDreamingWakeupGestureHandler != null - && mDreamingWakeupGestureHandler.onTouchEvent(ev)) { - return logDownDispatch(ev, "dream wakeup gesture handled", true); - } if (mBrightnessMirror != null && mBrightnessMirror.getVisibility() == View.VISIBLE) { // Disallow new pointers while the brightness mirror is visible. This is so that diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 769abafed69f..f99d8f140670 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -32,7 +32,6 @@ import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT_RECOGNIZED; import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_HELP_FINGERPRINT_NOT_RECOGNIZED; import static com.android.systemui.DejankUtils.whitelistIpcs; -import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.IMPORTANT_MSG_MIN_DURATION; import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_IS_DISMISSIBLE; import static com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_ADAPTIVE_AUTH; @@ -226,18 +225,8 @@ public class KeyguardIndicationController { private KeyguardUpdateMonitorCallback mUpdateMonitorCallback; private boolean mDozing; - private boolean mIsActiveDreamLockscreenHosted; private final ScreenLifecycle mScreenLifecycle; @VisibleForTesting - final Consumer<Boolean> mIsActiveDreamLockscreenHostedCallback = - (Boolean isLockscreenHosted) -> { - if (mIsActiveDreamLockscreenHosted == isLockscreenHosted) { - return; - } - mIsActiveDreamLockscreenHosted = isLockscreenHosted; - updateDeviceEntryIndication(false); - }; - @VisibleForTesting final Consumer<Set<Integer>> mCoExAcquisitionMsgIdsToShowCallback = (Set<Integer> coExFaceAcquisitionMsgIdsToShow) -> mCoExFaceAcquisitionMsgIdsToShow = coExFaceAcquisitionMsgIdsToShow; @@ -423,10 +412,6 @@ public class KeyguardIndicationController { intentFilter.addAction(Intent.ACTION_USER_REMOVED); mBroadcastDispatcher.registerReceiver(mBroadcastReceiver, intentFilter); } - if (mFeatureFlags.isEnabled(LOCKSCREEN_WALLPAPER_DREAM_ENABLED)) { - collectFlow(mIndicationArea, mKeyguardInteractor.isActiveDreamLockscreenHosted(), - mIsActiveDreamLockscreenHostedCallback); - } collectFlow(mIndicationArea, mBiometricMessageInteractor.getCoExFaceAcquisitionMsgIdsToShow(), @@ -1032,12 +1017,6 @@ public class KeyguardIndicationController { return; } - // Device is dreaming and the dream is hosted in lockscreen - if (mIsActiveDreamLockscreenHosted) { - mIndicationArea.setVisibility(GONE); - return; - } - // A few places might need to hide the indication, so always start by making it visible mIndicationArea.setVisibility(VISIBLE); @@ -1247,7 +1226,6 @@ public class KeyguardIndicationController { pw.println(" mBiometricMessageFollowUp: " + mBiometricMessageFollowUp); pw.println(" mBatteryLevel: " + mBatteryLevel); pw.println(" mBatteryPresent: " + mBatteryPresent); - pw.println(" mIsActiveDreamLockscreenHosted: " + mIsActiveDreamLockscreenHosted); pw.println(" AOD text: " + ( mTopIndicationView == null ? null : mTopIndicationView.getText())); pw.println(" computePowerIndication(): " + computePowerIndication()); diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt index 172aff856693..cb2c8fc2c418 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt @@ -176,8 +176,8 @@ class KeyguardQuickAffordancesCombinedViewModelTest : SysuiTestCase() { BuiltInKeyguardQuickAffordanceKeys.HOME_CONTROLS, KeyguardQuickAffordanceSlots.SLOT_ID_BOTTOM_END + ":" + - BuiltInKeyguardQuickAffordanceKeys.QUICK_ACCESS_WALLET - ) + BuiltInKeyguardQuickAffordanceKeys.QUICK_ACCESS_WALLET, + ), ) homeControlsQuickAffordanceConfig = @@ -669,8 +669,8 @@ class KeyguardQuickAffordancesCombinedViewModelTest : SysuiTestCase() { min( 1f, KeyguardQuickAffordancesCombinedViewModel - .AFFORDANCE_FULLY_OPAQUE_ALPHA_THRESHOLD + 0.1f - ), + .AFFORDANCE_FULLY_OPAQUE_ALPHA_THRESHOLD + 0.1f, + ) ) val testConfig = @@ -765,7 +765,7 @@ class KeyguardQuickAffordancesCombinedViewModelTest : SysuiTestCase() { testScope.runTest { kosmos.setTransition( sceneTransition = Idle(Scenes.Lockscreen), - stateTransition = TransitionStep(from = AOD, to = LOCKSCREEN) + stateTransition = TransitionStep(from = AOD, to = LOCKSCREEN), ) intendedShadeAlphaMutableStateFlow.value = 0.25f val underTest = collectLastValue(underTest.transitionAlpha) @@ -780,7 +780,7 @@ class KeyguardQuickAffordancesCombinedViewModelTest : SysuiTestCase() { testScope.runTest { kosmos.setTransition( sceneTransition = Idle(Scenes.Gone), - stateTransition = TransitionStep(from = AOD, to = GONE) + stateTransition = TransitionStep(from = AOD, to = GONE), ) intendedShadeAlphaMutableStateFlow.value = 0.5f val underTest = collectLastValue(underTest.transitionAlpha) @@ -815,7 +815,7 @@ class KeyguardQuickAffordancesCombinedViewModelTest : SysuiTestCase() { when (testConfig.isActivated) { true -> ActivationState.Active false -> ActivationState.Inactive - } + }, ) } else { KeyguardQuickAffordanceConfig.LockScreenState.Hidden @@ -864,7 +864,7 @@ class KeyguardQuickAffordancesCombinedViewModelTest : SysuiTestCase() { val intent: Intent? = null, val isSelected: Boolean = false, val isDimmed: Boolean = false, - val slotId: String = "" + val slotId: String = "", ) { init { check(!isVisible || icon != null) { "Must supply non-null icon if visible!" } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerWithCoroutinesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerWithCoroutinesTest.kt index a68ba06637cc..e2f22cde96de 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerWithCoroutinesTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerWithCoroutinesTest.kt @@ -17,20 +17,16 @@ package com.android.systemui.statusbar import android.testing.TestableLooper -import android.view.View import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED import com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_BIOMETRIC_MESSAGE import com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_BIOMETRIC_MESSAGE_FOLLOW_UP import com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController.INDICATION_TYPE_TRUST import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.runBlocking import org.junit.Test import org.junit.runner.RunWith import org.mockito.Mockito.times -import org.mockito.Mockito.verify import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) @@ -38,36 +34,6 @@ import org.mockito.kotlin.whenever @TestableLooper.RunWithLooper(setAsMainLooper = true) class KeyguardIndicationControllerWithCoroutinesTest : KeyguardIndicationControllerBaseTest() { @Test - fun testIndicationAreaVisibility_onLockscreenHostedDreamStateChanged() = - runBlocking(IMMEDIATE) { - // GIVEN starting state for keyguard indication and wallpaper dream enabled - createController() - mFlags.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, true) - mController.setVisible(true) - - // THEN indication area is visible - verify(mIndicationArea, times(2)).visibility = View.VISIBLE - - // WHEN the device is dreaming with lockscreen hosted dream - mController.mIsActiveDreamLockscreenHostedCallback.accept( - true /* isActiveDreamLockscreenHosted */ - ) - mExecutor.runAllReady() - - // THEN the indication area is hidden - verify(mIndicationArea).visibility = View.GONE - - // WHEN the device stops dreaming with lockscreen hosted dream - mController.mIsActiveDreamLockscreenHostedCallback.accept( - false /* isActiveDreamLockscreenHosted */ - ) - mExecutor.runAllReady() - - // THEN indication area is set visible - verify(mIndicationArea, times(3)).visibility = View.VISIBLE - } - - @Test fun onTrustAgentErrorMessageDelayed_fingerprintEngaged() { createController() mController.setVisible(true) |