diff options
author | Clay Murphy <claym@google.com> | 2018-05-03 23:00:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-03 23:00:24 +0000 |
commit | 008a9e0bf136d461480396e6971347ce1c8b9484 (patch) | |
tree | 6f4bb1fe27ddd21544f74e80d0779cfeb00f4c7a /en/devices | |
parent | 6930a80a9ae47f2686acbc17fbd5d18c24918066 (diff) | |
parent | fb789314a92670246a8254d97e62f2a9c61f00ad (diff) | |
download | source.android.com-008a9e0bf136d461480396e6971347ce1c8b9484.tar.gz |
Merge "Docs: Changes to source.android.com"android-o-mr1-iot-release-1.0.0
Diffstat (limited to 'en/devices')
-rw-r--r-- | en/devices/_toc-interfaces.yaml | 2 | ||||
-rw-r--r-- | en/devices/architecture/vintf/comp-matrices.html | 10 | ||||
-rw-r--r-- | en/devices/bluetooth/ble.html | 148 | ||||
-rw-r--r-- | en/devices/graphics/images/graphics_pipeline.png | bin | 24878 -> 26540 bytes | |||
-rw-r--r-- | en/devices/graphics/run-tests.html | 2 | ||||
-rw-r--r-- | en/devices/tech/debug/native-memory.html | 8 | ||||
-rw-r--r-- | en/devices/tech/debug/valgrind.html | 7 | ||||
-rw-r--r-- | en/devices/tech/ota/ab/index.html | 7 |
8 files changed, 173 insertions, 11 deletions
diff --git a/en/devices/_toc-interfaces.yaml b/en/devices/_toc-interfaces.yaml index dba14fbe..504b9b72 100644 --- a/en/devices/_toc-interfaces.yaml +++ b/en/devices/_toc-interfaces.yaml @@ -215,6 +215,8 @@ toc: path: /devices/bluetooth - title: Services path: /devices/bluetooth/services + - title: Bluetooth Low Energy + path: /devices/bluetooth/ble - title: BLE Advertising path: /devices/bluetooth/ble_advertising - title: Verifying and Debugging diff --git a/en/devices/architecture/vintf/comp-matrices.html b/en/devices/architecture/vintf/comp-matrices.html index d3512e70..74589eef 100644 --- a/en/devices/architecture/vintf/comp-matrices.html +++ b/en/devices/architecture/vintf/comp-matrices.html @@ -22,7 +22,7 @@ --> <p>This section describes the framework and device compatibility matrices and -the <a href="#compatiblity-matrix-schema">compatibility matrix schema</a>. For +the <a href="#compatibility-matrix-schema">compatibility matrix schema</a>. For match rules, see <a href="/devices/architecture/vintf/match-rules.html">Matching Rules</a>.</p> @@ -102,7 +102,7 @@ device manifest (requirements enforced at launch and OTA time).</p> <version>1.0</version> <path>/system/etc/media_profile_V1_0.dtd</path> </xmlfile> -</compatiblity-matrix> +</compatibility-matrix> </pre> <h2 id="device-compatibility-matrix">Device compatibility matrix</h2> @@ -154,12 +154,12 @@ expects from the framework (requirements enforced at launch and OTA time). </compatibility-matrix> </pre> -<h2 id="compatiblity-matrix-schema">Compatiblity matrix schema</h2> +<h2 id="compatibility-matrix-schema">Compatibility matrix schema</h2> <dl> <dt><code>?xml</code></dt> <dd>Optional. It only provides information to the XML parser.</dd> <dt><code>compatibility-matrix.version</code></dt> -<dd>Required. Version of this compatiblity matrix. Describes the elements +<dd>Required. Version of this compatibility matrix. Describes the elements expected in the manifest. Unrelated to XML version.</dd> <dt><code>compatibility-matrix.type</code></dt> <dd>Required. Type of this compatibility matrix: @@ -202,7 +202,7 @@ device) expects.</dd> <dd>Optional, can repeat. A list of required interfaces of this HAL.</dd> <dt><code>compatibility-matrix.hal.interface.name</code></dt> <dd>Required. Name of the interface.</dd> -<dt><code>compatibility-matrix.hal.interface</code></dt> +<dt><code>compatibility-matrix.hal.interface.instance</code></dt> <dd>Optional, can repeat. A list of required instances of this interface.</dd> <dt><code>compatibility-matrix.kernel.version</code></dt> <dd>Required. Kernel version. Format is diff --git a/en/devices/bluetooth/ble.html b/en/devices/bluetooth/ble.html new file mode 100644 index 00000000..15b909f1 --- /dev/null +++ b/en/devices/bluetooth/ble.html @@ -0,0 +1,148 @@ +<html devsite> + <head> + <title>Bluetooth Low Energy</title> + <meta name="project_path" value="/_project.yaml" /> + <meta name="book_path" value="/_book.yaml" /> + </head> + <body> + <!-- + Copyright 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain a + copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + --> + + <p> + Bluetooth Low Energy (BLE), available in Android 4.3 and later, creates + short connections between devices to transfer bursts of data. BLE + remains in sleep mode when not connected. This lets BLE provide lower + bandwidth and reduced power consumption compared to Classic Bluetooth. + It is ideal for applications such as a heart-rate monitor or a wireless + keyboard. To use BLE, devices need to have a chipset that supports BLE. + </p> + + <h2 id="implementation">Implementation</h2> + + <p> + All current BLE application profiles are based on the + <a href="https://www.bluetooth.com/specifications/gatt">Generic + Attribute Profile</a> (GATT). When an Android device interacts with a + BLE device, the device that sends information is the server and the + device that receives information is the client. Android includes + <a href="https://developer.android.com/guide/topics/connectivity/bluetooth-le.html"> + developer APIs for BLE</a>, including APIs for interactions between + GATT servers and GATT clients. To fully leverage the BLE APIs, + implement the + <a href="/devices/bluetooth/hci_requirements.html"> + Android Bluetooth HCI Requirements</a>. + </p> + + <h2 id="device-modes">Device modes</h2> + + <p> + When using BLE, an Android device can act as a peripheral device, a + central device, or both. Peripheral mode lets devices send + advertisement packets. Central mode lets devices scan for + advertisements. An Android device acting as both a peripheral and + central device can communicate with other BLE peripheral devices while + sending advertisements in peripheral mode. Devices supporting + Bluetooth 4.1 and earlier can only use BLE in central mode. Older + device chipsets may not support BLE peripheral mode. + </p> + + <h2 id="ble-scanning">BLE scanning</h2> + + <p> + An Android device can target and scan for specific Bluetooth devices + more efficiently when using BLE. BLE APIs let app developers create + filters for finding devices with less involvement from the host + controller. + </p> + + <aside class="caution"> + <strong>Caution:</strong> BLE scanning needs location permissions as BLE + scanning identifies objects that could be used for geolocation. Turning + off Location services will turn off Bluetooth scanning. + </aside> + + <h3 id="location-scanning">Location scanning</h3> + + <p> + A device's location services can use Bluetooth to detect Bluetooth + beacons and provide a more accurate location. This is how users + enable the feature: + </p> + + <ol> + <li>Go to <strong>Settings</strong> > <strong> Security & + Location</strong> > <strong>Location</strong>.</li> + <li>Check that the Location <strong>On</strong>/<strong>Off</strong> + toggle is in the <strong>On</strong> position.</li> + <li>Go to <strong>Mode</strong>.</li> + <li>Select either <strong>High accuracy</strong> or <strong>Battery + saving</strong> mode.</li> + </ol> + + <p> + Individual apps need location permissions to use BLE scanning, even + if they are scanning only to find devices to connect to. If the user + disables location scanning, or does not give an app location + permissions, then the app will not receive any BLE scanning results. + </p> + + <p> + Users can disable system-level Bluetooth background scanning by + going to <strong>Settings</strong> > <strong>Security & + Location</strong> > <strong>Location</strong> > <strong> + Scanning</strong> and disabling the toggle for <strong>Bluetooth + scanning</strong>. This does not affect BLE scanning for location or + local devices. + </p> + + <h3 id="filtering-scan-results">Filtering scan results</h3> + + <p> + Android 6.0 and later includes BLE scanning and filter-matching on + the Bluetooth controller. A device can filter scan results and + report <strong>found</strong> and <strong>lost</strong> events + related to BLE devices to the application processor (AP). Filtering + also works for batch scans, which helps save power as BLE scanning is + offloaded to the firmware. Batch scans reduce how often the AP wakes + up due to BLE scanning for devices or beacons. + </p> + + <p> + The <code>OnFound</code>/<code>OnLost</code> feature is implemented + in the Bluetooth controller and then tested to confirm that BLE + devices are not missed in scans. This provides power savings, and it + can also provide the following benefits: + </p> + + <ul> + <li>For an <code>OnFound</code> event, the main AP wakes up upon the + discovery of a specific device.</li> + <li>For an <code>OnLost</code> event, the AP wakes up when a + specific device cannot be found.</li> + <li>Framework apps get fewer unwanted notifications when a nearby device is in range.</li> + <li>Continuous scans enable framework apps to be notified when a device is out of range.</li> + </ul> + + <p> + A scan filter can be based on the discovery of a device's + advertisements (the <code>OnFound</code> event). The Java layer can + specify parameters such as first discovery (or a specified number of + advertisements since first discovery). Implement BLE filtering using + the <a href="/devices/bluetooth/hci_requirements#advertisement-packet-content-filter"> + Advertising Packet Content Filter HCI command</a>. + </p> +</body> +</html>
\ No newline at end of file diff --git a/en/devices/graphics/images/graphics_pipeline.png b/en/devices/graphics/images/graphics_pipeline.png Binary files differindex 6033b4f9..60fb0fc1 100644 --- a/en/devices/graphics/images/graphics_pipeline.png +++ b/en/devices/graphics/images/graphics_pipeline.png diff --git a/en/devices/graphics/run-tests.html b/en/devices/graphics/run-tests.html index 0eb83d00..7824e76b 100644 --- a/en/devices/graphics/run-tests.html +++ b/en/devices/graphics/run-tests.html @@ -271,7 +271,7 @@ supporting <code>NativeActivity,</code> use the following commands.</p> <pre class="devsite-terminal devsite-click-to-copy"> adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \ -cmdLine "deqp --deqp-case=dEQP-GLES2.info.* --deqp-log-filename=/sdcard/dEQP-Log.qpa +'cmdLine "deqp --deqp-case=dEQP-GLES2.info.* --deqp-log-filename=/sdcard/dEQP-Log.qpa"' </pre> <h3 id=debugging_on_android>Debugging on Android</h3> diff --git a/en/devices/tech/debug/native-memory.html b/en/devices/tech/debug/native-memory.html index b690793d..afa0d220 100644 --- a/en/devices/tech/debug/native-memory.html +++ b/en/devices/tech/debug/native-memory.html @@ -21,6 +21,14 @@ limitations under the License. --> +<h2 id="asan">Address Sanitizer</h2> + +<p>Android platform developers use <a href="/devices/tech/debug/asan.html">AddressSanitizer</a> +(ASan) to find memory bugs in C/C++.</p> + +</p>Since Android 8.0 (Oreo) it's also possible to use ASan to debug apps on non-rooted production +devices. You can find instructions on the +<a href="https://github.com/google/sanitizers/wiki/AddressSanitizerOnAndroidO">ASan wiki</a>.</p> <h2 id="malloc_debug">Malloc debug</h2> diff --git a/en/devices/tech/debug/valgrind.html b/en/devices/tech/debug/valgrind.html index 9ae0f088..6abbc999 100644 --- a/en/devices/tech/debug/valgrind.html +++ b/en/devices/tech/debug/valgrind.html @@ -25,9 +25,10 @@ (for detecting memory-related errors in C and C++), Cachegrind (a cache profiler), Massif (a heap profiler), and several other tools.</p> -<p class="note"><strong>Note:</strong> While you can use Valgrind for Android -debugging, most Android platform developers use -<a href="/devices/tech/debug/asan.html">AddressSanitizer</a> instead.</p> +<p class="warning"><strong>Note:</strong> While you can still use Valgrind for Android +debugging, Android platform developers use +<a href="/devices/tech/debug/asan.html">AddressSanitizer</a> instead. +Valgrind will be removed from the platform in a future release.</p> <h2 id=build-valgrind>Building Valgrind</h2> <p>To build Valgrind:</p> diff --git a/en/devices/tech/ota/ab/index.html b/en/devices/tech/ota/ab/index.html index c2a9c447..f494c825 100644 --- a/en/devices/tech/ota/ab/index.html +++ b/en/devices/tech/ota/ab/index.html @@ -21,7 +21,8 @@ limitations under the License. --> - <p>A/B system updates, also known as seamless updates, ensure a workable + <p> + A/B system updates, also known as seamless updates, ensure a workable booting system remains on the disk during an <a href="/devices/tech/ota/index.html"> over-the-air (OTA) update</a>. This approach reduces the likelihood of an inactive device after an update, which means fewer device @@ -31,8 +32,10 @@ updates successfully. </p> - <p>For more information about A/B system updates and how they work, see + <p> + For more information about A/B system updates and how they work, see <a href="#slots">Partition selection (slots)</a>. + </p> <p>A/B system updates provide the following benefits:</p> |