Replace SurfaceControl call points with Transaction calls (1/n)
Removed calls to SurfaceControl methods that use the sGlobalTransaction
and changed to use the Transaction methods. Removed from all classes
except from WindowSurfaceController and deleted all unused methods from
SurfaceControl.
Test: go/wm-smoke
Change-Id: I69228214bdece20ea481c6d8041321f8385a446a
Exempt-From-Owner-Approval: Santos already +1'ed
diff --git a/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java b/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
index a98f79c..73420a0 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DimmerTests.java
@@ -46,7 +46,7 @@
private static class TestWindowContainer extends WindowContainer<TestWindowContainer> {
final SurfaceControl mControl = mock(SurfaceControl.class);
- final SurfaceControl.Transaction mTransaction = mock(SurfaceControl.Transaction.class);
+ final SurfaceControl.Transaction mTransaction = spy(StubTransaction.class);
TestWindowContainer(WindowManagerService wm) {
super(wm);
@@ -66,7 +66,7 @@
private static class MockSurfaceBuildingContainer extends WindowContainer<TestWindowContainer> {
final SurfaceSession mSession = new SurfaceSession();
final SurfaceControl mHostControl = mock(SurfaceControl.class);
- final SurfaceControl.Transaction mHostTransaction = mock(SurfaceControl.Transaction.class);
+ final SurfaceControl.Transaction mHostTransaction = spy(StubTransaction.class);
MockSurfaceBuildingContainer(WindowManagerService wm) {
super(wm);
@@ -118,7 +118,7 @@
public void setUp() throws Exception {
mHost = new MockSurfaceBuildingContainer(mWm);
mSurfaceAnimatorStarter = spy(new SurfaceAnimatorStarterImpl());
- mTransaction = mock(SurfaceControl.Transaction.class);
+ mTransaction = spy(StubTransaction.class);
mDimmer = new Dimmer(mHost, mSurfaceAnimatorStarter);
}