Loading src/com/android/launcher3/testing/TestInformationHandler.java +6 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.launcher3.testing; import android.content.Context; import android.os.Bundle; import android.os.Debug; import com.android.launcher3.DeviceProfile; import com.android.launcher3.InvariantDeviceProfile; Loading Loading @@ -113,10 +114,10 @@ public class TestInformationHandler implements ResourceBasedOverride { break; } case TestProtocol.REQUEST_ALLOCATED_MEMORY: { final Runtime runtime = Runtime.getRuntime(); response.putLong(TestProtocol.TEST_INFO_RESPONSE_FIELD, runtime.totalMemory() - runtime.freeMemory()); case TestProtocol.REQUEST_TOTAL_PSS_KB: { Debug.MemoryInfo mem = new Debug.MemoryInfo(); Debug.getMemoryInfo(mem); response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, mem.getTotalPss()); break; } } Loading src/com/android/launcher3/testing/TestProtocol.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public final class TestProtocol { public static final String REQUEST_APP_LIST_FREEZE_FLAGS = "app-list-freeze-flags"; public static final String REQUEST_OVERVIEW_LEFT_GESTURE_MARGIN = "overview-left-margin"; public static final String REQUEST_OVERVIEW_RIGHT_GESTURE_MARGIN = "overview-right-margin"; public static final String REQUEST_ALLOCATED_MEMORY = "allocated-memory"; public static final String REQUEST_TOTAL_PSS_KB = "total_pss"; public static boolean sDebugTracing = false; public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing"; Loading tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +3 −3 Original line number Diff line number Diff line Loading @@ -957,8 +957,8 @@ public final class LauncherInstrumentation { getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING); } public long getAllocatedMemory() { return getTestInfo(TestProtocol.REQUEST_ALLOCATED_MEMORY). getLong(TestProtocol.TEST_INFO_RESPONSE_FIELD); public int getTotalPssKb() { return getTestInfo(TestProtocol.REQUEST_TOTAL_PSS_KB). getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD); } } No newline at end of file Loading
src/com/android/launcher3/testing/TestInformationHandler.java +6 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.launcher3.testing; import android.content.Context; import android.os.Bundle; import android.os.Debug; import com.android.launcher3.DeviceProfile; import com.android.launcher3.InvariantDeviceProfile; Loading Loading @@ -113,10 +114,10 @@ public class TestInformationHandler implements ResourceBasedOverride { break; } case TestProtocol.REQUEST_ALLOCATED_MEMORY: { final Runtime runtime = Runtime.getRuntime(); response.putLong(TestProtocol.TEST_INFO_RESPONSE_FIELD, runtime.totalMemory() - runtime.freeMemory()); case TestProtocol.REQUEST_TOTAL_PSS_KB: { Debug.MemoryInfo mem = new Debug.MemoryInfo(); Debug.getMemoryInfo(mem); response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, mem.getTotalPss()); break; } } Loading
src/com/android/launcher3/testing/TestProtocol.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public final class TestProtocol { public static final String REQUEST_APP_LIST_FREEZE_FLAGS = "app-list-freeze-flags"; public static final String REQUEST_OVERVIEW_LEFT_GESTURE_MARGIN = "overview-left-margin"; public static final String REQUEST_OVERVIEW_RIGHT_GESTURE_MARGIN = "overview-right-margin"; public static final String REQUEST_ALLOCATED_MEMORY = "allocated-memory"; public static final String REQUEST_TOTAL_PSS_KB = "total_pss"; public static boolean sDebugTracing = false; public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing"; Loading
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +3 −3 Original line number Diff line number Diff line Loading @@ -957,8 +957,8 @@ public final class LauncherInstrumentation { getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING); } public long getAllocatedMemory() { return getTestInfo(TestProtocol.REQUEST_ALLOCATED_MEMORY). getLong(TestProtocol.TEST_INFO_RESPONSE_FIELD); public int getTotalPssKb() { return getTestInfo(TestProtocol.REQUEST_TOTAL_PSS_KB). getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD); } } No newline at end of file