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

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

Merge "Check if a view can be recycled in async case." into sc-v2-dev am: 6c20a8f5 am: e330f4fc

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

Change-Id: Ia95b7c7f524b27878ae178251cad857c76202115
parents 715c4c9a e330f4fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,7 @@ public class AppWidgetHostView extends FrameLayout {

        // If our stale view has been prepared to match active, and the new
        // layout matches, try recycling it
        if (layoutId == mLayoutId && mView != null) {
        if (remoteViews.canRecycleView(mView)) {
            try {
                mLastExecutionSignal = remoteViews.reapplyAsync(mContext,
                        mView,
+1 −1
Original line number Diff line number Diff line
@@ -5795,7 +5795,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 (hasMultipleLayouts()) {
            if ((Integer) v.getTag(R.id.widget_frame) != rvToApply.getLayoutId()) {
            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.");
            }