Loading services/core/java/com/android/server/am/KeyguardController.java +3 −4 Original line number Diff line number Diff line Loading @@ -204,12 +204,11 @@ class KeyguardController { mOccluded = false; mDismissingKeyguardActivity = null; final ArrayList<ActivityStack> stacks = mStackSupervisor.getStacksOnDefaultDisplay(); final int topStackNdx = stacks.size() - 1; for (int stackNdx = topStackNdx; stackNdx >= 0; --stackNdx) { for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = stacks.get(stackNdx); // Only the very top activity may control occluded state if (stackNdx == topStackNdx) { // Only the focused stack top activity may control occluded state if (mStackSupervisor.isFocusedStack(stack)) { // A dismissing activity occludes Keyguard in the insecure case for legacy reasons. final ActivityRecord topDismissing = stack.getTopDismissingKeyguardActivity(); Loading services/core/java/com/android/server/wm/AppWindowToken.java +23 −2 Original line number Diff line number Diff line Loading @@ -95,6 +95,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree // change. private boolean mReparenting; // True if we are current in the process of removing this app token from the display private boolean mRemovingFromDisplay = false; // The input dispatching timeout for this application token in nanoseconds. long mInputDispatchingTimeoutNanos; Loading Loading @@ -464,6 +467,12 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return !hidden; } @Override void removeImmediately() { onRemovedFromDisplay(); super.removeImmediately(); } @Override void removeIfPossible() { mIsExiting = false; Loading @@ -480,6 +489,11 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } void onRemovedFromDisplay() { if (mRemovingFromDisplay) { return; } mRemovingFromDisplay = true; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG_WM, "Removing app token: " + this); boolean delayed = setVisibility(null, false, TRANSIT_UNSET, true, mVoiceInteraction); Loading Loading @@ -512,12 +526,14 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mService.mNoAnimationNotifyOnTransitionFinished.add(token); } final TaskStack stack = getTask().mStack; final TaskStack stack = getStack(); if (delayed && !isEmpty()) { // set the token aside because it has an active animation to be finished if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM, "removeAppToken make exiting: " + this); if (stack != null) { stack.mExitingAppTokens.add(this); } mIsExiting = true; } else { // Make sure there is no animation running on this token, so any windows associated Loading @@ -540,6 +556,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (!delayed) { updateReportedVisibilityLocked(); } mRemovingFromDisplay = false; } void clearAnimatingFlags() { Loading Loading @@ -1558,6 +1576,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (getController() != null) { pw.print(prefix); pw.print("controller="); pw.println(getController()); } if (mRemovingFromDisplay) { pw.println(prefix + "mRemovingFromDisplay=" + mRemovingFromDisplay); } } @Override Loading services/core/java/com/android/server/wm/WindowManagerService.java +6 −9 Original line number Diff line number Diff line Loading @@ -5606,22 +5606,19 @@ public class WindowManagerService extends IWindowManager.Stub WindowState win = mWindowMap.get(client); if (localLOGV) Slog.v(TAG_WM, "Looking up client " + client + ": " + win); if (win == null) { RuntimeException ex = new IllegalArgumentException( "Requested window " + client + " does not exist"); if (throwOnError) { throw ex; throw new IllegalArgumentException( "Requested window " + client + " does not exist"); } Slog.w(TAG_WM, "Failed looking up window", ex); Slog.w(TAG_WM, "Failed looking up window callers=" + Debug.getCallers(3)); return null; } if (session != null && win.mSession != session) { RuntimeException ex = new IllegalArgumentException( "Requested window " + client + " is in session " + win.mSession + ", not " + session); if (throwOnError) { throw ex; throw new IllegalArgumentException("Requested window " + client + " is in session " + win.mSession + ", not " + session); } Slog.w(TAG_WM, "Failed looking up window", ex); Slog.w(TAG_WM, "Failed looking up window callers=" + Debug.getCallers(3)); return null; } Loading Loading
services/core/java/com/android/server/am/KeyguardController.java +3 −4 Original line number Diff line number Diff line Loading @@ -204,12 +204,11 @@ class KeyguardController { mOccluded = false; mDismissingKeyguardActivity = null; final ArrayList<ActivityStack> stacks = mStackSupervisor.getStacksOnDefaultDisplay(); final int topStackNdx = stacks.size() - 1; for (int stackNdx = topStackNdx; stackNdx >= 0; --stackNdx) { for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = stacks.get(stackNdx); // Only the very top activity may control occluded state if (stackNdx == topStackNdx) { // Only the focused stack top activity may control occluded state if (mStackSupervisor.isFocusedStack(stack)) { // A dismissing activity occludes Keyguard in the insecure case for legacy reasons. final ActivityRecord topDismissing = stack.getTopDismissingKeyguardActivity(); Loading
services/core/java/com/android/server/wm/AppWindowToken.java +23 −2 Original line number Diff line number Diff line Loading @@ -95,6 +95,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree // change. private boolean mReparenting; // True if we are current in the process of removing this app token from the display private boolean mRemovingFromDisplay = false; // The input dispatching timeout for this application token in nanoseconds. long mInputDispatchingTimeoutNanos; Loading Loading @@ -464,6 +467,12 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return !hidden; } @Override void removeImmediately() { onRemovedFromDisplay(); super.removeImmediately(); } @Override void removeIfPossible() { mIsExiting = false; Loading @@ -480,6 +489,11 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } void onRemovedFromDisplay() { if (mRemovingFromDisplay) { return; } mRemovingFromDisplay = true; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG_WM, "Removing app token: " + this); boolean delayed = setVisibility(null, false, TRANSIT_UNSET, true, mVoiceInteraction); Loading Loading @@ -512,12 +526,14 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mService.mNoAnimationNotifyOnTransitionFinished.add(token); } final TaskStack stack = getTask().mStack; final TaskStack stack = getStack(); if (delayed && !isEmpty()) { // set the token aside because it has an active animation to be finished if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM, "removeAppToken make exiting: " + this); if (stack != null) { stack.mExitingAppTokens.add(this); } mIsExiting = true; } else { // Make sure there is no animation running on this token, so any windows associated Loading @@ -540,6 +556,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (!delayed) { updateReportedVisibilityLocked(); } mRemovingFromDisplay = false; } void clearAnimatingFlags() { Loading Loading @@ -1558,6 +1576,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (getController() != null) { pw.print(prefix); pw.print("controller="); pw.println(getController()); } if (mRemovingFromDisplay) { pw.println(prefix + "mRemovingFromDisplay=" + mRemovingFromDisplay); } } @Override Loading
services/core/java/com/android/server/wm/WindowManagerService.java +6 −9 Original line number Diff line number Diff line Loading @@ -5606,22 +5606,19 @@ public class WindowManagerService extends IWindowManager.Stub WindowState win = mWindowMap.get(client); if (localLOGV) Slog.v(TAG_WM, "Looking up client " + client + ": " + win); if (win == null) { RuntimeException ex = new IllegalArgumentException( "Requested window " + client + " does not exist"); if (throwOnError) { throw ex; throw new IllegalArgumentException( "Requested window " + client + " does not exist"); } Slog.w(TAG_WM, "Failed looking up window", ex); Slog.w(TAG_WM, "Failed looking up window callers=" + Debug.getCallers(3)); return null; } if (session != null && win.mSession != session) { RuntimeException ex = new IllegalArgumentException( "Requested window " + client + " is in session " + win.mSession + ", not " + session); if (throwOnError) { throw ex; throw new IllegalArgumentException("Requested window " + client + " is in session " + win.mSession + ", not " + session); } Slog.w(TAG_WM, "Failed looking up window", ex); Slog.w(TAG_WM, "Failed looking up window callers=" + Debug.getCallers(3)); return null; } Loading