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

Commit 285f99bd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use the current padding instead of the default one during layout." into...

Merge "Use the current padding instead of the default one during layout." into sc-dev am: f45161ef

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

Change-Id: I392d1d1e91872cbe9024bb6b0d375e5835442218
parents 3531586d f45161ef
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -282,11 +282,10 @@ public class AppWidgetHostView extends FrameLayout {
    }

    private SizeF computeSizeFromLayout(int left, int top, int right, int bottom) {
        Rect padding = getDefaultPadding();
        float density = getResources().getDisplayMetrics().density;
        return new SizeF(
                (right - left - padding.right - padding.left) / density,
                (bottom - top - padding.bottom - padding.top) / density
                (right - left - getPaddingLeft() - getPaddingRight()) / density,
                (bottom - top - getPaddingTop() - getPaddingBottom()) / density
        );
    }

@@ -386,7 +385,7 @@ public class AppWidgetHostView extends FrameLayout {
            maxHeight = Math.max(maxHeight, paddedSize.getHeight());
        }
        if (paddedSizes.equals(
                widgetManager.getAppWidgetOptions(mAppWidgetId).<PointF>getParcelableArrayList(
                widgetManager.getAppWidgetOptions(mAppWidgetId).<SizeF>getParcelableArrayList(
                        AppWidgetManager.OPTION_APPWIDGET_SIZES))) {
            return;
        }