Skip background memory trim if the app is in the foreground state

Bug: 308927629
Test: Manual
Change-Id: I96792546c073176d6ce90769bf52f16790565178
2 files changed