summaryrefslogtreecommitdiff
path: root/core/java/android/window/TaskOrganizer.java
diff options
context:
space:
mode:
authorwilsonshih <wilsonshih@google.com>2020-12-01 15:07:17 +0800
committerVadim Caen <caen@google.com>2021-02-15 14:49:00 +0100
commit56f65c3bb7d52422dc33108268207954d34633cb (patch)
tree150ac133282c442136908890cf11ee752a2b4550 /core/java/android/window/TaskOrganizer.java
parentd8385e060c12acc21010956f4fbe57daa526a41a (diff)
Customizable exit splash screen animation.(2/N)
Introduce new APIs to customize exit splash screen animation. - SplashScreen This can be used for Activity to handle the exit splash screen animation. - SplashScreen#OnExitAnimationListener When receive onSplashScreenExit, the splash screen view will be on top of the activity. - SplashScreenView The view object which represents the view of current starting window. There are two APIs for developer to control it: - getIconView: get the icon view object. - remove: remove the view and release resources. If an Activity create a OnExitAnimationListener and set on SplashScreen, the core will request a copy of SplashScreenView from Shell, then send the parcelable information to client to reconstruct the view on top of the DecorView, then call onSplashScreenExit to let the listener able to operating this view. Bug: 73289295 Test: build/flash, check splash screen starting window. Test: atest StartingSurfaceDrawerTests ActivityRecordTests WindowOrganizerTests Test: atest CtsWindowManagerDeviceTestCases:SplashscreenTests Change-Id: I9f77fb4471bcf37a7f74d6c18a345ca56c05b716
Diffstat (limited to 'core/java/android/window/TaskOrganizer.java')
-rw-r--r--core/java/android/window/TaskOrganizer.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/window/TaskOrganizer.java b/core/java/android/window/TaskOrganizer.java
index cdb4762a4f0a..217ade82b336 100644
--- a/core/java/android/window/TaskOrganizer.java
+++ b/core/java/android/window/TaskOrganizer.java
@@ -105,6 +105,12 @@ public class TaskOrganizer extends WindowOrganizer {
public void removeStartingWindow(int taskId) {}
/**
+ * Called when the Task want to copy the splash screen.
+ */
+ @BinderThread
+ public void copySplashScreenView(int taskId) {}
+
+ /**
* Called when a task with the registered windowing mode can be controlled by this task
* organizer. For non-root tasks, the leash may initially be hidden so it is up to the organizer
* to show this task.
@@ -223,6 +229,11 @@ public class TaskOrganizer extends WindowOrganizer {
}
@Override
+ public void copySplashScreenView(int taskId) {
+ mExecutor.execute(() -> TaskOrganizer.this.copySplashScreenView(taskId));
+ }
+
+ @Override
public void onTaskAppeared(ActivityManager.RunningTaskInfo taskInfo, SurfaceControl leash) {
mExecutor.execute(() -> TaskOrganizer.this.onTaskAppeared(taskInfo, leash));
}