Snap for 6740172 from f17afc1451455da7c044b3cd1d2cc27d5437175d to rvc-d1-release

Change-Id: I906ade39de8da1c0af18499f779c18dd76346a58
diff --git a/2_device-types/2_2_handheld-reqs.md b/2_device-types/2_2_handheld-reqs.md
index 07a17f5..ef89604 100644
--- a/2_device-types/2_2_handheld-reqs.md
+++ b/2_device-types/2_2_handheld-reqs.md
@@ -477,6 +477,40 @@
 itself as a low RAM device or so that it allocates internal (non-removable)
 storage as shared storage.
 
+If Handheld device implementations include support for
+[`ControlsProviderService`](https://developer.android.com/reference/android/service/controls/ControlsProviderService)
+and [`Control`](https://developer.android.com/reference/android/service/controls/Control)
+APIs and allow third-party applications to publish [`device controls`](
+https://developer.android.com/preview/features/device-control), then they:
+
+*   [[3.8](#3_8_user_interface_compatibility).16/H-1-1] MUST declare the feature
+    flag [`android.software.controls`](https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_CONTROLS)
+    and set it to `true`.
+*   [[3.8](#3_8_user_interface_compatibility).16/H-1-2] MUST provide a user
+    affordance with the ability to add, edit, select, and operate the user’s
+    favorite device controls from the controls registered by the third-party
+    applications through the [`ControlsProviderService`](https://developer.android.com/reference/android/service/controls/ControlsProviderService)
+    and the [`Control`](https://developer.android.com/reference/android/service/controls/Control#getDeviceType%28%29)
+    APIs.
+*   [[3.8](#3_8_user_interface_compatibility).16/H-1-3] MUST provide access to
+    this user affordance within three interactions from a default Launcher.
+*   [[3.8](#3_8_user_interface_compatibility).16/H-1-4] MUST accurately render
+    in this user affordance the name and icon of each third-party app that
+    provides controls via the [`ControlsProviderService`](https://developer.android.com/reference/android/service/controls/ControlsProviderService)
+    API as well as any specified fields provided by the [`Control`](https://developer.android.com/reference/android/service/controls/Control)
+    APIs.
+
+Conversely, If Handheld device implementations do not implement such controls,
+they:
+
+*   [[3.8](#3_8_user_interface_compatibility).16/H-2-1] MUST report `null` for
+    the [`ControlsProviderService`](https://developer.android.com/reference/android/service/controls/ControlsProviderService)
+    and the [`Control`](https://developer.android.com/reference/android/service/controls/Control)
+    APIs.
+*   [[3.8](#3_8_user_interface_compatibility).16/H-2-2] MUST declare the feature
+    flag [`android.software.controls`](https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_CONTROLS)
+    and set it to `false`.
+
 Handheld device implementations:
 
 *  [[3.10](#3_10_accessibility)/H-0-1] MUST support third-party accessibility
diff --git a/3_software/3_1_managed-api-compatibility.md b/3_software/3_1_managed-api-compatibility.md
index a2eabb6..c89308a 100644
--- a/3_software/3_1_managed-api-compatibility.md
+++ b/3_software/3_1_managed-api-compatibility.md
@@ -53,14 +53,27 @@
 
 ### 3.1.1\. Android Extensions
 
-Android includes the support of extending the managed APIs while keeping the
-same API level version.
+Android supports extending the managed API surface of a particular API level by
+updating the extension version for that API level. The
+`android.os.ext.SdkExtensions.getExtensionVersion(int apiLevel)` API returns the
+extension version of the provided `apiLevel`, if there are extensions for that
+API level.
 
-*   [C-0-1] Android device implementations MUST preload the AOSP implementation
-of both the shared library `ExtShared` and services `ExtServices` with versions
-higher than or equal to the minimum versions allowed per each API level.
-For example, Android 7.0 device implementations, running API level 24 MUST
-include at least version 1.
+Android device implementations:
+
+*   [C-0-1] MUST preload the AOSP implementation of both the shared library
+    `ExtShared` and services `ExtServices` with versions greater than or equal to
+    the minimum versions allowed per each API level. For example, Android 7.0
+    device implementations, running API level 24 MUST include at least
+    version 1.
+
+*   [C-0-2] MUST only return valid extension version number that have been
+    defined by the AOSP.
+
+*   [C-0-3] MUST support all the APIs defined by the extension versions
+    returned by `android.os.ext.SdkExtensions.getExtensionVersion(int apiLevel)`
+    in the same manner as other managed APIs are supported, following the
+    requirements in [section 3.1](#3_1_managed-api-compatibility).
 
 ### 3.1.2\. Android Library
 
diff --git a/3_software/3_8_user-interface-compatibility.md b/3_software/3_8_user-interface-compatibility.md
index f8f1e68..de304a6 100644
--- a/3_software/3_8_user-interface-compatibility.md
+++ b/3_software/3_8_user-interface-compatibility.md
@@ -601,3 +601,12 @@
 *   [C-1-4] MUST report correct values for all cutout metrics defined in the
 [`DisplayCutout`](
 https://developer.android.com/reference/android/view/DisplayCutout) API.
+
+### 3.8.16\. Device Controls
+
+Android includes [`ControlsProviderService`](https://developer.android.com/reference/android/service/controls/ControlsProviderService)
+and [`Control`](https://developer.android.com/reference/android/service/controls/Control)
+APIs to allow third-party applications to publish device controls for quick
+status and action for users.
+
+See Section [2_2_3](#2_2_3_software) for device-specific requirements.
\ No newline at end of file
diff --git a/7_hardware-compatibility/7_2_input-devices.md b/7_hardware-compatibility/7_2_input-devices.md
index 66ae318..79a8827 100644
--- a/7_hardware-compatibility/7_2_input-devices.md
+++ b/7_hardware-compatibility/7_2_input-devices.md
@@ -186,7 +186,8 @@
      (either mouse-like or touch).
 *    SHOULD support fully independently tracked pointers.
 
-If device implementations include a touchscreen (single-touch or better), they:
+If device implementations include a touchscreen (single-touch or better) on a
+primary Android-compatible display, they:
 
 *    [C-1-1] MUST report `TOUCHSCREEN_FINGER` for the [`Configuration.touchscreen`](https://developer.android.com/reference/android/content/res/Configuration.html#touchscreen)
      API field.
@@ -194,18 +195,23 @@
      `android.hardware.faketouch` feature flags.
 
 If device implementations include a touchscreen that can track more than
-a single touch, they:
+a single touch on a primary Android-compatible display, they:
 
-*    [C-2-1] MUST report the appropriate feature flags  `android.hardware.touchscreen.multitouch`,
+*    [C-2-1] MUST report the appropriate feature flags `android.hardware.touchscreen.multitouch`,
 `android.hardware.touchscreen.multitouch.distinct`, `android.hardware.touchscreen.multitouch.jazzhand`
 corresponding to the type of the specific touchscreen on the device.
 
-If device implementations do not include a touchscreen (and rely on a pointer
-device only) and meet the fake touch requirements in
+If device implementations rely on an external input device such as mouse or
+trackball (i.e. not directly touching the screen) for input on a primary
+Android-compatible display and meet the fake touch requirements in
 [section 7.2.5](#7_2_5_fake_touch_input), they:
 
 *    [C-3-1] MUST NOT report any feature flag starting with
-`android.hardware.touchscreen` and MUST report only `android.hardware.faketouch`.
+`android.hardware.touchscreen`.
+*    [C-3-2] MUST report only `android.hardware.faketouch`.
+*    [C-3-3] MUST report `TOUCHSCREEN_NOTOUCH` for the
+[`Configuration.touchscreen`](https://developer.android.com/reference/android/content/res/Configuration.html#touchscreen)
+API field.
 
 ### 7.2.5\. Fake Touch Input
 
@@ -247,8 +253,6 @@
 *   [C-1-6] MUST support pointer down then allow users to quickly move the
 object to a different position on the screen and then pointer up on the screen,
 which allows users to fling an object on the screen.
-*   [C-1-7] MUST report `TOUCHSCREEN_NOTOUCH` for the [`Configuration.touchscreen`](https://developer.android.com/reference/android/content/res/Configuration.html#touchscreen)
-API field.
 
 If device implementations declare support for
 `android.hardware.faketouch.multitouch.distinct`, they:
diff --git a/9_security-model/9_1_permissions.md b/9_security-model/9_1_permissions.md
index ebb1927..294e8bc 100644
--- a/9_security-model/9_1_permissions.md
+++ b/9_security-model/9_1_permissions.md
@@ -106,3 +106,14 @@
     https://developer.android.com/reference/android/provider/Settings.html#ACTION_USAGE_ACCESS_SETTINGS)
     intent pattern but MUST implement it as a no-op, that is to have an
     equivalent behavior as when the user is declined for access.
+
+If device implementations provide a user affordance to choose which apps can
+draw on top of other apps with an activity that handles the
+[`ACTION_MANAGE_OVERLAY_PERMISSION`](https://developer.android.com/reference/android/provider/Settings.html#ACTION_MANAGE_OVERLAY_PERMISSION)
+intent, they:
+
+*   [C-2-1] MUST ensure that all activities with intent filters for the
+    [`ACTION_MANAGE_OVERLAY_PERMISSION`](
+    https://developer.android.com/reference/android/provider/Settings.html#ACTION_MANAGE_OVERLAY_PERMISSION)
+    intent have the same UI screen, regardless of the initiating app or any
+    information it provides.
\ No newline at end of file