Merge "Make Recents activity invisible when it is behind a translucent activity" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cbc73decf1
@@ -1725,13 +1725,9 @@ final class ActivityStack {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aboveTop = false;
|
aboveTop = false;
|
||||||
// mLaunchingBehind: Activities launching behind are at the back of the task stack
|
|
||||||
// but must be drawn initially for the animation as though they were visible.
|
if (shouldBeVisible(r, behindTranslucentActivity, stackVisibleBehind,
|
||||||
final boolean activityVisibleBehind =
|
visibleBehind, behindFullscreenActivity)) {
|
||||||
(behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;
|
|
||||||
final boolean isVisible = (!behindFullscreenActivity || r.mLaunchTaskBehind
|
|
||||||
|| activityVisibleBehind) && okToShowLocked(r);
|
|
||||||
if (isVisible) {
|
|
||||||
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Make visible? " + r
|
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Make visible? " + r
|
||||||
+ " finishing=" + r.finishing + " state=" + r.state);
|
+ " finishing=" + r.finishing + " state=" + r.state);
|
||||||
// First: if this is not the current activity being started, make
|
// First: if this is not the current activity being started, make
|
||||||
@@ -1819,6 +1815,31 @@ final class ActivityStack {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return true if the input activity should be made visible */
|
||||||
|
private boolean shouldBeVisible(ActivityRecord r, boolean behindTranslucentActivity,
|
||||||
|
boolean stackVisibleBehind, ActivityRecord visibleBehind,
|
||||||
|
boolean behindFullscreenActivity) {
|
||||||
|
// mLaunchingBehind: Activities launching behind are at the back of the task stack
|
||||||
|
// but must be drawn initially for the animation as though they were visible.
|
||||||
|
final boolean activityVisibleBehind =
|
||||||
|
(behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;
|
||||||
|
|
||||||
|
if (!okToShowLocked(r)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isVisible =
|
||||||
|
!behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind;
|
||||||
|
|
||||||
|
if (isVisible && r.isRecentsActivity()) {
|
||||||
|
// Recents activity can only be visible if the home stack isn't fullscreen or is the
|
||||||
|
// focused stack.
|
||||||
|
isVisible = !mFullscreen || mStackSupervisor.isFocusedStack(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return isVisible;
|
||||||
|
}
|
||||||
|
|
||||||
private void checkTranslucentActivityWaiting(ActivityRecord top) {
|
private void checkTranslucentActivityWaiting(ActivityRecord top) {
|
||||||
if (mTranslucentActivityWaiting != top) {
|
if (mTranslucentActivityWaiting != top) {
|
||||||
mUndrawnActivitiesBelowTopTranslucent.clear();
|
mUndrawnActivitiesBelowTopTranslucent.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user