Deprecate Activity#requestVisibleBehind
The scenario in which this method was intended for is no longer in use. Test: documentation Bug: 37433505 Change-Id: I9927e9a1c4a8cecc920d78abe406b77969854290
This commit is contained in:
@@ -803,6 +803,7 @@ public class Activity extends ContextThemeWrapper
|
||||
final FragmentController mFragments = FragmentController.createController(new HostCallbacks());
|
||||
|
||||
// Most recent call to requestVisibleBehind().
|
||||
@Deprecated
|
||||
boolean mVisibleBehind;
|
||||
|
||||
private static final class ManagedCursor {
|
||||
@@ -6384,9 +6385,13 @@ public class Activity extends ContextThemeWrapper
|
||||
* <p>False will be returned any time this method is called between the return of onPause and
|
||||
* the next call to onResume.
|
||||
*
|
||||
* @deprecated This method's functionality is no longer supported as of
|
||||
* {@link android.os.Build.VERSION_CODES#O} and will be removed in a future release.
|
||||
*
|
||||
* @param visible true to notify the system that the activity wishes to be visible behind other
|
||||
* translucent activities, false to indicate otherwise. Resources must be
|
||||
* released when passing false to this method.
|
||||
*
|
||||
* @return the resulting visibiity state. If true the activity will remain visible beyond
|
||||
* {@link #onPause()} if the next activity is translucent or not fullscreen. If false
|
||||
* then the activity may not count on being visible behind other translucent activities,
|
||||
@@ -6396,6 +6401,7 @@ public class Activity extends ContextThemeWrapper
|
||||
*
|
||||
* @see #onVisibleBehindCanceled()
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean requestVisibleBehind(boolean visible) {
|
||||
if (!mResumed) {
|
||||
// Do not permit paused or stopped activities to do this.
|
||||
@@ -6422,7 +6428,11 @@ public class Activity extends ContextThemeWrapper
|
||||
* process. Otherwise {@link #onStop()} will be called following return.
|
||||
*
|
||||
* @see #requestVisibleBehind(boolean)
|
||||
*
|
||||
* @deprecated This method's functionality is no longer supported as of
|
||||
* {@link android.os.Build.VERSION_CODES#O} and will be removed in a future release.
|
||||
*/
|
||||
@Deprecated
|
||||
@CallSuper
|
||||
public void onVisibleBehindCanceled() {
|
||||
mCalled = true;
|
||||
@@ -6432,6 +6442,9 @@ public class Activity extends ContextThemeWrapper
|
||||
* Translucent activities may call this to determine if there is an activity below them that
|
||||
* is currently set to be visible in the background.
|
||||
*
|
||||
* @deprecated This method's functionality is no longer supported as of
|
||||
* {@link android.os.Build.VERSION_CODES#O} and will be removed in a future release.
|
||||
*
|
||||
* @return true if an activity below is set to visible according to the most recent call to
|
||||
* {@link #requestVisibleBehind(boolean)}, false otherwise.
|
||||
*
|
||||
@@ -6440,6 +6453,7 @@ public class Activity extends ContextThemeWrapper
|
||||
* @see #onBackgroundVisibleBehindChanged(boolean)
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@SystemApi
|
||||
public boolean isBackgroundVisibleBehind() {
|
||||
try {
|
||||
@@ -6456,12 +6470,16 @@ public class Activity extends ContextThemeWrapper
|
||||
* This call may be a consequence of {@link #requestVisibleBehind(boolean)} or might be
|
||||
* due to a background activity finishing itself.
|
||||
*
|
||||
* @deprecated This method's functionality is no longer supported as of
|
||||
* {@link android.os.Build.VERSION_CODES#O} and will be removed in a future release.
|
||||
*
|
||||
* @param visible true if a background activity is visible, false otherwise.
|
||||
*
|
||||
* @see #requestVisibleBehind(boolean)
|
||||
* @see #onVisibleBehindCanceled()
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@SystemApi
|
||||
public void onBackgroundVisibleBehindChanged(boolean visible) {
|
||||
}
|
||||
|
||||
@@ -852,7 +852,11 @@ public class ActivityManager {
|
||||
/**
|
||||
* Returns true if activities contained in this stack can request visible behind by
|
||||
* calling {@link Activity#requestVisibleBehind}.
|
||||
*
|
||||
* @deprecated This method's functionality is no longer supported as of
|
||||
* {@link android.os.Build.VERSION_CODES#O} and will be removed in a future release.
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean activitiesCanRequestVisibleBehind(int stackId) {
|
||||
return stackId == FULLSCREEN_WORKSPACE_STACK_ID ||
|
||||
stackId == ASSISTANT_STACK_ID;
|
||||
|
||||
Reference in New Issue
Block a user