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

Commit 144bae3f authored by Chris Li's avatar Chris Li Committed by Android (Google) Code Review
Browse files

Merge "Try fix Bundle#getParcelable error for relayout bundle" into main

parents 9ab5c649 85e02626
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -9044,20 +9044,26 @@ public final class ViewRootImpl implements ViewParent,
                    mTempInsets, mTempControls, mRelayoutBundle);
            mRelayoutRequested = true;
            final int maybeSyncSeqId = mRelayoutBundle.getInt(
                    IWindowSession.KEY_RELAYOUT_BUNDLE_SEQID);
            if (maybeSyncSeqId > 0) {
                mSyncSeqId = maybeSyncSeqId;
            }
            if (activityWindowInfoFlag() && mPendingActivityWindowInfo != null) {
                final ActivityWindowInfo outInfo = mRelayoutBundle.getParcelable(
                ActivityWindowInfo outInfo = null;
                try {
                    outInfo = mRelayoutBundle.getParcelable(
                            IWindowSession.KEY_RELAYOUT_BUNDLE_ACTIVITY_WINDOW_INFO,
                            ActivityWindowInfo.class);
                    mRelayoutBundle.remove(IWindowSession.KEY_RELAYOUT_BUNDLE_ACTIVITY_WINDOW_INFO);
                } catch (IllegalStateException e) {
                    Log.e(TAG, "Failed to get ActivityWindowInfo from relayout Bundle", e);
                }
                if (outInfo != null) {
                    mPendingActivityWindowInfo.set(outInfo);
                }
            }
            mRelayoutBundle.clear();
            final int maybeSyncSeqId = mRelayoutBundle.getInt(
                    IWindowSession.KEY_RELAYOUT_BUNDLE_SEQID);
            if (maybeSyncSeqId > 0) {
                mSyncSeqId = maybeSyncSeqId;
            }
            mWinFrameInScreen.set(mTmpFrames.frame);
            if (mTranslator != null) {
                mTranslator.translateRectInScreenToAppWindow(mTmpFrames.frame);