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
Loading
Please register or sign in to comment