summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorYunfan Chen <yunfanc@google.com>2020-05-13 14:47:38 +0900
committerYunfan Chen <yunfanc@google.com>2020-05-13 17:43:53 +0900
commit4c6a8fc2e2e2642dd17a6db0e9a84c93e0298414 (patch)
tree83c72d252a68a707b61b593bbe7466f8efb7439f /graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
parentec5ab8b1d4af1f8fea4d2afd81156a3a81d299f3 (diff)
Fix OOM when running testAddRemoveRace
The test has been very likely to fail with OOM error or process crashes. This is because we repeatedly creating ActivityRecord/ActivityStack/Task in the test. Even though we release it after each run, the GC can still throw OOM because of reference by mocking is not released while running the test. After receiving several OOM's, the test process will crash. To fix this issue, simply re-use the same ActivityRecord instead of creating one per loop run. This works for this test as we only care about the starting window handling inside ActivityRecord. Test: atest AppWindowTokenTests#testAddRemoveRace Bug: 130392471 Change-Id: I7df942d364ee07e179b05b6f837494c475197d7c
Diffstat (limited to 'graphics/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions