Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLockWhileAwakeInteractorTest.kt→packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardShowWhileAwakeInteractorTest.kt +16 −19 Original line number Diff line number Diff line Loading @@ -39,42 +39,39 @@ import org.mockito.kotlin.whenever @SmallTest @RunWith(AndroidJUnit4::class) class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @kotlinx.coroutines.ExperimentalCoroutinesApi class KeyguardShowWhileAwakeInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope private lateinit var underTest: KeyguardLockWhileAwakeInteractor private lateinit var underTest: KeyguardShowWhileAwakeInteractor @Before fun setup() { underTest = kosmos.keyguardLockWhileAwakeInteractor underTest = kosmos.keyguardShowWhileAwakeInteractor } @Test fun emitsMultipleTimeoutEvents() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) runCurrent() kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout( options = null ) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertThat(values) .containsExactly(LockWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON) .containsExactly(ShowWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON) advanceTimeBy(1000) kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout( options = null ) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertThat(values) .containsExactly( LockWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, LockWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, ShowWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, ShowWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, ) } Loading @@ -88,7 +85,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @Test fun emitsWhenKeyguardReenabled_onlyIfShowingWhenDisabled() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) kosmos.biometricSettingsRepository.setIsUserInLockdown(false) runCurrent() Loading @@ -101,7 +98,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) runCurrent() assertThat(values).containsExactly(LockWhileAwakeReason.KEYGUARD_REENABLED) assertThat(values).containsExactly(ShowWhileAwakeReason.KEYGUARD_REENABLED) kosmos.fakeKeyguardTransitionRepository.sendTransitionSteps( from = KeyguardState.LOCKSCREEN, Loading @@ -112,7 +109,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) runCurrent() assertThat(values).containsExactly(LockWhileAwakeReason.KEYGUARD_REENABLED) assertThat(values).containsExactly(ShowWhileAwakeReason.KEYGUARD_REENABLED) } /** Loading @@ -122,7 +119,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @Test fun doesNotEmit_keyguardNoLongerSuppressed() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) // Enable keyguard and then suppress it. kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) Loading @@ -144,14 +141,14 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @Test fun doesNotEmit_fromLockdown_orFromLockNow_ifEnabledButSuppressed() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) // Set keyguard enabled, but then disable lockscreen (suppress it). kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) whenever(kosmos.lockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true) runCurrent() kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(null) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() kosmos.biometricSettingsRepository.setIsUserInLockdown(true) Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -185,7 +185,7 @@ class KeyguardWakeDirectlyToGoneInteractorTest : SysuiTestCase() { canWake, ) kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(null) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertEquals( Loading @@ -209,7 +209,7 @@ class KeyguardWakeDirectlyToGoneInteractorTest : SysuiTestCase() { canWake, ) kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(null) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertEquals( Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +20 −1 Original line number Diff line number Diff line Loading @@ -146,6 +146,9 @@ import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatu import com.android.systemui.deviceentry.shared.model.SuccessFaceAuthenticationStatus; import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpsysTableLogger; import com.android.systemui.keyguard.KeyguardWmStateRefactor; import com.android.systemui.keyguard.domain.interactor.KeyguardServiceShowLockscreenInteractor; import com.android.systemui.keyguard.domain.interactor.ShowWhileAwakeReason; import com.android.systemui.keyguard.shared.constants.TrustAgentUiEvent; import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.clocks.WeatherData; Loading Loading @@ -298,6 +301,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private final Provider<SceneInteractor> mSceneInteractor; private final Provider<AlternateBouncerInteractor> mAlternateBouncerInteractor; private final Provider<CommunalSceneInteractor> mCommunalSceneInteractor; private final KeyguardServiceShowLockscreenInteractor mKeyguardServiceShowLockscreenInteractor; private final AuthController mAuthController; private final UiEventLogger mUiEventLogger; private final Set<String> mAllowFingerprintOnOccludingActivitiesFromPackage; Loading Loading @@ -2214,7 +2218,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab Provider<AlternateBouncerInteractor> alternateBouncerInteractor, Provider<JavaAdapter> javaAdapter, Provider<SceneInteractor> sceneInteractor, Provider<CommunalSceneInteractor> communalSceneInteractor) { Provider<CommunalSceneInteractor> communalSceneInteractor, KeyguardServiceShowLockscreenInteractor keyguardServiceShowLockscreenInteractor) { mContext = context; mSubscriptionManager = subscriptionManager; mUserTracker = userTracker; Loading Loading @@ -2264,6 +2269,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mJavaAdapter = javaAdapter; mSceneInteractor = sceneInteractor; mCommunalSceneInteractor = communalSceneInteractor; mKeyguardServiceShowLockscreenInteractor = keyguardServiceShowLockscreenInteractor; mHandler = new Handler(mainLooper) { @Override Loading Loading @@ -2545,6 +2551,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab ); } if (KeyguardWmStateRefactor.isEnabled()) { mJavaAdapter.get().alwaysCollectFlow( mKeyguardServiceShowLockscreenInteractor.getShowNowEvents(), this::onKeyguardServiceShowLockscreenNowEvents ); } if (glanceableHubV2()) { mJavaAdapter.get().alwaysCollectFlow( mCommunalSceneInteractor.get().isCommunalVisible(), Loading Loading @@ -2578,6 +2591,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab handlePrimaryBouncerChanged(primaryBouncerIsOrWillBeShowing, primaryBouncerFullyShown); } void onKeyguardServiceShowLockscreenNowEvents(ShowWhileAwakeReason reason) { if (reason == ShowWhileAwakeReason.FOLDED_WITH_SWIPE_UP_TO_CONTINUE) { mMainExecutor.execute(this::tryForceIsDismissibleKeyguard); } } private void initializeSimState() { // Set initial sim states values. for (int slot = 0; slot < mTelephonyManager.getActiveModemCount(); slot++) { Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +11 −6 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ import com.android.systemui.flags.FeatureFlags; import com.android.systemui.keyguard.domain.interactor.KeyguardDismissInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardEnabledInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardServiceLockNowInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardServiceShowLockscreenInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardStateCallbackInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardWakeDirectlyToGoneInteractor; import com.android.systemui.keyguard.ui.binder.KeyguardSurfaceBehindParamsApplier; Loading Loading @@ -331,7 +331,7 @@ public class KeyguardService extends Service { return new FoldGracePeriodProvider(); } }; private final KeyguardServiceLockNowInteractor mKeyguardServiceLockNowInteractor; private final KeyguardServiceShowLockscreenInteractor mKeyguardServiceShowLockscreenInteractor; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Inject Loading @@ -358,7 +358,7 @@ public class KeyguardService extends Service { KeyguardDismissInteractor keyguardDismissInteractor, Lazy<DeviceEntryInteractor> deviceEntryInteractorLazy, KeyguardStateCallbackInteractor keyguardStateCallbackInteractor, KeyguardServiceLockNowInteractor keyguardServiceLockNowInteractor, KeyguardServiceShowLockscreenInteractor keyguardServiceShowLockscreenInteractor, KeyguardUpdateMonitor keyguardUpdateMonitor) { super(); mKeyguardViewMediator = keyguardViewMediator; Loading Loading @@ -391,7 +391,7 @@ public class KeyguardService extends Service { mKeyguardEnabledInteractor = keyguardEnabledInteractor; mKeyguardWakeDirectlyToGoneInteractor = keyguardWakeDirectlyToGoneInteractor; mKeyguardDismissInteractor = keyguardDismissInteractor; mKeyguardServiceLockNowInteractor = keyguardServiceLockNowInteractor; mKeyguardServiceShowLockscreenInteractor = keyguardServiceShowLockscreenInteractor; mKeyguardUpdateMonitor = keyguardUpdateMonitor; } Loading Loading @@ -673,7 +673,7 @@ public class KeyguardService extends Service { if (SceneContainerFlag.isEnabled()) { mDeviceEntryInteractorLazy.get().lockNow("doKeyguardTimeout"); } else if (KeyguardWmStateRefactor.isEnabled()) { mKeyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(options); mKeyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout(); } mKeyguardViewMediator.doKeyguardTimeout(options); Loading @@ -686,7 +686,12 @@ public class KeyguardService extends Service { if (mFoldGracePeriodProvider.get().isEnabled()) { mKeyguardInteractor.showDismissibleKeyguard(); } if (KeyguardWmStateRefactor.isEnabled()) { mKeyguardServiceShowLockscreenInteractor.onKeyguardServiceShowDismissibleKeyguard(); } else { mKeyguardViewMediator.showDismissibleKeyguard(); } if (SceneContainerFlag.isEnabled() && mFoldGracePeriodProvider.get().isEnabled()) { mMainExecutor.execute(() -> mSceneInteractorLazy.get().changeScene( Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromGoneTransitionInteractor.kt +2 −5 Original line number Diff line number Diff line Loading @@ -34,9 +34,6 @@ import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter import com.android.app.tracing.coroutines.launchTraced as launch @SysUISingleton class FromGoneTransitionInteractor Loading @@ -52,7 +49,7 @@ constructor( powerInteractor: PowerInteractor, private val communalSceneInteractor: CommunalSceneInteractor, keyguardOcclusionInteractor: KeyguardOcclusionInteractor, private val keyguardLockWhileAwakeInteractor: KeyguardLockWhileAwakeInteractor, private val keyguardShowWhileAwakeInteractor: KeyguardShowWhileAwakeInteractor, ) : TransitionInteractor( fromState = KeyguardState.GONE, Loading Loading @@ -101,7 +98,7 @@ constructor( private fun listenForGoneToLockscreenOrHubOrOccluded() { if (KeyguardWmStateRefactor.isEnabled) { scope.launch { keyguardLockWhileAwakeInteractor.lockWhileAwakeEvents keyguardShowWhileAwakeInteractor.showWhileAwakeEvents .filterRelevantKeyguardState() .sample(communalSceneInteractor.isIdleOnCommunalNotEditMode, ::Pair) .collect { (lockReason, idleOnCommunal) -> Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLockWhileAwakeInteractorTest.kt→packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardShowWhileAwakeInteractorTest.kt +16 −19 Original line number Diff line number Diff line Loading @@ -39,42 +39,39 @@ import org.mockito.kotlin.whenever @SmallTest @RunWith(AndroidJUnit4::class) class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @kotlinx.coroutines.ExperimentalCoroutinesApi class KeyguardShowWhileAwakeInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope private lateinit var underTest: KeyguardLockWhileAwakeInteractor private lateinit var underTest: KeyguardShowWhileAwakeInteractor @Before fun setup() { underTest = kosmos.keyguardLockWhileAwakeInteractor underTest = kosmos.keyguardShowWhileAwakeInteractor } @Test fun emitsMultipleTimeoutEvents() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) runCurrent() kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout( options = null ) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertThat(values) .containsExactly(LockWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON) .containsExactly(ShowWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON) advanceTimeBy(1000) kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout( options = null ) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertThat(values) .containsExactly( LockWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, LockWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, ShowWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, ShowWhileAwakeReason.KEYGUARD_TIMEOUT_WHILE_SCREEN_ON, ) } Loading @@ -88,7 +85,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @Test fun emitsWhenKeyguardReenabled_onlyIfShowingWhenDisabled() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) kosmos.biometricSettingsRepository.setIsUserInLockdown(false) runCurrent() Loading @@ -101,7 +98,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) runCurrent() assertThat(values).containsExactly(LockWhileAwakeReason.KEYGUARD_REENABLED) assertThat(values).containsExactly(ShowWhileAwakeReason.KEYGUARD_REENABLED) kosmos.fakeKeyguardTransitionRepository.sendTransitionSteps( from = KeyguardState.LOCKSCREEN, Loading @@ -112,7 +109,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) runCurrent() assertThat(values).containsExactly(LockWhileAwakeReason.KEYGUARD_REENABLED) assertThat(values).containsExactly(ShowWhileAwakeReason.KEYGUARD_REENABLED) } /** Loading @@ -122,7 +119,7 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @Test fun doesNotEmit_keyguardNoLongerSuppressed() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) // Enable keyguard and then suppress it. kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) Loading @@ -144,14 +141,14 @@ class KeyguardLockWhileAwakeInteractorTest : SysuiTestCase() { @Test fun doesNotEmit_fromLockdown_orFromLockNow_ifEnabledButSuppressed() = testScope.runTest { val values by collectValues(underTest.lockWhileAwakeEvents) val values by collectValues(underTest.showWhileAwakeEvents) // Set keyguard enabled, but then disable lockscreen (suppress it). kosmos.keyguardEnabledInteractor.notifyKeyguardEnabled(true) whenever(kosmos.lockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true) runCurrent() kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(null) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() kosmos.biometricSettingsRepository.setIsUserInLockdown(true) Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -185,7 +185,7 @@ class KeyguardWakeDirectlyToGoneInteractorTest : SysuiTestCase() { canWake, ) kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(null) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertEquals( Loading @@ -209,7 +209,7 @@ class KeyguardWakeDirectlyToGoneInteractorTest : SysuiTestCase() { canWake, ) kosmos.keyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(null) kosmos.keyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout() runCurrent() assertEquals( Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +20 −1 Original line number Diff line number Diff line Loading @@ -146,6 +146,9 @@ import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatu import com.android.systemui.deviceentry.shared.model.SuccessFaceAuthenticationStatus; import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpsysTableLogger; import com.android.systemui.keyguard.KeyguardWmStateRefactor; import com.android.systemui.keyguard.domain.interactor.KeyguardServiceShowLockscreenInteractor; import com.android.systemui.keyguard.domain.interactor.ShowWhileAwakeReason; import com.android.systemui.keyguard.shared.constants.TrustAgentUiEvent; import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.clocks.WeatherData; Loading Loading @@ -298,6 +301,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private final Provider<SceneInteractor> mSceneInteractor; private final Provider<AlternateBouncerInteractor> mAlternateBouncerInteractor; private final Provider<CommunalSceneInteractor> mCommunalSceneInteractor; private final KeyguardServiceShowLockscreenInteractor mKeyguardServiceShowLockscreenInteractor; private final AuthController mAuthController; private final UiEventLogger mUiEventLogger; private final Set<String> mAllowFingerprintOnOccludingActivitiesFromPackage; Loading Loading @@ -2214,7 +2218,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab Provider<AlternateBouncerInteractor> alternateBouncerInteractor, Provider<JavaAdapter> javaAdapter, Provider<SceneInteractor> sceneInteractor, Provider<CommunalSceneInteractor> communalSceneInteractor) { Provider<CommunalSceneInteractor> communalSceneInteractor, KeyguardServiceShowLockscreenInteractor keyguardServiceShowLockscreenInteractor) { mContext = context; mSubscriptionManager = subscriptionManager; mUserTracker = userTracker; Loading Loading @@ -2264,6 +2269,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mJavaAdapter = javaAdapter; mSceneInteractor = sceneInteractor; mCommunalSceneInteractor = communalSceneInteractor; mKeyguardServiceShowLockscreenInteractor = keyguardServiceShowLockscreenInteractor; mHandler = new Handler(mainLooper) { @Override Loading Loading @@ -2545,6 +2551,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab ); } if (KeyguardWmStateRefactor.isEnabled()) { mJavaAdapter.get().alwaysCollectFlow( mKeyguardServiceShowLockscreenInteractor.getShowNowEvents(), this::onKeyguardServiceShowLockscreenNowEvents ); } if (glanceableHubV2()) { mJavaAdapter.get().alwaysCollectFlow( mCommunalSceneInteractor.get().isCommunalVisible(), Loading Loading @@ -2578,6 +2591,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab handlePrimaryBouncerChanged(primaryBouncerIsOrWillBeShowing, primaryBouncerFullyShown); } void onKeyguardServiceShowLockscreenNowEvents(ShowWhileAwakeReason reason) { if (reason == ShowWhileAwakeReason.FOLDED_WITH_SWIPE_UP_TO_CONTINUE) { mMainExecutor.execute(this::tryForceIsDismissibleKeyguard); } } private void initializeSimState() { // Set initial sim states values. for (int slot = 0; slot < mTelephonyManager.getActiveModemCount(); slot++) { Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +11 −6 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ import com.android.systemui.flags.FeatureFlags; import com.android.systemui.keyguard.domain.interactor.KeyguardDismissInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardEnabledInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardServiceLockNowInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardServiceShowLockscreenInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardStateCallbackInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardWakeDirectlyToGoneInteractor; import com.android.systemui.keyguard.ui.binder.KeyguardSurfaceBehindParamsApplier; Loading Loading @@ -331,7 +331,7 @@ public class KeyguardService extends Service { return new FoldGracePeriodProvider(); } }; private final KeyguardServiceLockNowInteractor mKeyguardServiceLockNowInteractor; private final KeyguardServiceShowLockscreenInteractor mKeyguardServiceShowLockscreenInteractor; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Inject Loading @@ -358,7 +358,7 @@ public class KeyguardService extends Service { KeyguardDismissInteractor keyguardDismissInteractor, Lazy<DeviceEntryInteractor> deviceEntryInteractorLazy, KeyguardStateCallbackInteractor keyguardStateCallbackInteractor, KeyguardServiceLockNowInteractor keyguardServiceLockNowInteractor, KeyguardServiceShowLockscreenInteractor keyguardServiceShowLockscreenInteractor, KeyguardUpdateMonitor keyguardUpdateMonitor) { super(); mKeyguardViewMediator = keyguardViewMediator; Loading Loading @@ -391,7 +391,7 @@ public class KeyguardService extends Service { mKeyguardEnabledInteractor = keyguardEnabledInteractor; mKeyguardWakeDirectlyToGoneInteractor = keyguardWakeDirectlyToGoneInteractor; mKeyguardDismissInteractor = keyguardDismissInteractor; mKeyguardServiceLockNowInteractor = keyguardServiceLockNowInteractor; mKeyguardServiceShowLockscreenInteractor = keyguardServiceShowLockscreenInteractor; mKeyguardUpdateMonitor = keyguardUpdateMonitor; } Loading Loading @@ -673,7 +673,7 @@ public class KeyguardService extends Service { if (SceneContainerFlag.isEnabled()) { mDeviceEntryInteractorLazy.get().lockNow("doKeyguardTimeout"); } else if (KeyguardWmStateRefactor.isEnabled()) { mKeyguardServiceLockNowInteractor.onKeyguardServiceDoKeyguardTimeout(options); mKeyguardServiceShowLockscreenInteractor.onKeyguardServiceDoKeyguardTimeout(); } mKeyguardViewMediator.doKeyguardTimeout(options); Loading @@ -686,7 +686,12 @@ public class KeyguardService extends Service { if (mFoldGracePeriodProvider.get().isEnabled()) { mKeyguardInteractor.showDismissibleKeyguard(); } if (KeyguardWmStateRefactor.isEnabled()) { mKeyguardServiceShowLockscreenInteractor.onKeyguardServiceShowDismissibleKeyguard(); } else { mKeyguardViewMediator.showDismissibleKeyguard(); } if (SceneContainerFlag.isEnabled() && mFoldGracePeriodProvider.get().isEnabled()) { mMainExecutor.execute(() -> mSceneInteractorLazy.get().changeScene( Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromGoneTransitionInteractor.kt +2 −5 Original line number Diff line number Diff line Loading @@ -34,9 +34,6 @@ import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter import com.android.app.tracing.coroutines.launchTraced as launch @SysUISingleton class FromGoneTransitionInteractor Loading @@ -52,7 +49,7 @@ constructor( powerInteractor: PowerInteractor, private val communalSceneInteractor: CommunalSceneInteractor, keyguardOcclusionInteractor: KeyguardOcclusionInteractor, private val keyguardLockWhileAwakeInteractor: KeyguardLockWhileAwakeInteractor, private val keyguardShowWhileAwakeInteractor: KeyguardShowWhileAwakeInteractor, ) : TransitionInteractor( fromState = KeyguardState.GONE, Loading Loading @@ -101,7 +98,7 @@ constructor( private fun listenForGoneToLockscreenOrHubOrOccluded() { if (KeyguardWmStateRefactor.isEnabled) { scope.launch { keyguardLockWhileAwakeInteractor.lockWhileAwakeEvents keyguardShowWhileAwakeInteractor.showWhileAwakeEvents .filterRelevantKeyguardState() .sample(communalSceneInteractor.isIdleOnCommunalNotEditMode, ::Pair) .collect { (lockReason, idleOnCommunal) -> Loading