Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FragmentStrictMode] Detect Fragment reuse #142

Conversation

simonschiller
Copy link
Contributor

Proposed Changes

  • Detect reuse of Fragment instances

Testing

Test: See FragmentStrictModeTest#detectFragmentReuse and FragmentStrictModeTest#detectFragmentReuseInFlightTransaction

Issues Fixed

Fixes: 153738653

@@ -283,6 +283,10 @@ public void run() {
// track it separately.
boolean mIsCreated;

// True if the fragment was already added to a FragmentManager, but has since been removed
// again.
boolean mRemovedFromFragmentManager;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is long, I think mRemoved would be enough.

@dlam
Copy link
Member

dlam commented Mar 17, 2021

Build should be passing again now - if you rebase this checks should pass.

@simonschiller
Copy link
Contributor Author

Rebased and the checks here seem fine, but I got an email notification telling me that they didn't pass. Is this branch green on your internal CI?

@dlam
Copy link
Member

dlam commented Mar 19, 2021

I think the lint check has some issues with api files right now on push events - feel free to ignore since checks here are passing.

@simonschiller simonschiller deleted the feature/fragment-reuse branch March 25, 2021 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants