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

Commit 205763b1 authored by Archisha Baranwal's avatar Archisha Baranwal
Browse files

Modified Revert of "Adding ViewCaptureAwareWindowManager to ScreenDecorations window."

This reverts commit 27a9061e.

Reason for revert: Reverting change due to the restructure of ViewCaptureAwareWindowManager ( go/wm-for-viewcapture )

Flag: com.android.systemui.enable_view_capture_tracing

Change-Id: I141965687d73be72331a30d6795c5926dc817d15
parent 61cc6b05
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ import android.widget.FrameLayout;

import androidx.annotation.VisibleForTesting;

import com.android.app.viewcapture.ViewCaptureAwareWindowManager;
import com.android.internal.util.Preconditions;
import com.android.settingslib.Utils;
import com.android.systemui.biometrics.data.repository.FacePropertyRepository;
@@ -167,7 +166,7 @@ public class ScreenDecorations implements
    ViewGroup mScreenDecorHwcWindow;
    @VisibleForTesting
    ScreenDecorHwcLayer mScreenDecorHwcLayer;
    private ViewCaptureAwareWindowManager mWindowManager;
    private WindowManager mWindowManager;
    private int mRotation;
    private UserSettingObserver mColorInversionSetting;
    private DelayableExecutor mExecutor;
@@ -337,7 +336,7 @@ public class ScreenDecorations implements
            FacePropertyRepository facePropertyRepository,
            JavaAdapter javaAdapter,
            CameraProtectionLoader cameraProtectionLoader,
            ViewCaptureAwareWindowManager viewCaptureAwareWindowManager,
            WindowManager windowManager,
            @ScreenDecorationsThread Handler handler,
            @ScreenDecorationsThread DelayableExecutor executor) {
        mContext = context;
@@ -353,7 +352,7 @@ public class ScreenDecorations implements
        mLogger = logger;
        mFacePropertyRepository = facePropertyRepository;
        mJavaAdapter = javaAdapter;
        mWindowManager = viewCaptureAwareWindowManager;
        mWindowManager = windowManager;
        mHandler = handler;
        mExecutor = executor;
    }
+2 −12
Original line number Diff line number Diff line
@@ -80,8 +80,6 @@ import androidx.annotation.Nullable;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;

import com.android.app.viewcapture.ViewCapture;
import com.android.app.viewcapture.ViewCaptureAwareWindowManager;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.biometrics.AuthController;
import com.android.systemui.biometrics.data.repository.FakeFacePropertyRepository;
@@ -104,7 +102,6 @@ import com.android.systemui.settings.FakeDisplayTracker;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.commandline.CommandRegistry;
import com.android.systemui.statusbar.events.PrivacyDotViewController;
import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.concurrency.FakeThreadFactory;
import com.android.systemui.util.kotlin.JavaAdapter;
@@ -112,8 +109,6 @@ import com.android.systemui.util.settings.FakeSettings;
import com.android.systemui.util.settings.SecureSettings;
import com.android.systemui.util.time.FakeSystemClock;

import kotlin.Lazy;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -132,7 +127,6 @@ public class ScreenDecorationsTest extends SysuiTestCase {

    private ScreenDecorations mScreenDecorations;
    private WindowManager mWindowManager;
    private ViewCaptureAwareWindowManager mViewCaptureAwareWindowManager;
    private DisplayManager mDisplayManager;
    private SecureSettings mSecureSettings;
    private FakeExecutor mExecutor;
@@ -179,8 +173,6 @@ public class ScreenDecorationsTest extends SysuiTestCase {
    private CutoutDecorProviderFactory mCutoutFactory;
    @Mock
    private JavaAdapter mJavaAdapter;
    @Mock
    private Lazy<ViewCapture> mLazyViewCapture;

    private FakeFacePropertyRepository mFakeFacePropertyRepository =
            new FakeFacePropertyRepository();
@@ -254,14 +246,12 @@ public class ScreenDecorationsTest extends SysuiTestCase {
                new ScreenDecorationsLogger(logcatLogBuffer("TestLogBuffer")),
                mFakeFacePropertyRepository));

        mViewCaptureAwareWindowManager = new ViewCaptureAwareWindowManager(mWindowManager,
                mLazyViewCapture, false);
        mScreenDecorations = spy(new ScreenDecorations(mContext, mSecureSettings,
                mCommandRegistry, mUserTracker, mDisplayTracker, mDotViewController,
                mPrivacyDotDecorProviderFactory, mFaceScanningProviderFactory,
                new ScreenDecorationsLogger(logcatLogBuffer("TestLogBuffer")),
                mFakeFacePropertyRepository, mJavaAdapter, mCameraProtectionLoader,
                mViewCaptureAwareWindowManager, mMainHandler, mExecutor) {
                mWindowManager, mMainHandler, mExecutor) {
            @Override
            public void start() {
                super.start();
@@ -1276,7 +1266,7 @@ public class ScreenDecorationsTest extends SysuiTestCase {
                mPrivacyDotDecorProviderFactory, mFaceScanningProviderFactory,
                new ScreenDecorationsLogger(logcatLogBuffer("TestLogBuffer")),
                mFakeFacePropertyRepository, mJavaAdapter, mCameraProtectionLoader,
                mViewCaptureAwareWindowManager, mMainHandler, mExecutor);
                mWindowManager, mMainHandler, mExecutor);
        screenDecorations.start();
        when(mContext.getDisplay()).thenReturn(mDisplay);
        when(mDisplay.getDisplayInfo(any())).thenAnswer(new Answer<Boolean>() {