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

Commit fcdbde4c authored by Sunny Goyal's avatar Sunny Goyal Committed by android-build-merger
Browse files

Merge "Store the appropriate layout id for the infrated view, so that it can...

Merge "Store the appropriate layout id for the infrated view, so that it can be used for verification during reapply." into nyc-mr1-dev
am: d2d8e9b2

* commit 'd2d8e9b2':
  Store the appropriate layout id for the infrated view, so that it can be used for verification during reapply.

Change-Id: I04ca85225233f4165c3c9cd1ab56d9c772b7d7c1
parents 69ead35a d2d8e9b2
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -3176,7 +3176,9 @@ public class RemoteViews implements Parcelable, Filter {
        // we don't add a filter to the static version returned by getSystemService.
        inflater = inflater.cloneInContext(inflationContext);
        inflater.setFilter(this);
        return inflater.inflate(rv.getLayoutId(), parent, false);
        View v = inflater.inflate(rv.getLayoutId(), parent, false);
        v.setTagInternal(R.id.widget_frame, rv.getLayoutId());
        return v;
    }

    private static void loadTransitionOverride(Context context,
@@ -3354,7 +3356,7 @@ public class RemoteViews implements Parcelable, Filter {
        // across orientation change, and has the RemoteViews re-applied in the new orientation,
        // we throw an exception, since the layouts may be completely unrelated.
        if (hasLandscapeAndPortraitLayouts()) {
            if (v.getId() != rvToApply.getLayoutId()) {
            if ((Integer) v.getTag(R.id.widget_frame) != rvToApply.getLayoutId()) {
                throw new RuntimeException("Attempting to re-apply RemoteViews to a view that" +
                        " that does not share the same root layout id.");
            }
@@ -3390,7 +3392,7 @@ public class RemoteViews implements Parcelable, Filter {
        // across orientation change, and has the RemoteViews re-applied in the new orientation,
        // we throw an exception, since the layouts may be completely unrelated.
        if (hasLandscapeAndPortraitLayouts()) {
            if (v.getId() != rvToApply.getLayoutId()) {
            if ((Integer) v.getTag(R.id.widget_frame) != rvToApply.getLayoutId()) {
                throw new RuntimeException("Attempting to re-apply RemoteViews to a view that" +
                        " that does not share the same root layout id.");
            }