diff options
| author | 2024-09-14 00:16:43 +0000 | |
|---|---|---|
| committer | 2024-09-14 00:16:43 +0000 | |
| commit | 104f6bfa6e45a87d78c737eaee4a5f4e26c7411c (patch) | |
| tree | bbde71002d7df5021f941b8019ff3167216a167e | |
| parent | ddfd3aebd36c8bddb9152f0e99d3dfd3c1919b5b (diff) | |
| parent | ef59e5ee5a395f28a11e4ee1ece17e3dc511fb8a (diff) | |
Merge "Revert "Fix rounded corners in transitions on non-internal displays"" into main
| -rw-r--r-- | core/java/com/android/internal/policy/ScreenDecorationsUtils.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/core/java/com/android/internal/policy/ScreenDecorationsUtils.java b/core/java/com/android/internal/policy/ScreenDecorationsUtils.java index b23515aa51f3..067e5e8813a7 100644 --- a/core/java/com/android/internal/policy/ScreenDecorationsUtils.java +++ b/core/java/com/android/internal/policy/ScreenDecorationsUtils.java @@ -37,8 +37,6 @@ public class ScreenDecorationsUtils { * * Note that if the context is not an UI context(not associated with Display), it will use * default display. - * - * If the associated display is not internal, will return 0. */ public static float getWindowCornerRadius(Context context) { final Resources resources = context.getResources(); @@ -46,13 +44,7 @@ public class ScreenDecorationsUtils { return 0f; } // Use Context#getDisplayNoVerify() in case the context is not an UI context. - final Display display = context.getDisplayNoVerify(); - // The radius is only valid for internal displays, since the corner radius of external or - // virtual displays is not known when window corners are configured or are not supported. - if (display.getType() != Display.TYPE_INTERNAL) { - return 0f; - } - final String displayUniqueId = display.getUniqueId(); + final String displayUniqueId = context.getDisplayNoVerify().getUniqueId(); // Radius that should be used in case top or bottom aren't defined. float defaultRadius = RoundedCorners.getRoundedCornerRadius(resources, displayUniqueId) - RoundedCorners.getRoundedCornerRadiusAdjustment(resources, displayUniqueId); |