summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java7
-rw-r--r--tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java6
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java b/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java
index ddcb4da88..80bb3eddd 100644
--- a/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java
+++ b/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java
@@ -44,8 +44,11 @@ class PortraitLandscapeRunner implements TestRule {
} finally {
mTest.mDevice.setOrientationNatural();
mTest.executeOnLauncher(launcher ->
- launcher.getRotationHelper().forceAllowRotationForTesting(
- false));
+ {
+ if (launcher != null) {
+ launcher.getRotationHelper().forceAllowRotationForTesting(false);
+ }
+ });
mTest.mLauncher.setExpectedRotation(Surface.ROTATION_0);
}
}
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 0bd63623d..14f2c857e 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -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