Loading data/etc/services.core.protolog.json +12 −6 Original line number Diff line number Diff line Loading @@ -307,6 +307,12 @@ "group": "WM_DEBUG_STARTING_WINDOW", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-1777196134": { "message": "goodToGo(): No apps to animate, mPendingAnimations=%d", "level": "DEBUG", "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "-1770075711": { "message": "Adding window client %s that is dead, aborting.", "level": "WARN", Loading Loading @@ -1987,12 +1993,6 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "194124419": { "message": "goodToGo(): Animation finished already, canceled=%s mPendingAnimations=%d", "level": "DEBUG", "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "200829729": { "message": "ScreenRotationAnimation onAnimationEnd", "level": "DEBUG", Loading Loading @@ -2089,6 +2089,12 @@ "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DragState.java" }, "269976641": { "message": "goodToGo(): Animation canceled already", "level": "DEBUG", "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "274773837": { "message": "applyAnimation: anim=%s nextAppTransition=ANIM_CLIP_REVEAL transit=%s Callers=%s", "level": "VERBOSE", Loading services/core/java/com/android/server/wm/RemoteAnimationController.java +7 −4 Original line number Diff line number Diff line Loading @@ -104,11 +104,11 @@ class RemoteAnimationController implements DeathRecipient { */ void goodToGo(@WindowManager.TransitionOldType int transit) { ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo()"); if (mPendingAnimations.isEmpty() || mCanceled) { if (mCanceled) { ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo(): Animation finished already, canceled=%s mPendingAnimations=%d", mCanceled, mPendingAnimations.size()); "goodToGo(): Animation canceled already"); onAnimationFinished(); invokeAnimationCancelled(); return; } Loading @@ -120,8 +120,11 @@ class RemoteAnimationController implements DeathRecipient { // Create the app targets final RemoteAnimationTarget[] appTargets = createAppAnimations(); if (appTargets.length == 0) { ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo(): No apps to animate"); ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo(): No apps to animate, mPendingAnimations=%d", mPendingAnimations.size()); onAnimationFinished(); invokeAnimationCancelled(); return; } Loading services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java +11 −6 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_WINDOW_ANIMAT import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; Loading Loading @@ -208,18 +210,20 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { } @Test public void testZeroAnimations() { public void testZeroAnimations() throws Exception { mController.goodToGo(TRANSIT_OLD_NONE); verifyNoMoreInteractionsExceptAsBinder(mMockRunner); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); verify(mMockRunner).onAnimationCancelled(); } @Test public void testNotReallyStarted() { public void testNotReallyStarted() throws Exception { final WindowState win = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin"); mController.createRemoteAnimationRecord(win.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), null); mController.goodToGo(TRANSIT_OLD_ACTIVITY_OPEN); verifyNoMoreInteractionsExceptAsBinder(mMockRunner); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); verify(mMockRunner).onAnimationCancelled(); } @Test Loading Loading @@ -250,7 +254,7 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { } @Test public void testRemovedBeforeStarted() { public void testRemovedBeforeStarted() throws Exception { final WindowState win = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin"); final AnimationAdapter adapter = mController.createRemoteAnimationRecord(win.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), null).mAdapter; Loading @@ -258,7 +262,8 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { mFinishedCallback); win.mActivityRecord.removeImmediately(); mController.goodToGo(TRANSIT_OLD_ACTIVITY_OPEN); verifyNoMoreInteractionsExceptAsBinder(mMockRunner); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); verify(mMockRunner).onAnimationCancelled(); verify(mFinishedCallback).onAnimationFinished(eq(ANIMATION_TYPE_APP_TRANSITION), eq(adapter)); } Loading Loading
data/etc/services.core.protolog.json +12 −6 Original line number Diff line number Diff line Loading @@ -307,6 +307,12 @@ "group": "WM_DEBUG_STARTING_WINDOW", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-1777196134": { "message": "goodToGo(): No apps to animate, mPendingAnimations=%d", "level": "DEBUG", "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "-1770075711": { "message": "Adding window client %s that is dead, aborting.", "level": "WARN", Loading Loading @@ -1987,12 +1993,6 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "194124419": { "message": "goodToGo(): Animation finished already, canceled=%s mPendingAnimations=%d", "level": "DEBUG", "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "200829729": { "message": "ScreenRotationAnimation onAnimationEnd", "level": "DEBUG", Loading Loading @@ -2089,6 +2089,12 @@ "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DragState.java" }, "269976641": { "message": "goodToGo(): Animation canceled already", "level": "DEBUG", "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "274773837": { "message": "applyAnimation: anim=%s nextAppTransition=ANIM_CLIP_REVEAL transit=%s Callers=%s", "level": "VERBOSE", Loading
services/core/java/com/android/server/wm/RemoteAnimationController.java +7 −4 Original line number Diff line number Diff line Loading @@ -104,11 +104,11 @@ class RemoteAnimationController implements DeathRecipient { */ void goodToGo(@WindowManager.TransitionOldType int transit) { ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo()"); if (mPendingAnimations.isEmpty() || mCanceled) { if (mCanceled) { ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo(): Animation finished already, canceled=%s mPendingAnimations=%d", mCanceled, mPendingAnimations.size()); "goodToGo(): Animation canceled already"); onAnimationFinished(); invokeAnimationCancelled(); return; } Loading @@ -120,8 +120,11 @@ class RemoteAnimationController implements DeathRecipient { // Create the app targets final RemoteAnimationTarget[] appTargets = createAppAnimations(); if (appTargets.length == 0) { ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo(): No apps to animate"); ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "goodToGo(): No apps to animate, mPendingAnimations=%d", mPendingAnimations.size()); onAnimationFinished(); invokeAnimationCancelled(); return; } Loading
services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java +11 −6 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_WINDOW_ANIMAT import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; Loading Loading @@ -208,18 +210,20 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { } @Test public void testZeroAnimations() { public void testZeroAnimations() throws Exception { mController.goodToGo(TRANSIT_OLD_NONE); verifyNoMoreInteractionsExceptAsBinder(mMockRunner); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); verify(mMockRunner).onAnimationCancelled(); } @Test public void testNotReallyStarted() { public void testNotReallyStarted() throws Exception { final WindowState win = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin"); mController.createRemoteAnimationRecord(win.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), null); mController.goodToGo(TRANSIT_OLD_ACTIVITY_OPEN); verifyNoMoreInteractionsExceptAsBinder(mMockRunner); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); verify(mMockRunner).onAnimationCancelled(); } @Test Loading Loading @@ -250,7 +254,7 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { } @Test public void testRemovedBeforeStarted() { public void testRemovedBeforeStarted() throws Exception { final WindowState win = createWindow(null /* parent */, TYPE_BASE_APPLICATION, "testWin"); final AnimationAdapter adapter = mController.createRemoteAnimationRecord(win.mActivityRecord, new Point(50, 100), null, new Rect(50, 100, 150, 150), null).mAdapter; Loading @@ -258,7 +262,8 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { mFinishedCallback); win.mActivityRecord.removeImmediately(); mController.goodToGo(TRANSIT_OLD_ACTIVITY_OPEN); verifyNoMoreInteractionsExceptAsBinder(mMockRunner); verify(mMockRunner, never()).onAnimationStart(anyInt(), any(), any(), any(), any()); verify(mMockRunner).onAnimationCancelled(); verify(mFinishedCallback).onAnimationFinished(eq(ANIMATION_TYPE_APP_TRANSITION), eq(adapter)); } Loading