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

Commit 765faeb3 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove property of window insets lazy getter

So far it is no problem so make it default behavior.

Bug: 151908239
Test: android.view.WindowMetricsTest
Change-Id: Ia56699786c57a95aff38e78f458b2dbe6793f22f
parent 0674cd7e
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -54,9 +54,6 @@ import java.util.function.Supplier;
 * @hide
 */
public final class WindowMetricsController {
    // TODO(b/151908239): Remove and always enable this if it is stable.
    private static final boolean LAZY_WINDOW_INSETS = android.os.SystemProperties.getBoolean(
            "persist.wm.debug.win_metrics_lazy_insets", true);
    private final Context mContext;

    public WindowMetricsController(@NonNull Context context) {
@@ -98,9 +95,7 @@ public final class WindowMetricsController {
        final IBinder token = Context.getToken(mContext);
        final Supplier<WindowInsets> insetsSupplier = () -> getWindowInsetsFromServerForDisplay(
                mContext.getDisplayId(), token, bounds, isScreenRound, windowingMode);
        return LAZY_WINDOW_INSETS
                ? new WindowMetrics(new Rect(bounds), insetsSupplier, density)
                : new WindowMetrics(new Rect(bounds), insetsSupplier.get(), density);
        return new WindowMetrics(new Rect(bounds), insetsSupplier, density);
    }

    /**