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

Commit 7f46c1b7 authored by Adam Powell's avatar Adam Powell
Browse files

Clarify Fragment#setUserVisibleHint guarantees in docs

Note that setUserVisibleHint can be called from outside of the
fragment lifecycle. Some apps override it and expect otherwise,
and the bug fix for N will affect their expectations.

https://code.google.com/p/android/issues/detail?id=213681

Bug 29526496

Change-Id: I68d5690cefe5f354313f3d89e8ec5ebccaf2544f
parent a831c0e3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1029,6 +1029,9 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
     * This may be used by the system to prioritize operations such as fragment lifecycle updates
     * or loader ordering behavior.</p>
     *
     * <p><strong>Note:</strong> This method may be called outside of the fragment lifecycle
     * and thus has no ordering guarantees with regard to fragment lifecycle method calls.</p>
     *
     * <p><strong>Note:</strong> Prior to Android N there was a platform bug that could cause
     * <code>setUserVisibleHint</code> to bring a fragment up to the started state before its
     * <code>FragmentTransaction</code> had been committed. As some apps relied on this behavior,