From 7fe953e729ef95b9b4bf2790a7b22916e406857b Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 16 Oct 2019 10:27:29 -0700 Subject: Adjust reportFullyDrawn documentation Since Q, this API affects how the application is optimized. Bug: 117575269 Test: manual Change-Id: I0a448b8a59df4544775739505e50e401b43ba965 --- core/java/android/app/Activity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 2c57622a4df8..9872e306eb9f 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -2563,9 +2563,12 @@ public class Activity extends ContextThemeWrapper } /** - * Report to the system that your app is now fully drawn, purely for diagnostic - * purposes (calling it does not impact the visible behavior of the activity). - * This is only used to help instrument application launch times, so that the + * Report to the system that your app is now fully drawn, for diagnostic and + * optimization purposes. The system may adjust optimizations to prioritize + * work that happens before reportFullyDrawn is called, to improve app startup. + * Misrepresenting the startup window by calling reportFullyDrawn too late or too + * early may decrease application and startup performance.

+ * This is also used to help instrument application launch times, so that the * app can report when it is fully in a usable state; without this, the only thing * the system itself can determine is the point at which the activity's window * is first drawn and displayed. To participate in app launch time -- cgit v1.2.3-59-g8ed1b