From b09a41d86c98ac7505981d64cba078cf4f2fd4dd Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 6 May 2021 20:56:47 -0700 Subject: [PATCH] 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 --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index e5b93b1890..02ea82eea9 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -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); }