summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src
diff options
context:
space:
mode:
author Kweku Adams <kwekua@google.com> 2021-10-14 10:59:06 -0700
committer Kweku Adams <kwekua@google.com> 2021-11-02 16:18:14 -0700
commitcc590ac913b5ea11e5338714076fa5f2083cd7ee (patch)
tree999e76bde002a6a0f8f06e8b971c310c0f74ed67 /tests/DynamicCodeLoggerIntegrationTests/src
parent77b40ddfd7f332431d72efd237d771dcb937a7c0 (diff)
Add basic launch time prediction.
We estimate the next app launch time by looking at the past 7 days of usage history and assuming that the user opens the app like clockwork. If there is at least 24 hours of usage events, then we take the earliest ACTIVITY_RESUMED event and estimate that the app will be launched exactly 7 days after that event. If there is less than 24 hours of history (which would be the case for a new app), then we take the earliest ACTIVITY_RESUMED and add 24 hours. If we don't see any launch event in the past 7 days, then we just say the app should be launched within a year. If we have a long estimate for an app and it is launched, then we re-evaluate our estimate because we can now estimate a launch within the next 7 days. Bug: 194532703 Test: atest FrameworksMockingServicesTests:PrefetchControllerTest Test: manually launch apps and check dumpsys for expected launch time changes Change-Id: I9ef5fc3e3df3c2d029243b1fb8949a4bf21900db
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src')
0 files changed, 0 insertions, 0 deletions