Loading services/core/java/com/android/server/am/ActivityRecord.java +5 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo boolean visible; // does this activity's window need to be shown? boolean visibleIgnoringKeyguard; // is this activity visible, ignoring the fact that Keyguard // might hide this activity? private boolean mLastSetWindowVisibility; // The last window visibility state that was set. private boolean mDeferHidingClient; // If true we told WM to defer reporting to the client // process that it is hidden. boolean sleeping; // have we told the activity to sleep? Loading Loading @@ -1581,6 +1582,10 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo } void setVisibility(boolean visible) { if (mLastSetWindowVisibility == visible) { return; } mLastSetWindowVisibility = visible; mWindowContainerController.setVisibility(visible, mDeferHidingClient); mStackSupervisor.mActivityMetricsLogger.notifyVisibilityChanged(this, visible); } Loading services/core/java/com/android/server/am/ActivityStack.java +1 −1 Original line number Diff line number Diff line Loading @@ -1933,7 +1933,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai * * @return true if {@param r} is visible taken Keyguard state into account, false otherwise */ private boolean checkKeyguardVisibility(ActivityRecord r, boolean shouldBeVisible, boolean checkKeyguardVisibility(ActivityRecord r, boolean shouldBeVisible, boolean isTop) { final boolean isInPinnedStack = r.getStack().getStackId() == PINNED_STACK_ID; final boolean keyguardShowing = mStackSupervisor.mKeyguardController.isKeyguardShowing(); Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +7 −1 Original line number Diff line number Diff line Loading @@ -1333,7 +1333,13 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } r.startFreezingScreenLocked(app, 0); if (r.getStack().checkKeyguardVisibility(r, true /* shouldBeVisible */, true /* isTop */)) { // We only set the visibility to true if the activity is allowed to be visible based on // keyguard state. This avoids setting this into motion in window manager that is later // cancelled due to later calls to ensure visible activities that set visibility back to // false. r.setVisibility(true); } // schedule launch ticks to collect information about slow apps. r.startLaunchTickingLocked(); Loading Loading
services/core/java/com/android/server/am/ActivityRecord.java +5 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo boolean visible; // does this activity's window need to be shown? boolean visibleIgnoringKeyguard; // is this activity visible, ignoring the fact that Keyguard // might hide this activity? private boolean mLastSetWindowVisibility; // The last window visibility state that was set. private boolean mDeferHidingClient; // If true we told WM to defer reporting to the client // process that it is hidden. boolean sleeping; // have we told the activity to sleep? Loading Loading @@ -1581,6 +1582,10 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo } void setVisibility(boolean visible) { if (mLastSetWindowVisibility == visible) { return; } mLastSetWindowVisibility = visible; mWindowContainerController.setVisibility(visible, mDeferHidingClient); mStackSupervisor.mActivityMetricsLogger.notifyVisibilityChanged(this, visible); } Loading
services/core/java/com/android/server/am/ActivityStack.java +1 −1 Original line number Diff line number Diff line Loading @@ -1933,7 +1933,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai * * @return true if {@param r} is visible taken Keyguard state into account, false otherwise */ private boolean checkKeyguardVisibility(ActivityRecord r, boolean shouldBeVisible, boolean checkKeyguardVisibility(ActivityRecord r, boolean shouldBeVisible, boolean isTop) { final boolean isInPinnedStack = r.getStack().getStackId() == PINNED_STACK_ID; final boolean keyguardShowing = mStackSupervisor.mKeyguardController.isKeyguardShowing(); Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +7 −1 Original line number Diff line number Diff line Loading @@ -1333,7 +1333,13 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } r.startFreezingScreenLocked(app, 0); if (r.getStack().checkKeyguardVisibility(r, true /* shouldBeVisible */, true /* isTop */)) { // We only set the visibility to true if the activity is allowed to be visible based on // keyguard state. This avoids setting this into motion in window manager that is later // cancelled due to later calls to ensure visible activities that set visibility back to // false. r.setVisibility(true); } // schedule launch ticks to collect information about slow apps. r.startLaunchTickingLocked(); Loading