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

Commit c810b5e4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid mentioning complex deprecated API in API docs" into main

parents 967f4c99 57b2300f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1786,7 +1786,12 @@ public final class Display {
     *         {@code getWindowManager()} or {@code getSystemService(Context.WINDOW_SERVICE)}), the
     *         returned metrics provide the size of the current app window. As a result, in
     *         multi-window mode, the returned size can be smaller than the size of the device
     *         screen.
     *         screen. System decoration handling may vary depending on API level:
     *         <ul>
     *             <li>API level 35 and above, the window size will be returned.
     *             <li>API level 34 and below, the window size minus system decoration areas and
     *                 display cutout is returned.
     *         </ul>
     *     <li>If metrics are requested from a non-activity context (for example, the application
     *         context, where the WindowManager is accessed by
     *         {@code getApplicationContext().getSystemService(Context.WINDOW_SERVICE)}), the
+2 −2
Original line number Diff line number Diff line
@@ -107,8 +107,8 @@ public final class WindowMetrics {
     * and display cutout areas depending on the calling context and target SDK level. Please refer
     * to {@link Display#getSize(Point)} for details.
     * <p>
     * The value reported by {@link Display#getSize(Point)} excluding system decoration areas can be
     * obtained by using:
     * The following code snippet shows how to get the bounds excluding navigation bars and display
     * cutout:
     * <pre class="prettyprint">
     * final WindowMetrics metrics = windowManager.getCurrentWindowMetrics();
     * // Gets all excluding insets