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: I90551511ac2766dc30c51a25aec2c96e3e552ce9
This commit is contained in:
Stefan Andonian
2023-01-30 22:51:26 +00:00
parent ba73400fe1
commit 526e168906
2 changed files with 4 additions and 4 deletions

View File

@@ -86,7 +86,7 @@ import androidx.annotation.BinderThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.android.app.viewcapture.ViewCapture;
import com.android.app.viewcapture.SettingsAwareViewCapture;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
@@ -556,7 +556,7 @@ public class QuickstepLauncher extends Launcher {
addMultiWindowModeChangedListener(mDepthController);
initUnfoldTransitionProgressProvider();
if (FeatureFlags.CONTINUOUS_VIEW_TREE_CAPTURE.get()) {
mViewCapture = ViewCapture.getInstance().startCapture(getWindow());
mViewCapture = SettingsAwareViewCapture.getInstance(this).startCapture(getWindow());
}
getWindow().addPrivateFlags(PRIVATE_FLAG_OPTIMIZE_MEASURE);
}

View File

@@ -68,7 +68,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
import com.android.app.viewcapture.ViewCapture;
import com.android.app.viewcapture.SettingsAwareViewCapture;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.R;
@@ -1208,7 +1208,7 @@ public class TouchInteractionService extends Service
mTaskbarManager.dumpLogs("", pw);
if (FeatureFlags.CONTINUOUS_VIEW_TREE_CAPTURE.get()) {
ViewCapture.getInstance().dump(pw, fd, this);
SettingsAwareViewCapture.getInstance(this).dump(pw, fd, this);
}
}
}