Loading services/core/java/com/android/server/wm/Session.java +1 −3 Original line number Diff line number Diff line Loading @@ -68,9 +68,7 @@ import java.util.Set; * This class represents an active client session. There is generally one * Session object per process that is interacting with the window manager. */ // Needs to be public and not final so we can mock during tests...sucks I know :( public class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final WindowManagerService mService; final IWindowSessionCallback mCallback; final IInputMethodClient mClient; Loading services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java +2 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ import java.util.LinkedList; class WindowTestsBase { static WindowManagerService sWm = null; private static final IWindow sIWindow = new TestIWindow(); private static final Session sMockSession = mock(Session.class); private static Session sMockSession; // The default display is removed in {@link #setUp} and then we iterate over all displays to // make sure we don't collide with any existing display. If we run into no other display, the // added display should be treated as default. This cannot be the default display Loading Loading @@ -93,6 +93,7 @@ class WindowTestsBase { // Allows to mock package local classes and methods System.setProperty("dexmaker.share_classloader", "true"); MockitoAnnotations.initMocks(this); sMockSession = mock(Session.class); } final Context context = InstrumentationRegistry.getTargetContext(); Loading Loading
services/core/java/com/android/server/wm/Session.java +1 −3 Original line number Diff line number Diff line Loading @@ -68,9 +68,7 @@ import java.util.Set; * This class represents an active client session. There is generally one * Session object per process that is interacting with the window manager. */ // Needs to be public and not final so we can mock during tests...sucks I know :( public class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final WindowManagerService mService; final IWindowSessionCallback mCallback; final IInputMethodClient mClient; Loading
services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java +2 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ import java.util.LinkedList; class WindowTestsBase { static WindowManagerService sWm = null; private static final IWindow sIWindow = new TestIWindow(); private static final Session sMockSession = mock(Session.class); private static Session sMockSession; // The default display is removed in {@link #setUp} and then we iterate over all displays to // make sure we don't collide with any existing display. If we run into no other display, the // added display should be treated as default. This cannot be the default display Loading Loading @@ -93,6 +93,7 @@ class WindowTestsBase { // Allows to mock package local classes and methods System.setProperty("dexmaker.share_classloader", "true"); MockitoAnnotations.initMocks(this); sMockSession = mock(Session.class); } final Context context = InstrumentationRegistry.getTargetContext(); Loading