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

Commit 48d08ba1 authored by Jon Eckenrode's avatar Jon Eckenrode Committed by Android (Google) Code Review
Browse files

Merge "Added notes about Android 16 ignoring screen orientation, aspect ratio,...

Merge "Added notes about Android 16 ignoring screen orientation, aspect ratio, and resizability APIs and manifest attributes." into main
parents 8277e2b6 9c43bf5c
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -7684,16 +7684,19 @@ public class Activity extends ContextThemeWrapper
    /**
     * Change the desired orientation of this activity. If the activity is currently in the
     * foreground or otherwise impacting the screen orientation, the screen is immediately changed
     * (possibly causing the activity to be restarted). Otherwise, the requested orientation is used
     * the next time the activity is visible.
     * (possibly causing the activity to be restarted). Otherwise, the new orientation is used the
     * next time the activity is visible.
     *
     * <aside class="note"><b>Note:</b>
     *     <ul>
     *         <li>Device manufacturers can configure devices to override (ignore) calls to this
     *             method to improve the layout of orientation-restricted apps.</li>
     *         <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
     *             system ignores calls to this method for apps that target Android 16 (API level
     *             36) or higher.</li>
     *         <li>Device manufacturers can configure devices to ignore calls to this method to
     *             improve the layout of orientation-restricted apps.</li>
     *         <li>On devices with Android 16 (API level 36) or higher installed, virtual device
     *             owners (limited to select trusted and privileged apps) can optimize app layout on
     *             displays they manage by ignoring calls to this method. See also
     *             owners (select trusted and privileged apps) can optimize app layout on displays
     *             they manage by ignoring calls to this method. See also
     *             <a href="https://source.android.com/docs/core/permissions/app-streaming">
     *               Companion app streaming</a>.</li>
     *     </ul>
@@ -7717,17 +7720,20 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * Return the current requested orientation of the activity. This is either the orientation
     * requested in the app manifest, or the last requested orientation given to
     * Returns the current requested orientation of the activity, which is either the orientation
     * requested in the app manifest or the last orientation given to
     * {@link #setRequestedOrientation(int)}.
     *
     * <aside class="note"><b>Note:</b>
     *     <ul>
     *         <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
     *             system ignores calls to this method for apps that target Android 16 (API level
     *             36) or higher.</li>
     *         <li>Device manufacturers can configure devices to ignore calls to this method to
     *             improve the layout of orientation-restricted apps.</li>
     *         <li>On devices with Android 16 (API level 36) or higher installed, virtual device
     *             owners (limited to select trusted and privileged apps) can optimize app layout on
     *             displays they manage by ignoring calls to this method. See also
     *             owners (select trusted and privileged apps) can optimize app layout on displays
     *             they manage by ignoring calls to this method. See also
     *             <a href="https://source.android.com/docs/core/permissions/app-streaming">
     *               Companion app streaming</a>.</li>
     *     </ul>
+32 −26
Original line number Diff line number Diff line
@@ -853,11 +853,14 @@
            element.
         <aside class="note"><b>Note:</b>
            <ul>
                <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
                    system ignores this attribute for apps that target Android 16 (API level 36) or
                    higher.</li>
                <li>Device manufacturers can configure devices to override (ignore) this attribute
                    to improve the layout of apps.</li>
                <li>On devices with Android 16 (API level 36) or higher installed, virtual device
                    owners (limited to select trusted and privileged apps) can configure devices
                    they manage to override (ignore) this attribute to improve app layout. See also
                    owners (select trusted and privileged apps) can configure devices they manage to
                    override (ignore) this attribute to improve app layout. See also
                    <a href="https://source.android.com/docs/core/permissions/app-streaming">
                    Companion app streaming</a>.</li>
             </ul>
@@ -1482,19 +1485,20 @@
                <li>On Android 11 (API level 30) and lower, the value of
                    {@link android.R.attr#screenOrientation} is ignored for resizeable activities
                    in multi-window mode.</li>
                <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
                    system ignores this attribute for apps that target Android 16 (API level 36) or
                    higher.</li>
                <li>Device manufacturers can configure devices to override (ignore) this attribute
                    to force apps to resize. The override does not affect the app's support for
                    multi-window mode. See
                    <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
                    compatibility mode</a>.</li>
                    multi-window mode.</li>
                <li>On devices with Android 16 (API level 36) or higher installed, virtual device
                    owners (limited to select trusted and privileged apps) can configure devices
                    they manage to override (ignore) this attribute to force apps to resize. See
                    <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
                    compatibility mode</a>. See also
                    <a href="https://source.android.com/docs/core/permissions/app-streaming">
                    owners (select trusted and privileged apps) can configure devices they manage to
                    override (ignore) this attribute to force apps to resize. See
                    also <a href="https://source.android.com/docs/core/permissions/app-streaming">
                    Companion app streaming</a>.</li>
            </ul>
            <p>See <a href="{@docRoot}guide/practices/device-compatibility-mode"> Device
            compatibility mode</a>.</p>
         </aside> -->
    <attr name="resizeableActivity" format="boolean" />

@@ -1519,18 +1523,19 @@
            <ul>
                <li>This attribute is ignored if the activity has
                    {@link android.R.attr#resizeableActivity} set to {@code true}.</li>
                <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
                    system ignores this attribute for apps that target Android 16 (API level 36) or
                    higher.</li>
                <li>Device manufacturers can configure devices to override (ignore) this attribute
                    to improve the layout of apps. See
                    <a href="{@docRoot}guide/practices/device-compatibility-mode#override_any_orientation_to_user">
                    Device compatibility mode</a>.</li>
                    to improve the layout of apps.</li>
                <li>On devices with Android 16 (API level 36) or higher installed, virtual device
                    owners (limited to select trusted and privileged apps) can configure devices
                    they manage to override (ignore) this attribute to improve app layout. See
                    <a href="{@docRoot}guide/practices/device-compatibility-mode#override_any_orientation_to_user">
                    Device compatibility mode</a>. See also
                    owners (select trusted and privileged apps) can configure devices they manage to
                    override (ignore) this attribute to improve app layout. See
                    <a href="https://source.android.com/docs/core/permissions/app-streaming">
                    Companion app streaming</a>.</li>
            </ul>
            <p>See <a href="{@docRoot}guide/practices/device-compatibility-mode"> Device
            compatibility mode</a>.</p>
         </aside> -->
    <attr name="maxAspectRatio" format="float" />

@@ -1544,18 +1549,19 @@
            <ul>
                <li>This attribute is ignored if the activity has
                    {@link android.R.attr#resizeableActivity} set to {@code true}.</li>
                <li>To improve the layout of apps on form factors with smallest width >= 600dp, the
                    system ignores this attribute for apps that target Android 16 (API level 36) or
                    higher.</li>
                <li>Device manufacturers can configure devices to override (ignore) this attribute
                    to improve the layout of apps. See
                    <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
                    compatibility mode</a>.</li>
                    to improve the layout of apps.</li>
                <li>On devices with Android 16 (API level 36) or higher installed, virtual device
                    owners (limited to select trusted and privileged apps) can configure devices
                    they manage to override (ignore) this attribute to improve app layout. See
                    <a href="{@docRoot}guide/practices/device-compatibility-mode">Device
                    compatibility mode</a>. See also
                    owners (select trusted and privileged apps) can configure devices they manage to
                    override (ignore) this attribute to improve app layout. See
                    <a href="https://source.android.com/docs/core/permissions/app-streaming">
                    Companion app streaming</a>.</li>
            </ul>
            <p>See <a href="{@docRoot}guide/practices/device-compatibility-mode"> Device
            compatibility mode</a>.</p>
         </aside> -->
   <attr name="minAspectRatio" format="float" />