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

Commit d3e4ade8 authored by Chandru S's avatar Chandru S Committed by Android (Google) Code Review
Browse files

Merge changes I08a52ebe,I3665df58 into main

* changes:
  Remove COMPOSE_BOUNCER_ENABLED enabled static flag
  Add a check for is unlocked before transitioning to the gone scene.
parents 31bfe866 531276aa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ class ShadeControllerSceneImplTest : SysuiTestCase() {

    private fun TestScope.setDeviceEntered(isEntered: Boolean) {
        if (isEntered) {
            // Unlock the device marking the device has entered.
            kosmos.fakeDeviceEntryFingerprintAuthRepository.setAuthenticationStatus(
                SuccessFingerprintAuthenticationStatus(0, true)
            )
+3 −2
Original line number Diff line number Diff line
@@ -12,14 +12,15 @@ import com.android.systemui.bouncer.ui.BouncerDialogFactory
import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel
import com.android.systemui.bouncer.ui.viewmodel.KeyguardBouncerViewModel
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.flags.Flags.COMPOSE_BOUNCER_ENABLED
import com.android.systemui.keyguard.ui.viewmodel.PrimaryBouncerToGoneTransitionViewModel
import com.android.systemui.log.BouncerLogger
import com.android.systemui.user.domain.interactor.SelectedUserInteractor
import dagger.Lazy
import javax.inject.Inject
import kotlinx.coroutines.ExperimentalCoroutinesApi

/** Helper data class that allows to lazy load all the dependencies of the legacy bouncer. */
@OptIn(ExperimentalCoroutinesApi::class)
@SysUISingleton
data class LegacyBouncerDependencies
@Inject
@@ -59,7 +60,7 @@ constructor(
    private val composeBouncerDependencies: Lazy<ComposeBouncerDependencies>,
) {
    fun bind(view: ViewGroup) {
        if (COMPOSE_BOUNCER_ENABLED && composeBouncerFlags.isOnlyComposeBouncerEnabled()) {
        if (composeBouncerFlags.isOnlyComposeBouncerEnabled()) {
            val deps = composeBouncerDependencies.get()
            ComposeBouncerViewBinder.bind(
                view,
+0 −7
Original line number Diff line number Diff line
@@ -410,13 +410,6 @@ object Flags {
    val CLIPBOARD_SHARED_TRANSITIONS =
            unreleasedFlag("clipboard_shared_transitions", teamfood = true)

    /**
     * Whether the compose bouncer is enabled. This ensures ProGuard can
     * remove unused code from our APK at compile time.
     */
    // TODO(b/280877228): Tracking Bug
    @JvmField val COMPOSE_BOUNCER_ENABLED = false

    // 1900
    @JvmField val NOTE_TASKS = releasedFlag("keycode_flag")

+7 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ 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.DeviceEntryInteractor
import com.android.systemui.deviceentry.domain.interactor.DeviceUnlockedInteractor
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.dagger.ShadeTouchLog
import com.android.systemui.scene.domain.interactor.SceneInteractor
@@ -61,6 +62,7 @@ constructor(
    private val shadeInteractor: ShadeInteractor,
    private val sceneInteractor: SceneInteractor,
    private val deviceEntryInteractor: DeviceEntryInteractor,
    private val deviceUnlockedInteractor: DeviceUnlockedInteractor,
    private val notificationStackScrollLayout: NotificationStackScrollLayout,
    @ShadeTouchLog private val touchLog: LogBuffer,
    private val vibratorHelper: VibratorHelper,
@@ -148,7 +150,11 @@ constructor(
    }

    private fun getCollapseDestinationScene(): SceneKey {
        return if (deviceEntryInteractor.isDeviceEntered.value) {
        // Always check whether device is unlocked before transitioning to gone scene.
        return if (
            deviceUnlockedInteractor.deviceUnlockStatus.value.isUnlocked &&
                deviceEntryInteractor.isDeviceEntered.value
        ) {
            Scenes.Gone
        } else {
            Scenes.Lockscreen
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ package com.android.systemui.shade
import com.android.systemui.assist.AssistManager
import com.android.systemui.concurrency.fakeExecutor
import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
import com.android.systemui.deviceentry.domain.interactor.deviceUnlockedInteractor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.kosmos.testDispatcher
@@ -58,6 +59,7 @@ val Kosmos.shadeControllerSceneImpl by
            statusBarKeyguardViewManager = mock<StatusBarKeyguardViewManager>(),
            notificationShadeWindowController = mock<NotificationShadeWindowController>(),
            assistManagerLazy = { mock<AssistManager>() },
            deviceUnlockedInteractor = deviceUnlockedInteractor,
        )
    }