Skip to content
Snippets Groups Projects
Commit 59c2e7cf authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Add a new launch type for hot start with relaunched activity

An existing activity may be relaunched when moving from background
to front if the current configuration is changed and the activity
cannot handle the change.

The relaunch type was reported as a hot start because its process
is alive and the original activity exists. But the relaunch needs to
destroy the original activity and create a new instance, which may
even take longer time than a warm start. So the case should be
separated from hot start.

Also:
- Make WaitResult#launchState is always populated by
  ActivityMetricsLogger, so "am start -W" can get consistent
  launch type.
- Remove dead code in ActivityRecord#ensureActivityConfiguration
  that it already early returns if !attachedToProcess.

Bug: 172528316
Test: atest ActivityMetricsLaunchObserverTests#testLaunchState
Change-Id: I3ef64ce1e23b2f13d42fa2b12bc31c0cdb4652fc
parent e12c50e0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment