Skip to content
Snippets Groups Projects
Commit 7f79e398 authored by Candice Lo's avatar Candice Lo
Browse files

refactor(magnification): Renaming WindowMagnificationConnectionWrapper class...

refactor(magnification): Renaming WindowMagnificationConnectionWrapper class as MagnificationConnectionWrapper

The class handles not only the window mode, but also the fullscreen
fullscreen mode. Therefore, we would like to remove "window" from the
name to avoid the confusion.

Bug: 310109308
Test: manually
      atest MagnificationConnectionWrapperTest
      atest WindowMagnificationManagerTest
Flag: NA
Change-Id: Id09c8609041f34a18934ffaad758982250e1ca77
parent 2ae44393
No related branches found
No related tags found
No related merge requests found
......@@ -35,15 +35,15 @@ import com.android.server.accessibility.AccessibilityTraceManager;
/**
* A wrapper of {@link IWindowMagnificationConnection}.
*/
class WindowMagnificationConnectionWrapper {
class MagnificationConnectionWrapper {
private static final boolean DBG = false;
private static final String TAG = "WindowMagnificationConnectionWrapper";
private static final String TAG = "MagnificationConnectionWrapper";
private final @NonNull IWindowMagnificationConnection mConnection;
private final @NonNull AccessibilityTraceManager mTrace;
WindowMagnificationConnectionWrapper(@NonNull IWindowMagnificationConnection connection,
MagnificationConnectionWrapper(@NonNull IWindowMagnificationConnection connection,
@NonNull AccessibilityTraceManager trace) {
mConnection = connection;
mTrace = trace;
......
......@@ -60,7 +60,7 @@ import java.lang.annotation.RetentionPolicy;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
/**
* A class to manipulate window magnification through {@link WindowMagnificationConnectionWrapper}
* A class to manipulate window magnification through {@link MagnificationConnectionWrapper}
* create by {@link #setConnection(IWindowMagnificationConnection)}. To set the connection with
* SysUI, call {@code StatusBarManagerInternal#requestWindowMagnificationConnection(boolean)}.
* The applied magnification scale is constrained by
......@@ -133,7 +133,7 @@ public class WindowMagnificationManager implements
@VisibleForTesting
@GuardedBy("mLock")
@Nullable
WindowMagnificationConnectionWrapper mConnectionWrapper;
MagnificationConnectionWrapper mConnectionWrapper;
@GuardedBy("mLock")
private ConnectionCallback mConnectionCallback;
@GuardedBy("mLock")
......@@ -245,7 +245,7 @@ public class WindowMagnificationManager implements
}
}
if (connection != null) {
mConnectionWrapper = new WindowMagnificationConnectionWrapper(connection, mTrace);
mConnectionWrapper = new MagnificationConnectionWrapper(connection, mTrace);
}
if (mConnectionWrapper != null) {
......
......@@ -37,11 +37,11 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
* Tests for WindowMagnificationConnectionWrapper. We don't test {@code
* WindowMagnificationConnectionWrapper#linkToDeath(IBinder.DeathRecipient)} since it's tested in
* Tests for MagnificationConnectionWrapper. We don't test {@code
* MagnificationConnectionWrapper#linkToDeath(IBinder.DeathRecipient)} since it's tested in
* {@link WindowMagnificationManagerTest}.
*/
public class WindowMagnificationConnectionWrapperTest {
public class MagnificationConnectionWrapperTest {
private static final int TEST_DISPLAY = Display.DEFAULT_DISPLAY;
......@@ -54,14 +54,14 @@ public class WindowMagnificationConnectionWrapperTest {
private MagnificationAnimationCallback mAnimationCallback;
private MockWindowMagnificationConnection mMockWindowMagnificationConnection;
private WindowMagnificationConnectionWrapper mConnectionWrapper;
private MagnificationConnectionWrapper mConnectionWrapper;
@Before
public void setUp() throws RemoteException {
MockitoAnnotations.initMocks(this);
mMockWindowMagnificationConnection = new MockWindowMagnificationConnection();
mConnection = mMockWindowMagnificationConnection.getConnection();
mConnectionWrapper = new WindowMagnificationConnectionWrapper(mConnection, mTrace);
mConnectionWrapper = new MagnificationConnectionWrapper(mConnection, mTrace);
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment