[Central Surfaces] Make PulsingGestureListener a singleton.

Bug: 277762009
Test: tap screen while on AOD -> verify device wakes to lockscreen
Test: atest PulsingGestureListenerTest
Change-Id: Iab8909c7898d7db89bb09bf6e8394e9d0981c66b
This commit is contained in:
Caitlin Shkuratov
2023-06-08 13:45:19 +00:00
parent 7f63a23a96
commit 44867425b0
2 changed files with 2 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ import android.provider.Settings
import android.view.GestureDetector
import android.view.MotionEvent
import com.android.systemui.Dumpable
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dock.DockManager
import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.FalsingManager
@@ -29,7 +30,6 @@ import com.android.systemui.plugins.FalsingManager.LOW_PENALTY
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.settings.UserTracker
import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent
import com.android.systemui.tuner.TunerService
import com.android.systemui.tuner.TunerService.Tunable
import java.io.PrintWriter
@@ -44,9 +44,8 @@ import javax.inject.Inject
* screen is still ON and not in the true AoD display state. When the device is in the true AoD
* display state, wake-ups are handled by [com.android.systemui.doze.DozeSensors].
*/
@CentralSurfacesComponent.CentralSurfacesScope
@SysUISingleton
class PulsingGestureListener @Inject constructor(
private val notificationShadeWindowView: NotificationShadeWindowView,
private val falsingManager: FalsingManager,
private val dockManager: DockManager,
private val powerInteractor: PowerInteractor,

View File

@@ -53,8 +53,6 @@ import org.mockito.Mockito.`when` as whenever
@RunWithLooper(setAsMainLooper = true)
@SmallTest
class PulsingGestureListenerTest : SysuiTestCase() {
@Mock
private lateinit var view: NotificationShadeWindowView
@Mock
private lateinit var dockManager: DockManager
@Mock
@@ -87,7 +85,6 @@ class PulsingGestureListenerTest : SysuiTestCase() {
powerRepository = FakePowerRepository()
underTest = PulsingGestureListener(
view,
falsingManager,
dockManager,
PowerInteractor(