Use testapi to trigger gc in system and sysui

- Do this prior to gc'ing launcher to ensure that temporary binder
  refs on the system side a released

Bug: 186268407
Test: Presubmit

Change-Id: I7878e1042b07ded5491af6153cff9b0772c557db
This commit is contained in:
Winson Chung committed 2021-05-10 13:00:37 -07:00
1 parent bcf85de807
commit b09a41d86c
1 file changed
+2
@@ -1349,6 +1349,8 @@ public final class LauncherInstrumentation {
}
public int getTotalPssKb() {
// GC the system & sysui first before gc'ing launcher
logShellCommand("cmd statusbar run-gc");
return getTestInfo(TestProtocol.REQUEST_TOTAL_PSS_KB).
getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD);
}