Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d72a79a authored by Charles Chen's avatar Charles Chen Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: Iaad9e175bf5b9f09403429a28b76ea674bb99dad
parents fccc553a d51d2f5e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);