Ignore virtual presentation windows - RESTRICT AUTOMERGE
Windows of TYPE_PRESENTATION on virtual displays should not be counted as visible windows to determine if BAL is allowed. Test: manual test, atest BackgroundActivityLaunchTest Bug: 264029851, 205130886 Merged-In: I08b16ba1c155e951286ddc22019180cbd6334dfa Change-Id: I0f6bc691ca50582cb56e3b8a7ade14eac1660358
This commit is contained in:
@@ -61,7 +61,6 @@ import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
|
||||
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST;
|
||||
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
|
||||
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY;
|
||||
@@ -5820,7 +5819,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
*/
|
||||
boolean isNonToastOrStartingOrPrivatePresentation() {
|
||||
return mAttrs.type != TYPE_TOAST && mAttrs.type != TYPE_APPLICATION_STARTING
|
||||
&& mAttrs.type != TYPE_PRIVATE_PRESENTATION;
|
||||
&& mAttrs.type != TYPE_PRIVATE_PRESENTATION
|
||||
&& !(mAttrs.type == TYPE_PRESENTATION && isOnVirtualDisplay());
|
||||
}
|
||||
|
||||
boolean isNonToastWindowVisibleForUid(int callingUid) {
|
||||
@@ -5833,6 +5833,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
&& isVisibleNow();
|
||||
}
|
||||
|
||||
private boolean isOnVirtualDisplay() {
|
||||
return getDisplayContent().mDisplay.getType() == Display.TYPE_VIRTUAL;
|
||||
}
|
||||
|
||||
void setViewVisibility(int viewVisibility) {
|
||||
mViewVisibility = viewVisibility;
|
||||
// The viewVisibility is set to GONE with a client request to relayout. If this occurs and
|
||||
|
||||
Reference in New Issue
Block a user