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

Commit 57176b36 authored by Minche Li's avatar Minche Li Committed by Android (Google) Code Review
Browse files

Merge "Refactoring that make WindowMagnificationController has...

Merge "Refactoring that make WindowMagnificationController has WindowMagnificationAnimationController"
parents 622adb8f 1c4bb8dc
Loading
Loading
Loading
Loading
+33 −32
Original line number Diff line number Diff line
@@ -68,15 +68,15 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie
    private Configuration mLastConfiguration;
    private SysUiState mSysUiState;

    private static class AnimationControllerSupplier extends
            DisplayIdIndexSupplier<WindowMagnificationAnimationController> {
    private static class ControllerSupplier extends
            DisplayIdIndexSupplier<WindowMagnificationController> {

        private final Context mContext;
        private final Handler mHandler;
        private final WindowMagnifierCallback mWindowMagnifierCallback;
        private final SysUiState mSysUiState;

        AnimationControllerSupplier(Context context, Handler handler,
        ControllerSupplier(Context context, Handler handler,
                WindowMagnifierCallback windowMagnifierCallback,
                DisplayManager displayManager, SysUiState sysUiState) {
            super(displayManager);
@@ -87,19 +87,19 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie
        }

        @Override
        protected WindowMagnificationAnimationController createInstance(Display display) {
        protected WindowMagnificationController createInstance(Display display) {
            final Context windowContext = mContext.createWindowContext(display,
                    TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY, /* options */ null);
            final WindowMagnificationController controller = new WindowMagnificationController(
            return new WindowMagnificationController(
                    windowContext,
                    mHandler, new SfVsyncFrameCallbackProvider(), null,
                    mHandler, new WindowMagnificationAnimationController(windowContext),
                    new SfVsyncFrameCallbackProvider(), null,
                    new SurfaceControl.Transaction(), mWindowMagnifierCallback, mSysUiState);
            return new WindowMagnificationAnimationController(windowContext, controller);
        }
    }

    @VisibleForTesting
    DisplayIdIndexSupplier<WindowMagnificationAnimationController> mAnimationControllerSupplier;
    DisplayIdIndexSupplier<WindowMagnificationController> mMagnificationControllerSupplier;

    @Inject
    public WindowMagnification(Context context, @Main Handler mainHandler,
@@ -113,7 +113,7 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie
        mModeSwitchesController = modeSwitchesController;
        mSysUiState = sysUiState;
        mOverviewProxyService = overviewProxyService;
        mAnimationControllerSupplier = new AnimationControllerSupplier(context,
        mMagnificationControllerSupplier = new ControllerSupplier(context,
                mHandler, this, context.getSystemService(DisplayManager.class), sysUiState);
    }

@@ -121,8 +121,9 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie
    public void onConfigurationChanged(Configuration newConfig) {
        final int configDiff = newConfig.diff(mLastConfiguration);
        mLastConfiguration.setTo(newConfig);
        mAnimationControllerSupplier.forEach(
                animationController -> animationController.onConfigurationChanged(configDiff));
        mMagnificationControllerSupplier.forEach(
                magnificationController -> magnificationController.onConfigurationChanged(
                        configDiff));
        if (mModeSwitchesController != null) {
            mModeSwitchesController.onConfigurationChanged(configDiff);
        }
@@ -143,10 +144,10 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie

    private void updateSysUiStateFlag() {
        //TODO(b/187510533): support multi-display once SysuiState supports it.
        final WindowMagnificationAnimationController controller =
                mAnimationControllerSupplier.valueAt(Display.DEFAULT_DISPLAY);
        final WindowMagnificationController controller =
                mMagnificationControllerSupplier.valueAt(Display.DEFAULT_DISPLAY);
        if (controller != null) {
            controller.updateSysUiStateFlag();
            controller.updateSysUIStateFlag();
        } else {
            // The instance is initialized when there is an IPC request. Considering
            // self-crash cases, we need to reset the flag in such situation.
@@ -158,39 +159,39 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie
    @MainThread
    void enableWindowMagnification(int displayId, float scale, float centerX, float centerY,
            @Nullable IRemoteMagnificationAnimationCallback callback) {
        final WindowMagnificationAnimationController windowMagnificationAnimationController =
                mAnimationControllerSupplier.get(displayId);
        if (windowMagnificationAnimationController != null) {
            windowMagnificationAnimationController.enableWindowMagnification(scale, centerX,
        final WindowMagnificationController windowMagnificationController =
                mMagnificationControllerSupplier.get(displayId);
        if (windowMagnificationController != null) {
            windowMagnificationController.enableWindowMagnification(scale, centerX,
                    centerY, callback);
        }
    }

    @MainThread
    void setScale(int displayId, float scale) {
        final WindowMagnificationAnimationController windowMagnificationAnimationController =
                mAnimationControllerSupplier.get(displayId);
        if (windowMagnificationAnimationController != null) {
            windowMagnificationAnimationController.setScale(scale);
        final WindowMagnificationController windowMagnificationController =
                mMagnificationControllerSupplier.get(displayId);
        if (windowMagnificationController != null) {
            windowMagnificationController.setScale(scale);
        }
    }

    @MainThread
    void moveWindowMagnifier(int displayId, float offsetX, float offsetY) {
        final WindowMagnificationAnimationController windowMagnificationAnimationController =
                mAnimationControllerSupplier.get(displayId);
        if (windowMagnificationAnimationController != null) {
            windowMagnificationAnimationController.moveWindowMagnifier(offsetX, offsetY);
        final WindowMagnificationController windowMagnificationcontroller =
                mMagnificationControllerSupplier.get(displayId);
        if (windowMagnificationcontroller != null) {
            windowMagnificationcontroller.moveWindowMagnifier(offsetX, offsetY);
        }
    }

    @MainThread
    void disableWindowMagnification(int displayId,
            @Nullable IRemoteMagnificationAnimationCallback callback) {
        final WindowMagnificationAnimationController windowMagnificationAnimationController =
                mAnimationControllerSupplier.get(displayId);
        if (windowMagnificationAnimationController != null) {
            windowMagnificationAnimationController.deleteWindowMagnification(callback);
        final WindowMagnificationController windowMagnificationController =
                mMagnificationControllerSupplier.get(displayId);
        if (windowMagnificationController != null) {
            windowMagnificationController.deleteWindowMagnification(callback);
        }
    }

@@ -234,8 +235,8 @@ public class WindowMagnification extends CoreStartable implements WindowMagnifie
    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println(TAG);
        mAnimationControllerSupplier.forEach(
                animationController -> animationController.dump(pw));
        mMagnificationControllerSupplier.forEach(
                magnificationController -> magnificationController.dump(pw));
    }

    private void setWindowMagnificationConnection() {
+26 −46
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.accessibility;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UiContext;
import android.content.Context;
@@ -31,7 +32,6 @@ import android.view.animation.AccelerateInterpolator;
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.R;

import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@@ -58,7 +58,7 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
    // The animation is running for enabling the window magnification.
    private static final int STATE_ENABLING = 3;

    private final WindowMagnificationController mController;
    private WindowMagnificationController mController;
    private final ValueAnimator mValueAnimator;
    private final AnimationSpec mStartSpec = new AnimationSpec();
    private final AnimationSpec mEndSpec = new AnimationSpec();
@@ -71,21 +71,22 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
    @MagnificationState
    private int mState = STATE_DISABLED;

    WindowMagnificationAnimationController(@UiContext Context context,
            WindowMagnificationController controller) {
        this(context, controller, newValueAnimator(context.getResources()));
    WindowMagnificationAnimationController(@UiContext Context context) {
        this(context, newValueAnimator(context.getResources()));
    }

    @VisibleForTesting
    WindowMagnificationAnimationController(Context context,
            WindowMagnificationController controller, ValueAnimator valueAnimator) {
    WindowMagnificationAnimationController(Context context, ValueAnimator valueAnimator) {
        mContext = context;
        mController = controller;
        mValueAnimator = valueAnimator;
        mValueAnimator.addUpdateListener(this);
        mValueAnimator.addListener(this);
    }

    void setWindowMagnificationController(@NonNull WindowMagnificationController controller) {
        mController = controller;
    }

    /**
     * Wraps {@link WindowMagnificationController#enableWindowMagnification(float, float, float)}
     * with transition animation. If the window magnification is not enabled, the scale will start
@@ -105,6 +106,9 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
     */
    void enableWindowMagnification(float scale, float centerX, float centerY,
            @Nullable IRemoteMagnificationAnimationCallback animationCallback) {
        if (mController == null) {
            return;
        }
        sendAnimationCallback(false);
        // Enable window magnification without animation immediately.
        if (animationCallback == null) {
@@ -139,6 +143,9 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
    }

    private void setupEnableAnimationSpecs(float scale, float centerX, float centerY) {
        if (mController == null) {
            return;
        }
        final float currentScale = mController.getScale();
        final float currentCenterX = mController.getCenterX();
        final float currentCenterY = mController.getCenterY();
@@ -160,15 +167,9 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
        }
    }

    /**
     * Wraps {@link WindowMagnificationController#setScale(float)}. If the animation is
     * running, it has no effect.
     */
    void setScale(float scale) {
        if (mValueAnimator.isRunning()) {
            return;
        }
        mController.setScale(scale);
    /** Returns {@code true} if the animator is running. */
    boolean isAnimating() {
        return mValueAnimator.isRunning();
    }

    /**
@@ -181,6 +182,9 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
     */
    void deleteWindowMagnification(
            @Nullable IRemoteMagnificationAnimationCallback animationCallback) {
        if (mController == null) {
            return;
        }
        sendAnimationCallback(false);
        // Delete window magnification without animation.
        if (animationCallback == null) {
@@ -206,25 +210,6 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
        setState(STATE_DISABLING);
    }

    /**
     * Wraps {@link WindowMagnificationController#moveWindowMagnifier(float, float)}. If the
     * animation is running, it has no effect.
     * @param offsetX The amount in pixels to offset the window magnifier in the X direction, in
     *                current screen pixels.
     * @param offsetY The amount in pixels to offset the window magnifier in the Y direction, in
     *                current screen pixels.
     */
    void moveWindowMagnifier(float offsetX, float offsetY) {
        if (mValueAnimator.isRunning()) {
            return;
        }
        mController.moveWindowMagnifier(offsetX, offsetY);
    }

    void onConfigurationChanged(int configDiff) {
        mController.onConfigurationChanged(configDiff);
    }

    private void setState(@MagnificationState int state) {
        if (DEBUG) {
            Log.d(TAG, "setState from " + mState + " to " + state);
@@ -239,7 +224,7 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp

    @Override
    public void onAnimationEnd(Animator animation, boolean isReverse) {
        if (mEndAnimationCanceled) {
        if (mEndAnimationCanceled || mController == null) {
            return;
        }
        if (Float.isNaN(mController.getScale())) {
@@ -279,6 +264,9 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp

    @Override
    public void onAnimationUpdate(ValueAnimator animation) {
        if (mController == null) {
            return;
        }
        final float fract = animation.getAnimatedFraction();
        final float sentScale = mStartSpec.mScale + (mEndSpec.mScale - mStartSpec.mScale) * fract;
        final float centerX =
@@ -288,14 +276,6 @@ class WindowMagnificationAnimationController implements ValueAnimator.AnimatorUp
        mController.enableWindowMagnification(sentScale, centerX, centerY);
    }

    public void updateSysUiStateFlag() {
        mController.updateSysUIStateFlag();
    }

    void dump(PrintWriter pw) {
        mController.dump(pw);
    }

    private static ValueAnimator newValueAnimator(Resources resources) {
        final ValueAnimator valueAnimator = new ValueAnimator();
        valueAnimator.setDuration(
+41 −2
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import android.view.WindowManagerGlobal;
import android.view.WindowMetrics;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
import android.view.accessibility.IRemoteMagnificationAnimationCallback;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
@@ -133,6 +134,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
    // The top Y of the system gesture rect at the bottom. Set to -1 if it is invalid.
    private int mSystemGestureTop = -1;

    private final WindowMagnificationAnimationController mAnimationController;
    private final SfVsyncFrameCallbackProvider mSfVsyncFrameProvider;
    private final MagnificationGestureDetector mGestureDetector;
    private final int mBounceEffectDuration;
@@ -148,11 +150,14 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
    private MirrorWindowControl mMirrorWindowControl;

    WindowMagnificationController(@UiContext Context context, @NonNull Handler handler,
            @NonNull WindowMagnificationAnimationController animationController,
            SfVsyncFrameCallbackProvider sfVsyncFrameProvider,
            MirrorWindowControl mirrorWindowControl, SurfaceControl.Transaction transaction,
            @NonNull WindowMagnifierCallback callback, SysUiState sysUiState) {
        mContext = context;
        mHandler = handler;
        mAnimationController = animationController;
        mAnimationController.setWindowMagnificationController(this);
        mSfVsyncFrameProvider = sfVsyncFrameProvider;
        mWindowMagnifierCallback = callback;
        mSysUiState = sysUiState;
@@ -258,6 +263,19 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
        return false;
    }

    /**
     * Wraps {@link WindowMagnificationController#deleteWindowMagnification()}} with transition
     * animation. If the window magnification is enabling, it runs the animation in reverse.
     *
     * @param animationCallback Called when the transition is complete, the given arguments
     *                          are as same as current values, or the transition is interrupted
     *                          due to the new transition request.
     */
    void deleteWindowMagnification(
            @Nullable IRemoteMagnificationAnimationCallback animationCallback) {
        mAnimationController.deleteWindowMagnification(animationCallback);
    }

    /**
     * Deletes the magnification window.
     */
@@ -692,6 +710,27 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
        moveWindowMagnifier(xOffset, yOffset);
    }

    /**
     * Wraps {@link WindowMagnificationController#enableWindowMagnification(float, float, float)}
     * with transition animation. If the window magnification is not enabled, the scale will start
     * from 1.0 and the center won't be changed during the animation. If animator is
     * {@code STATE_DISABLING}, the animation runs in reverse.
     *
     * @param scale   The target scale, or {@link Float#NaN} to leave unchanged.
     * @param centerX The screen-relative X coordinate around which to center,
     *                or {@link Float#NaN} to leave unchanged.
     * @param centerY The screen-relative Y coordinate around which to center,
     *                or {@link Float#NaN} to leave unchanged.
     * @param animationCallback Called when the transition is complete, the given arguments
     *                          are as same as current values, or the transition is interrupted
     *                          due to the new transition request.
     */
    void enableWindowMagnification(float scale, float centerX, float centerY,
            @Nullable IRemoteMagnificationAnimationCallback animationCallback) {
        mAnimationController.enableWindowMagnification(scale, centerX,
                centerY, animationCallback);
    }

    /**
     * Enables window magnification with specified parameters. If the given scale is <strong>less
     * than or equal to 1.0f<strong>, then
@@ -732,7 +771,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
     * @param scale the target scale, or {@link Float#NaN} to leave unchanged
     */
    void setScale(float scale) {
        if (!isWindowVisible() || mScale == scale) {
        if (mAnimationController.isAnimating() || !isWindowVisible() || mScale == scale) {
            return;
        }
        enableWindowMagnification(scale, Float.NaN, Float.NaN);
@@ -749,7 +788,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
     *                current screen pixels.
     */
    void moveWindowMagnifier(float offsetX, float offsetY) {
        if (mMirrorSurfaceView == null) {
        if (mAnimationController.isAnimating() || mMirrorSurfaceView == null) {
            return;
        }
        if (updateMagnificationFramePosition((int) offsetX, (int) offsetY)) {
+11 −11
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase {
    @Mock
    private IWindowMagnificationConnectionCallback mConnectionCallback;
    @Mock
    private WindowMagnificationAnimationController mWindowMagnificationAnimationController;
    private WindowMagnificationController mWindowMagnificationController;
    @Mock
    private ModeSwitchesController mModeSwitchesController;
    @Mock
@@ -89,7 +89,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase {
        mWindowMagnification = new WindowMagnification(getContext(),
                getContext().getMainThreadHandler(), mCommandQueue,
                mModeSwitchesController, mSysUiState, mOverviewProxyService);
        mWindowMagnification.mAnimationControllerSupplier = new FakeAnimationControllerSupplier(
        mWindowMagnification.mMagnificationControllerSupplier = new FakeControllerSupplier(
                mContext.getSystemService(DisplayManager.class));

        mWindowMagnification.requestWindowMagnificationConnection(true);
@@ -103,7 +103,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase {
                Float.NaN, mAnimationCallback);
        waitForIdleSync();

        verify(mWindowMagnificationAnimationController).enableWindowMagnification(eq(3.0f),
        verify(mWindowMagnificationController).enableWindowMagnification(eq(3.0f),
                eq(Float.NaN), eq(Float.NaN), eq(mAnimationCallback));
    }

@@ -113,7 +113,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase {
                mAnimationCallback);
        waitForIdleSync();

        verify(mWindowMagnificationAnimationController).deleteWindowMagnification(
        verify(mWindowMagnificationController).deleteWindowMagnification(
                mAnimationCallback);
    }

@@ -122,7 +122,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase {
        mIWindowMagnificationConnection.setScale(TEST_DISPLAY, 3.0f);
        waitForIdleSync();

        verify(mWindowMagnificationAnimationController).setScale(3.0f);
        verify(mWindowMagnificationController).setScale(3.0f);
    }

    @Test
@@ -130,7 +130,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase {
        mIWindowMagnificationConnection.moveWindowMagnifier(TEST_DISPLAY, 100f, 200f);
        waitForIdleSync();

        verify(mWindowMagnificationAnimationController).moveWindowMagnifier(100f, 200f);
        verify(mWindowMagnificationController).moveWindowMagnifier(100f, 200f);
    }

    @Test
@@ -151,16 +151,16 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase {
        verify(mModeSwitchesController).removeButton(TEST_DISPLAY);
    }

    private class FakeAnimationControllerSupplier extends
            DisplayIdIndexSupplier<WindowMagnificationAnimationController> {
    private class FakeControllerSupplier extends
            DisplayIdIndexSupplier<WindowMagnificationController> {

        FakeAnimationControllerSupplier(DisplayManager displayManager) {
        FakeControllerSupplier(DisplayManager displayManager) {
            super(displayManager);
        }

        @Override
        protected WindowMagnificationAnimationController createInstance(Display display) {
            return mWindowMagnificationAnimationController;
        protected WindowMagnificationController createInstance(Display display) {
            return mWindowMagnificationController;
        }
    }
}
+7 −36
Original line number Diff line number Diff line
@@ -100,12 +100,13 @@ public class WindowMagnificationAnimationControllerTest extends SysuiTestCase {
        mInstrumentation = InstrumentationRegistry.getInstrumentation();
        mWaitingAnimationPeriod = 2 * ANIMATION_DURATION_MS;
        mWaitIntermediateAnimationPeriod = ANIMATION_DURATION_MS / 2;
        mWindowMagnificationAnimationController = new WindowMagnificationAnimationController(
                mContext, newValueAnimator());
        mController = new SpyWindowMagnificationController(mContext, mHandler,
                mWindowMagnificationAnimationController,
                mSfVsyncFrameProvider, null, new SurfaceControl.Transaction(),
                mWindowMagnifierCallback, mSysUiState);
        mSpyController = mController.getSpyController();
        mWindowMagnificationAnimationController = new WindowMagnificationAnimationController(
                mContext, mController, newValueAnimator());
    }

    @After
@@ -382,17 +383,6 @@ public class WindowMagnificationAnimationControllerTest extends SysuiTestCase {
        verify(mAnimationCallback).onResult(true);
    }

    @Test
    public void setScale_enabled_expectedScale() {
        enableWindowMagnificationWithoutAnimation();

        mInstrumentation.runOnMainSync(
                () -> mWindowMagnificationAnimationController.setScale(DEFAULT_SCALE + 1));

        verify(mSpyController).setScale(DEFAULT_SCALE + 1);
        verifyFinalSpec(DEFAULT_SCALE + 1, DEFAULT_CENTER_X, DEFAULT_CENTER_Y);
    }

    @Test
    public void deleteWindowMagnification_enabled_expectedValuesAndInvokeCallback()
            throws RemoteException {
@@ -508,26 +498,12 @@ public class WindowMagnificationAnimationControllerTest extends SysuiTestCase {
        enableWindowMagnificationWithoutAnimation();

        mInstrumentation.runOnMainSync(
                () -> mWindowMagnificationAnimationController.moveWindowMagnifier(100f, 200f));
                () -> mController.moveWindowMagnifier(100f, 200f));

        verify(mSpyController).moveWindowMagnifier(100f, 200f);
        verifyFinalSpec(DEFAULT_SCALE, DEFAULT_CENTER_X + 100f, DEFAULT_CENTER_Y + 100f);
    }

    @Test
    public void onConfigurationChanged_passThrough() {
        mWindowMagnificationAnimationController.onConfigurationChanged(100);

        verify(mSpyController).onConfigurationChanged(100);
    }

    @Test
    public void updateSysUiStateFlag_passThrough() {
        mWindowMagnificationAnimationController.updateSysUiStateFlag();

        verify(mSpyController).updateSysUIStateFlag();
    }

    private void verifyFinalSpec(float expectedScale, float expectedCenterX,
            float expectedCenterY) {
        assertEquals(expectedScale, mController.getScale(), 0f);
@@ -581,11 +557,12 @@ public class WindowMagnificationAnimationControllerTest extends SysuiTestCase {
        private WindowMagnificationController mSpyController;

        SpyWindowMagnificationController(Context context, Handler handler,
                WindowMagnificationAnimationController animationController,
                SfVsyncFrameCallbackProvider sfVsyncFrameProvider,
                MirrorWindowControl mirrorWindowControl, SurfaceControl.Transaction transaction,
                WindowMagnifierCallback callback, SysUiState sysUiState) {
            super(context, handler, sfVsyncFrameProvider, mirrorWindowControl, transaction,
                    callback, sysUiState);
            super(context, handler, animationController, sfVsyncFrameProvider, mirrorWindowControl,
                    transaction, callback, sysUiState);
            mSpyController = Mockito.mock(WindowMagnificationController.class);
        }

@@ -622,12 +599,6 @@ public class WindowMagnificationAnimationControllerTest extends SysuiTestCase {
            super.updateSysUIStateFlag();
            mSpyController.updateSysUIStateFlag();
        }

        @Override
        void onConfigurationChanged(int configDiff) {
            super.onConfigurationChanged(configDiff);
            mSpyController.onConfigurationChanged(configDiff);
        }
    }

    private static ValueAnimator newValueAnimator() {
Loading