android: Allow Paint Preview to happen with native The decision whether to display the Paint Preview depends on the heuristic detecting cold start: the start is considered _not_ cold (i.e. warm) when the native library has already been loaded and initialized. We hypothesize that recently the library started becoming initialized very early in the process lifetime. One of the causes for it is asynchronous library loading on a separate thread. As a result of recent changes, the volume of UMA samples for "Browser.PaintPreview.TabbedPlayer.TimeToFirstBitmap" has dropped dramatically, leading to Paint Preview becoming less useful. This change attempts to use another heuristic for a cold start: 1. the app process creation is caused by an activity 2. no activity is paused prior to pre-inflation of the tabbed activity The (1) uses a new "process creation reason" trick available on P+ devices and falls back to time-based detection for older devices. Bug: 1471136 Change-Id: I3cdd6adc13212890619b2242ce2bfadd0d23fa3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4874028 Reviewed-by: Michael Thiessen <mthiesse@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Egor Pasko <pasko@chromium.org> Cr-Commit-Position: refs/heads/main@{#1204729}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.