Loading services/core/java/com/android/server/wm/RootWindowContainer.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -564,8 +564,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> /** /** * Returns {@code true} if the callingUid has any non-toast window currently visible to the * Returns {@code true} if the callingUid has any non-toast window currently visible to the * user. Also ignores {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_STARTING}, * user. Also ignores {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_STARTING}, * since those windows don't belong to apps. * and{@link android.view.WindowManager.LayoutParams#TYPE_PRIVATE_PRESENTATION}, as they * @see WindowState#isNonToastOrStarting() * should not count towards the apps visibility * @see WindowState#isNonToastOrStartingOrPrivatePresentation() */ */ boolean isAnyNonToastWindowVisibleForUid(int callingUid) { boolean isAnyNonToastWindowVisibleForUid(int callingUid) { final PooledPredicate p = PooledLambda.obtainPredicate( final PooledPredicate p = PooledLambda.obtainPredicate( Loading services/core/java/com/android/server/wm/WindowState.java +11 −7 Original line number Original line Diff line number Diff line Loading @@ -5825,20 +5825,24 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } } /** /** * Returns {@code true} if this window is not {@link WindowManager.LayoutParams#TYPE_TOAST} * Returns {@code true} if this window is not {@link WindowManager.LayoutParams#TYPE_TOAST}, * or {@link WindowManager.LayoutParams#TYPE_APPLICATION_STARTING}, * {@link WindowManager.LayoutParams#TYPE_APPLICATION_STARTING} or * since this window doesn't belong to apps. * {@link WindowManager.LayoutParams#TYPE_PRIVATE_PRESENTATION}, * since those windows should not count towards the apps visibility. */ */ boolean isNonToastOrStarting() { boolean isNonToastOrStartingOrPrivatePresentation() { return mAttrs.type != TYPE_TOAST && mAttrs.type != TYPE_APPLICATION_STARTING; return mAttrs.type != TYPE_TOAST && mAttrs.type != TYPE_APPLICATION_STARTING && mAttrs.type != TYPE_PRIVATE_PRESENTATION; } } boolean isNonToastWindowVisibleForUid(int callingUid) { boolean isNonToastWindowVisibleForUid(int callingUid) { return getOwningUid() == callingUid && isNonToastOrStarting() && isVisibleNow(); return getOwningUid() == callingUid && isNonToastOrStartingOrPrivatePresentation() && isVisibleNow(); } } boolean isNonToastWindowVisibleForPid(int pid) { boolean isNonToastWindowVisibleForPid(int pid) { return mSession.mPid == pid && isNonToastOrStarting() && isVisibleNow(); return mSession.mPid == pid && isNonToastOrStartingOrPrivatePresentation() && isVisibleNow(); } } void setViewVisibility(int viewVisibility) { void setViewVisibility(int viewVisibility) { Loading Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -564,8 +564,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> /** /** * Returns {@code true} if the callingUid has any non-toast window currently visible to the * Returns {@code true} if the callingUid has any non-toast window currently visible to the * user. Also ignores {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_STARTING}, * user. Also ignores {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_STARTING}, * since those windows don't belong to apps. * and{@link android.view.WindowManager.LayoutParams#TYPE_PRIVATE_PRESENTATION}, as they * @see WindowState#isNonToastOrStarting() * should not count towards the apps visibility * @see WindowState#isNonToastOrStartingOrPrivatePresentation() */ */ boolean isAnyNonToastWindowVisibleForUid(int callingUid) { boolean isAnyNonToastWindowVisibleForUid(int callingUid) { final PooledPredicate p = PooledLambda.obtainPredicate( final PooledPredicate p = PooledLambda.obtainPredicate( Loading
services/core/java/com/android/server/wm/WindowState.java +11 −7 Original line number Original line Diff line number Diff line Loading @@ -5825,20 +5825,24 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } } /** /** * Returns {@code true} if this window is not {@link WindowManager.LayoutParams#TYPE_TOAST} * Returns {@code true} if this window is not {@link WindowManager.LayoutParams#TYPE_TOAST}, * or {@link WindowManager.LayoutParams#TYPE_APPLICATION_STARTING}, * {@link WindowManager.LayoutParams#TYPE_APPLICATION_STARTING} or * since this window doesn't belong to apps. * {@link WindowManager.LayoutParams#TYPE_PRIVATE_PRESENTATION}, * since those windows should not count towards the apps visibility. */ */ boolean isNonToastOrStarting() { boolean isNonToastOrStartingOrPrivatePresentation() { return mAttrs.type != TYPE_TOAST && mAttrs.type != TYPE_APPLICATION_STARTING; return mAttrs.type != TYPE_TOAST && mAttrs.type != TYPE_APPLICATION_STARTING && mAttrs.type != TYPE_PRIVATE_PRESENTATION; } } boolean isNonToastWindowVisibleForUid(int callingUid) { boolean isNonToastWindowVisibleForUid(int callingUid) { return getOwningUid() == callingUid && isNonToastOrStarting() && isVisibleNow(); return getOwningUid() == callingUid && isNonToastOrStartingOrPrivatePresentation() && isVisibleNow(); } } boolean isNonToastWindowVisibleForPid(int pid) { boolean isNonToastWindowVisibleForPid(int pid) { return mSession.mPid == pid && isNonToastOrStarting() && isVisibleNow(); return mSession.mPid == pid && isNonToastOrStartingOrPrivatePresentation() && isVisibleNow(); } } void setViewVisibility(int viewVisibility) { void setViewVisibility(int viewVisibility) { Loading