From 4181dd38fc806ff14b591c2af2f42ad6daaeb6c5 Mon Sep 17 00:00:00 2001 From: Stefan Andonian Date: Tue, 24 Jan 2023 18:14:32 +0000 Subject: 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 --- .../src/com/android/systemui/motiontool/MotionToolModule.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/motiontool/MotionToolModule.kt b/packages/SystemUI/src/com/android/systemui/motiontool/MotionToolModule.kt index 1324d2c5c27b..c4a1ed4500ab 100644 --- a/packages/SystemUI/src/com/android/systemui/motiontool/MotionToolModule.kt +++ b/packages/SystemUI/src/com/android/systemui/motiontool/MotionToolModule.kt @@ -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 -- cgit v1.2.3-59-g8ed1b