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

Commit 2f26b5c7 authored by Kean Mariotti's avatar Kean Mariotti
Browse files

vc tracing: refactoring prior perfetto migration

Instantiate polymorphic ViewCapture instances through ViewCaptureFactory,
instead of referencing concrete classes.

Bug: 323166383
Test: presubmit
Flag: N/A
Change-Id: Iecf0c8c4f1b1d6d416838739f612bbc862278a29
parent 50a7190e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ import androidx.annotation.Nullable;
import androidx.core.graphics.Insets;
import androidx.core.view.WindowInsetsCompat;

import com.android.app.viewcapture.SettingsAwareViewCapture;
import com.android.app.viewcapture.ViewCaptureFactory;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.shared.TestProtocol;
@@ -150,7 +150,7 @@ public class TaskbarDragLayer extends BaseDragLayer<TaskbarActivityContext> {
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        getViewTreeObserver().addOnComputeInternalInsetsListener(mTaskbarInsetsComputer);
        mViewCaptureCloseable = SettingsAwareViewCapture.getInstance(getContext())
        mViewCaptureCloseable = ViewCaptureFactory.getInstance(getContext())
                .startCapture(getRootView(), ".Taskbar");
    }

+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ import android.view.WindowInsets;

import androidx.annotation.NonNull;

import com.android.app.viewcapture.SettingsAwareViewCapture;
import com.android.app.viewcapture.ViewCaptureFactory;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.shared.TestProtocol;
@@ -59,7 +59,7 @@ public class TaskbarOverlayDragLayer extends
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        getViewTreeObserver().addOnComputeInternalInsetsListener(this);
        mViewCaptureCloseable = SettingsAwareViewCapture.getInstance(getContext())
        mViewCaptureCloseable = ViewCaptureFactory.getInstance(getContext())
                .startCapture(getRootView(), ".TaskbarOverlay");
    }

+2 −2
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;

import com.android.app.viewcapture.SettingsAwareViewCapture;
import com.android.app.viewcapture.ViewCaptureFactory;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Flags;
@@ -668,7 +668,7 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer
        addMultiWindowModeChangedListener(mDepthController);
        initUnfoldTransitionProgressProvider();
        if (FeatureFlags.CONTINUOUS_VIEW_TREE_CAPTURE.get()) {
            mViewCapture = SettingsAwareViewCapture.getInstance(this).startCapture(getWindow());
            mViewCapture = ViewCaptureFactory.getInstance(this).startCapture(getWindow());
        }
        getWindow().addPrivateFlags(PRIVATE_FLAG_OPTIMIZE_MEASURE);
        QuickstepOnboardingPrefs.setup(this);