Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d85e500f authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Added limit of descendant amount when adding activity to task

This avoid bad apps to consume available layers of surfaceflinger.

The tree weight is a simple field (instead of iterating activities)
to indicate the total amount of descendant window containers.

Background launch restriction only disallow launching new task from
background. If the target task is an existing own task, the new
activity will still be added.

When exceeding this limit, the target task will be removed, so if
a problematical loop is still starting activity, it will becomes
a new task that will be blocked by background launch restriction.

Bug: 268590786
Bug: 270477256
Test: Endless loop to start activities in its own task in
      background. There won't have Surface$OutOfResourcesException.
Change-Id: Ief0d23477bd095f7e60a0a9079b66b3bc88f6df9
parent 57e90d8f
Loading
Loading
Loading
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