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

Commit 2fbfa36a authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Enable lazy evaluation for getWindowInsets()

To reduce unnecessary cost when getting bounds.
See I28230adcdf004eed60a9fcd4481639f5c04b7c2c

Bug: 151908239
Test: atest android.view.WindowMetricsTest
Change-Id: If619aad648b01fef19b9973459c4b621f5eeb4a3
parent bc8dbe12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ import java.util.function.Supplier;
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", false);
            "persist.wm.debug.win_metrics_lazy_insets", true);
    private final Context mContext;

    public WindowMetricsController(@NonNull Context context) {