Loading core/java/android/app/ActivityThread.java +26 −3 Original line number Diff line number Diff line Loading @@ -4734,6 +4734,7 @@ public final class ActivityThread extends ClientTransactionHandler } private void reportSplashscreenViewShown(IBinder token, SplashScreenView view) { Trace.instant(Trace.TRACE_TAG_VIEW, "reportSplashscreenViewShown"); ActivityClient.getInstance().reportSplashScreenAttached(token); synchronized (this) { if (mSplashScreenGlobal != null) { Loading @@ -4751,11 +4752,33 @@ public final class ActivityThread extends ClientTransactionHandler final SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); transaction.hide(startingWindowLeash); decorView.getViewRootImpl().applyTransactionOnDraw(transaction); view.syncTransferSurfaceOnDraw(); // Tell server we can remove the starting window if (com.android.window.flags.Flags.useRtFrameCallbackForSplashScreenTransfer() && decorView.isHardwareAccelerated()) { decorView.getViewRootImpl().registerRtFrameCallback( new HardwareRenderer.FrameDrawingCallback() { @Override public void onFrameDraw(long frame) { } @Override public HardwareRenderer.FrameCommitCallback onFrameDraw( int syncResult, long frame) { return didProduceBuffer -> { Trace.instant(Trace.TRACE_TAG_VIEW, "transferSplashscreenView"); transaction.apply(); // Tell server we can remove the starting window after frame commit. decorView.postOnAnimation(() -> reportSplashscreenViewShown(token, view)); }; } }); } else { Trace.instant(Trace.TRACE_TAG_VIEW, "transferSplashscreenView_software"); decorView.getViewRootImpl().applyTransactionOnDraw(transaction); // Tell server we can remove the starting window after frame commit. decorView.postOnAnimation(() -> reportSplashscreenViewShown(token, view)); } } /** * Cycle activity through onPause and onUserLeaveHint so that PIP is entered if supported, then Loading core/java/android/window/flags/windowing_frontend.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -425,6 +425,17 @@ flag { } } flag { name: "use_rt_frame_callback_for_splash_screen_transfer" namespace: "windowing_frontend" description: "report SplashscreenView shown after RtFrame commit" is_fixed_read_only: true bug: "387231234" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "port_window_size_animation" namespace: "windowing_frontend" Loading Loading
core/java/android/app/ActivityThread.java +26 −3 Original line number Diff line number Diff line Loading @@ -4734,6 +4734,7 @@ public final class ActivityThread extends ClientTransactionHandler } private void reportSplashscreenViewShown(IBinder token, SplashScreenView view) { Trace.instant(Trace.TRACE_TAG_VIEW, "reportSplashscreenViewShown"); ActivityClient.getInstance().reportSplashScreenAttached(token); synchronized (this) { if (mSplashScreenGlobal != null) { Loading @@ -4751,11 +4752,33 @@ public final class ActivityThread extends ClientTransactionHandler final SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); transaction.hide(startingWindowLeash); decorView.getViewRootImpl().applyTransactionOnDraw(transaction); view.syncTransferSurfaceOnDraw(); // Tell server we can remove the starting window if (com.android.window.flags.Flags.useRtFrameCallbackForSplashScreenTransfer() && decorView.isHardwareAccelerated()) { decorView.getViewRootImpl().registerRtFrameCallback( new HardwareRenderer.FrameDrawingCallback() { @Override public void onFrameDraw(long frame) { } @Override public HardwareRenderer.FrameCommitCallback onFrameDraw( int syncResult, long frame) { return didProduceBuffer -> { Trace.instant(Trace.TRACE_TAG_VIEW, "transferSplashscreenView"); transaction.apply(); // Tell server we can remove the starting window after frame commit. decorView.postOnAnimation(() -> reportSplashscreenViewShown(token, view)); }; } }); } else { Trace.instant(Trace.TRACE_TAG_VIEW, "transferSplashscreenView_software"); decorView.getViewRootImpl().applyTransactionOnDraw(transaction); // Tell server we can remove the starting window after frame commit. decorView.postOnAnimation(() -> reportSplashscreenViewShown(token, view)); } } /** * Cycle activity through onPause and onUserLeaveHint so that PIP is entered if supported, then Loading
core/java/android/window/flags/windowing_frontend.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -425,6 +425,17 @@ flag { } } flag { name: "use_rt_frame_callback_for_splash_screen_transfer" namespace: "windowing_frontend" description: "report SplashscreenView shown after RtFrame commit" is_fixed_read_only: true bug: "387231234" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "port_window_size_animation" namespace: "windowing_frontend" Loading