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

Commit 9f6f9ca9 authored by Ryan Mitchell's avatar Ryan Mitchell
Browse files

Fix RelativeLayout checking of resource ids greater than 0x80

For splits with package id 0x80 and higher, the resource ids are
negative. RelativeLayout builds a dependency graph to indicate in which
order the layout height and width need to be processed. Since the ids
are less than 0, RelativeLayout is incorrectly assuming the layouts are
not order dependent.

Bug: 72869300
Test: manual
Change-Id: I98f58f11733c2976fc5c1b4152949cf80660f657
parent d81cd262
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import android.annotation.NonNull;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ResourceId;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.os.Build;
@@ -1991,7 +1992,7 @@ public class RelativeLayout extends ViewGroup {
                // dependencies for a specific set of rules
                for (int j = 0; j < rulesCount; j++) {
                    final int rule = rules[rulesFilter[j]];
                    if (rule > 0) {
                    if (ResourceId.isValid(rule)) {
                        // The node this node depends on
                        final Node dependency = keyNodes.get(rule);
                        // Skip unknowns and self dependencies