Merge "Use accessor methods to get/set visibleBehindActivity"

This commit is contained in:
Wale Ogunwale
2015-12-17 19:54:40 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 7 deletions

View File

@@ -813,10 +813,9 @@ final class ActivityStack {
if (hasVisibleBehindActivity()) {
// Stop visible behind activity before going to sleep.
final ActivityRecord r = mActivityContainer.mActivityDisplay.mVisibleBehindActivity;
final ActivityRecord r = getVisibleBehindActivity();
mStackSupervisor.mStoppingActivities.add(r);
if (DEBUG_STATES) Slog.v(TAG_STATES,
"Sleep still waiting to stop visible behind " + r);
if (DEBUG_STATES) Slog.v(TAG_STATES, "Sleep still waiting to stop visible behind " + r);
return true;
}
@@ -1053,7 +1052,7 @@ final class ActivityStack {
mHandler.removeMessages(STOP_TIMEOUT_MSG, r);
r.stopped = true;
r.state = ActivityState.STOPPED;
if (mActivityContainer.mActivityDisplay.mVisibleBehindActivity == r) {
if (getVisibleBehindActivity() == r) {
mStackSupervisor.requestVisibleBehindLocked(r, false);
}
if (r.finishing) {
@@ -1214,9 +1213,9 @@ final class ActivityStack {
next.returningOptions = null;
if (mActivityContainer.mActivityDisplay.mVisibleBehindActivity == next) {
if (getVisibleBehindActivity() == next) {
// When resuming an activity, require it to call requestVisibleBehind() again.
mActivityContainer.mActivityDisplay.setVisibleBehindActivity(null);
setVisibleBehindActivity(null);
}
}

View File

@@ -5171,7 +5171,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
/** All of the stacks on this display. Order matters, topmost stack is in front of all other
* stacks, bottommost behind. Accessed directly by ActivityManager package classes */
final ArrayList<ActivityStack> mStacks = new ArrayList<ActivityStack>();
final ArrayList<ActivityStack> mStacks = new ArrayList<>();
ActivityRecord mVisibleBehindActivity;