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

Commit 43e6468e authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

Merge "Further improvement to determining visiblility of tasks in home stack."...

Merge "Further improvement to determining visiblility of tasks in home stack." into nyc-dev am: a21c6e90
am: 135176d0

* commit '135176d0':
  Further improvement to determining visiblility of tasks in home stack.
parents 290c1422 135176d0
Loading
Loading
Loading
Loading
+28 −27
Original line number Original line Diff line number Diff line
@@ -1587,6 +1587,33 @@ final class ActivityStack {
                // determined individually unlike other stacks where the visibility or fullscreen
                // determined individually unlike other stacks where the visibility or fullscreen
                // status of an activity in a previous task affects other.
                // status of an activity in a previous task affects other.
                behindFullscreenActivity = stackVisibility == STACK_INVISIBLE;
                behindFullscreenActivity = stackVisibility == STACK_INVISIBLE;
            } else if (mStackId == HOME_STACK_ID) {
                if (task.isHomeTask()) {
                    if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Home task: at " + task
                            + " stackInvisible=" + stackInvisible
                            + " behindFullscreenActivity=" + behindFullscreenActivity);
                    // No other task in the home stack should be visible behind the home activity.
                    // Home activities is usually a translucent activity with the wallpaper behind
                    // them. However, when they don't have the wallpaper behind them, we want to
                    // show activities in the next application stack behind them vs. another
                    // task in the home stack like recents.
                    behindFullscreenActivity = true;
                } else if (task.isRecentsTask()
                        && task.getTaskToReturnTo() == APPLICATION_ACTIVITY_TYPE) {
                    if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY,
                            "Recents task returning to app: at " + task
                                    + " stackInvisible=" + stackInvisible
                                    + " behindFullscreenActivity=" + behindFullscreenActivity);
                    // We don't want any other tasks in the home stack visible if the recents
                    // activity is going to be returning to an application activity type.
                    // We do this to preserve the visible order the user used to get into the
                    // recents activity. The recents activity is normally translucent and if it
                    // doesn't have the wallpaper behind it the next activity in the home stack
                    // shouldn't be visible when the home stack is brought to the front to display
                    // the recents activity from an app.
                    behindFullscreenActivity = true;
                }

            }
            }
        }
        }


@@ -1687,33 +1714,7 @@ final class ActivityStack {
                        + " behindFullscreenActivity=" + behindFullscreenActivity);
                        + " behindFullscreenActivity=" + behindFullscreenActivity);
            // At this point, nothing else needs to be shown in this task.
            // At this point, nothing else needs to be shown in this task.
            behindFullscreenActivity = true;
            behindFullscreenActivity = true;
        } else if (isHomeStack()) {
        } else if (!isHomeStack() && r.frontOfTask && task.isOverHomeStack()) {
            if (r.isHomeActivity()) {
                if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Home activity: at " + r
                        + " stackInvisible=" + stackInvisible
                        + " behindFullscreenActivity=" + behindFullscreenActivity);
                // No other activity in the home stack should be visible behind the home activity.
                // Home activities is usually a translucent activity with the wallpaper behind them.
                // However, when they don't have the wallpaper behind them, we want to show
                // activities in the next application stack behind them vs. another activity in the
                // home stack like recents.
                behindFullscreenActivity = true;
            } else if (r.isRecentsActivity()
                    && task.getTaskToReturnTo() == APPLICATION_ACTIVITY_TYPE) {
                if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY,
                        "Recents activity returning to app: at " + r
                        + " stackInvisible=" + stackInvisible
                        + " behindFullscreenActivity=" + behindFullscreenActivity);
                // We don't want any other activities in the home stack visible if the recents
                // activity is going to be returning to an application activity type.
                // We do this to preserve the visible order the user used to get into the recents
                // activity. The recents activity is normally translucent and if it doesn't have
                // the wallpaper behind it the next activity in the home stack shouldn't be visible
                // when the home stack is brought to the front to display the recents activity from
                // an app.
                behindFullscreenActivity = true;
            }
        } else if (r.frontOfTask && task.isOverHomeStack()) {
            if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Showing home: at " + r
            if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Showing home: at " + r
                    + " stackInvisible=" + stackInvisible
                    + " stackInvisible=" + stackInvisible
                    + " behindFullscreenActivity=" + behindFullscreenActivity);
                    + " behindFullscreenActivity=" + behindFullscreenActivity);
+5 −0
Original line number Original line Diff line number Diff line
@@ -933,10 +933,15 @@ final class TaskRecord {
        }
        }
        return false;
        return false;
    }
    }

    boolean isHomeTask() {
    boolean isHomeTask() {
        return taskType == HOME_ACTIVITY_TYPE;
        return taskType == HOME_ACTIVITY_TYPE;
    }
    }


    boolean isRecentsTask() {
        return taskType == RECENTS_ACTIVITY_TYPE;
    }

    boolean isApplicationTask() {
    boolean isApplicationTask() {
        return taskType == APPLICATION_ACTIVITY_TYPE;
        return taskType == APPLICATION_ACTIVITY_TYPE;
    }
    }