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

Commit a21c82cd authored by Jian-Syuan (Shane) Wong's avatar Jian-Syuan (Shane) Wong Committed by Android (Google) Code Review
Browse files

Merge "Fix the activity leak issue" into main

parents 5f8b94d3 5d28b2ec
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -9587,6 +9587,8 @@ public final class ViewRootImpl implements ViewParent,
            }
            mRemoved = true;
            mOnBackInvokedDispatcher.detachFromWindow();
            removeVrrMessages();
            if (mAdded) {
                dispatchDetachedFromWindow();
            }
@@ -12551,8 +12553,8 @@ public final class ViewRootImpl implements ViewParent,
                if (sToolkitFrameRateFunctionEnablingReadOnlyFlagValue) {
                    mFrameRateTransaction.setFrameRateCategory(mSurfaceControl,
                        frameRateCategory, false).applyAsyncUnsafe();
                    mLastPreferredFrameRateCategory = frameRateCategory;
                }
                mLastPreferredFrameRateCategory = frameRateCategory;
            }
        } catch (Exception e) {
            Log.e(mTag, "Unable to set frame rate category", e);
@@ -12612,8 +12614,8 @@ public final class ViewRootImpl implements ViewParent,
                if (sToolkitFrameRateFunctionEnablingReadOnlyFlagValue) {
                    mFrameRateTransaction.setFrameRate(mSurfaceControl, preferredFrameRate,
                    mFrameRateCompatibility).applyAsyncUnsafe();
                    mLastPreferredFrameRate = preferredFrameRate;
                }
                mLastPreferredFrameRate = preferredFrameRate;
            }
        } catch (Exception e) {
            Log.e(mTag, "Unable to set frame rate", e);
@@ -12855,4 +12857,10 @@ public final class ViewRootImpl implements ViewParent,
            mHasIdledMessage = true;
        }
    }
    private void removeVrrMessages() {
        mHandler.removeMessages(MSG_TOUCH_BOOST_TIMEOUT);
        mHandler.removeMessages(MSG_CHECK_INVALIDATION_IDLE);
        mHandler.removeMessages(MSG_FRAME_RATE_SETTING);
    }
}