android.view.DisplayCutout#ParcelableWrapper ( )源码实例Demo

下面列出了android.view.DisplayCutout#ParcelableWrapper ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: android_9.0.0_r45   文件: TaskSnapshotSurface.java
@Override
public void resized(Rect frame, Rect overscanInsets, Rect contentInsets, Rect visibleInsets,
        Rect stableInsets, Rect outsets, boolean reportDraw,
        MergedConfiguration mergedConfiguration, Rect backDropFrame, boolean forceLayout,
        boolean alwaysConsumeNavBar, int displayId,
        DisplayCutout.ParcelableWrapper displayCutout) {
    if (mergedConfiguration != null && mOuter != null
            && mOuter.mOrientationOnCreation
                    != mergedConfiguration.getMergedConfiguration().orientation) {

        // The orientation of the screen is changing. We better remove the snapshot ASAP as
        // we are going to wait on the new window in any case to unfreeze the screen, and
        // the starting window is not needed anymore.
        sHandler.post(mOuter::remove);
    }
    if (reportDraw) {
        sHandler.obtainMessage(MSG_REPORT_DRAW, mOuter).sendToTarget();
    }
}
 
源代码2 项目: android_9.0.0_r45   文件: Session.java
@Override
public int relayout(IWindow window, int seq, WindowManager.LayoutParams attrs,
        int requestedWidth, int requestedHeight, int viewFlags, int flags, long frameNumber,
        Rect outFrame, Rect outOverscanInsets, Rect outContentInsets, Rect outVisibleInsets,
        Rect outStableInsets, Rect outsets, Rect outBackdropFrame,
        DisplayCutout.ParcelableWrapper cutout, MergedConfiguration mergedConfiguration,
        Surface outSurface) {
    if (false) Slog.d(TAG_WM, ">>>>>> ENTERED relayout from "
            + Binder.getCallingPid());
    Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, mRelayoutTag);
    int res = mService.relayoutWindow(this, window, seq, attrs,
            requestedWidth, requestedHeight, viewFlags, flags, frameNumber,
            outFrame, outOverscanInsets, outContentInsets, outVisibleInsets,
            outStableInsets, outsets, outBackdropFrame, cutout,
            mergedConfiguration, outSurface);
    Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
    if (false) Slog.d(TAG_WM, "<<<<<< EXITING relayout to "
            + Binder.getCallingPid());
    return res;
}
 
源代码3 项目: android_9.0.0_r45   文件: Session.java
@Override
public int addToDisplay(IWindow window, int seq, WindowManager.LayoutParams attrs,
        int viewVisibility, int displayId, Rect outFrame, Rect outContentInsets,
        Rect outStableInsets, Rect outOutsets,
        DisplayCutout.ParcelableWrapper outDisplayCutout, InputChannel outInputChannel) {
        // 调用 WMS.addWindow()
    return mService.addWindow(this, window, seq, attrs, viewVisibility, displayId, outFrame,
            outContentInsets, outStableInsets, outOutsets, outDisplayCutout, outInputChannel);
}
 
源代码4 项目: android_9.0.0_r45   文件: WallpaperService.java
@Override
public void resized(Rect frame, Rect overscanInsets, Rect contentInsets,
        Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
        MergedConfiguration mergedConfiguration, Rect backDropRect, boolean forceLayout,
        boolean alwaysConsumeNavBar, int displayId,
        DisplayCutout.ParcelableWrapper displayCutout) {
    Message msg = mCaller.obtainMessageIO(MSG_WINDOW_RESIZED,
            reportDraw ? 1 : 0, outsets);
    mCaller.sendMessage(msg);
}
 
源代码5 项目: android_9.0.0_r45   文件: WindowManagerPolicy.java
/**
 * Return the layout hints for a newly added window. These values are computed on the
 * most recent layout, so they are not guaranteed to be correct.
 *
 * @param attrs The LayoutParams of the window.
 * @param taskBounds The bounds of the task this window is on or {@code null} if no task is
 *                   associated with the window.
 * @param displayFrames display frames.
 * @param outFrame The frame of the window.
 * @param outContentInsets The areas covered by system windows, expressed as positive insets.
 * @param outStableInsets The areas covered by stable system windows irrespective of their
 *                        current visibility. Expressed as positive insets.
 * @param outOutsets The areas that are not real display, but we would like to treat as such.
 * @param outDisplayCutout The area that has been cut away from the display.
 * @return Whether to always consume the navigation bar.
 *         See {@link #isNavBarForcedShownLw(WindowState)}.
 */
default boolean getLayoutHintLw(WindowManager.LayoutParams attrs, Rect taskBounds,
        DisplayFrames displayFrames, Rect outFrame, Rect outContentInsets,
        Rect outStableInsets, Rect outOutsets,
        DisplayCutout.ParcelableWrapper outDisplayCutout) {
    return false;
}