Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f8c4d3b authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Inline WindowState#getAttrs

The method was added for public access from window policy.
Since the logic was moved to DisplayPolicy, there is only
internal access. So remove it to avoid inconsistent usages.

Bug: 163976519
Flag: EXEMPT inline getter
Test: CtsWindowManagerDeviceActivity
Change-Id: Ic0a4830eec2870992da68a29a24067162ec38197
parent c9aa38fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -334,7 +334,7 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer,
        builder.setId(System.currentTimeMillis());
        builder.setContentInsets(contentInsets);
        builder.setLetterboxInsets(letterboxInsets);
        final boolean isWindowTranslucent = mainWindow.getAttrs().format != PixelFormat.OPAQUE;
        final boolean isWindowTranslucent = mainWindow.mAttrs.format != PixelFormat.OPAQUE;
        final boolean isShowWallpaper = mainWindow.hasWallpaper();
        int pixelFormat = builder.getPixelFormat();
        if (pixelFormat == PixelFormat.UNKNOWN) {
@@ -432,7 +432,7 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer,
        final ActivityManager.TaskDescription taskDescription = getTaskDescription(source);
        final int color = ColorUtils.setAlphaComponent(
                taskDescription.getBackgroundColor(), 255);
        final WindowManager.LayoutParams attrs = mainWindow.getAttrs();
        final WindowManager.LayoutParams attrs = mainWindow.mAttrs;
        final Rect taskBounds = source.getBounds();
        final InsetsState insetsState = mainWindow.getInsetsStateWithVisibilityOverride();
        final Rect systemBarInsets = getSystemBarInsets(mainWindow.getFrame(), insetsState);
+1 −1
Original line number Diff line number Diff line
@@ -3076,7 +3076,7 @@ final class ActivityRecord extends WindowToken {
        if (win == null) {
            return;
        }
        isOpaque = isOpaque & !PixelFormat.formatHasAlpha(win.getAttrs().format);
        isOpaque = isOpaque & !PixelFormat.formatHasAlpha(win.mAttrs.format);
        win.mWinAnimator.setOpaqueLocked(isOpaque);
    }

+2 −2
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ class AppCompatLetterboxPolicy {
                        // Check for FLAG_SHOW_WALLPAPER explicitly instead of using
                        // WindowContainer#showWallpaper because the later will return true when
                        // this activity is using blurred wallpaper for letterbox background.
                        && (mainWindow.getAttrs().flags & FLAG_SHOW_WALLPAPER) == 0;
                        && (mainWindow.mAttrs.flags & FLAG_SHOW_WALLPAPER) == 0;

        mLastShouldShowLetterboxUi = shouldShowLetterboxUi;

@@ -334,7 +334,7 @@ class AppCompatLetterboxPolicy {
        if (w == null) {
            return true;
        }
        final int type = w.getAttrs().type;
        final int type = w.mAttrs.type;
        // Allow letterbox to be displayed early for base application or application starting
        // windows even if it is not on the top z order to prevent flickering when the
        // letterboxed window is brought to the top
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ class BackNavigationController {
                    }
                }
            }
            final boolean canInterruptInView = (window.getAttrs().privateFlags
            final boolean canInterruptInView = (window.mAttrs.privateFlags
                    & PRIVATE_FLAG_APP_PROGRESS_GENERATION_ALLOWED) != 0;
            infoBuilder.setAppProgressAllowed(canInterruptInView && !transferGestureToEmbedded
                    && callbackInfo.isAnimationCallback());
+2 −2
Original line number Diff line number Diff line
@@ -5811,7 +5811,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        // For each window, we only take the rects that fall within its touchable region.
        forAllWindows(w -> {
            if (!w.canReceiveTouchInput() || !w.isVisible()
                    || (w.getAttrs().flags & FLAG_NOT_TOUCHABLE) != 0
                    || (w.mAttrs.flags & FLAG_NOT_TOUCHABLE) != 0
                    || unhandled.isEmpty()) {
                return;
            }
@@ -5901,7 +5901,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        if (win.mWmService.mConstants.mSystemGestureExclusionLogDebounceTimeoutMillis <= 0) {
            return false;
        }
        final WindowManager.LayoutParams attrs = win.getAttrs();
        final WindowManager.LayoutParams attrs = win.mAttrs;
        final int type = attrs.type;
        return type != TYPE_WALLPAPER
                && type != TYPE_APPLICATION_STARTING
Loading