Merge "Remove WindowManager usage in ViewConfiguration" into sc-v2-dev am: d51d2f5efb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15659012

Change-Id: Iaad9e175bf5b9f09403429a28b76ea674bb99dad
This commit is contained in:
Charles Chen
2021-08-26 12:51:25 +00:00
committed by Automerger Merge Worker

View File

@@ -433,9 +433,8 @@ public class ViewConfiguration {
mAmbiguousGestureMultiplier = Math.max(1.0f, multiplierValue.getFloat());
// Size of the screen in bytes, in ARGB_8888 format
final WindowManager windowManager = context.getSystemService(WindowManager.class);
final Rect maxWindowBounds = windowManager.getMaximumWindowMetrics().getBounds();
mMaximumDrawingCacheSize = 4 * maxWindowBounds.width() * maxWindowBounds.height();
final Rect maxBounds = config.windowConfiguration.getMaxBounds();
mMaximumDrawingCacheSize = 4 * maxBounds.width() * maxBounds.height();
mOverscrollDistance = (int) (sizeAndDensity * OVERSCROLL_DISTANCE + 0.5f);
mOverflingDistance = (int) (sizeAndDensity * OVERFLING_DISTANCE + 0.5f);