Pass the captured snapshot data to Launcher when recents animation is
cancelled. In the current implementation, when recents animation is cancelled due to stack order change, window manager replaces the surface with a snapshot before cancellation. Launcher needs to acquire the snapshot in order to switch the live tile into snapshot mode, and yet because the recents animation is cancelled, that snapshot can no longer be acquired anymore. This change takes care of this "relay" process. Fixes: 138683199 Test: N/A Change-Id: I1c11af38c2bdc442e3b45d0b5f0c7e7e37c2b0f0
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.view;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.graphics.Rect;
|
||||
import android.view.RemoteAnimationTarget;
|
||||
import android.view.IRecentsAnimationController;
|
||||
@@ -33,16 +34,16 @@ oneway interface IRecentsAnimationRunner {
|
||||
* wallpaper not drawing in time, or the handler not finishing the animation within a predefined
|
||||
* amount of time.
|
||||
*
|
||||
* @param deferredWithScreenshot If set to {@code true}, the contents of the task will be
|
||||
* replaced with a screenshot, such that the runner's leash is
|
||||
* still active. As soon as the runner doesn't need the leash
|
||||
* anymore, it must call
|
||||
* {@link IRecentsAnimationController#cleanupScreenshot).
|
||||
* @param taskSnapshot If the snapshot is null, the animation will be cancelled and the leash
|
||||
* will be inactive immediately. Otherwise, the contents of the task will be
|
||||
* replaced with {@param taskSnapshot}, such that the runner's leash is
|
||||
* still active. As soon as the runner doesn't need the leash anymore, it
|
||||
* must call {@link IRecentsAnimationController#cleanupScreenshot).
|
||||
*
|
||||
* @see {@link RecentsAnimationController#cleanupScreenshot}
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
void onAnimationCanceled(boolean deferredWithScreenshot) = 1;
|
||||
void onAnimationCanceled(in @nullable ActivityManager.TaskSnapshot taskSnapshot) = 1;
|
||||
|
||||
/**
|
||||
* Called when the system is ready for the handler to start animating all the visible tasks.
|
||||
|
||||
Reference in New Issue
Block a user