diff options
| -rw-r--r-- | core/java/android/app/Activity.java | 26 | ||||
| -rw-r--r-- | core/res/res/values/attrs_manifest.xml | 58 |
2 files changed, 48 insertions, 36 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index ee9c64f97382..b4f653354e07 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -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> diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index 15230c299973..9983c459d71a 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -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" /> @@ -1540,24 +1545,25 @@ <p>Minimum aspect ratio, expressed as (longer dimension / shorter dimension) in decimal form. For example, if the minimum aspect ratio is 4:3, set value to 1.33. <p>Value needs to be greater or equal to 1.0, otherwise it is ignored. - <aside class="note"><b>Note:</b> + <aside class="note"><b>Note:</b> <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" /> + <attr name="minAspectRatio" format="float" /> <!-- This value indicates how tasks rooted at this activity will behave in lockTask mode. While in lockTask mode the system will not launch non-permitted tasks until |