Prevent LocalService#updateOomAdj been called during test
When testing, we mock WindowProcessController#mOwner as Object, if updateOomAdj is called during test, then the test process will crash. This won't happen in normal use. To prevent the test process from crash, mock out ATMS#updateOomAdj() during test. Fix: 138770685 Test: atest WmTests Change-Id: Ibc8e56e6fd9b332d987c7cd2ed501aba4394f7a2
This commit is contained in:
committed by
Wei Sheng Shih
parent
bb4f6c6b8f
commit
8d096d2a6d
@@ -5460,7 +5460,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
updateOomAdj = true;
|
||||
}
|
||||
if (updateOomAdj) {
|
||||
mH.post(mAmInternal::updateOomAdj);
|
||||
updateOomAdj();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user