Loading services/core/java/com/android/server/am/RecentsAnimation.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -134,6 +134,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // Fetch all the surface controls and pass them to the client to get the animation // Fetch all the surface controls and pass them to the client to get the animation // started // started mWindowManager.cancelRecentsAnimation(); mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); display.mDisplayId); Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +12 −10 Original line number Original line Diff line number Diff line Loading @@ -256,6 +256,7 @@ public class RecentsAnimationController { void cancelAnimation() { void cancelAnimation() { if (DEBUG) Log.d(TAG, "cancelAnimation()"); if (DEBUG) Log.d(TAG, "cancelAnimation()"); synchronized (mService.getWindowManagerLock()) { if (mCanceled) { if (mCanceled) { // We've already canceled the animation // We've already canceled the animation return; return; Loading @@ -266,8 +267,9 @@ public class RecentsAnimationController { } catch (RemoteException e) { } catch (RemoteException e) { Slog.e(TAG, "Failed to cancel recents animation", e); Slog.e(TAG, "Failed to cancel recents animation", e); } } } // Clean up and return to the previous app // Clean up and return to the previous app // Don't hold the WM lock here as it calls back to AM/RecentsAnimation mCallbacks.onAnimationFinished(false /* moveHomeToTop */); mCallbacks.onAnimationFinished(false /* moveHomeToTop */); } } Loading services/core/java/com/android/server/wm/WindowManagerService.java +6 −7 Original line number Original line Diff line number Diff line Loading @@ -2694,7 +2694,6 @@ public class WindowManagerService extends IWindowManager.Stub IRecentsAnimationRunner recentsAnimationRunner, IRecentsAnimationRunner recentsAnimationRunner, RecentsAnimationController.RecentsAnimationCallbacks callbacks, int displayId) { RecentsAnimationController.RecentsAnimationCallbacks callbacks, int displayId) { synchronized (mWindowMap) { synchronized (mWindowMap) { cancelRecentsAnimation(); mRecentsAnimationController = new RecentsAnimationController(this, mRecentsAnimationController = new RecentsAnimationController(this, recentsAnimationRunner, callbacks, displayId); recentsAnimationRunner, callbacks, displayId); mRecentsAnimationController.initialize(); mRecentsAnimationController.initialize(); Loading @@ -2719,14 +2718,14 @@ public class WindowManagerService extends IWindowManager.Stub } } public void cancelRecentsAnimation() { public void cancelRecentsAnimation() { synchronized (mWindowMap) { // Note: Do not hold the WM lock, this will lock appropriately in the call which also // calls through to AM/RecentsAnimation.onAnimationFinished() if (mRecentsAnimationController != null) { if (mRecentsAnimationController != null) { // This call will call through to cleanupAnimation() below after the animation is // This call will call through to cleanupAnimation() below after the animation is // canceled // canceled mRecentsAnimationController.cancelAnimation(); mRecentsAnimationController.cancelAnimation(); } } } } } public void cleanupRecentsAnimation() { public void cleanupRecentsAnimation() { synchronized (mWindowMap) { synchronized (mWindowMap) { Loading Loading
services/core/java/com/android/server/am/RecentsAnimation.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -134,6 +134,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks { // Fetch all the surface controls and pass them to the client to get the animation // Fetch all the surface controls and pass them to the client to get the animation // started // started mWindowManager.cancelRecentsAnimation(); mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this, display.mDisplayId); display.mDisplayId); Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +12 −10 Original line number Original line Diff line number Diff line Loading @@ -256,6 +256,7 @@ public class RecentsAnimationController { void cancelAnimation() { void cancelAnimation() { if (DEBUG) Log.d(TAG, "cancelAnimation()"); if (DEBUG) Log.d(TAG, "cancelAnimation()"); synchronized (mService.getWindowManagerLock()) { if (mCanceled) { if (mCanceled) { // We've already canceled the animation // We've already canceled the animation return; return; Loading @@ -266,8 +267,9 @@ public class RecentsAnimationController { } catch (RemoteException e) { } catch (RemoteException e) { Slog.e(TAG, "Failed to cancel recents animation", e); Slog.e(TAG, "Failed to cancel recents animation", e); } } } // Clean up and return to the previous app // Clean up and return to the previous app // Don't hold the WM lock here as it calls back to AM/RecentsAnimation mCallbacks.onAnimationFinished(false /* moveHomeToTop */); mCallbacks.onAnimationFinished(false /* moveHomeToTop */); } } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +6 −7 Original line number Original line Diff line number Diff line Loading @@ -2694,7 +2694,6 @@ public class WindowManagerService extends IWindowManager.Stub IRecentsAnimationRunner recentsAnimationRunner, IRecentsAnimationRunner recentsAnimationRunner, RecentsAnimationController.RecentsAnimationCallbacks callbacks, int displayId) { RecentsAnimationController.RecentsAnimationCallbacks callbacks, int displayId) { synchronized (mWindowMap) { synchronized (mWindowMap) { cancelRecentsAnimation(); mRecentsAnimationController = new RecentsAnimationController(this, mRecentsAnimationController = new RecentsAnimationController(this, recentsAnimationRunner, callbacks, displayId); recentsAnimationRunner, callbacks, displayId); mRecentsAnimationController.initialize(); mRecentsAnimationController.initialize(); Loading @@ -2719,14 +2718,14 @@ public class WindowManagerService extends IWindowManager.Stub } } public void cancelRecentsAnimation() { public void cancelRecentsAnimation() { synchronized (mWindowMap) { // Note: Do not hold the WM lock, this will lock appropriately in the call which also // calls through to AM/RecentsAnimation.onAnimationFinished() if (mRecentsAnimationController != null) { if (mRecentsAnimationController != null) { // This call will call through to cleanupAnimation() below after the animation is // This call will call through to cleanupAnimation() below after the animation is // canceled // canceled mRecentsAnimationController.cancelAnimation(); mRecentsAnimationController.cancelAnimation(); } } } } } public void cleanupRecentsAnimation() { public void cleanupRecentsAnimation() { synchronized (mWindowMap) { synchronized (mWindowMap) { Loading