Optimize GC judgment process from foreground to background

when app goes from the foreground to the background,GC
will occur after 5s when memory grows more than a quarter
of what it can grow. But if the memory of the process
changes during these 5s, such as triggering GC, then
the above judgment conditions will be meaningless.

It would be more reasonable to judge the memory growth
at the time of execution of the task, And can avoid
repeated GC.

Bug: 243053465
Signed-off-by: qiubowen <qiubowen@xiaomi.com>
Change-Id: I89796ab24194c2a8cdff9e8ed8e3913a51bfdc62
1 file changed