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

Commit ab74e303 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Revert "Add verbose logging to debug a test flake that does not repro easily locally."

This reverts commit ab3427eb.

Reason for revert: I want a revert CL

Bug: 417163416
Change-Id: I65daadb2e60116f0d8fbf021d544f64e2923c56e
parent a8efffb2
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.systemui.keyguard.domain.interactor

import android.animation.ValueAnimator
import android.util.Log
import android.util.MathUtils
import com.android.app.animation.Interpolators
import com.android.app.tracing.coroutines.launchTraced as launch
@@ -53,7 +52,6 @@ import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart

@SysUISingleton
@@ -303,12 +301,8 @@ constructor(
            // When the refactor is enabled, we no longer use isKeyguardGoingAway.
            scope.launch("$TAG#listenForLockscreenToGoneDragging") {
                swipeToDismissInteractor.dismissFling
                    .onEach { Log.d(TAG, "Dismiss fling emitting - filtering.") }
                    .filterNotNull()
                    .filterRelevantKeyguardStateAnd {
                        Log.d(TAG, "dismissFling emitting - elevant keyguard state, proceeding.")
                        true
                    }
                    .filterRelevantKeyguardState()
                    .collect { _ ->
                        startTransitionTo(KeyguardState.GONE, ownerReason = "dismissFling != null")
                    }
+6 −25
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.systemui.keyguard.domain.interactor

import android.util.Log
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyguard.shared.model.KeyguardState
@@ -30,8 +29,6 @@ import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.stateIn

private const val TAG = "SwipeToDismissInteractor"

/**
 * Handles logic around the swipe to dismiss gesture, where the user swipes up on the dismissable
 * lockscreen to unlock the device.
@@ -56,28 +53,12 @@ constructor(
    val dismissFling: StateFlow<FlingInfo?> =
        shadeRepository.currentFling
            .filter { flingInfo ->
                val isDismiss =
                flingInfo != null &&
                    !flingInfo.expand &&
                    keyguardInteractor.statusBarState.value != StatusBarState.SHADE_LOCKED &&
                    transitionInteractor.startedKeyguardTransitionStep.value.to ==
                        KeyguardState.LOCKSCREEN &&
                    keyguardInteractor.isKeyguardDismissible.value

                // Extra verbose logging to help debug a < 1% test flake that seemingly only repros
                // in presubmit. We can remove this after that's figured out.
                Log.d(
                    TAG,
                    "Received fling $flingInfo, isDismiss: $isDismiss." +
                        "expand: ${flingInfo?.expand}, " +
                        "statusBarState: ${keyguardInteractor.statusBarState.value}, " +
                        "startedKeyguardTransitionStep: " +
                        "${transitionInteractor.startedKeyguardTransitionStep.value.to ==
                        KeyguardState.LOCKSCREEN}, " +
                        "isKeyguardDismissible: ${keyguardInteractor.isKeyguardDismissible.value}",
                )

                isDismiss
            }
            .stateIn(backgroundScope, SharingStarted.Eagerly, null)
}
+0 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.systemui.shade.data.repository

import android.annotation.SuppressLint
import android.util.Log
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import javax.inject.Inject
@@ -313,7 +312,6 @@ class ShadeRepositoryImpl @Inject constructor(@Background val backgroundScope: C
    }

    override fun setCurrentFling(info: FlingInfo?) {
        Log.d(TAG, "setCurrentFling: $info")
        backgroundScope.launch { currentFling.emit(info) }
    }