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

Commit 77230512 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Revert "Always check if the view can be recycled."" into sc-v2-dev am:...

Merge "Revert "Always check if the view can be recycled."" into sc-v2-dev am: 533ce6f9 am: f3ba2931

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16213673

Change-Id: I01773d86e94717a2a9d935982717c4e5a1164101
parents 3412fe3d f3ba2931
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -5746,9 +5746,11 @@ public class RemoteViews implements Parcelable, Filter {
        // persisted across change, and has the RemoteViews re-applied in a different situation
        // (orientation or size), we throw an exception, since the layouts may be completely
        // unrelated.
        if (hasMultipleLayouts()) {
            if (!rvToApply.canRecycleView(v)) {
            throw new RuntimeException("Attempting to re-apply RemoteViews to a view that"
                    + " that does not share the same root layout id.");
                throw new RuntimeException("Attempting to re-apply RemoteViews to a view that" +
                        " that does not share the same root layout id.");
            }
        }

        rvToApply.performApply(v, (ViewGroup) v.getParent(), handler, colorResources);
@@ -5792,9 +5794,11 @@ public class RemoteViews implements Parcelable, Filter {
        // In the case that a view has this RemoteViews applied in one orientation, is persisted
        // 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 (hasMultipleLayouts()) {
            if (!rvToApply.canRecycleView(v)) {
            throw new RuntimeException("Attempting to re-apply RemoteViews to a view that"
                    + " that does not share the same root layout id.");
                throw new RuntimeException("Attempting to re-apply RemoteViews to a view that" +
                        " that does not share the same root layout id.");
            }
        }

        return new AsyncApplyTask(rvToApply, (ViewGroup) v.getParent(),