diff options
Diffstat (limited to 'android/view/WindowManagerPolicy.java')
-rw-r--r-- | android/view/WindowManagerPolicy.java | 65 |
1 files changed, 18 insertions, 47 deletions
diff --git a/android/view/WindowManagerPolicy.java b/android/view/WindowManagerPolicy.java index 137e551d..534335bf 100644 --- a/android/view/WindowManagerPolicy.java +++ b/android/view/WindowManagerPolicy.java @@ -66,7 +66,6 @@ import static android.view.WindowManager.LayoutParams.isSystemAlertWindowType; import android.annotation.IntDef; import android.annotation.Nullable; import android.annotation.SystemApi; -import android.app.ActivityManager.StackId; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.res.CompatibilityInfo; @@ -722,12 +721,6 @@ public interface WindowManagerPolicy { public void setInitialDisplaySize(Display display, int width, int height, int density); /** - * Called by window manager to set the overscan region that should be used for the - * given display. - */ - public void setDisplayOverscan(Display display, int left, int top, int right, int bottom); - - /** * Check permissions when adding a window. * * @param attrs The window's LayoutParams. @@ -758,7 +751,8 @@ public interface WindowManagerPolicy { * @param attrs The window layout parameters to be modified. These values * are modified in-place. */ - public void adjustWindowParamsLw(WindowManager.LayoutParams attrs); + public void adjustWindowParamsLw(WindowState win, WindowManager.LayoutParams attrs, + boolean hasStatusBarServicePermission); /** * After the window manager has computed the current configuration based @@ -1172,14 +1166,10 @@ public interface WindowManagerPolicy { /** * Called when layout of the windows is about to start. * - * @param isDefaultDisplay true if window is on {@link Display#DEFAULT_DISPLAY}. - * @param displayWidth The current full width of the screen. - * @param displayHeight The current full height of the screen. - * @param displayRotation The current rotation being applied to the base window. + * @param displayFrames frames of the display we are doing layout on. * @param uiMode The current uiMode in configuration. */ - public void beginLayoutLw(boolean isDefaultDisplay, int displayWidth, int displayHeight, - int displayRotation, int uiMode); + default void beginLayoutLw(DisplayFrames displayFrames, int uiMode) {} /** * Returns the bottom-most layer of the system decor, above which no policy decor should @@ -1188,37 +1178,28 @@ public interface WindowManagerPolicy { public int getSystemDecorLayerLw(); /** - * Return the rectangle of the screen that is available for applications to run in. - * This will be called immediately after {@link #beginLayoutLw}. - * - * @param r The rectangle to be filled with the boundaries available to applications. - */ - public void getContentRectLw(Rect r); - - /** - * Called for each window attached to the window manager as layout is - * proceeding. The implementation of this function must take care of - * setting the window's frame, either here or in finishLayout(). + * Called for each window attached to the window manager as layout is proceeding. The + * implementation of this function must take care of setting the window's frame, either here or + * in finishLayout(). * * @param win The window being positioned. * @param attached For sub-windows, the window it is attached to; this * window will already have had layoutWindow() called on it * so you can use its Rect. Otherwise null. + * @param displayFrames The display frames. */ - public void layoutWindowLw(WindowState win, WindowState attached); + default void layoutWindowLw( + WindowState win, WindowState attached, DisplayFrames displayFrames) {} /** - * Return the insets for the areas covered by system windows. These values - * are computed on the most recent layout, so they are not guaranteed to - * be correct. + * Return the insets for the areas covered by system windows. 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 displayRotation Rotation of the display. - * @param displayWidth The width of the display. - * @param displayHeight The height of the display. + * @param displayFrames display frames. * @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. @@ -1226,16 +1207,11 @@ public interface WindowManagerPolicy { * @return Whether to always consume the navigation bar. * See {@link #isNavBarForcedShownLw(WindowState)}. */ - public boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, - int displayRotation, int displayWidth, int displayHeight, Rect outContentInsets, - Rect outStableInsets, Rect outOutsets); - - /** - * Called when layout of the windows is finished. After this function has - * returned, all windows given to layoutWindow() <em>must</em> have had a - * frame assigned. - */ - public void finishLayoutLw(); + default boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, + DisplayFrames displayFrames, Rect outContentInsets, Rect outStableInsets, + Rect outOutsets) { + return false; + } /** Layout state may have changed (so another layout will be performed) */ static final int FINISH_LAYOUT_REDO_LAYOUT = 0x0001; @@ -1652,11 +1628,6 @@ public interface WindowManagerPolicy { public void showGlobalActions(); /** - * @return The current height of the input method window. - */ - public int getInputMethodWindowVisibleHeightLw(); - - /** * Called when the current user changes. Guaranteed to be called before the broadcast * of the new user id is made to all listeners. * |