DisplayFrames 中包含了屏幕区域、应用区域、内容区域、安全显示区域等等。DisplayFrames 中用十几个 Rect 对象来表示这些 frame。

mDisplayId 是跟物理屏幕相关的,DEFAULT_DISPLAY 的值是 0,mDisplayWidth 是物理屏幕宽度,mDisplayHeight 是物理屏幕高度。

/**
 * The current size of the screen; really; extends into the overscan area of the screen and
 * doesn't account for any system elements like the status bar.
 */
public final Rect mOverscan = new Rect();
/**
 * The current visible size of the screen; really; (ir)regardless of whether the status bar can
 * be hidden but not extending into the overscan area.
 */
public final Rect mUnrestricted = new Rect();
/** Like mOverscan*, but allowed to move into the overscan region where appropriate. */
public final Rect mRestrictedOverscan = new Rect();
/**
 * The current size of the screen; these may be different than (0,0)-(dw,dh) if the status bar
 * can't be hidden; in that case it effectively carves out that area of the display from all
 * other windows.
 */
public final Rect mRestricted = new Rect();
/**
 * During layout, the current screen borders accounting for any currently visible system UI
 * elements.
 */
public final Rect mSystem = new Rect();

/** For applications requesting stable content insets, these are them. */
public final Rect mStable = new Rect();

/**
 * For applications requesting stable content insets but have also set the fullscreen window
 * flag, these are the stable dimensions without the status bar.
 */
public final Rect mStableFullscreen = new Rect();
/**
 * During layout, the current screen borders with all outer decoration (status bar, input method
 * dock) accounted for.
 */
public final Rect mCurrent = new Rect();

/**
 * During layout, the frame in which content should be displayed to the user, accounting for all
 * screen decoration except for any space they deem as available for other content. This is
 * usually the same as mCurrent*, but may be larger if the screen decor has supplied content
 * insets.
 */
public final Rect mContent = new Rect();

/**
 * During layout, the frame in which voice content should be displayed to the user, accounting
 * for all screen decoration except for any space they deem as available for other content.
 */
public final Rect mVoiceContent = new Rect();

/** During layout, the current screen borders along which input method windows are placed. */
public final Rect mDock = new Rect();
/** The display cutout used for layout (after rotation) */
@NonNull public WmDisplayCutout mDisplayCutout = WmDisplayCutout.NO_CUTOUT;

/** The cutout as supplied by display info */
@NonNull public WmDisplayCutout mDisplayInfoCutout = WmDisplayCutout.NO_CUTOUT;

/**
 * During layout, the frame that is display-cutout safe, i.e. that does not intersect with it.
 */
public final Rect mDisplayCutoutSafe = new Rect();