Merge "Use max of corners when deciding gestures and add logs for corners" into sc-v2-dev am: 725ad3c031
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15758695 Change-Id: I187b6298819d963ad361a8e6665c10ef41b4d43b
This commit is contained in:
@@ -1561,6 +1561,7 @@ public final class LauncherInstrumentation {
|
|||||||
float getWindowCornerRadius() {
|
float getWindowCornerRadius() {
|
||||||
final Resources resources = getResources();
|
final Resources resources = getResources();
|
||||||
if (!supportsRoundedCornersOnWindows(resources)) {
|
if (!supportsRoundedCornersOnWindows(resources)) {
|
||||||
|
Log.d(TAG, "No rounded corners");
|
||||||
return 0f;
|
return 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1579,7 +1580,8 @@ public final class LauncherInstrumentation {
|
|||||||
|
|
||||||
// Always use the smallest radius to make sure the rounded corners will
|
// Always use the smallest radius to make sure the rounded corners will
|
||||||
// completely cover the display.
|
// completely cover the display.
|
||||||
return Math.min(topRadius, bottomRadius);
|
Log.d(TAG, "Rounded corners top: " + topRadius + " bottom: " + bottomRadius);
|
||||||
|
return Math.max(topRadius, bottomRadius);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean supportsRoundedCornersOnWindows(Resources resources) {
|
private static boolean supportsRoundedCornersOnWindows(Resources resources) {
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ public final class Workspace extends Home {
|
|||||||
+ mLauncher.getTouchSlop());
|
+ mLauncher.getTouchSlop());
|
||||||
|
|
||||||
mLauncher.swipeToState(
|
mLauncher.swipeToState(
|
||||||
0,
|
windowCornerRadius,
|
||||||
startY,
|
startY,
|
||||||
0,
|
windowCornerRadius,
|
||||||
startY - swipeHeight - mLauncher.getTouchSlop(),
|
startY - swipeHeight - mLauncher.getTouchSlop(),
|
||||||
12,
|
12,
|
||||||
ALL_APPS_STATE_ORDINAL, LauncherInstrumentation.GestureScope.INSIDE);
|
ALL_APPS_STATE_ORDINAL, LauncherInstrumentation.GestureScope.INSIDE);
|
||||||
|
|||||||
Reference in New Issue
Block a user