From 58030642b04061ca6a9899d61d9188a43e671663 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Sat, 4 Sep 2021 13:06:39 -0700 Subject: [PATCH] Add tmp buffer to rounded corners - Testing if this actually moves the gesture out of the screen decor area Bug: 197326121 Test: Pre/postsubmit Change-Id: I3c46ed3860ba6ba1fb605242b4f7242aaabc5672 --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 98d081b70a..ea8a295b83 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -1559,10 +1559,12 @@ public final class LauncherInstrumentation { } float getWindowCornerRadius() { + // TODO(b/197326121): Check if the touch is overlapping with the corners by offsetting + final float tmpBuffer = 100f; final Resources resources = getResources(); if (!supportsRoundedCornersOnWindows(resources)) { Log.d(TAG, "No rounded corners"); - return 0f; + return tmpBuffer; } // Radius that should be used in case top or bottom aren't defined. @@ -1581,7 +1583,7 @@ public final class LauncherInstrumentation { // Always use the smallest radius to make sure the rounded corners will // completely cover the display. Log.d(TAG, "Rounded corners top: " + topRadius + " bottom: " + bottomRadius); - return Math.max(topRadius, bottomRadius); + return Math.max(topRadius, bottomRadius) + tmpBuffer; } private static boolean supportsRoundedCornersOnWindows(Resources resources) {