Use calling uid for metrics of starting from recents
The startActivityFromRecents can also be called from AppTask. Without giving the uid, the launching state will always be a new instance. And if it is starting itself again, there will be 2 launching states for the same target activity, then one of the launch metric cannot be ended because there will be only one drawn event. For real Recents, it still use a standalone state. Otherwise use the calling uid to match if there is an existing state to reuse. Bug: 254657154 Bug: 204488635 Test: Call below code in Activity#onCreate getSystemService(ActivityManager.class).getAppTasks() .get(0).moveToFront(); The launch time/trace should be ended normally. Change-Id: I23e99ea9eb47ebe8defa28d4c4a56d5d46c9a1c4
Loading
Please register or sign in to comment