diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-08-05 22:03:56 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-08-05 22:03:56 +0000 |
commit | f17afc1451455da7c044b3cd1d2cc27d5437175d (patch) | |
tree | b68cede628e77614ba8a79fd0f50c8cb6abc0760 | |
parent | cf580930c8183e7e787669d29ba448eb52110a13 (diff) | |
parent | 35d35096f0b7f292ef072d3bd19033ec27271a19 (diff) | |
download | platform_compatibility_cdd-f17afc1451455da7c044b3cd1d2cc27d5437175d.tar.gz platform_compatibility_cdd-f17afc1451455da7c044b3cd1d2cc27d5437175d.tar.bz2 platform_compatibility_cdd-f17afc1451455da7c044b3cd1d2cc27d5437175d.zip |
Merge "CDD: Handheld requirements for device controls." into rvc-dev am: 35d35096f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/compatibility/cdd/+/11790907
Change-Id: I45a4c75cf08ad0ee12ca1c400b275bff1fba67f5
-rw-r--r-- | 2_device-types/2_2_handheld-reqs.md | 34 | ||||
-rw-r--r-- | 3_software/3_8_user-interface-compatibility.md | 9 |
2 files changed, 43 insertions, 0 deletions
diff --git a/2_device-types/2_2_handheld-reqs.md b/2_device-types/2_2_handheld-reqs.md index 07a17f5c..ef89604a 100644 --- a/2_device-types/2_2_handheld-reqs.md +++ b/2_device-types/2_2_handheld-reqs.md @@ -477,6 +477,40 @@ http://developer.android.com/reference/android/app/ActivityManager.html#isLowRam 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_8_user-interface-compatibility.md b/3_software/3_8_user-interface-compatibility.md index f8f1e689..de304a63 100644 --- a/3_software/3_8_user-interface-compatibility.md +++ b/3_software/3_8_user-interface-compatibility.md @@ -601,3 +601,12 @@ API as described in the SDK. * [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 |