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

Commit 25a01a38 authored by Garfield Tan's avatar Garfield Tan Committed by Android (Google) Code Review
Browse files

Merge "Update Window#setResizingCaptionDrawable" into main

parents da2d6c60 8be2d96c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2954,6 +2954,15 @@ public abstract class Window {
     * There is a second caption drawn underneath it that will be fast enough. By default the
     * caption is constructed from the theme. You can provide a drawable, that will be drawn instead
     * to better match your application.
     *
     * Starting in Android 15, this API is a no-op. New window decorations introduced in Android 14
     * are drawn in SystemUI process, and OEMs are responsible to make them responsive to resizing.
     * There is no need to set a background drawable to improve UX anymore since then. Additionally,
     * the foremost activity can draw in caption areas starting in Android 15. Check
     * {@link WindowInsetsController#APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND},
     * {@link WindowInsetsController#APPEARANCE_LIGHT_CAPTION_BARS},
     * {@link WindowInsetsController#setSystemBarsAppearance(int, int)} and
     * {@link WindowInsets#getBoundingRects(int)}.
     */
    public abstract void setResizingCaptionDrawable(Drawable drawable);

+1 −4
Original line number Diff line number Diff line
@@ -4069,10 +4069,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
    }

    @Override
    public void setResizingCaptionDrawable(Drawable drawable) {
        // TODO(b/333724879): Deprecate this public API. The new caption in WM shell allows the app
        // content to draw behind it directly if requested.
    }
    public void setResizingCaptionDrawable(Drawable drawable) {}

    @Override
    public void setDecorCaptionShade(int decorCaptionShade) {