@@ -5466,27 +5466,33 @@ ActivityOptions getActivityOptions() {
54665466
54675467 /**
54685468 * Activities that want to remain visible behind a translucent activity above them must call
5469- * this method anytime before a return from {@link #onPause()}. If this call is successful
5470- * then the activity will remain visible when {@link #onPause()} is called, and can continue to
5471- * play media in the background, but it must stop playing and release resources prior to or
5472- * within the call to {@link #onVisibleBehindCanceled()}. If this call returns false, the
5473- * activity will not be visible in the background, and must release any media resources
5474- * immediately.
5469+ * this method anytime between the start of {@link #onResume()} and the return from
5470+ * {@link #onPause()}. If this call is successful then the activity will remain visible after
5471+ * {@link #onPause()} is called, and is allowed to continue playing media in the background.
5472+ *
5473+ * <p>The actions of this call are reset each time that this activity is brought to the
5474+ * front. That is, every time {@link #onResume()} is called the activity will be assumed
5475+ * to not have requested visible behind. Therefore, if you want this activity to continue to
5476+ * be visible in the background you must call this method again.
54755477 *
54765478 * <p>Only fullscreen opaque activities may make this call. I.e. this call is a nop
54775479 * for dialog and translucent activities.
54785480 *
5479- * <p>False will be returned any time this method is call between the return of onPause and
5481+ * <p>Under all circumstances, the activity must stop playing and release resources prior to or
5482+ * within a call to {@link #onVisibleBehindCanceled()} or if this call returns false.
5483+ *
5484+ * <p>False will be returned any time this method is called between the return of onPause and
54805485 * the next call to onResume.
54815486 *
54825487 * @param visible true to notify the system that the activity wishes to be visible behind other
54835488 * translucent activities, false to indicate otherwise. Resources must be
54845489 * released when passing false to this method.
5485- * @return the resulting visibiity state. If true the activity may remain visible beyond
5486- * {@link #onPause()}. If false then the activity may not count on being visible behind
5487- * other translucent activities, and must stop any media playback and release resources.
5488- * Returning false may occur in lieu of a call to onVisibleBehindCanceled() so the return
5489- * value must be checked.
5490+ * @return the resulting visibiity state. If true the activity will remain visible beyond
5491+ * {@link #onPause()} if the next activity is translucent or not fullscreen. If false
5492+ * then the activity may not count on being visible behind other translucent activities,
5493+ * and must stop any media playback and release resources.
5494+ * Returning false may occur in lieu of a call to {@link #onVisibleBehindCanceled()} so
5495+ * the return value must be checked.
54905496 *
54915497 * @see #onVisibleBehindCanceled()
54925498 * @see #onBackgroundVisibleBehindChanged(boolean)
0 commit comments