summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-04-17 19:00:38 +0800
committer Riddle Hsu <riddlehsu@google.com> 2023-04-17 16:37:12 +0000
commit7673f3f876ce7566fc552fe28174812676203bf7 (patch)
tree8953fc60647ae7eb19523b96dbf2d4e1b5bc0b3c /api/api.go
parentb4a8a82fa927597775483f8a0391856d7dc1399e (diff)
Check null before getting task bounds
The task bounds was used to decide whether multiple launches can be combined into one event for tracking launch time. With below sample: startActivities(new Intent[] { new Intent(c, Activity1.class), new Intent(c, Activity2.class).setFlags( Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK) }); When launching Activity2, because Activity1 hasn't real started, Activity1 will be removed from task directly. Then its task will be null, that causes mLastLaunchedActivity.getTask() to be null. If the task is not available, check if the launched activity has the same uid as the caller uid. Fix: 276513946 Test: atest ActivityMetricsLaunchObserverTests#testConsecutiveLaunch Change-Id: I731f0446b62b666b22ba1a6b37364d95efd0a32c
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions