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

Commit f7bd3dfb authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clean up calculate_bounds_in_parent_from_bounds_in_screen flag." into main

parents aea79856 8db21785
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ import static android.view.displayhash.DisplayHashResultCallback.EXTRA_DISPLAY_H
import static android.view.flags.Flags.FLAG_SENSITIVE_CONTENT_APP_PROTECTION_API;
import static android.view.flags.Flags.FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY;
import static android.view.flags.Flags.FLAG_VIEW_VELOCITY_API;
import static android.view.flags.Flags.calculateBoundsInParentFromBoundsInScreen;
import static android.view.flags.Flags.enableUseMeasureCacheDuringForceLayout;
import static android.view.flags.Flags.sensitiveContentAppProtection;
import static android.view.flags.Flags.toolkitFrameRateBySizeReadOnly;
@@ -975,13 +974,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    private static boolean sAlwaysRemeasureExactly = false;
    /**
     * When true calculates the bounds in parent from bounds in screen relative to its parents.
     * This addresses the deprecated API (setBoundsInParent) in Compose, which causes empty
     * getBoundsInParent call for Compose apps.
     */
    private static boolean sCalculateBoundsInParentFromBoundsInScreenFlagValue = false;
    /**
     * When true makes it possible to use onMeasure caches also when the force layout flag is
     * enabled. This helps avoiding multiple measures in the same frame with the same dimensions.
@@ -2564,8 +2556,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        sToolkitSetFrameRateReadOnlyFlagValue = toolkitSetFrameRateReadOnly();
        sToolkitMetricsForFrameRateDecisionFlagValue = toolkitMetricsForFrameRateDecision();
        sCalculateBoundsInParentFromBoundsInScreenFlagValue =
                calculateBoundsInParentFromBoundsInScreen();
        sUseMeasureCacheDuringForceLayoutFlagValue = enableUseMeasureCacheDuringForceLayout();
    }
@@ -11216,11 +11206,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        // deprecated, and only setBoundsInScreen is called.
        // The bounds in parent can be calculated by diff'ing the child view's bounds in screen with
        // the parent's.
        if (sCalculateBoundsInParentFromBoundsInScreenFlagValue) {
        getBoundsInParent(info, parentInfo, rect);
        } else {
            info.getBoundsInParent(rect);
        }
        structure.setDimens(rect.left, rect.top, 0, 0, rect.width(), rect.height());
        structure.setVisibility(VISIBLE);
        structure.setEnabled(info.isEnabled());
+0 −11
Original line number Diff line number Diff line
@@ -99,17 +99,6 @@ flag {
    is_fixed_read_only: true
}

flag {
  name: "calculate_bounds_in_parent_from_bounds_in_screen"
  namespace: "accessibility"
  description: "Calculate bounds in parent of each node in ViewStructure from its bounds set relative to screen and its parent's"
  bug: "366131857"
  is_fixed_read_only: true
  metadata {
      purpose: PURPOSE_BUGFIX
  }
}

flag {
    name: "surface_view_set_composition_order"
    namespace: "window_surfaces"