Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 526e1689 authored by Stefan Andonian's avatar Stefan Andonian
Browse files

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
parent ba73400f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
    }
+2 −2
Original line number Diff line number Diff line
@@ -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);
            }
        }
    }