summaryrefslogtreecommitdiff
path: root/core/java/android/window/SplashScreen.java
diff options
context:
space:
mode:
authorVadim Caen <caen@google.com>2021-03-05 23:01:25 +0100
committerVadim Caen <caen@google.com>2021-05-21 13:13:15 +0200
commitcb81f1716da2b37f25b38d3bb76ef1a6a3967c1e (patch)
tree60736339476128b7b246197483018fcdfa1982f4 /core/java/android/window/SplashScreen.java
parent907fbba22deec2d1969a2f4b579d693d21ea11a1 (diff)
Display Splashscreen AVD in a SurfaceView
If the splashscreen uses an animated icon, we need to display it in a surface view to avoid any jank if the view is passed to the client. Test: CtsWindowManagerDeviceTestCases:SplashscreenTests#testHandleExitIconAnimatingActivity Bug: 181757194 Change-Id: I7e2745a68626849374f5ebb9011c2e8c3b3b92c3
Diffstat (limited to 'core/java/android/window/SplashScreen.java')
-rw-r--r--core/java/android/window/SplashScreen.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/java/android/window/SplashScreen.java b/core/java/android/window/SplashScreen.java
index 7d222dbe7bd2..42a58fb65e39 100644
--- a/core/java/android/window/SplashScreen.java
+++ b/core/java/android/window/SplashScreen.java
@@ -220,7 +220,13 @@ public interface SplashScreen {
}
}
- public void dispatchOnExitAnimation(IBinder token, SplashScreenView view) {
+ public void handOverSplashScreenView(@NonNull IBinder token,
+ @NonNull SplashScreenView splashScreenView) {
+ transferSurface(splashScreenView);
+ dispatchOnExitAnimation(token, splashScreenView);
+ }
+
+ private void dispatchOnExitAnimation(IBinder token, SplashScreenView view) {
synchronized (mGlobalLock) {
final SplashScreenImpl impl = findImpl(token);
if (impl == null) {
@@ -240,5 +246,9 @@ public interface SplashScreen {
return impl != null && impl.mExitAnimationListener != null;
}
}
+
+ private void transferSurface(@NonNull SplashScreenView splashScreenView) {
+ splashScreenView.transferSurface();
+ }
}
}