Move ViewCapture On/Off controls to QuickSettings Tile.

Rather than use a feature flag for this feature, the on/off state will
be stored as a system setting and will be changed via a QuickSettings
tile.

Bug: b/264452057
Test: Verified that the new QuickSettings tile doesn't crash via normal
interactions (pressing, long-pressing, etc.). Also verified that
ViewCapture is turned on when the QuickSettings tile is in the enabled
state and is turned off when it is in the disabled state.

Change-Id: I19b26c279d627ccc8a242536aac83de07c824db9
This commit is contained in:
Stefan Andonian
2023-01-24 18:14:32 +00:00
parent 798eac1a56
commit 4181dd38fc

View File

@@ -19,7 +19,6 @@ package com.android.systemui.motiontool
import android.view.WindowManagerGlobal
import com.android.app.motiontool.DdmHandleMotionTool
import com.android.app.motiontool.MotionToolManager
import com.android.app.viewcapture.ViewCapture
import com.android.systemui.CoreStartable
import dagger.Binds
import dagger.Module
@@ -38,17 +37,12 @@ interface MotionToolModule {
}
@Provides
fun provideMotionToolManager(
viewCapture: ViewCapture,
windowManagerGlobal: WindowManagerGlobal
): MotionToolManager {
return MotionToolManager.getInstance(viewCapture, windowManagerGlobal)
fun provideMotionToolManager(windowManagerGlobal: WindowManagerGlobal): MotionToolManager {
return MotionToolManager.getInstance(windowManagerGlobal)
}
@Provides
fun provideWindowManagerGlobal(): WindowManagerGlobal = WindowManagerGlobal.getInstance()
@Provides fun provideViewCapture(): ViewCapture = ViewCapture.getInstance()
}
@Binds