summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
authorCharles Chen <charlesccchen@google.com>2020-04-15 14:28:13 +0800
committerCharles Chen <charlesccchen@google.com>2020-04-22 18:16:56 +0800
commit2622d3ef7ea02aaf254e15b54358d83e0066f17c (patch)
tree0ca4e52ddf74886d2ea4f7ac9dbd65342180425d /services/incremental/IncrementalService.cpp
parent1b8c7de05d71f0e68e06a6227b873f14cd615fa6 (diff)
Limit number of window context without any window
This change is to prevent misuse of window context from app and leads to performance drop on system by limit the numer of window context an app can use. Code snippet below is a sample to cause this issue: ``` Rect getBounds() { Context windowContext = context.createWindowContext(...); return windowContext.getSystemService(WindowManager.class) .getCuttentWindowMetrics().getBounds() } ``` This method could be invoked dozens of times and produce dozens of window tokens. It would slow down the speed of window traversalling. These token won't be removed until system server has been GC'd. Test: atest WindowContextTests WindowContextPolicyTests fixes: 152934797 Bug: 153369119 Change-Id: I927e85a45c05c4d90b51a624ea408ff3a3ffce93
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
0 files changed, 0 insertions, 0 deletions