[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:
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user