1<!DOCTYPE html>
2<html>
3 <head>
4  <title>
5   Android 7.0, (N) Compatibility Definition
6  </title>
7  <link href="source/android-cdd.css" rel="stylesheet" type="text/css"/>
8 </head>
9 <meta charset="UTF-8">
10 <body>
11  <h1>Android 7.0 Compatibility Definition</h1>
12  <h6>
13   Table of Contents
14  </h6>
15  <div id="toc">
16   <div id="toc_left">
17    <p class="toc_h1"><a href="#1_introduction">1. Introduction</a> </p>
18
19    <p class="toc_h1"><a href="#2_device_types">2. Device Types</a> </p>
20
21    <p class="toc_h2"><a href="#2_1_device_configurations">2.1 Device Configurations</a> </p>
22
23    <p class="toc_h1"><a href="#3_software">3. Software</a> </p>
24
25    <p class="toc_h2"><a href="#3_1_managed_api_compatibility">3.1. Managed API Compatibility</a> </p>
26
27    <p class="toc_h2"><a href="#3_1_1_android_extensions">3.1.1. Android Extensions</a> </p>
28
29    <p class="toc_h2"><a href="#3_2_soft_api_compatibility">3.2. Soft API Compatibility</a> </p>
30
31    <p class="toc_h3"><a href="#3_2_1_permissions">3.2.1. Permissions</a> </p>
32
33    <p class="toc_h3"><a href="#3_2_2_build_parameters">3.2.2. Build Parameters</a> </p>
34
35    <p class="toc_h3"><a href="#3_2_3_intent_compatibility">3.2.3. Intent Compatibility</a> </p>
36
37    <p class="toc_h4"><a href="#3_2_3_1_core_application_intents">3.2.3.1. Core Application Intents</a> </p>
38
39    <p class="toc_h4"><a href="#3_2_3_2_intent_resolution">3.2.3.2. Intent Resolution</a> </p>
40
41    <p class="toc_h4"><a href="#3_2_3_3_intent_namespaces">3.2.3.3. Intent Namespaces</a> </p>
42
43    <p class="toc_h4"><a href="#3_2_3_4_broadcast_intents">3.2.3.4. Broadcast Intents</a> </p>
44
45    <p class="toc_h4"><a href="#3_2_3_5_default_app_settings">3.2.3.5. Default App Settings</a> </p>
46
47    <p class="toc_h2"><a href="#3_3_native_api_compatibility">3.3. Native API Compatibility</a> </p>
48
49    <p class="toc_h3"><a href="#3_3_1_application_binary_interfaces">3.3.1. Application Binary Interfaces</a> </p>
50
51    <p class="toc_h4"><a href="#3_3_1_1_graphic_libraries">3.3.1.1. Graphic Libraries</a> </p>
52
53    <p class="toc_h3"><a href="#3_3_2_32-bit_arm_native_code_compatibility">3.3.2. 32-bit ARM Native Code Compatibility</a> </p>
54
55    <p class="toc_h2"><a href="#3_4_web_compatibility">3.4. Web Compatibility</a> </p>
56
57    <p class="toc_h3"><a href="#3_4_1_webview_compatibility">3.4.1. WebView Compatibility</a> </p>
58
59    <p class="toc_h3"><a href="#3_4_2_browser_compatibility">3.4.2. Browser Compatibility</a> </p>
60
61    <p class="toc_h2"><a href="#3_5_api_behavioral_compatibility">3.5. API Behavioral Compatibility</a> </p>
62
63    <p class="toc_h2"><a href="#3_6_api_namespaces">3.6. API Namespaces</a> </p>
64
65    <p class="toc_h2"><a href="#3_7_runtime_compatibility">3.7. Runtime Compatibility</a> </p>
66
67    <p class="toc_h2"><a href="#3_8_user_interface_compatibility">3.8. User Interface Compatibility</a> </p>
68
69    <p class="toc_h3"><a href="#3_8_1_launcher_(home_screen)">3.8.1. Launcher (Home Screen)</a> </p>
70
71    <p class="toc_h3"><a href="#3_8_2_widgets">3.8.2. Widgets</a> </p>
72
73    <p class="toc_h3"><a href="#3_8_3_notifications">3.8.3. Notifications</a> </p>
74
75    <p class="toc_h3"><a href="#3_8_4_search">3.8.4. Search</a> </p>
76
77    <p class="toc_h3"><a href="#3_8_5_toasts">3.8.5. Toasts</a> </p>
78
79    <p class="toc_h3"><a href="#3_8_6_themes">3.8.6. Themes</a> </p>
80
81    <p class="toc_h3"><a href="#3_8_7_live_wallpapers">3.8.7. Live Wallpapers</a> </p>
82
83    <p class="toc_h3"><a href="#3_8_8_activity_switching">3.8.8. Activity Switching</a> </p>
84
85   </div>
86   <div id="toc_right">
87    <p class="toc_h3"><a href="#3_8_9_input_management">3.8.9. Input Management</a> </p>
88
89    <p class="toc_h3"><a href="#3_8_10_lock_screen_media_control">3.8.10. Lock Screen Media Control</a> </p>
90
91    <p class="toc_h3"><a href="#3_8_11_screen_savers_(previously_dreams)">3.8.11. Screen savers (previously Dreams)</a> </p>
92
93    <p class="toc_h3"><a href="#3_8_12_location">3.8.12. Location</a> </p>
94
95    <p class="toc_h3"><a href="#3_8_13_unicode_and_font">3.8.13. Unicode and Font</a> </p>
96
97    <p class="toc_h3"><a href="#3_8_14_multi-windows">3.8.14. Multi-windows</a> </p>
98
99    <p class="toc_h2"><a href="#3_9_device_administration">3.9. Device Administration</a> </p>
100
101    <p class="toc_h3"><a href="#3_9_1_device_provisioning">3.9.1 Device Provisioning</a> </p>
102
103    <p class="toc_h4"><a href="#3_9_1_1_device_owner_provisioning">3.9.1.1 Device owner provisioning</a> </p>
104
105    <p class="toc_h4"><a href="#3_9_1_2_managed_profile_provisioning">3.9.1.2 Managed profile provisioning</a> </p>
106
107    <p class="toc_h2"><a href="#3_9_2_managed_profile_support">3.9.2 Managed Profile Support</a> </p>
108
109    <p class="toc_h2"><a href="#3_10_accessibility">3.10. Accessibility</a> </p>
110
111    <p class="toc_h2"><a href="#3_11_text-to-speech">3.11. Text-to-Speech</a> </p>
112
113    <p class="toc_h2"><a href="#3_12_tv_input_framework">3.12. TV Input Framework</a> </p>
114
115    <p class="toc_h3"><a href="#3_12_1_tv_app">3.12.1. TV App</a> </p>
116
117    <p class="toc_h4"><a href="#3_12_1_1_electronic_program_guide">3.12.1.1. Electronic Program Guide</a> </p>
118
119    <p class="toc_h4"><a href="#3_12_1_2_navigation">3.12.1.2. Navigation</a> </p>
120
121    <p class="toc_h4"><a href="#3_12_1_3_tv_input_app_linking">3.12.1.3. TV input app linking</a> </p>
122
123    <p class="toc_h4"><a href="#3_12_1_4_time_shifting">3.12.1.4. Time shifting</a> </p>
124
125    <p class="toc_h4"><a href="#3_12_1_5_tv_recording">3.12.1.5. TV recording</a> </p>
126
127    <p class="toc_h2"><a href="#3_13_quick_settings">3.13. Quick Settings</a> </p>
128
129    <p class="toc_h2"><a href="#3_14_vehicle_ui_apis">3.14. Vehicle UI APIs</a> </p>
130
131    <p class="toc_h3"><a href="#3_14_1__vehicle_media_ui">3.14.1.  Vehicle Media UI</a> </p>
132
133    <p class="toc_h1"><a href="#4_application_packaging_compatibility">4. Application Packaging Compatibility</a> </p>
134
135    <p class="toc_h1"><a href="#5_multimedia_compatibility">5. Multimedia Compatibility</a> </p>
136
137    <p class="toc_h2"><a href="#5_1_media_codecs">5.1. Media Codecs</a> </p>
138
139    <p class="toc_h3"><a href="#5_1_1_audio_codecs">5.1.1. Audio Codecs</a> </p>
140
141    <p class="toc_h3"><a href="#5_1_2_image_codecs">5.1.2. Image Codecs</a> </p>
142
143    <p class="toc_h3"><a href="#5_1_3_video_codecs">5.1.3. Video Codecs</a> </p>
144
145    <p class="toc_h2"><a href="#5_2_video_encoding">5.2. Video Encoding</a> </p>
146
147    <p class="toc_h3"><a href="#5_2_1_h_263">5.2.1. H.263</a> </p>
148
149    <p class="toc_h3"><a href="#5_2_2_h-264">5.2.2. H-264</a> </p>
150
151    <p class="toc_h3"><a href="#5_2_3_vp8">5.2.3. VP8</a> </p>
152
153    <p class="toc_h2"><a href="#5_3_video_decoding">5.3. Video Decoding</a> </p>
154
155   </div>
156   <div style="clear: both; page-break-after:always; height:1px">
157   </div>
158   <div id="toc_left">
159    <p class="toc_h3"><a href="#5_3_1_mpeg-2">5.3.1. MPEG-2</a> </p>
160
161    <p class="toc_h3"><a href="#5_3_2_h_263">5.3.2. H.263</a> </p>
162
163    <p class="toc_h3"><a href="#5_3_3_mpeg-4">5.3.3. MPEG-4</a> </p>
164
165    <p class="toc_h3"><a href="#5_3_4_h_264">5.3.4. H.264</a> </p>
166
167    <p class="toc_h3"><a href="#5_3_5_h_265_(hevc)">5.3.5. H.265 (HEVC)</a> </p>
168
169    <p class="toc_h3"><a href="#5_3_6_vp8">5.3.6. VP8</a> </p>
170
171    <p class="toc_h3"><a href="#5_3_7_vp9">5.3.7. VP9</a> </p>
172
173    <p class="toc_h2"><a href="#5_4_audio_recording">5.4. Audio Recording</a> </p>
174
175    <p class="toc_h3"><a href="#5_4_1_raw_audio_capture">5.4.1. Raw Audio Capture</a> </p>
176
177    <p class="toc_h3"><a href="#5_4_2_capture_for_voice_recognition">5.4.2. Capture for Voice Recognition</a> </p>
178
179    <p class="toc_h3"><a href="#5_4_3_capture_for_rerouting_of_playback">5.4.3. Capture for Rerouting of Playback</a> </p>
180
181    <p class="toc_h2"><a href="#5_5_audio_playback">5.5. Audio Playback</a> </p>
182
183    <p class="toc_h3"><a href="#5_5_1_raw_audio_playback">5.5.1. Raw Audio Playback</a> </p>
184
185    <p class="toc_h3"><a href="#5_5_2_audio_effects">5.5.2. Audio Effects</a> </p>
186
187    <p class="toc_h3"><a href="#5_5_3_audio_output_volume">5.5.3. Audio Output Volume</a> </p>
188
189    <p class="toc_h2"><a href="#5_6_audio_latency">5.6. Audio Latency</a> </p>
190
191    <p class="toc_h2"><a href="#5_7_network_protocols">5.7. Network Protocols</a> </p>
192
193    <p class="toc_h2"><a href="#5_8_secure_media">5.8. Secure Media</a> </p>
194
195    <p class="toc_h2"><a href="#5_9_musical_instrument_digital_interface_(midi)">5.9. Musical Instrument Digital Interface (MIDI)</a> </p>
196
197    <p class="toc_h2"><a href="#5_10_professional_audio">5.10. Professional Audio</a> </p>
198
199    <p class="toc_h2"><a href="#5_11_capture_for_unprocessed">5.11. Capture for Unprocessed</a> </p>
200
201    <p class="toc_h1"><a href="#6_developer_tools_and_options_compatibility">6. Developer Tools and Options Compatibility</a> </p>
202
203    <p class="toc_h2"><a href="#6_1_developer_tools">6.1. Developer Tools</a> </p>
204
205    <p class="toc_h2"><a href="#6_2_developer_options">6.2. Developer Options</a> </p>
206
207    <p class="toc_h1"><a href="#7_hardware_compatibility">7. Hardware Compatibility</a> </p>
208
209    <p class="toc_h2"><a href="#7_1_display_and_graphics">7.1. Display and Graphics</a> </p>
210
211    <p class="toc_h3"><a href="#7_1_1_screen_configuration">7.1.1. Screen Configuration</a> </p>
212
213    <p class="toc_h4"><a href="#7_1_1_1_screen_size">7.1.1.1. Screen Size</a> </p>
214
215    <p class="toc_h4"><a href="#7_1_1_2_screen_aspect_ratio">7.1.1.2. Screen Aspect Ratio</a> </p>
216
217    <p class="toc_h4"><a href="#7_1_1_3_screen_density">7.1.1.3. Screen Density</a> </p>
218
219    <p class="toc_h3"><a href="#7_1_2_display_metrics">7.1.2. Display Metrics</a> </p>
220
221    <p class="toc_h3"><a href="#7_1_3_screen_orientation">7.1.3. Screen Orientation</a> </p>
222
223    <p class="toc_h3"><a href="#7_1_4_2d_and_3d_graphics_acceleration">7.1.4. 2D and 3D Graphics Acceleration</a> </p>
224
225    <p class="toc_h3"><a href="#7_1_5_legacy_application_compatibility_mode">7.1.5. Legacy Application Compatibility Mode</a> </p>
226
227   </div>
228   <div id="toc_right">
229    <p class="toc_h3"><a href="#7_1_6_screen_technology">7.1.6. Screen Technology</a> </p>
230
231    <p class="toc_h3"><a href="#7_1_7_secondary_displays">7.1.7. Secondary Displays</a> </p>
232
233    <p class="toc_h2"><a href="#7_2_input_devices">7.2. Input Devices</a> </p>
234
235    <p class="toc_h3"><a href="#7_2_1_keyboard">7.2.1. Keyboard</a> </p>
236
237    <p class="toc_h3"><a href="#7_2_2_non_touch_navigation">7.2.2. Non-touch Navigation</a> </p>
238
239    <p class="toc_h3"><a href="#7_2_3_navigation_keys">7.2.3. Navigation Keys</a> </p>
240
241    <p class="toc_h3"><a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen Input</a> </p>
242
243    <p class="toc_h3"><a href="#7_2_5_fake_touch_input">7.2.5. Fake Touch Input</a> </p>
244
245    <p class="toc_h3"><a href="#7_2_6_game_controller_support">7.2.6. Game Controller Support</a> </p>
246
247    <p class="toc_h4"><a href="#7_2_6_1_button_mappings">7.2.6.1. Button Mappings</a> </p>
248
249    <p class="toc_h3"><a href="#7_2_7_remote_control">7.2.7. Remote Control</a> </p>
250
251    <p class="toc_h2"><a href="#7_3_sensors">7.3. Sensors</a> </p>
252
253    <p class="toc_h3"><a href="#7_3_1_accelerometer">7.3.1. Accelerometer</a> </p>
254
255    <p class="toc_h3"><a href="#7_3_2_magnetometer">7.3.2. Magnetometer</a> </p>
256
257    <p class="toc_h3"><a href="#7_3_3_gps">7.3.3. GPS</a> </p>
258
259    <p class="toc_h3"><a href="#7_3_4_gyroscope">7.3.4. Gyroscope</a> </p>
260
261    <p class="toc_h3"><a href="#7_3_5_barometer">7.3.5. Barometer</a> </p>
262
263    <p class="toc_h3"><a href="#7_3_6_thermometer">7.3.6. Thermometer</a> </p>
264
265    <p class="toc_h3"><a href="#7_3_7_photometer">7.3.7. Photometer</a> </p>
266
267    <p class="toc_h3"><a href="#7_3_8_proximity_sensor">7.3.8. Proximity Sensor</a> </p>
268
269    <p class="toc_h3"><a href="#7_3_9_high_fidelity_sensors">7.3.9. High Fidelity Sensors</a> </p>
270
271    <p class="toc_h3"><a href="#7_3_10_fingerprint_sensor">7.3.10. Fingerprint Sensor</a> </p>
272
273    <p class="toc_h3"><a href="#7_3_11_android_automotive-only_sensors">7.3.11. Android Automotive-only sensors</a> </p>
274
275    <p class="toc_h4"><a href="#7_3_11_1_current_gear">7.3.11.1. Current Gear</a> </p>
276
277    <p class="toc_h4"><a href="#7_3_11_2_day_night_mode">7.3.11.2. Day Night Mode</a> </p>
278
279    <p class="toc_h4"><a href="#7_3_11_3_driving_status">7.3.11.3. Driving Status</a> </p>
280
281    <p class="toc_h4"><a href="#7_3_11_4_wheel_speed">7.3.11.4. Wheel Speed</a> </p>
282
283    <p class="toc_h2"><a href="#7_3_12_pose_sensor">7.3.12. Pose Sensor</a> </p>
284
285    <p class="toc_h2"><a href="#7_4_data_connectivity">7.4. Data Connectivity</a> </p>
286
287    <p class="toc_h3"><a href="#7_4_1_telephony">7.4.1. Telephony</a> </p>
288
289    <p class="toc_h4"><a href="#7_4_1_1_number_blocking_compatibility">7.4.1.1. Number Blocking Compatibility</a> </p>
290
291    <p class="toc_h3"><a href="#7_4_2_ieee_802_11_(wi-fi)">7.4.2. IEEE 802.11 (Wi-Fi)</a> </p>
292
293    <p class="toc_h4"><a href="#7_4_2_1_wi-fi_direct">7.4.2.1. Wi-Fi Direct</a> </p>
294
295    <p class="toc_h4"><a href="#7_4_2_2_wi-fi_tunneled_direct_link_setup">7.4.2.2. Wi-Fi Tunneled Direct Link Setup</a> </p>
296
297   </div>
298   <div style="clear: both; page-break-after:always; height:1px">
299   </div>
300   <div id="toc_left">
301    <p class="toc_h3"><a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a> </p>
302
303    <p class="toc_h3"><a href="#7_4_4_near-field_communications">7.4.4. Near-Field Communications</a> </p>
304
305    <p class="toc_h3"><a href="#7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</a> </p>
306
307    <p class="toc_h3"><a href="#7_4_6_sync_settings">7.4.6. Sync Settings</a> </p>
308
309    <p class="toc_h3"><a href="#7_4_7_data_saver">7.4.7. Data Saver</a> </p>
310
311    <p class="toc_h2"><a href="#7_5_cameras">7.5. Cameras</a> </p>
312
313    <p class="toc_h3"><a href="#7_5_1_rear-facing_camera">7.5.1. Rear-Facing Camera</a> </p>
314
315    <p class="toc_h3"><a href="#7_5_2_front-facing_camera">7.5.2. Front-Facing Camera</a> </p>
316
317    <p class="toc_h3"><a href="#7_5_3_external_camera">7.5.3. External Camera</a> </p>
318
319    <p class="toc_h3"><a href="#7_5_4_camera_api_behavior">7.5.4. Camera API Behavior</a> </p>
320
321    <p class="toc_h3"><a href="#7_5_5_camera_orientation">7.5.5. Camera Orientation</a> </p>
322
323    <p class="toc_h2"><a href="#7_6_memory_and_storage">7.6. Memory and Storage</a> </p>
324
325    <p class="toc_h3"><a href="#7_6_1_minimum_memory_and_storage">7.6.1. Minimum Memory and Storage</a> </p>
326
327    <p class="toc_h3"><a href="#7_6_2_application_shared_storage">7.6.2. Application Shared Storage</a> </p>
328
329    <p class="toc_h3"><a href="#7_6_3_adoptable_storage">7.6.3. Adoptable Storage</a> </p>
330
331    <p class="toc_h2"><a href="#7_7_usb">7.7. USB</a> </p>
332
333    <p class="toc_h3"><a href="#7_7_1_usb_peripheral_mode">7.7.1. USB peripheral mode</a> </p>
334
335    <p class="toc_h3"><a href="#7_7_2_usb_host_mode">7.7.2. USB host mode</a> </p>
336
337    <p class="toc_h2"><a href="#7_8_audio">7.8. Audio</a> </p>
338
339    <p class="toc_h3"><a href="#7_8_1_microphone">7.8.1. Microphone</a> </p>
340
341    <p class="toc_h3"><a href="#7_8_2_audio_output">7.8.2. Audio Output</a> </p>
342
343    <p class="toc_h4"><a href="#7_8_2_1_analog_audio_ports">7.8.2.1. Analog Audio Ports</a> </p>
344
345    <p class="toc_h3"><a href="#7_8_3_near-ultrasound">7.8.3. Near-Ultrasound</a> </p>
346
347    <p class="toc_h2"><a href="#7_9_virtual_reality">7.9. Virtual Reality</a> </p>
348
349    <p class="toc_h3"><a href="#7_9_1_virtual_reality_mode">7.9.1. Virtual Reality Mode</a> </p>
350
351    <p class="toc_h3"><a href="#7_9_2_virtual_reality_high_performance">7.9.2. Virtual Reality High Performance</a> </p>
352
353    <p class="toc_h1"><a href="#8_performance_and_power">8. Performance and Power</a> </p>
354
355    <p class="toc_h2"><a href="#8_1_user_experience_consistency">8.1. User Experience Consistency</a> </p>
356
357    <p class="toc_h2"><a href="#8_2_file_i/o_access_performance">8.2. File I/O Access Performance</a> </p>
358
359    <p class="toc_h2"><a href="#8_3_power-saving_modes">8.3. Power-Saving Modes</a> </p>
360
361    <p class="toc_h2"><a href="#8_4_power_consumption_accounting">8.4. Power Consumption Accounting</a> </p>
362
363    <p class="toc_h2"><a href="#8_5_consistent_performance">8.5. Consistent Performance</a> </p>
364
365    <p class="toc_h1"><a href="#9_security_model_compatibility">9. Security Model Compatibility</a> </p>
366
367    <p class="toc_h2"><a href="#9_1_permissions">9.1. Permissions</a> </p>
368
369   </div>
370   <div id="toc_right">
371    <p class="toc_h2"><a href="#9_2_uid_and_process_isolation">9.2. UID and Process Isolation</a> </p>
372
373    <p class="toc_h2"><a href="#9_3_filesystem_permissions">9.3. Filesystem Permissions</a> </p>
374
375    <p class="toc_h2"><a href="#9_4_alternate_execution_environments">9.4. Alternate Execution Environments</a> </p>
376
377    <p class="toc_h2"><a href="#9_5_multi-user_support">9.5. Multi-User Support</a> </p>
378
379    <p class="toc_h2"><a href="#9_6_premium_sms_warning">9.6. Premium SMS Warning</a> </p>
380
381    <p class="toc_h2"><a href="#9_7_kernel_security_features">9.7. Kernel Security Features</a> </p>
382
383    <p class="toc_h2"><a href="#9_8_privacy">9.8. Privacy</a> </p>
384
385    <p class="toc_h2"><a href="#9_9_data_storage_encryption">9.9. Data Storage Encryption</a> </p>
386
387    <p class="toc_h3"><a href="#9_9_1_direct_boot">9.9.1. Direct Boot</a> </p>
388
389    <p class="toc_h3"><a href="#9_9_2_file_based_encryption">9.9.2. File Based Encryption</a> </p>
390
391    <p class="toc_h3"><a href="#9_9_3_full_disk_encryption">9.9.3. Full Disk Encryption</a> </p>
392
393    <p class="toc_h2"><a href="#9_10_device_integrity">9.10. Device Integrity</a> </p>
394
395    <p class="toc_h2"><a href="#9_11_keys_and_credentials">9.11. Keys and Credentials</a> </p>
396
397    <p class="toc_h3"><a href="#9_11_1_secure_lock_screen">9.11.1. Secure Lock Screen</a> </p>
398
399    <p class="toc_h2"><a href="#9_12_data_deletion">9.12. Data Deletion</a> </p>
400
401    <p class="toc_h2"><a href="#9_13_safe_boot_mode">9.13. Safe Boot Mode</a> </p>
402
403    <p class="toc_h2"><a href="#9_14_automotive_vehicle_system_isolation">9.14. Automotive Vehicle System Isolation</a> </p>
404
405    <p class="toc_h1"><a href="#10_software_compatibility_testing">10. Software Compatibility Testing</a> </p>
406
407    <p class="toc_h2"><a href="#10_1_compatibility_test_suite">10.1. Compatibility Test Suite</a> </p>
408
409    <p class="toc_h2"><a href="#10_2_cts_verifier">10.2. CTS Verifier</a> </p>
410
411    <p class="toc_h1"><a href="#11_updatable_software">11. Updatable Software</a> </p>
412
413    <p class="toc_h1"><a href="#12_document_changelog">12. Document Changelog</a> </p>
414
415    <p class="toc_h2"><a href="#12_1_changelog_viewing_tips">12.1. Changelog Viewing Tips</a> </p>
416
417    <p class="toc_h1"><a href="#13_contact_us">13. Contact Us</a> </p>
418
419   </div>
420   <div style="clear: both; page-break-after:always; height:1px">
421   </div>
422   <div style="clear: both">
423   </div>
424  </div>
425  <div id="main">
426   <h1 id="1_introduction">
427    1. Introduction
428   </h1>
429   <p>
430    This document enumerates the requirements that must be met in order for devices
431to be compatible with Android 7.0.
432   </p>
433   <p>
434    The use of &ldquo;MUST&rdquo;, &ldquo;MUST NOT&rdquo;, &ldquo;REQUIRED&rdquo;, &ldquo;SHALL&rdquo;, &ldquo;SHALL NOT&rdquo;, &ldquo;SHOULD&rdquo;,
435&ldquo;SHOULD NOT&rdquo;, &ldquo;RECOMMENDED&rdquo;, &ldquo;MAY&rdquo;, and &ldquo;OPTIONAL&rdquo; is per the IETF standard
436defined in
437    <a href="http://www.ietf.org/rfc/rfc2119.txt">RFC2119</a>.
438   </p>
439   <p>
440    As used in this document, a &ldquo;device implementer&rdquo; or &ldquo;implementer&rdquo; is a person
441or organization developing a hardware/software solution running Android
4427.0. A &ldquo;device implementation&rdquo; or &ldquo;implementation is the
443hardware/software solution so developed.
444   </p>
445   <p>
446    To be considered compatible with Android 7.0, device
447implementations MUST meet the requirements presented in this Compatibility
448Definition, including any documents incorporated via reference.
449   </p>
450   <p>
451    Where this definition or the software tests described in
452    <a href="#10_software_compatibility_testing">
453     section 10</a> is silent, ambiguous, or incomplete, it
454is the responsibility of the device implementer to ensure compatibility with
455existing implementations.
456   </p>
457   <p>
458    For this reason, the
459    <a href="http://source.android.com/">Android Open Source Project</a>  is both the reference and preferred implementation of Android. Device
460implementers are STRONGLY RECOMMENDED to base their implementations to the
461greatest extent possible on the &ldquo;upstream&rdquo; source code available from the
462Android Open Source Project. While some components can hypothetically be
463replaced with alternate implementations, it is STRONGLY RECOMMENDED to not
464follow this practice, as passing the software tests will become substantially
465more difficult. It is the implementer&rsquo;s responsibility to ensure full
466behavioral compatibility with the standard Android implementation, including
467and beyond the Compatibility Test Suite. Finally, note that certain component
468substitutions and modifications are explicitly forbidden by this document.
469   </p>
470   <p>
471    Many of the resources linked to in this document are derived directly or
472indirectly from the Android SDK and will be functionally identical to the
473information in that SDK&rsquo;s documentation. In any cases where this Compatibility
474Definition or the Compatibility Test Suite disagrees with the SDK
475documentation, the SDK documentation is considered authoritative. Any technical
476details provided in the linked resources throughout this document are
477considered by inclusion to be part of this Compatibility Definition.
478   </p>
479   <h1 id="2_device_types">
480    2. Device Types
481   </h1>
482   <p>
483    While the Android Open Source Project has been used in the implementation of a
484variety of device types and form factors, many aspects of the architecture and
485compatibility requirements were optimized for handheld devices. Starting from
486Android 5.0, the Android Open Source Project aims to embrace a wider variety of
487device types as described in this section.
488   </p>
489   <p>
490    <strong>
491     Android Handheld device
492    </strong>
493    refers to an Android device implementation that is
494typically used by holding it in the hand, such as mp3 players, phones, and
495tablets. Android Handheld device implementations:
496   </p>
497   <ul>
498    <li>
499     MUST have a touchscreen embedded in the device.
500    </li>
501    <li>
502     MUST have a power source that provides mobility, such as a battery.
503    </li>
504   </ul>
505   <p>
506    <strong>
507     Android Television device
508    </strong>
509    refers to an Android device implementation that
510is an entertainment interface for consuming digital media, movies, games, apps,
511and/or live TV for users sitting about ten feet away (a &ldquo;lean back&rdquo; or &ldquo;10-foot
512user interface&rdquo;). Android Television devices:
513   </p>
514   <ul>
515    <li>
516     MUST have an embedded screen OR include a video output port, such as VGA,
517    HDMI, or a wireless port for display.
518    </li>
519    <li>
520     MUST declare the features
521     <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK">android.software.leanback</a>  and android.hardware.type.television.
522    </li>
523   </ul>
524   <p>
525    <strong>
526     Android Watch device
527    </strong>
528    refers to an Android device implementation intended to
529be worn on the body, perhaps on the wrist, and:
530   </p>
531   <ul>
532    <li>
533     MUST have a screen with the physical diagonal length in the range from 1.1
534    to 2.5 inches.
535    </li>
536    <li>
537     MUST declare the feature android.hardware.type.watch.
538    </li>
539    <li>
540     MUST support uiMode =
541     <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH">UI_MODE_TYPE_WATCH</a>.  
542    </li>
543   </ul>
544   <p>
545    <strong>
546     Android Automotive implementation
547    </strong>
548    refers to a vehicle head unit running
549Android as an operating system for part or all of the system and/or
550infotainment functionality. Android Automotive implementations:
551   </p>
552   <ul>
553    <li>
554     MUST have a screen with the physical diagonal length equal to or greater
555    than 6 inches.
556    </li>
557    <li>
558     MUST declare the feature android.hardware.type.automotive.
559    </li>
560    <li>
561     MUST support uiMode =
562     <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR">UI_MODE_TYPE_CAR</a>.  
563    </li>
564    <li>
565     Android Automotive implementations MUST support all public APIs in the
566     <code>
567      android.car.*
568     </code>
569     namespace.
570    </li>
571   </ul>
572   <p>
573    All Android device implementations that do not fit into any of the above device
574types still MUST meet all requirements in this document to be Android
5757.0 compatible, unless the requirement is explicitly described to
576be only applicable to a specific Android device type from above.
577   </p>
578   <h2 id="2_1_device_configurations">
579    2.1 Device Configurations
580   </h2>
581   <p>
582    This is a summary of major differences in hardware configuration by device
583type. (Empty cells denote a &ldquo;MAY&rdquo;). Not all configurations are covered in this
584table; see relevant hardware sections for more detail.
585   </p>
586   <table>
587    <tr>
588     <th>
589      Category
590     </th>
591     <th>
592      Feature
593     </th>
594     <th>
595      Section
596     </th>
597     <th>
598      Handheld
599     </th>
600     <th>
601      Television
602     </th>
603     <th>
604      Watch
605     </th>
606     <th>
607      Automotive
608     </th>
609     <th>
610      Other
611     </th>
612    </tr>
613    <tr>
614     <td rowspan="3">
615      Input
616     </td>
617     <td>
618      D-pad
619     </td>
620     <td>
621      <a href="#7_2_2_non_touch_navigation">7.2.2. Non-touch Navigation</a>  </td>
622     <td>
623     </td>
624     <td>
625      MUST
626     </td>
627     <td>
628     </td>
629     <td>
630     </td>
631     <td>
632     </td>
633    </tr>
634    <tr>
635     <td>
636      Touchscreen
637     </td>
638     <td>
639      <a href="#7_2_4_touchscreen_input">7.2.4. Touchscreen input</a>  </td>
640     <td>
641      MUST
642     </td>
643     <td>
644     </td>
645     <td>
646      MUST
647     </td>
648     <td>
649     </td>
650     <td>
651      SHOULD
652     </td>
653    </tr>
654    <tr>
655     <td>
656      Microphone
657     </td>
658     <td>
659      <a href="#7_8_1_microphone">7.8.1. Microphone</a>  </td>
660     <td>
661      MUST
662     </td>
663     <td>
664      SHOULD
665     </td>
666     <td>
667      MUST
668     </td>
669     <td>
670      MUST
671     </td>
672     <td>
673      SHOULD
674     </td>
675    </tr>
676    <tr>
677     <td rowspan="2">
678      Sensors
679     </td>
680     <td>
681      Accelerometer
682     </td>
683     <td>
684      <a href="#7_3_1_accelerometer">7.3.1 Accelerometer</a>  </td>
685     <td>
686      SHOULD
687     </td>
688     <td>
689     </td>
690     <td>
691      SHOULD
692     </td>
693     <td>
694     </td>
695     <td>
696      SHOULD
697     </td>
698    </tr>
699    <tr>
700     <td>
701      GPS
702     </td>
703     <td>
704      <a href="#7_3_3_gps">7.3.3. GPS</a>  </td>
705     <td>
706      SHOULD
707     </td>
708     <td>
709     </td>
710     <td>
711     </td>
712     <td>
713      SHOULD
714     </td>
715     <td>
716     </td>
717    </tr>
718    <tr>
719     <td rowspan="6">
720      Connectivity
721     </td>
722     <td>
723      Wi-Fi
724     </td>
725     <td>
726      <a href="#7_4_2_ieee_802.11">7.4.2. IEEE 802.11</a>  </td>
727     <td>
728      SHOULD
729     </td>
730     <td>
731      SHOULD
732     </td>
733     <td>
734     </td>
735     <td>
736      SHOULD
737     </td>
738     <td>
739      SHOULD
740     </td>
741    </tr>
742    <tr>
743     <td>
744      Wi-Fi Direct
745     </td>
746     <td>
747      <a href="#7_4_2_1_wi-fi-direct">7.4.2.1. Wi-Fi Direct</a>  </td>
748     <td>
749      SHOULD
750     </td>
751     <td>
752      SHOULD
753     </td>
754     <td>
755     </td>
756     <td>
757     </td>
758     <td>
759      SHOULD
760     </td>
761    </tr>
762    <tr>
763     <td>
764      Bluetooth
765     </td>
766     <td>
767      <a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a>  </td>
768     <td>
769      SHOULD
770     </td>
771     <td>
772      MUST
773     </td>
774     <td>
775      MUST
776     </td>
777     <td>
778      MUST
779     </td>
780     <td>
781      SHOULD
782     </td>
783    </tr>
784    <tr>
785     <td>
786      Bluetooth Low Energy
787     </td>
788     <td>
789      <a href="#7_4_3_bluetooth">7.4.3. Bluetooth</a>  </td>
790     <td>
791      SHOULD
792     </td>
793     <td>
794      MUST
795     </td>
796     <td>
797      SHOULD
798     </td>
799     <td>
800      SHOULD
801     </td>
802     <td>
803      SHOULD
804     </td>
805    </tr>
806    <tr>
807     <td>
808      Cellular radio
809     </td>
810     <td>
811      <a href="#7_4_5_minimum_network_capability">7.4.5. Minimum Network Capability</a>  </td>
812     <td>
813     </td>
814     <td>
815     </td>
816     <td>
817     </td>
818     <td>
819      SHOULD
820     </td>
821     <td>
822     </td>
823    </tr>
824    <tr>
825     <td>
826      USB peripheral/host mode
827     </td>
828     <td>
829      <a href="#7_7_usb">7.7. USB</a>  </td>
830     <td>
831      SHOULD
832     </td>
833     <td>
834     </td>
835     <td>
836     </td>
837     <td>
838      SHOULD
839     </td>
840     <td>
841      SHOULD
842     </td>
843    </tr>
844    <tr>
845     <td>
846      Output
847     </td>
848     <td>
849      Speaker and/or Audio output ports
850     </td>
851     <td>
852      <a href="#7_8_2_audio_output">7.8.2. Audio Output</a>  </td>
853     <td>
854      MUST
855     </td>
856     <td>
857      MUST
858     </td>
859     <td>
860     </td>
861     <td>
862      MUST
863     </td>
864     <td>
865      MUST
866     </td>
867    </tr>
868   </table>
869   <h1 id="3_software">
870    3. Software
871   </h1>
872   <h2 id="3_1_managed_api_compatibility">
873    3.1. Managed API Compatibility
874   </h2>
875   <p>
876    The managed Dalvik bytecode execution environment is the primary vehicle for
877Android applications. The Android application programming interface (API) is the
878set of Android platform interfaces exposed to applications running in the
879managed runtime environment. Device implementations MUST provide complete
880implementations, including all documented behaviors, of any documented API
881exposed by the
882    <a href="http://developer.android.com/reference/packages.html">
883     Android SDK</a> or any API decorated
884with the &ldquo;@SystemApi&rdquo; marker in the upstream Android source code.
885   </p>
886   <p>
887    Device implementations MUST support/preserve all classes, methods, and
888associated elements marked by the TestApi annotation (@TestApi).
889   </p>
890   <p>
891    Device implementations MUST NOT omit any managed APIs, alter API interfaces or
892signatures, deviate from the documented behavior, or include no-ops, except
893where specifically allowed by this Compatibility Definition.
894   </p>
895   <p>
896    This Compatibility Definition permits some types of hardware for which Android
897includes APIs to be omitted by device implementations. In such cases, the APIs
898MUST still be present and behave in a reasonable way. See
899    <a href="#7_hardware_compatibility">
900     section 7</a> for specific requirements for this scenario.
901   </p>
902   <h2 id="3_1_1_android_extensions">
903    3.1.1. Android Extensions
904   </h2>
905   <p>
906    Android includes the support of extending the managed APIs while keeping the same API
907level version. Android device implementations MUST preload the AOSP implementation
908of both the shared library
909    <code>
910     ExtShared
911    </code>
912    and services
913    <code>
914     ExtServices
915    </code>
916    with versions higher
917than or equal to the minimum versions allowed per each API level.
918For example, Android 7.0 device implementations, running API level 24 MUST include
919at least version 1.
920   </p>
921   <h2 id="3_2_soft_api_compatibility">
922    3.2. Soft API Compatibility
923   </h2>
924   <p>
925    In addition to the managed APIs from
926    <a href="#3_1_managed_api_compatibility">
927     section 3.1</a>, Android also includes a significant
928runtime-only &ldquo;soft&rdquo; API, in the form of such things as intents, permissions,
929and similar aspects of Android applications that cannot be enforced at
930application compile time.
931   </p>
932   <h3 id="3_2_1_permissions">
933    3.2.1. Permissions
934   </h3>
935   <p>
936    Device implementers MUST support and enforce all permission constants as
937documented by the
938    <a href="http://developer.android.com/reference/android/Manifest.permission.html">
939     Permission reference page</a>.
940Note that
941    <a href="#9_security_model_compatibility">section 9</a>  lists additional
942requirements related to the Android security model.
943   </p>
944   <h3 id="3_2_2_build_parameters">
945    3.2.2. Build Parameters
946   </h3>
947   <p>
948    The Android APIs include a number of constants on the
949    <a href="http://developer.android.com/reference/android/os/Build.html">
950     android.os.Build
951class
952    </a>
953    that are
954intended to describe the current device. To provide consistent, meaningful
955values across device implementations, the table below includes additional
956restrictions on the formats of these values to which device implementations
957MUST conform.
958   </p>
959   <table>
960    <tr>
961     <th>
962      Parameter
963     </th>
964     <th>
965      Details
966     </th>
967    </tr>
968    <tr>
969     <td>
970      VERSION.RELEASE
971     </td>
972     <td>
973      The version of the currently-executing Android system, in human-readable
974    format. This field MUST have one of the string values defined in
975      <a href="http://source.android.com/compatibility/7.0/versions.html">7.0</a>.  
976     </td>
977    </tr>
978    <tr>
979     <td>
980      VERSION.SDK
981     </td>
982     <td>
983      The version of the currently-executing Android system, in a format
984    accessible to third-party application code. For Android 7.0,
985    this field MUST have the integer value 7.0_INT.
986     </td>
987    </tr>
988    <tr>
989     <td>
990      VERSION.SDK_INT
991     </td>
992     <td>
993      The version of the currently-executing Android system, in a format
994    accessible to third-party application code. For Android 7.0,
995    this field MUST have the integer value 7.0_INT.
996     </td>
997    </tr>
998    <tr>
999     <td>
1000      VERSION.INCREMENTAL
1001     </td>
1002     <td>
1003      A value chosen by the device implementer designating the specific build
1004    of the currently-executing Android system, in human-readable format. This
1005    value MUST NOT be reused for different builds made available to end users. A
1006    typical use of this field is to indicate which build number or
1007    source-control change identifier was used to generate the build. There are
1008    no requirements on the specific format of this field, except that it MUST
1009    NOT be null or the empty string ("").
1010     </td>
1011    </tr>
1012    <tr>
1013     <td>
1014      BOARD
1015     </td>
1016     <td>
1017      A value chosen by the device implementer identifying the specific
1018    internal hardware used by the device, in human-readable format. A possible
1019    use of this field is to indicate the specific revision of the board powering
1020    the device. The value of this field MUST be encodable as 7-bit ASCII and
1021    match the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.
1022     </td>
1023    </tr>
1024    <tr>
1025     <td>
1026      BRAND
1027     </td>
1028     <td>
1029      A value reflecting the brand name associated with the device as known to
1030    the end users. MUST be in human-readable format and SHOULD represent the
1031    manufacturer of the device or the company brand under which the device is
1032    marketed. The value of this field MUST be encodable as 7-bit ASCII and match
1033    the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.
1034     </td>
1035    </tr>
1036    <tr>
1037     <td>
1038      SUPPORTED_ABIS
1039     </td>
1040     <td>
1041      The name of the instruction set (CPU type + ABI convention) of native
1042    code. See
1043      <a href="#3_3_native_api_compatibility"> section 3.3. Native API Compatibility</a>.
1044     </td>
1045    </tr>
1046    <tr>
1047     <td>
1048      SUPPORTED_32_BIT_ABIS
1049     </td>
1050     <td>
1051      The name of the instruction set (CPU type + ABI convention) of native
1052    code. See <a href="#3_3_native_api_compatibility"> section 3.3. Native API Compatibility</a>.
1053     </td>
1054    </tr>
1055    <tr>
1056     <td>
1057      SUPPORTED_64_BIT_ABIS
1058     </td>
1059     <td>
1060      The name of the second instruction set (CPU type + ABI convention) of
1061    native code. See
1062      <a href="#3_3_native_api_compatibility"> section 3.3. Native API Compatibility</a>.
1063     </td>
1064    </tr>
1065    <tr>
1066     <td>
1067      CPU_ABI
1068     </td>
1069     <td>
1070      The name of the instruction set (CPU type + ABI convention) of native
1071    code. See
1072      <a href="#3_3_native_api_compatibility"> section 3.3. Native API Compatibility</a>.
1073     </td>
1074    </tr>
1075    <tr>
1076     <td>
1077      CPU_ABI2
1078     </td>
1079     <td>
1080      The name of the second instruction set (CPU type + ABI convention) of
1081    native code. See
1082      <a href="#3_3_native_api_compatibility"> section 3.3. Native API Compatibility</a>.
1083     </td>
1084    </tr>
1085    <tr>
1086     <td>
1087      DEVICE
1088     </td>
1089     <td>
1090      A value chosen by the device implementer containing the development name
1091    or code name identifying the configuration of the hardware features and
1092    industrial design of the device. The value of this field MUST be encodable
1093    as 7-bit ASCII and match the regular expression
1094    &ldquo;^[a-zA-Z0-9_-]+$&rdquo;. This device name MUST NOT change during the
1095    lifetime of the product.
1096     </td>
1097    </tr>
1098    <tr>
1099     <td>
1100      FINGERPRINT
1101     </td>
1102     <td>
1103      A string that uniquely identifies this build. It SHOULD be reasonably
1104    human-readable. It MUST follow this template:
1105      <p class="small">
1106       $(BRAND)/$(PRODUCT)/
1107       <br/>
1108       &nbsp;&nbsp;&nbsp;&nbsp;$(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS)
1109      </p>
1110      <p>
1111       For example:
1112      </p>
1113      <p class="small">
1114       acme/myproduct/
1115       <br/>
1116       &nbsp;&nbsp;&nbsp;&nbsp;mydevice:7.0/LMYXX/3359:userdebug/test-keys
1117      </p>
1118      <p>
1119       The fingerprint MUST NOT include whitespace characters. If other fields
1120    included in the template above have whitespace characters, they MUST be
1121    replaced in the build fingerprint with another character, such as the
1122    underscore ("_") character. The value of this field MUST be encodable as
1123    7-bit ASCII.
1124      </p>
1125     </td>
1126    </tr>
1127    <tr>
1128     <td>
1129      HARDWARE
1130     </td>
1131     <td>
1132      The name of the hardware (from the kernel command line or /proc). It
1133    SHOULD be reasonably human-readable. The value of this field MUST be
1134    encodable as 7-bit ASCII and match the regular expression
1135    &ldquo;^[a-zA-Z0-9_-]+$&rdquo;.
1136     </td>
1137    </tr>
1138    <tr>
1139     <td>
1140      HOST
1141     </td>
1142     <td>
1143      A string that uniquely identifies the host the build was built on, in
1144    human-readable format. There are no requirements on the specific format of
1145    this field, except that it MUST NOT be null or the empty string ("").
1146     </td>
1147    </tr>
1148    <tr>
1149     <td>
1150      ID
1151     </td>
1152     <td>
1153      An identifier chosen by the device implementer to refer to a specific
1154    release, in human-readable format. This field can be the same as
1155    android.os.Build.VERSION.INCREMENTAL, but SHOULD be a value sufficiently
1156    meaningful for end users to distinguish between software builds. The value
1157    of this field MUST be encodable as 7-bit ASCII and match the regular
1158    expression &ldquo;^[a-zA-Z0-9._-]+$&rdquo;.
1159     </td>
1160    </tr>
1161    <tr>
1162     <td>
1163      MANUFACTURER
1164     </td>
1165     <td>
1166      The trade name of the Original Equipment Manufacturer (OEM) of the
1167    product. There are no requirements on the specific format of this field,
1168    except that it MUST NOT be null or the empty string ("").
1169     </td>
1170    </tr>
1171    <tr>
1172     <td>
1173      MODEL
1174     </td>
1175     <td>
1176      A value chosen by the device implementer containing the name of the
1177    device as known to the end user. This SHOULD be the same name under which
1178    the device is marketed and sold to end users. There are no requirements on
1179    the specific format of this field, except that it MUST NOT be null or the
1180    empty string ("").
1181     </td>
1182    </tr>
1183    <tr>
1184     <td>
1185      PRODUCT
1186     </td>
1187     <td>
1188      A value chosen by the device implementer containing the development name
1189    or code name of the specific product (SKU) that MUST be unique within the
1190    same brand. MUST be human-readable, but is not necessarily intended for view
1191    by end users. The value of this field MUST be encodable as 7-bit ASCII and
1192    match the regular expression &ldquo;^[a-zA-Z0-9_-]+$&rdquo;. This product
1193    name MUST NOT change during the lifetime of the product.
1194     </td>
1195    </tr>
1196    <tr>
1197     <td>
1198      SERIAL
1199     </td>
1200     <td>
1201      A hardware serial number, which MUST be available and unique across
1202    devices with the same MODEL and MANUFACTURER. The value of this field MUST
1203    be encodable as 7-bit ASCII and match the regular expression
1204    &ldquo;^([a-zA-Z0-9]{6,20})$&rdquo;.
1205     </td>
1206    </tr>
1207    <tr>
1208     <td>
1209      TAGS
1210     </td>
1211     <td>
1212      A comma-separated list of tags chosen by the device implementer that
1213    further distinguishes the build. This field MUST have one of the values
1214    corresponding to the three typical Android platform signing configurations:
1215    release-keys, dev-keys, test-keys.
1216     </td>
1217    </tr>
1218    <tr>
1219     <td>
1220      TIME
1221     </td>
1222     <td>
1223      A value representing the timestamp of when the build occurred.
1224     </td>
1225    </tr>
1226    <tr>
1227     <td>
1228      TYPE
1229     </td>
1230     <td>
1231      A value chosen by the device implementer specifying the runtime
1232    configuration of the build. This field MUST have one of the values
1233    corresponding to the three typical Android runtime configurations: user,
1234    userdebug, or eng.
1235     </td>
1236    </tr>
1237    <tr>
1238     <td>
1239      USER
1240     </td>
1241     <td>
1242      A name or user ID of the user (or automated user) that generated the
1243    build. There are no requirements on the specific format of this field,
1244    except that it MUST NOT be null or the empty string ("").
1245     </td>
1246    </tr>
1247    <tr>
1248     <td>
1249      SECURITY_PATCH
1250     </td>
1251     <td>
1252      A value indicating the security patch level of a build. It MUST signify
1253    that the build includes all security patches issued up through the
1254    designated Android Public Security Bulletin. It MUST be in the format
1255    [YYYY-MM-DD], matching one of the Android Security Patch Level strings of
1256    the
1257      <a href="source.android.com/security/bulletin">
1258       Public Security
1259    Bulletins
1260      </a>
1261      , for example "2015-11-01".
1262     </td>
1263    </tr>
1264    <tr>
1265     <td>
1266      BASE_OS
1267     </td>
1268     <td>
1269      A value representing the FINGERPRINT parameter of the build that is
1270    otherwise identical to this build except for the patches provided in the
1271    Android Public Security Bulletin. It MUST report the correct value and if
1272    such a build does not exist, report an empty string ("").
1273     </td>
1274    </tr>
1275   </table>
1276   <h3 id="3_2_3_intent_compatibility">
1277    3.2.3. Intent Compatibility
1278   </h3>
1279   <h4 id="3_2_3_1_core_application_intents">
1280    3.2.3.1. Core Application Intents
1281   </h4>
1282   <p>
1283    Android intents allow application components to request functionality from
1284other Android components. The Android upstream project includes a list of
1285applications considered core Android applications, which implements several
1286intent patterns to perform common actions. The core Android applications are:
1287   </p>
1288   <ul>
1289    <li>
1290     Desk Clock
1291    </li>
1292    <li>
1293     Browser
1294    </li>
1295    <li>
1296     Calendar
1297    </li>
1298    <li>
1299     Contacts
1300    </li>
1301    <li>
1302     Gallery
1303    </li>
1304    <li>
1305     GlobalSearch
1306    </li>
1307    <li>
1308     Launcher
1309    </li>
1310    <li>
1311     Music
1312    </li>
1313    <li>
1314     Settings
1315    </li>
1316   </ul>
1317   <p>
1318    Device implementations MUST include the core Android applications as
1319appropriate or a component implementing the same intent patterns defined by
1320all the Activity or Service components of these core Android applications
1321exposed to other applications, implicitly or explicitly, through the
1322    <code>
1323     android:exported
1324    </code>
1325    attribute.
1326   </p>
1327   <h4 id="3_2_3_2_intent_resolution">
1328    3.2.3.2. Intent Resolution
1329   </h4>
1330   <p>
1331    As Android is an extensible platform, device implementations MUST allow each
1332intent pattern referenced in
1333    <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>
1334    to be overridden by third-party
1335applications. The upstream Android open source implementation allows this by
1336default; device implementers MUST NOT attach special privileges to system
1337applications' use of these intent patterns, or prevent third-party applications
1338from binding to and assuming control of these patterns. This prohibition
1339specifically includes but is not limited to disabling the &ldquo;Chooser&rdquo; user
1340interface that allows the user to select between multiple applications that all
1341handle the same intent pattern.
1342   </p>
1343   <p>
1344    Device implementations MUST provide a user interface for users to modify the
1345default activity for intents.
1346   </p>
1347   <p>
1348    However, device implementations MAY provide default activities for specific URI
1349patterns (e.g. http://play.google.com) when the default activity provides a
1350more specific attribute for the data URI. For example, an intent filter pattern
1351specifying the data URI &ldquo;http://www.android.com&rdquo; is more specific than the
1352browser's core intent pattern for &ldquo;http://&rdquo;.
1353   </p>
1354   <p>
1355    Android also includes a mechanism for third-party apps to declare an
1356authoritative default
1357    <a href="https://developer.android.com/training/app-links">app linking behavior</a>
1358    for certain types
1359of web URI intents. When such authoritative declarations are defined in an
1360app's intent filter patterns, device implementations:
1361   </p>
1362   <ul>
1363    <li>
1364     MUST attempt to validate any intent filters by performing the validation
1365steps defined in the
1366     <a href="https://developers.google.com/digital-asset-links">Digital Asset Links specification</a> as
1367implemented by the Package Manager in the upstream Android Open Source
1368Project.
1369    </li>
1370    <li>
1371     MUST attempt validation of the intent filters during the installation of
1372the application and set all successfully validated UIR intent filters as
1373default app handlers for their UIRs.
1374    </li>
1375    <li>
1376     MAY set specific URI intent filters as default app handlers for their URIs,
1377if they are successfully verified but other candidate URI filters fail
1378verification. If a device implementation does this, it MUST provide the
1379user appropriate per-URI pattern overrides in the settings menu.
1380    </li>
1381    <li>
1382     MUST provide the user with per-app App Links controls in Settings as
1383follows:
1384     <ul>
1385      <li>
1386       The user MUST be able to override holistically the default app links
1387behavior for an app to be: always open, always ask, or never open,
1388which must apply to all candidate URI intent filters equally.
1389      </li>
1390      <li>
1391       The user MUST be able to see a list of the candidate URI intent filters.
1392      </li>
1393      <li>
1394       The device implementation MAY provide the user with the ability to
1395override specific candidate URI intent filters that were successfully
1396verified, on a per-intent filter basis.
1397      </li>
1398      <li>
1399       The device implementation MUST provide users with the ability to view
1400and override specific candidate URI intent filters if the device
1401implementation lets some candidate URI intent filters succeed
1402verification while some others can fail.
1403      </li>
1404     </ul>
1405    </li>
1406   </ul>
1407   <h4 id="3_2_3_3_intent_namespaces">
1408    3.2.3.3. Intent Namespaces
1409   </h4>
1410   <p>
1411    Device implementations MUST NOT include any Android component that honors any
1412new intent or broadcast intent patterns using an ACTION, CATEGORY, or other key
1413string in the android.
1414    <em>
1415     or com.android.
1416    </em>
1417    namespace. Device implementers MUST
1418NOT include any Android components that honor any new intent or broadcast
1419intent patterns using an ACTION, CATEGORY, or other key string in a package
1420space belonging to another organization. Device implementers MUST NOT alter or
1421extend any of the intent patterns used by the core apps listed in
1422    <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>. Device implementations MAY include
1423intent patterns using namespaces clearly and obviously associated with their
1424own organization. This prohibition is analogous to that specified for Java
1425language classes in
1426    <a href="#3_6_api_namespaces">section 3.6</a>.  
1427   </p>
1428   <h4 id="3_2_3_4_broadcast_intents">
1429    3.2.3.4. Broadcast Intents
1430   </h4>
1431   <p>
1432    Third-party applications rely on the platform to broadcast certain intents to
1433notify them of changes in the hardware or software environment.
1434Android-compatible devices MUST broadcast the public broadcast intents in
1435response to appropriate system events. Broadcast intents are described in the
1436SDK documentation.
1437   </p>
1438   <h4 id="3_2_3_5_default_app_settings">
1439    3.2.3.5. Default App Settings
1440   </h4>
1441   <p>
1442    Android includes settings that provide users an easy way to select their
1443default applications, for example for Home screen or SMS. Where it makes sense,
1444device implementations MUST provide a similar settings menu and be compatible
1445with the intent filter pattern and API methods described in the SDK
1446documentation as below.
1447   </p>
1448   <p>
1449    Device implementations:
1450   </p>
1451   <ul>
1452    <li>
1453     MUST honor the
1454     <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_HOME_SETTINGS">android.settings.HOME_SETTINGS</a>  intent to show a default app settings menu for Home Screen, if the device
1455implementation reports android.software.home_screen.
1456    </li>
1457    <li>
1458     MUST provide a settings menu that will call the
1459     <a href="http://developer.android.com/reference/android/provider/Telephony.Sms.Intents.html">android.provider.Telephony.ACTION_CHANGE_DEFAULT</a>  intent to show a dialog to change the default SMS application, if the
1460device implementation reports android.hardware.telephony.
1461    </li>
1462    <li>
1463     MUST honor the
1464     <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFC_PAYMENT_SETTINGS">android.settings.NFC_PAYMENT_SETTINGS</a>  intent to show a default app settings menu for Tap and Pay, if the device
1465implementation reports android.hardware.nfc.hce.
1466    </li>
1467    <li>
1468     MUST honor the
1469     <a href="https://developer.android.com/reference/android/telecom/TelecomManager.html#ACTION_CHANGE_DEFAULT_DIALER">
1470      <code>android.telecom.action.CHANGE_DEFAULT_DIALER</code></a>
1471     intent to show a dialog to allow the user to change the default Phone application, if the
1472device implementation reports
1473     <code>
1474      android.hardware.telephony
1475     </code>.
1476    </li>
1477   </ul>
1478   <h2 id="3_3_native_api_compatibility">
1479    3.3. Native API Compatibility
1480   </h2>
1481   <p>
1482    Native code compatibility is challenging. For this reason, device implementers
1483are
1484    <strong>
1485     STRONGLY RECOMMENDED
1486    </strong>
1487    to use the implementations of the libraries listed
1488below from the upstream Android Open Source Project.
1489   </p>
1490   <h3 id="3_3_1_application_binary_interfaces">
1491    3.3.1. Application Binary Interfaces
1492   </h3>
1493   <p>
1494    Managed Dalvik bytecode can call into native code provided in the application
1495.apk file as an ELF .so file compiled for the appropriate device hardware
1496architecture. As native code is highly dependent on the underlying processor
1497technology, Android defines a number of Application Binary Interfaces (ABIs) in
1498the Android NDK. Device implementations MUST be compatible with one or more
1499defined ABIs, and MUST implement compatibility with the Android NDK, as below.
1500   </p>
1501   <p>
1502    If a device implementation includes support for an Android ABI, it:
1503   </p>
1504   <ul>
1505    <li>
1506     MUST include support for code running in the managed environment to call
1507    into native code, using the standard Java Native Interface (JNI) semantics.
1508    </li>
1509    <li>
1510     MUST be source-compatible (i.e. header compatible) and binary-compatible
1511    (for the ABI) with each required library in the list below.
1512    </li>
1513    <li>
1514     MUST support the equivalent 32-bit ABI if any 64-bit ABI is supported.
1515    </li>
1516    <li>
1517     MUST accurately report the native Application Binary Interface (ABI)
1518    supported by the device, via the android.os.Build.SUPPORTED_ABIS,
1519    android.os.Build.SUPPORTED_32_BIT_ABIS, and
1520    android.os.Build.SUPPORTED_64_BIT_ABIS parameters, each a comma separated
1521    list of ABIs ordered from the most to the least preferred one.
1522    </li>
1523    <li>
1524     MUST report, via the above parameters, only those ABIs documented and
1525    described in the latest version of the
1526     <a href="https://developer.android.com/ndk/guides/abis.html">Android NDK ABI Management documentation</a>,  and MUST
1527    include support for the
1528     <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0388f/Beijfcja.html">Advanced SIMD</a> ( a.k.a. NEON) extension.
1529    </li>
1530    <li>
1531     SHOULD be built using the source code and header files available in the
1532    upstream Android Open Source Project
1533    </li>
1534   </ul>
1535   <p>
1536    Note that future releases of the Android NDK may introduce support for
1537additional ABIs. If a device implementation is not compatible with an existing
1538predefined ABI, it MUST NOT report support for any ABIs at all.
1539   </p>
1540   <p>
1541    The following native code APIs MUST be available to apps that include native code:
1542   </p>
1543   <ul>
1544    <li>
1545     libandroid.so (native Android activity support)
1546    </li>
1547    <li>
1548     libc (C library)
1549    </li>
1550    <li>
1551     libcamera2ndk.so
1552    </li>
1553    <li>
1554     libdl (dynamic linker)
1555    </li>
1556    <li>
1557     libEGL.so (native OpenGL surface management)
1558    </li>
1559    <li>
1560     libGLESv1_CM.so (OpenGL ES 1.x)
1561    </li>
1562    <li>
1563     libGLESv2.so (OpenGL ES 2.0)
1564    </li>
1565    <li>
1566     libGLESv3.so (OpenGL ES 3.x)
1567    </li>
1568    <li>
1569     libicui18n.so
1570    </li>
1571    <li>
1572     libicuuc.so
1573    </li>
1574    <li>
1575     libjnigraphics.so
1576    </li>
1577    <li>
1578     liblog (Android logging)
1579    </li>
1580    <li>
1581     libmediandk.so (native media APIs support)
1582    </li>
1583    <li>
1584     libm (math library)
1585    </li>
1586    <li>
1587     libOpenMAXAL.so (OpenMAX AL 1.0.1 support)
1588    </li>
1589    <li>
1590     libOpenSLES.so (OpenSL ES 1.0.1 audio support)
1591    </li>
1592    <li>
1593     libRS.so
1594    </li>
1595    <li>
1596     libstdc++ (Minimal support for C++)
1597    </li>
1598    <li>
1599     libvukan.so (Vulkan)
1600    </li>
1601    <li>
1602     libz (Zlib compression)
1603    </li>
1604    <li>
1605     JNI interface
1606    </li>
1607    <li>
1608     Support for OpenGL, as described below
1609    </li>
1610   </ul>
1611   <p>
1612    For the native libraries listed above, the device implementation MUST NOT add
1613or remove the public functions.
1614   </p>
1615   <p>
1616    Native libraries not listed above but implemented and provided in AOSP as system
1617libraries are reserved and MUST NOT be exposed to third-party apps targeting API
1618level 24 or higher.
1619   </p>
1620   <p>
1621    Device implementations MAY add non-AOSP libraries and expose them directly as
1622an API to third-party apps but the additional libraries SHOULD be in
1623    <code>
1624     /vendor/lib
1625    </code>
1626    or
1627    <code>
1628     /vendor/lib64
1629    </code>
1630    and MUST be listed in
1631    <code>
1632     /vendor/etc/public.libraries.txt
1633    </code>.
1634   </p>
1635   <p>
1636    Note that device implementations MUST include libGLESv3.so and in turn, MUST export
1637all the OpenGL ES 3.1 and
1638    <a href="http://developer.android.com/guide/topics/graphics/opengl.html#aep">Android Extension Pack</a> function symbols as defined in the NDK release android-24. Although all the
1639symbols must be present, only the corresponding functions for OpenGL ES versions
1640and extensions actually supported by the device must be fully implemented.
1641   </p>
1642   <h4 id="3_3_1_1_graphic_libraries">
1643    3.3.1.1. Graphic Libraries
1644   </h4>
1645   <p>
1646    <a href="https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/xhtml/vkspec.html">Vulkan</a> is a low-overhead, cross-platform API for high-performance 3D graphics. Device
1647implementations, even if not including support of the Vulkan APIs, MUST satisfy
1648the following requirements:
1649   </p>
1650   <ul>
1651    <li>
1652     It MUST always provide a native library named
1653     <code>
1654      libvulkan.so
1655     </code>
1656     which exports
1657    function symbols for the core Vulkan 1.0 API as well as the
1658     <code>
1659      VK_KHR_surface
1660     </code>,
1661     <code>
1662      VK_KHR_android_surface
1663     </code>, and
1664     <code>
1665      VK_KHR_swapchain
1666     </code>
1667     extensions.
1668    </li>
1669   </ul>
1670   <p>
1671    Device implementations, if including support of the Vulkan APIs:
1672   </p>
1673   <ul>
1674    <li>
1675     MUST report, one or more
1676     <code>
1677      VkPhysicalDevices
1678     </code>
1679     through the
1680     <code>
1681      vkEnumeratePhysicalDevices
1682     </code>
1683     call.
1684    </li>
1685    <li>
1686     Each enumerated
1687     <code>
1688      VkPhysicalDevices
1689     </code>
1690     MUST fully implement the Vulkan 1.0 API.
1691    </li>
1692    <li>
1693     MUST report the correct
1694     <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_LEVEL">
1695      <code>PackageManager#FEATURE_VULKAN_HARDWARE_LEVEL</code></a> and
1696     <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_VERSION">
1697      <code>PackageManager#FEATURE_VULKAN_HARDWARE_VERSION</code></a> feature flags.
1698    </li>
1699    <li>
1700     MUST enumerate layers, contained in native libraries named
1701     <code>
1702      libVkLayer*.so
1703     </code>
1704     in the application package&rsquo;s native library directory, through the
1705     <code>
1706      vkEnumerateInstanceLayerProperties
1707     </code>
1708     and
1709     <code>
1710      vkEnumerateDeviceLayerProperties
1711     </code>
1712     functions in
1713     <code>
1714      libvulkan.so
1715     </code>
1716    </li>
1717    <li>
1718     MUST NOT enumerate layers provided by libraries outside of the application
1719    package, or provide other ways of tracing or intercepting the Vulkan API,
1720    unless the application has the
1721     <code>
1722      android:debuggable=&rdquo;true&rdquo;
1723     </code>
1724     attribute.
1725    </li>
1726   </ul>
1727   <p>
1728    Device implementations, if not including support of the Vulkan APIs:
1729   </p>
1730   <ul>
1731    <li>
1732     MUST report 0
1733     <code>
1734      VkPhysicalDevices
1735     </code>
1736     through the
1737     <code>
1738      vkEnumeratePhysicalDevices
1739     </code>
1740     call.
1741    </li>
1742    <li>
1743     MUST NOT delare any of the Vulkan feature flags
1744     <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_LEVEL">
1745      <code> PackageManager#FEATURE_VULKAN_HARDWARE_LEVEL</code></a> and
1746     <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_VULKAN_HARDWARE_VERSION">
1747      <code> PackageManager#FEATURE_VULKAN_HARDWARE_VERSION</code></a>.
1748    </li>
1749   </ul>
1750   <h3 id="3_3_2_32-bit_arm_native_code_compatibility">
1751    3.3.2. 32-bit ARM Native Code Compatibility
1752   </h3>
1753   <p>
1754    The ARMv8 architecture deprecates several CPU operations, including some
1755operations used in existing native code. On 64-bit ARM devices, the following
1756deprecated operations MUST remain available to 32-bit native ARM code, either
1757through native CPU support or through software emulation:
1758   </p>
1759   <ul>
1760    <li>
1761     SWP and SWPB instructions
1762    </li>
1763    <li>
1764     SETEND instruction
1765    </li>
1766    <li>
1767     CP15ISB, CP15DSB, and CP15DMB barrier operations
1768    </li>
1769   </ul>
1770   <p>
1771    Legacy versions of the Android NDK used /proc/cpuinfo to discover CPU features
1772from 32-bit ARM native code. For compatibility with applications built using
1773this NDK, devices MUST include the following lines in /proc/cpuinfo when it is
1774read by 32-bit ARM applications:
1775   </p>
1776   <ul>
1777    <li>
1778     "Features: ", followed by a list of any optional ARMv7 CPU features supported by the device.
1779    </li>
1780    <li>
1781     "CPU architecture: ", followed by an integer describing the device's highest
1782    supported ARM architecture (e.g., "8" for ARMv8 devices).
1783    </li>
1784   </ul>
1785   <p>
1786    These requirements only apply when /proc/cpuinfo is read by 32-bit ARM
1787applications. Devices SHOULD not alter /proc/cpuinfo when read by 64-bit ARM or
1788non-ARM applications.
1789   </p>
1790   <h2 id="3_4_web_compatibility">
1791    3.4. Web Compatibility
1792   </h2>
1793   <h3 id="3_4_1_webview_compatibility">
1794    3.4.1. WebView Compatibility
1795   </h3>
1796   <div class="note">
1797    Android Watch devices MAY, but all other device implementations MUST provide a
1798complete implementation of the android.webkit.Webview API.
1799   </div>
1800   <p>
1801    The platform feature android.software.webview MUST be reported on any device
1802that provides a complete implementation of the android.webkit.WebView API, and
1803MUST NOT be reported on devices without a complete implementation of the API.
1804The Android Open Source implementation uses code from the Chromium Project to
1805implement the
1806    <a href="http://developer.android.com/reference/android/webkit/WebView.html">android.webkit.WebView</a>. 
1807Because it is not feasible to develop a comprehensive test suite for a web
1808rendering system, device implementers MUST use the specific upstream build of
1809Chromium in the WebView implementation. Specifically:
1810   </p>
1811   <ul>
1812    <li>
1813     Device android.webkit.WebView implementations MUST be based on the
1814     <a href="http://www.chromium.org/">Chromium</a> build from the upstream Android Open
1815    Source Project for Android 7.0. This build includes a specific
1816    set of functionality and security fixes for the WebView.
1817    </li>
1818    <li>
1819     <p>
1820      The user agent string reported by the WebView MUST be in this format:
1821     </p>
1822     <p>
1823      Mozilla/5.0 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD); wv)
1824AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile
1825Safari/537.36
1826     </p>
1827     <ul>
1828      <li>
1829       The value of the $(VERSION) string MUST be the same as the value for android.os.Build.VERSION.RELEASE.
1830      </li>
1831      <li>
1832       The value of the $(MODEL) string MUST be the same as the value for android.os.Build.MODEL.
1833      </li>
1834      <li>
1835       The value of the $(BUILD) string MUST be the same as the value for android.os.Build.ID.
1836      </li>
1837      <li>
1838       The value of the $(CHROMIUM_VER) string MUST be the version of Chromium in the upstream Android Open Source Project.
1839      </li>
1840      <li>
1841       Device implementations MAY omit Mobile in the user agent string.
1842      </li>
1843     </ul>
1844    </li>
1845   </ul>
1846   <p>
1847    The WebView component SHOULD include support for as many HTML5 features as
1848possible and if it supports the feature SHOULD conform to the
1849    <a href="http://html.spec.whatwg.org/multipage/">HTML5 specification</a>. 
1850   </p>
1851   <h3 id="3_4_2_browser_compatibility">
1852    3.4.2. Browser Compatibility
1853   </h3>
1854   <div class="note">
1855    Android Television, Watch, and Android Automotive implementations MAY omit a
1856browser application, but MUST support the public intent patterns as described in
1857    <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>.  All other types of device
1858implementations MUST include a standalone Browser application for general user
1859web browsing.
1860   </div>
1861   <p>
1862    The standalone Browser MAY be based on a browser technology other than WebKit.
1863However, even if an alternate Browser application is used, the
1864android.webkit.WebView component provided to third-party applications MUST be
1865based on WebKit, as described in
1866    <a href="#3_4_1_webview_compatibility">section 3.4.1</a>. 
1867   </p>
1868   <p>
1869    Implementations MAY ship a custom user agent string in the standalone Browser application.
1870   </p>
1871   <p>
1872    The standalone Browser application (whether based on the upstream WebKit Browser
1873application or a third-party replacement) SHOULD include support for as much of
1874    <a href="http://html.spec.whatwg.org/multipage/">HTML5</a> as possible. Minimally, device
1875implementations MUST support each of these APIs associated with HTML5:
1876   </p>
1877   <ul>
1878    <li>
1879     <a href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline">application cache/offline operation</a> </li>
1880    <li>
1881     <a href="http://www.w3.org/html/wg/drafts/html/master/semantics.html#video">&lt;video&gt; tag</a> </li>
1882    <li>
1883     <a href="http://www.w3.org/TR/geolocation-API/">geolocation</a> </li>
1884   </ul>
1885   <p>
1886    Additionally, device implementations MUST support the HTML5/W3C
1887    <a href="http://www.w3.org/TR/webstorage/">webstorage API</a> and SHOULD support the HTML5/W3C
1888    <a href="http://www.w3.org/TR/IndexedDB/">IndexedDB API</a>.  Note that as the web
1889development standards bodies are transitioning to favor IndexedDB over
1890webstorage, IndexedDB is expected to become a required component in a future
1891version of Android.
1892   </p>
1893   <h2 id="3_5_api_behavioral_compatibility">
1894    3.5. API Behavioral Compatibility
1895   </h2>
1896   <p>
1897    The behaviors of each of the API types (managed, soft, native, and web) must be
1898consistent with the preferred implementation of the upstream
1899    <a href="http://source.android.com/">Android Open Source Project</a>.  Some specific areas of
1900compatibility are:
1901   </p>
1902   <ul>
1903    <li>
1904     Devices MUST NOT change the behavior or semantics of a standard intent.
1905    </li>
1906    <li>
1907     Devices MUST NOT alter the lifecycle or lifecycle semantics of a particular
1908    type of system component (such as Service, Activity, ContentProvider, etc.).
1909    </li>
1910    <li>
1911     Devices MUST NOT change the semantics of a standard permission.
1912    </li>
1913   </ul>
1914   <p>
1915    The above list is not comprehensive. The Compatibility Test Suite (CTS) tests
1916significant portions of the platform for behavioral compatibility, but not all.
1917It is the responsibility of the implementer to ensure behavioral compatibility
1918with the Android Open Source Project. For this reason, device implementers
1919SHOULD use the source code available via the Android Open Source Project where
1920possible, rather than re-implement significant parts of the system.
1921   </p>
1922   <h2 id="3_6_api_namespaces">
1923    3.6. API Namespaces
1924   </h2>
1925   <p>
1926    Android follows the package and class namespace conventions defined by the Java
1927programming language. To ensure compatibility with third-party applications,
1928device implementers MUST NOT make any prohibited modifications (see below) to
1929these package namespaces:
1930   </p>
1931   <ul>
1932    <li>
1933     java.*
1934    </li>
1935    <li>
1936     javax.*
1937    </li>
1938    <li>
1939     sun.*
1940    </li>
1941    <li>
1942     android.*
1943    </li>
1944    <li>
1945     com.android.*
1946    </li>
1947   </ul>
1948   <p>
1949    <strong>
1950     Prohibited modifications include
1951    </strong>
1952    :
1953   </p>
1954   <ul>
1955    <li>
1956     Device implementations MUST NOT modify the publicly exposed APIs on the
1957    Android platform by changing any method or class signatures, or by removing
1958    classes or class fields.
1959    </li>
1960    <li>
1961     Device implementers MAY modify the underlying implementation of the APIs,
1962    but such modifications MUST NOT impact the stated behavior and Java-language
1963    signature of any publicly exposed APIs.
1964    </li>
1965    <li>
1966     Device implementers MUST NOT add any publicly exposed elements (such as
1967    classes or interfaces, or fields or methods to existing classes or
1968    interfaces) to the APIs above.
1969    </li>
1970   </ul>
1971   <p>
1972    A &ldquo;publicly exposed element&rdquo; is any construct that is not decorated with
1973the&ldquo;@hide&rdquo; marker as used in the upstream Android source code. In other words,
1974device implementers MUST NOT expose new APIs or alter existing APIs in the
1975namespaces noted above. Device implementers MAY make internal-only
1976modifications, but those modifications MUST NOT be advertised or otherwise
1977exposed to developers.
1978   </p>
1979   <p>
1980    Device implementers MAY add custom APIs, but any such APIs MUST NOT be in a
1981namespace owned by or referring to another organization. For instance, device
1982implementers MUST NOT add APIs to the com.google.* or similar namespace: only
1983Google may do so. Similarly, Google MUST NOT add APIs to other companies'
1984namespaces. Additionally, if a device implementation includes custom APIs
1985outside the standard Android namespace, those APIs MUST be packaged in an
1986Android shared library so that only apps that explicitly use them (via the
1987&lt;uses-library&gt; mechanism) are affected by the increased memory usage of such
1988APIs.
1989   </p>
1990   <p>
1991    If a device implementer proposes to improve one of the package namespaces above
1992(such as by adding useful new functionality to an existing API, or adding a new
1993API), the implementer SHOULD visit
1994    <a href="http://source.android.com/">source.android.com</a> and begin the process for
1995contributing changes and code, according to the information on that site.
1996   </p>
1997   <p>
1998    Note that the restrictions above correspond to standard conventions for naming
1999APIs in the Java programming language; this section simply aims to reinforce
2000those conventions and make them binding through inclusion in this Compatibility
2001Definition.
2002   </p>
2003   <h2 id="3_7_runtime_compatibility">
2004    3.7. Runtime Compatibility
2005   </h2>
2006   <p>
2007    Device implementations MUST support the full Dalvik Executable (DEX) format and
2008    <a href="https://android.googlesource.com/platform/dalvik/">Dalvik bytecode specification and semantics</a>. 
2009Device implementers SHOULD use ART, the reference upstream implementation of the Dalvik
2010Executable Format, and the reference implementation&rsquo;s package management system.
2011   </p>
2012   <p>
2013    Device implementations MUST configure Dalvik runtimes to allocate memory in
2014accordance with the upstream Android platform, and as specified by the following
2015table. (See
2016    <a href="#7_1_1_screen_configuration">section 7.1.1</a> for screen size and
2017screen density definitions.) Note that memory values specified below are
2018considered minimum values and device implementations MAY allocate more memory
2019per application.
2020   </p>
2021   <table>
2022    <tr>
2023     <th>
2024      Screen Layout
2025     </th>
2026     <th>
2027      Screen Density
2028     </th>
2029     <th>
2030      Minimum Application Memory
2031     </th>
2032    </tr>
2033    <tr>
2034     <td rowspan="12">
2035      Android Watch
2036     </td>
2037     <td>
2038      120 dpi (ldpi)
2039     </td>
2040     <td rowspan="3">
2041      32MB
2042     </td>
2043    </tr>
2044    <tr>
2045     <td>
2046      160 dpi (mdpi)
2047     </td>
2048    </tr>
2049    <tr>
2050     <td>
2051      213 dpi (tvdpi)
2052     </td>
2053    </tr>
2054    <tr>
2055     <td>
2056      240 dpi (hdpi)
2057     </td>
2058     <td rowspan="2">
2059      36MB
2060     </td>
2061    </tr>
2062    <tr>
2063     <td>
2064      280 dpi (280dpi)
2065     </td>
2066    </tr>
2067    <tr>
2068     <td>
2069      320 dpi (xhdpi)
2070     </td>
2071     <td rowspan="2">
2072      48MB
2073     </td>
2074    </tr>
2075    <tr>
2076     <td>
2077      360 dpi (360dpi)
2078     </td>
2079    </tr>
2080    <tr>
2081     <td>
2082      400 dpi (400dpi)
2083     </td>
2084     <td>
2085      56MB
2086     </td>
2087    </tr>
2088    <tr>
2089     <td>
2090      420 dpi (420dpi)
2091     </td>
2092     <td>
2093      64MB
2094     </td>
2095    </tr>
2096    <tr>
2097     <td>
2098      480 dpi (xxhdpi)
2099     </td>
2100     <td>
2101      88MB
2102     </td>
2103    </tr>
2104    <tr>
2105     <td>
2106      560 dpi (560dpi)
2107     </td>
2108     <td>
2109      112MB
2110     </td>
2111    </tr>
2112    <tr>
2113     <td>
2114      640 dpi (xxxhdpi)
2115     </td>
2116     <td>
2117      154MB
2118     </td>
2119    </tr>
2120    <tr>
2121     <td rowspan="12">
2122      small/normal
2123     </td>
2124     <td>
2125      120 dpi (ldpi)
2126     </td>
2127     <td rowspan="2">
2128      32MB
2129     </td>
2130    </tr>
2131    <tr>
2132     <td>
2133      160 dpi (mdpi)
2134     </td>
2135    </tr>
2136    <tr>
2137     <td>
2138      213 dpi (tvdpi)
2139     </td>
2140     <td rowspan="3">
2141      48MB
2142     </td>
2143    </tr>
2144    <tr>
2145     <td>
2146      240 dpi (hdpi)
2147     </td>
2148    </tr>
2149    <tr>
2150     <td>
2151      280 dpi (280dpi)
2152     </td>
2153    </tr>
2154    <tr>
2155     <td>
2156      320 dpi (xhdpi)
2157     </td>
2158     <td rowspan="2">
2159      80MB
2160     </td>
2161    </tr>
2162    <tr>
2163     <td>
2164      360 dpi (360dpi)
2165     </td>
2166    </tr>
2167    <tr>
2168     <td>
2169      400 dpi (400dpi)
2170     </td>
2171     <td>
2172      96MB
2173     </td>
2174    </tr>
2175    <tr>
2176     <td>
2177      420 dpi (420dpi)
2178     </td>
2179     <td>
2180      112MB
2181     </td>
2182    </tr>
2183    <tr>
2184     <td>
2185      480 dpi (xxhdpi)
2186     </td>
2187     <td>
2188      128MB
2189     </td>
2190    </tr>
2191    <tr>
2192     <td>
2193      560 dpi (560dpi)
2194     </td>
2195     <td>
2196      192MB
2197     </td>
2198    </tr>
2199    <tr>
2200     <td>
2201      640 dpi (xxxhdpi)
2202     </td>
2203     <td>
2204      256MB
2205     </td>
2206    </tr>
2207    <tr>
2208     <td rowspan="12">
2209      large
2210     </td>
2211     <td>
2212      120 dpi (ldpi)
2213     </td>
2214     <td>
2215      32MB
2216     </td>
2217    </tr>
2218    <tr>
2219     <td>
2220      160 dpi (mdpi)
2221     </td>
2222     <td>
2223      48MB
2224     </td>
2225    </tr>
2226    <tr>
2227     <td>
2228      213 dpi (tvdpi)
2229     </td>
2230     <td rowspan="2">
2231      80MB
2232     </td>
2233    </tr>
2234    <tr>
2235     <td>
2236      240 dpi (hdpi)
2237     </td>
2238    </tr>
2239    <tr>
2240     <td>
2241      280 dpi (280dpi)
2242     </td>
2243     <td>
2244      96MB
2245     </td>
2246    </tr>
2247    <tr>
2248     <td>
2249      320 dpi (xhdpi)
2250     </td>
2251     <td>
2252      128MB
2253     </td>
2254    </tr>
2255    <tr>
2256     <td>
2257      360 dpi (360dpi)
2258     </td>
2259     <td>
2260      160MB
2261     </td>
2262    </tr>
2263    <tr>
2264     <td>
2265      400 dpi (400dpi)
2266     </td>
2267     <td>
2268      192MB
2269     </td>
2270    </tr>
2271    <tr>
2272     <td>
2273      420 dpi (420dpi)
2274     </td>
2275     <td>
2276      228MB
2277     </td>
2278    </tr>
2279    <tr>
2280     <td>
2281      480 dpi (xxhdpi)
2282     </td>
2283     <td>
2284      256MB
2285     </td>
2286    </tr>
2287    <tr>
2288     <td>
2289      560 dpi (560dpi)
2290     </td>
2291     <td>
2292      384MB
2293     </td>
2294    </tr>
2295    <tr>
2296     <td>
2297      640 dpi (xxxhdpi)
2298     </td>
2299     <td>
2300      512MB
2301     </td>
2302    </tr>
2303    <tr>
2304     <td rowspan="12">
2305      xlarge
2306     </td>
2307     <td>
2308      120 dpi (ldpi)
2309     </td>
2310     <td>
2311      48MB
2312     </td>
2313    </tr>
2314    <tr>
2315     <td>
2316      160 dpi (mdpi)
2317     </td>
2318     <td>
2319      80MB
2320     </td>
2321    </tr>
2322    <tr>
2323     <td>
2324      213 dpi (tvdpi)
2325     </td>
2326     <td rowspan="2">
2327      96MB
2328     </td>
2329    </tr>
2330    <tr>
2331     <td>
2332      240 dpi (hdpi)
2333     </td>
2334    </tr>
2335    <tr>
2336     <td>
2337      280 dpi (280dpi)
2338     </td>
2339     <td>
2340      144MB
2341     </td>
2342    </tr>
2343    <tr>
2344     <td>
2345      320 dpi (xhdpi)
2346     </td>
2347     <td>
2348      192MB
2349     </td>
2350    </tr>
2351    <tr>
2352     <td>
2353      360 dpi (360dpi)
2354     </td>
2355     <td>
2356      240MB
2357     </td>
2358    </tr>
2359    <tr>
2360     <td>
2361      400 dpi (400dpi)
2362     </td>
2363     <td>
2364      288MB
2365     </td>
2366    </tr>
2367    <tr>
2368     <td>
2369      420 dpi (420dpi)
2370     </td>
2371     <td>
2372      336MB
2373     </td>
2374    </tr>
2375    <tr>
2376     <td>
2377      480 dpi (xxhdpi)
2378     </td>
2379     <td>
2380      384MB
2381     </td>
2382    </tr>
2383    <tr>
2384     <td>
2385      560 dpi (560dpi)
2386     </td>
2387     <td>
2388      576MB
2389     </td>
2390    </tr>
2391    <tr>
2392     <td>
2393      640 dpi (xxxhdpi)
2394     </td>
2395     <td>
2396      768MB
2397     </td>
2398    </tr>
2399   </table>
2400   <h2 id="3_8_user_interface_compatibility">
2401    3.8. User Interface Compatibility
2402   </h2>
2403   <h3 id="3_8_1_launcher_(home_screen)">
2404    3.8.1. Launcher (Home Screen)
2405   </h3>
2406   <p>
2407    Android includes a launcher application (home screen) and support for
2408third-party applications to replace the device launcher (home screen). Device
2409implementations that allow third-party applications to replace the device home
2410screen MUST declare the platform feature android.software.home_screen.
2411   </p>
2412   <h3 id="3_8_2_widgets">
2413    3.8.2. Widgets
2414   </h3>
2415   <div class="note">
2416    Widgets are optional for all Android device implementations, but SHOULD be
2417supported on Android Handheld devices.
2418   </div>
2419   <p>
2420    Android defines a component type and corresponding API and lifecycle that allows
2421applications to expose an
2422    <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">&ldquo;AppWidget&rdquo;</a> to the end user, a feature that is STRONGLY RECOMMENDED to be supported on
2423Handheld Device implementations. Device implementations that support embedding
2424widgets on the home screen MUST meet the following requirements and declare
2425support for platform feature android.software.app_widgets.
2426   </p>
2427   <ul>
2428    <li>
2429     Device launchers MUST include built-in support for AppWidgets and expose
2430    user interface affordances to add, configure, view, and remove AppWidgets
2431    directly within the Launcher.
2432    </li>
2433    <li>
2434     Device implementations MUST be capable of rendering widgets that are 4 x 4
2435    in the standard grid size. See the
2436     <a href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html">App Widget Design Guidelines</a>
2437     in the Android SDK documentation for details.
2438    </li>
2439    <li>
2440     Device implementations that include support for lock screen MAY support
2441    application widgets on the lock screen.
2442    </li>
2443    <li>
2444     SHOULD trigger the fast-switch action between the two most recently used apps,
2445    when the recents function key is tapped twice.
2446    </li>
2447    <li>
2448     SHOULD trigger the split-screen multiwindow-mode, if supported, when the recents
2449    functions key is long pressed.
2450    </li>
2451   </ul>
2452   <h3 id="3_8_3_notifications">
2453    3.8.3. Notifications
2454   </h3>
2455   <p>
2456    Android includes APIs that allow developers to
2457    <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html">notify users of notable events</a> using hardware and software features of the device.
2458   </p>
2459   <p>
2460    Some APIs allow applications to perform notifications or attract attention using
2461hardware&mdash;specifically sound, vibration, and light. Device implementations MUST
2462support notifications that use hardware features, as described in the SDK
2463documentation, and to the extent possible with the device implementation
2464hardware. For instance, if a device implementation includes a vibrator, it MUST
2465correctly implement the vibration APIs. If a device implementation lacks
2466hardware, the corresponding APIs MUST be implemented as no-ops. This behavior is
2467further detailed in
2468    <a href="#7_hardware_compatibility">section 7</a>. 
2469   </p>
2470   <p>
2471    Additionally, the implementation MUST correctly render all
2472    <a href="https://developer.android.com/guide/topics/resources/available-resources.html">resources</a> (icons, animation files etc.) provided for in the APIs, or in the Status/System
2473Bar
2474    <a href="http://developer.android.com/design/style/iconography.html">icon style guide</a>,  which in the
2475case of an Android Television device includes the possibility to not display the
2476notifications. Device implementers MAY provide an alternative user experience
2477for notifications than that provided by the reference Android Open Source
2478implementation; however, such alternative notification systems MUST support
2479existing notification resources, as above.
2480   </p>
2481   <div class="note">
2482    Android Automotive implementations MAY manage the visibility and timing of
2483notifications to mitigate driver distraction, but MUST display
2484notifications that use
2485    <a href="https://developer.android.com/reference/android/app/Notification.CarExtender.html">CarExtender</a> when requested by applications.
2486   </div>
2487   <p>
2488    Android includes support for various notifications, such as:
2489   </p>
2490   <ul>
2491    <li>
2492     <strong>
2493      Rich notifications
2494     </strong>
2495     . Interactive Views for ongoing notifications.
2496    </li>
2497    <li>
2498     <strong>
2499      Heads-up notifications
2500     </strong>
2501     . Interactive Views users can act on or dismiss without leaving the current app.
2502    </li>
2503    <li>
2504     <strong>
2505      Lock screen notifications
2506     </strong>
2507     . Notifications shown over a lock screen with granular control on visibility.
2508    </li>
2509   </ul>
2510   <p>
2511    Android device implementations, when such notifications are made visible, MUST
2512properly execute Rich and Heads-up notifications and include the title/name,
2513icon, text as
2514    <a href="https://developer.android.com/design/patterns/notifications.html">documented in the Android APIs</a>. 
2515   </p>
2516   <p>
2517    Android includes Notification Listener Service APIs that allow apps (once
2518explicitly enabled by the user) to receive a copy of all notifications as they
2519are posted or updated. Device implementations MUST correctly and promptly send
2520notifications in their entirety to all such installed and user-enabled listener
2521services, including any and all metadata attached to the Notification object.
2522   </p>
2523   <p>
2524    Device implementations that support the DND (Do not Disturb) feature MUST meet
2525the following requirements:
2526   </p>
2527   <ul>
2528    <li>
2529     MUST implement an activity where the user can grant or deny the app access
2530    to DND policy configurations in response to the intent
2531     <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS">ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS</a>. 
2532    </li>
2533    <li>
2534     MUST display
2535     <a href="https://developer.android.com/reference/android/app/NotificationManager.html#addAutomaticZenRule(android.app.AutomaticZenRule)">Automatic DND rules</a> created by applications alongside the user-created and pre-defined rules.
2536    </li>
2537    <li>
2538     MUST honor the
2539     <a href="https://developer.android.com/reference/android/app/NotificationManager.Policy.html#suppressedVisualEffects">
2540      <code>suppressedVisualEffects</code></a> values passed along the
2541     <a href="https://developer.android.com/reference/android/app/NotificationManager.Policy.html#NotificationManager.Policy(int, int, int, int)">
2542      <code> NotificationManager.Policy</code></a>.
2543    </li>
2544   </ul>
2545   <h3 id="3_8_4_search">
2546    3.8.4. Search
2547   </h3>
2548   <p>
2549    Android includes APIs that allow developers to
2550    <a href="http://developer.android.com/reference/android/app/SearchManager.html">incorporate search</a> into their applications and expose their application&rsquo;s data into the global
2551system search. Generally speaking, this functionality consists of a single,
2552system-wide user interface that allows users to enter queries, displays
2553suggestions as users type, and displays results. The Android APIs allow
2554developers to reuse this interface to provide search within their own apps and
2555allow developers to supply results to the common global search user interface.
2556   </p>
2557   <p>
2558    Android device implementations SHOULD include global search, a single, shared,
2559system-wide search user interface capable of real-time suggestions in response
2560to user input. Device implementations SHOULD implement the APIs that allow
2561developers to reuse this user interface to provide search within their own
2562applications. Device implementations that implement the global search interface
2563MUST implement the APIs that allow third-party applications to add suggestions
2564to the search box when it is run in global search mode. If no third-party
2565applications are installed that make use of this functionality, the default
2566behavior SHOULD be to display web search engine results and suggestions.
2567   </p>
2568   <p>
2569    Android device implementations SHOULD, and Android Automotive implementations
2570MUST, implement an assistant on the device to
2571handle the
2572    <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a>. 
2573   </p>
2574   <p>
2575    Android also includes the
2576    <a href="https://developer.android.com/reference/android/app/assist/package-summary.html">Assist APIs</a> to allow applications to elect how much information of the current context is
2577shared with the assistant on the device. Device implementations supporting the
2578Assist action MUST indicate clearly to the end user when the context is
2579shared by displaying a white light around the edges of the screen. To ensure
2580clear visibility to the end user, the indication MUST meet or exceed the
2581duration and brightness of the Android Open Source Project implementation.
2582   </p>
2583   <h3 id="3_8_5_toasts">
2584    3.8.5. Toasts
2585   </h3>
2586   <p>
2587    Applications can use the
2588    <a href="http://developer.android.com/reference/android/widget/Toast.html">&ldquo;Toast&rdquo; API</a> to
2589display short non-modal strings to the end user that disappear after a brief
2590period of time. Device implementations MUST display Toasts from applications to
2591end users in some high-visibility manner.
2592   </p>
2593   <h3 id="3_8_6_themes">
2594    3.8.6. Themes
2595   </h3>
2596   <p>
2597    Android provides &ldquo;themes&rdquo; as a mechanism for applications to apply styles across
2598an entire Activity or application.
2599   </p>
2600   <p>
2601    Android includes a &ldquo;Holo&rdquo; theme family as a set of defined styles for
2602application developers to use if they want to match the
2603    <a href="http://developer.android.com/guide/topics/ui/themes.html">Holo theme look and feel</a> as defined by the Android SDK. Device implementations MUST NOT alter any of the
2604    <a href="http://developer.android.com/reference/android/R.style.html">Holo theme attributes</a> exposed to applications.
2605   </p>
2606   <p>
2607    Android includes a &ldquo;Material&rdquo; theme family as a set of defined styles for
2608application developers to use if they want to match the design theme&rsquo;s look and
2609feel across the wide variety of different Android device types. Device
2610implementations MUST support the &ldquo;Material&rdquo; theme family and MUST NOT alter any
2611of the
2612    <a href="http://developer.android.com/reference/android/R.style.html#Theme_Material">Material theme attributes</a> or their assets exposed to applications.
2613   </p>
2614   <p>
2615    Android also includes a &ldquo;Device Default&rdquo; theme family as a set of defined styles
2616for application developers to use if they want to match the look and feel of the
2617device theme as defined by the device implementer. Device implementations MAY
2618modify the
2619    <a href="http://developer.android.com/reference/android/R.style.html">Device Default theme attributes</a> exposed
2620to applications.
2621   </p>
2622   <p>
2623    Android supports a variant theme with translucent system bars, which allows
2624application developers to fill the area behind the status and navigation bar
2625with their app content. To enable a consistent developer experience in this
2626configuration, it is important the status bar icon style is maintained across
2627different device implementations. Therefore, Android device implementations MUST
2628use white for system status icons (such as signal strength and battery level)
2629and notifications issued by the system, unless the icon is indicating a
2630problematic status or an app requests a light status bar using the
2631SYSTEM_UI_FLAG_LIGHT_STATUS_BAR flag. When an app requests a light status bar,
2632Android device implementations MUST change the color of the system status icons
2633to black (for details, refer to
2634    <a href="http://developer.android.com/reference/android/R.style.html">R.style</a> ).
2635   </p>
2636   <h3 id="3_8_7_live_wallpapers">
2637    3.8.7. Live Wallpapers
2638   </h3>
2639   <p>
2640    Android defines a component type and corresponding API and lifecycle that allows
2641applications to expose one or more
2642    <a href="http://developer.android.com/reference/android/service/wallpaper/WallpaperService.html">&ldquo;Live Wallpapers&rdquo;</a> to the end user. Live wallpapers are animations, patterns, or similar images
2643with limited input capabilities that display as a wallpaper, behind other
2644applications.
2645   </p>
2646   <p>
2647    Hardware is considered capable of reliably running live wallpapers if it can run
2648all live wallpapers, with no limitations on functionality, at a reasonable frame
2649rate with no adverse effects on other applications. If limitations in the
2650hardware cause wallpapers and/or applications to crash, malfunction, consume
2651excessive CPU or battery power, or run at unacceptably low frame rates, the
2652hardware is considered incapable of running live wallpaper. As an example, some
2653live wallpapers may use an OpenGL 2.0 or 3.x context to render their content.
2654Live wallpaper will not run reliably on hardware that does not support multiple
2655OpenGL contexts because the live wallpaper use of an OpenGL context may conflict
2656with other applications that also use an OpenGL context.
2657   </p>
2658   <p>
2659    Device implementations capable of running live wallpapers reliably as described
2660above SHOULD implement live wallpapers, and when implemented MUST report the
2661platform feature flag android.software.live_wallpaper.
2662   </p>
2663   <h3 id="3_8_8_activity_switching">
2664    3.8.8. Activity Switching
2665   </h3>
2666   <div class="note">
2667    As the Recent function navigation key is OPTIONAL, the requirement to implement
2668the overview screen is OPTIONAL for Android Watch and Android Automotive implementations,
2669and RECOMMENDED for Android Television devices. There SHOULD still be a
2670method to switch between activities on Android Automotive implementations.
2671   </div>
2672   <p>
2673    The upstream Android source code includes the
2674    <a href="http://developer.android.com/guide/components/recents.html">overview screen</a>,  a
2675system-level user interface for task switching and displaying recently accessed
2676activities and tasks using a thumbnail image of the application&rsquo;s graphical
2677state at the moment the user last left the application. Device implementations
2678including the recents function navigation key as detailed in
2679    <a href="#7_2_3_navigation_keys">section 7.2.3</a> MAY alter the interface but MUST meet the
2680following requirements:
2681   </p>
2682   <ul>
2683    <li>
2684     MUST support at least up to 20 displayed activities.
2685    </li>
2686    <li>
2687     MUST at least display the title of 4 activities at a time.
2688    </li>
2689    <li>
2690     MUST implement the
2691     <a href="http://developer.android.com/about/versions/android-5.0.html#ScreenPinning">screen pinning behavior</a> and provide the user with a settings menu to toggle the feature.
2692    </li>
2693    <li>
2694     SHOULD display highlight color, icon, screen title in recents.
2695    </li>
2696    <li>
2697     SHOULD display a closing affordance ("x") but MAY delay this until user interacts with screens.
2698    </li>
2699    <li>
2700     SHOULD implement a shortcut to switch easily to the previous activity
2701    </li>
2702    <li>
2703     MAY display affiliated recents as a group that moves together.
2704    </li>
2705   </ul>
2706   <p>
2707    Device implementations are STRONGLY RECOMMENDED to use the upstream Android user
2708interface (or a similar thumbnail-based interface) for the overview screen.
2709   </p>
2710   <h3 id="3_8_9_input_management">
2711    3.8.9. Input Management
2712   </h3>
2713   <p>
2714    Android includes support for
2715    <a href="http://developer.android.com/guide/topics/text/creating-input-method.html">Input Management</a> and support for third-party input method editors. Device implementations that
2716allow users to use third-party input methods on the device MUST declare the
2717platform feature android.software.input_methods and support IME APIs as defined
2718in the Android SDK documentation.
2719   </p>
2720   <p>
2721    Device implementations that declare the android.software.input_methods feature
2722MUST provide a user-accessible mechanism to add and configure third-party input
2723methods. Device implementations MUST display the settings interface in response
2724to the android.settings.INPUT_METHOD_SETTINGS intent.
2725   </p>
2726   <h3 id="3_8_10_lock_screen_media_control">
2727    3.8.10. Lock Screen Media Control
2728   </h3>
2729   <p>
2730    The Remote Control Client API is deprecated from Android 5.0 in favor of the
2731    <a href="http://developer.android.com/reference/android/app/Notification.MediaStyle.html">Media Notification Template</a> that allows media applications to integrate with playback controls that are
2732displayed on the lock screen. Device implementations that support a lock screen,
2733unless an Android Automotive or Watch implementation, MUST display the
2734Lock screen Notifications including the Media Notification Template.
2735   </p>
2736   <h3 id="3_8_11_screen_savers_(previously_dreams)">
2737    3.8.11. Screen savers (previously Dreams)
2738   </h3>
2739   <p>
2740    Android includes support for
2741    <a href="http://developer.android.com/reference/android/service/dreams/DreamService.html">interactivescreensavers</a>, 
2742previously referred to as Dreams. Screen savers allow users to interact with
2743applications when a device connected to a power source is idle or docked in a
2744desk dock.  Android Watch devices MAY implement screen savers, but other types
2745of device implementations SHOULD include support for screen savers and provide
2746a settings option for users toconfigure screen savers in response to the
2747    <code>
2748     android.settings.DREAM_SETTINGS
2749    </code>
2750    intent.
2751   </p>
2752   <h3 id="3_8_12_location">
2753    3.8.12. Location
2754   </h3>
2755   <p>
2756    When a device has a hardware sensor (e.g. GPS) that is capable of providing the
2757location coordinates,
2758    <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE">location modes</a> MUST be displayed in the Location menu within Settings.
2759   </p>
2760   <h3 id="3_8_13_unicode_and_font">
2761    3.8.13. Unicode and Font
2762   </h3>
2763   <p>
2764    Android includes support for the emoji characters defined in
2765    <a href="http://www.unicode.org/versions/Unicode9.0.0/">Unicode 9.0</a>.  All device
2766implementations MUST be capable of rendering these emoji characters
2767in color glyph and when Android device implementations include an IME,
2768it SHOULD provide an input method to the user for these emoji characters.
2769   </p>
2770   <p>
2771    Android handheld devices SHOULD support the skin tone and diverse family emojis
2772as specified in the
2773    <a href="http://unicode.org/reports/tr51">Unicode Technical Report #51</a>. 
2774   </p>
2775   <p>
2776    Android includes support for Roboto 2 font with different
2777weights&mdash;sans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black,
2778sans-serif-condensed, sans-serif-condensed-light&mdash;which MUST all be included for
2779the languages available on the device and full Unicode 7.0 coverage of Latin,
2780Greek, and Cyrillic, including the Latin Extended A, B, C, and D ranges, and all
2781glyphs in the currency symbols block of Unicode 7.0.
2782   </p>
2783   <h3 id="3_8_14_multi-windows">
2784    3.8.14. Multi-windows
2785   </h3>
2786   <p>
2787    A device implementation MAY choose not to implement any multi-window modes, but
2788if it has the capability to display multiple activities at the same time it
2789MUST implement such multi-window mode(s) in accordance with the application
2790behaviors and APIs described in the Android SDK
2791    <a href="https://developer.android.com/preview/features/multi-window.html">multi-window mode support documentation</a> and meet the following requirements:
2792   </p>
2793   <ul>
2794    <li>
2795     Applications can indicate whether they are capable of operating in
2796    multi-window mode in the AndroidManifest.xml file, either explicitly via the
2797     <a href="https://developer.android.com/reference/android/R.attr.html#resizeableActivity">
2798      <code>android:resizeableActivity</code></a>
2799     attribute or implicitly by having the targetSdkVersion &gt; 24. Apps that
2800    explicitly set this attribute to false in their manifest MUST not be
2801    launched in multi-window mode. Apps that don't set the attribute in their
2802    manifest file (targetSdkVersion &lt; 24) can be launched in multi-window mode,
2803    but the system MUST provide warning that the app may not work as expected in
2804    multi-window mode.
2805    </li>
2806    <li>
2807     Device implementations MUST NOT offer split-screen or freeform mode
2808    if both the screen height and width is less than 440 dp.
2809    </li>
2810    <li>
2811     Device implementations with screen size
2812     <code>
2813      xlarge
2814     </code>
2815     SHOULD support freeform mode.
2816    </li>
2817    <li>
2818     Android Television device implementations MUST support picture-in-picture (PIP) mode multi-window
2819    and place the PIP multi-window in the top right corner when PIP is ON.
2820    </li>
2821    <li>
2822     Device implementations with PIP mode multi-window support
2823    MUST allocate at least 240x135 dp for the PIP window.
2824    </li>
2825    <li>
2826     If the PIP multi-window mode is supported the
2827     <a href="https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_WINDOW">
2828      <code>KeyEvent.KEYCODE_WINDOW</code></a> key MUST be used to control the PIP window; otherwise, the key MUST be
2829    available to the foreground activity.
2830    </li>
2831   </ul>
2832   <h2 id="3_9_device_administration">
2833    3.9. Device Administration
2834   </h2>
2835   <p>
2836    Android includes features that allow security-aware applications to perform
2837device administration functions at the system level, such as enforcing password
2838policies or performing remote wipe, through the
2839    <a href="http://developer.android.com/guide/topics/admin/device-admin.html">Android Device Administration API</a> ].
2840Device implementations MUST provide an implementation of the
2841    <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">DevicePolicyManager</a> class. Device implementations that supports a secure lock screen MUST implement
2842the full range of
2843    <a href="http://developer.android.com/guide/topics/admin/device-admin.html">device administration</a> policies defined in the Android SDK documentation and report the platform
2844feature android.software.device_admin.
2845   </p>
2846   <h3 id="3_9_1_device_provisioning">
2847    3.9.1 Device Provisioning
2848   </h3>
2849   <h4 id="3_9_1_1_device_owner_provisioning">
2850    3.9.1.1 Device owner provisioning
2851   </h4>
2852   <p>
2853    If a device implementation declares the
2854    <code>
2855     android.software.device_admin
2856    </code>
2857    feature
2858then it MUST implement the provisioning of the
2859    <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)">Device Owner app</a> of a Device Policy Client (DPC) application as indicated below:
2860   </p>
2861   <ul>
2862    <li>
2863     When the device implementation has no user data configured yet, it:
2864     <ul>
2865      <li>
2866       MUST report
2867       <code>
2868        true
2869       </code>
2870       for
2871       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProvisioningAllowed(java.lang.String)">
2872        DevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE)</a>.
2873      </li>
2874      <li>
2875       MUST enroll the DPC application as the Device Owner app in response to
2876     the intent action
2877       <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_DEVICE">
2878        android.app.action.PROVISION_MANAGED_DEVICE</a>.
2879      </li>
2880      <li>
2881       MUST enroll the DPC application as the Device Owner app if the device
2882     declares Near-Field Communications (NFC) support via the feature flag
2883     android.hardware.nfc and receives an NFC message containing a record
2884     with MIME type
2885       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#MIME_TYPE_PROVISIONING_NFC">
2886        MIME_TYPE_PROVISIONING_NFC</a>.
2887      </li>
2888     </ul>
2889    </li>
2890    <li>
2891     When the device implementation has user data, it:
2892     <ul>
2893      <li>
2894       MUST report
2895       <code>
2896        false
2897       </code>
2898       for the
2899       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProvisioningAllowed(java.lang.String)">
2900        DevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE)</a>.
2901      </li>
2902      <li>
2903       MUST not enroll any DPC application as the Device Owner App any more.
2904      </li>
2905     </ul>
2906    </li>
2907   </ul>
2908   <p>
2909    Device implementations MAY have a preinstalled application performing device
2910administration functions but this application MUST NOT be set as the Device
2911Owner app without explicit consent or action from the user or the administrator
2912of the device.
2913   </p>
2914   <h4 id="3_9_1_2_managed_profile_provisioning">
2915    3.9.1.2 Managed profile provisioning
2916   </h4>
2917   <p>
2918    If a device implementation declares the android.software.managed_users, it MUST
2919be possible to enroll a Device Policy Controller (DPC) application as the
2920    <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProfileOwnerApp(java.lang.String)">owner of a new Managed Profile</a>. 
2921   </p>
2922   <p>
2923    The managed profile provisioning process (the flow initiated by
2924    <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">android.app.action.PROVISION_MANAGED_PROFILE</a> )
2925user experience MUST align with the AOSP implementation.
2926   </p>
2927   <p>
2928    Device implementations MUST provide the following user affordances within the
2929Settings user interface to indicate to the user when a particular system function
2930has been disabled by the Device Policy Controller (DPC):
2931   </p>
2932   <ul>
2933    <li>
2934     A consistent icon or other user affordance (for example the upstream AOSP
2935     info icon) to represent when a particular setting is restricted by a
2936     Device Admin.
2937    </li>
2938    <li>
2939     A short explanation message, as provided by the Device Admin via the
2940     <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setShortSupportMessage%28android.content.ComponentName, java.lang.CharSequence%29">
2941      <code> setShortSupportMessage</code></a>.
2942    </li>
2943    <li>
2944     The DPC application&rsquo;s icon.
2945    </li>
2946   </ul>
2947   <h2 id="3_9_2_managed_profile_support">
2948    3.9.2 Managed Profile Support
2949   </h2>
2950   <p>
2951    Managed profile capable devices are those devices that:
2952   </p>
2953   <ul>
2954    <li>
2955     Declare android.software.device_admin (see
2956     <a href="#3_9_device_administration">section 3.9 Device Administration</a> ).
2957    </li>
2958    <li>
2959     Are not low RAM devices (see
2960     <a href="#7_6_1_minimum_memory_and_storage">section 7.6.1</a> ).
2961    </li>
2962    <li>
2963     Allocate internal (non-removable) storage as shared storage (see
2964     <a href="#7_6_2_application_shared_storage">section 7.6.2</a> ).
2965    </li>
2966   </ul>
2967   <p>
2968    Managed profile capable devices MUST:
2969   </p>
2970   <ul>
2971    <li>
2972     Declare the platform feature flag
2973     <code>
2974      android.software.managed_users
2975     </code>.
2976    </li>
2977    <li>
2978     Support managed profiles via the
2979     <code>
2980      android.app.admin.DevicePolicyManager
2981     </code>
2982     APIs.
2983    </li>
2984    <li>
2985     Allow one and only
2986     <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">one managed profile to be created</a>. 
2987    </li>
2988    <li>
2989     Use an icon badge (similar to the AOSP upstream work badge) to represent the
2990    managed applications and widgets and other badged UI elements like
2991    Recents &amp; Notifications.
2992    </li>
2993    <li>
2994     Display a notification icon (similar to the AOSP upstream work badge) to
2995    indicate when user is within a managed profile application.
2996    </li>
2997    <li>
2998     Display a toast indicating that the user is in the managed profile if and
2999    when the device wakes up (ACTION_USER_PRESENT) and the foreground
3000    application is within the managed profile.
3001    </li>
3002    <li>
3003     Where a managed profile exists, show a visual affordance in the Intent
3004    'Chooser' to allow the user to forward the intent from the managed profile
3005    to the primary user or vice versa, if enabled by the Device Policy
3006    Controller.
3007    </li>
3008    <li>
3009     Where a managed profile exists, expose the following user affordances for
3010    both the primary user and the managed profile:
3011     <ul>
3012      <li>
3013       Separate accounting for battery, location, mobile data and storage usage
3014    for the primary user and managed profile.
3015      </li>
3016      <li>
3017       Independent management of VPN Applications installed within the primary
3018    user or managed profile.
3019      </li>
3020      <li>
3021       Independent management of applications installed within the primary user
3022    or managed profile.
3023      </li>
3024      <li>
3025       Independent management of accounts within the primary user or managed
3026    profile.
3027      </li>
3028     </ul>
3029    </li>
3030    <li>
3031     Ensure the preinstalled dialer, contacts and messaging applications can
3032    search for and look up caller information from the managed profile (if one
3033    exists) alongside those from the primary profile, if the Device Policy
3034    Controller permits it. When contacts from the managed profile are displayed
3035    in the preinstalled call log, in-call UI, in-progress and missed-call
3036    notifications, contacts and messaging apps they SHOULD be badged with the
3037    same badge used to indicate managed profile applications.
3038    </li>
3039    <li>
3040     MUST ensure that it satisfies all the security requirements applicable for a
3041    device with multiple users enabled (see
3042     <a href="#9_5_multi-user_support">section 9.5</a> ),
3043    even though the managed profile is not counted as another user in addition
3044    to the primary user.
3045    </li>
3046    <li>
3047     Support the ability to specify a separate lock screen meeting the following
3048    requirements to grant access to apps running in a managed profile.
3049     <ul>
3050      <li>
3051       Device implementations MUST honor the
3052       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_SET_NEW_PASSWORD">
3053        <code>DevicePolicyManager.ACTION_SET_NEW_PASSWORD</code></a>
3054       intent and show an interface to configure a separate lock screen
3055    credential for the managed profile.
3056      </li>
3057      <li>
3058       The lock screen credentials of the managed profile MUST use the same
3059    credential storage and management mechanisms as the parent profile,
3060    as documented on the
3061       <a href="http://source.android.com/security/authentication/index.html">Android Open Source Project Site</a> </li>
3062      <li>
3063       The DPC
3064       <a href="https://developer.android.com/guide/topics/admin/device-admin.html#pwd">password policies</a> MUST apply to only the managed profile's lock screen credentials unless
3065    called upon the
3066       <code>
3067        DevicePolicyManager
3068       </code>
3069       instance returned by
3070       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#getParentProfileInstance(android.content.ComponentName)">getParentProfileInstance</a>. 
3071      </li>
3072     </ul>
3073    </li>
3074   </ul>
3075   <h2 id="3_10_accessibility">
3076    3.10. Accessibility
3077   </h2>
3078   <p>
3079    Android provides an accessibility layer that helps users with disabilities to
3080navigate their devices more easily. In addition, Android provides platform APIs
3081that enable
3082    <a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">accessibility service implementations</a> to receive callbacks for user and system events and generate alternate feedback
3083mechanisms, such as text-to-speech, haptic feedback, and trackball/d-pad
3084navigation.
3085   </p>
3086   <p>
3087    Device implementations include the following requirements:
3088   </p>
3089   <ul>
3090    <li>
3091     Android Automotive implementations SHOULD provide an implementation of the
3092    Android accessibility framework consistent with the default Android
3093    implementation.
3094    </li>
3095    <li>
3096     Device implementations (Android Automotive excluded) MUST provide an
3097    implementation of the Android accessibility framework consistent with the
3098    default Android implementation.
3099    </li>
3100    <li>
3101     Device implementations (Android Automotive excluded) MUST support
3102    third-party accessibility service implementations through the
3103     <a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">android.accessibilityservice APIs</a>. 
3104    </li>
3105    <li>
3106     Device implementations (Android Automotive excluded) MUST generate
3107    AccessibilityEvents and deliver these events to all registered
3108    AccessibilityService implementations in a manner consistent with the default
3109    Android implementation
3110    </li>
3111    <li>
3112     <p>
3113      Device implementations (Android Automotive and Android Watch devices with no
3114    audio output excluded), MUST provide a user-accessible mechanism to enable
3115    and disable accessibility services, and MUST display this interface in
3116    response to the android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS
3117    intent.
3118     </p>
3119    </li>
3120    <li>
3121     <p>
3122      Android device implementations with audio output are STRONGLY RECOMMENDED to provide
3123  implementations of accessibility services on the device comparable in or exceeding functionality
3124  of the TalkBack** and Switch Access accessibility services (https://github.com/google/talkback).
3125     </p>
3126    </li>
3127    <li>
3128     Android Watch devices with audio output SHOULD provide implementations of an accessibility service
3129  on the device comparable in or exceeding functionality of the TalkBack accessibility service
3130  (https://github.com/google/talkback).
3131    </li>
3132    <li>
3133     Device implementations SHOULD provide a mechanism in the out-of-box setup flow for users to enable
3134  relevant accessibility services, as well as options to adjust the font size, display size and
3135  magnification gestures.
3136    </li>
3137   </ul>
3138   <p>
3139    ** For languages supported by Text-to-speech.
3140   </p>
3141   <p>
3142    Also, note that if there is a preloaded accessibility service, it MUST be a Direct Boot aware
3143{directBootAware} app if the device has encrypted storage using File Based
3144Encryption (FBE).
3145   </p>
3146   <h2 id="3_11_text-to-speech">
3147    3.11. Text-to-Speech
3148   </h2>
3149   <p>
3150    Android includes APIs that allow applications to make use of text-to-speech
3151(TTS) services and allows service providers to provide implementations of TTS
3152services. Device implementations reporting the feature
3153android.hardware.audio.output MUST meet these requirements related to the
3154    <a href="http://developer.android.com/reference/android/speech/tts/package-summary.html">Android TTS framework</a>. 
3155   </p>
3156   <p>
3157    Android Automotive implementations:
3158   </p>
3159   <ul>
3160    <li>
3161     MUST support the Android TTS framework APIs.
3162    </li>
3163    <li>
3164     MAY support installation of third-party TTS engines. If supported, partners
3165    MUST provide a user-accessible interface that allows the user to select a
3166    TTS engine for use at system level.
3167    </li>
3168   </ul>
3169   <p>
3170    All other device implementations:
3171   </p>
3172   <ul>
3173    <li>
3174     MUST support the Android TTS framework APIs and SHOULD include a TTS engine
3175    supporting the languages available on the device. Note that the upstream
3176    Android open source software includes a full-featured TTS engine
3177    implementation.
3178    </li>
3179    <li>
3180     MUST support installation of third-party TTS engines.
3181    </li>
3182    <li>
3183     MUST provide a user-accessible interface that allows users to select a TTS
3184    engine for use at the system level.
3185    </li>
3186   </ul>
3187   <h2 id="3_12_tv_input_framework">
3188    3.12. TV Input Framework
3189   </h2>
3190   <p>
3191    The
3192    <a href="http://source.android.com/devices/tv/index.html">Android Television Input Framework (TIF)</a> simplifies the delivery of live content to Android Television devices. TIF
3193provides a standard API to create input modules that control Android Television
3194devices. Android Television device implementations MUST support TV Input
3195Framework.
3196   </p>
3197   <p>
3198    Device implementations that support TIF MUST declare the platform feature
3199android.software.live_tv.
3200   </p>
3201   <h3 id="3_12_1_tv_app">
3202    3.12.1. TV App
3203   </h3>
3204   <p>
3205    Any device implementation that declares support for Live TV MUST have an
3206installed TV application (TV App). The Android Open Source Project provides an
3207implementation of the TV App.
3208   </p>
3209   <p>
3210    The TV App MUST provide facilities to install and use
3211    <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html">TV Channels</a> and meet the following requirements:
3212   </p>
3213   <ul>
3214    <li>
3215     Device implementations MUST allow third-party TIF-based inputs
3216    (<a href="https://source.android.com/devices/tv/index.html#third-party_input_example">third-party inputs</a>)
3217    to be installed and managed.
3218    </li>
3219    <li>
3220     Device implementations MAY provide visual separation between pre-installed
3221     <a href="https://source.android.com/devices/tv/index.html#tv_inputs">TIF-based inputs</a> (installed inputs) and third-party inputs.
3222    </li>
3223    <li>
3224     Device implementations MUST NOT display the third-party inputs more than a
3225    single navigation action away from the TV App (i.e. expanding a list of
3226    third-party inputs from the TV App).
3227    </li>
3228   </ul>
3229   <h4 id="3_12_1_1_electronic_program_guide">
3230    3.12.1.1. Electronic Program Guide
3231   </h4>
3232   <p>
3233    Android Television device implementations MUST show an informational and
3234interactive overlay, which MUST include an electronic program guide (EPG)
3235generated from the values in the
3236    <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html">TvContract.Programs</a> fields. The EPG MUST meet the following requirements:
3237   </p>
3238   <ul>
3239    <li>
3240     The EPG MUST display information from all installed inputs and third-party
3241    inputs.
3242    </li>
3243    <li>
3244     The EPG MAY provide visual separation between the installed inputs and
3245    third-party inputs.
3246    </li>
3247    <li>
3248     The EPG is STRONGLY RECOMMENDED to display installed inputs and third-party
3249    inputs with equal prominence. The EPG MUST NOT display the third-party
3250    inputs more than a single navigation action away from the installed inputs
3251    on the EPG.
3252    </li>
3253    <li>
3254     On channel change, device implementations MUST display EPG data for the
3255    currently playing program.
3256    </li>
3257   </ul>
3258   <h4 id="3_12_1_2_navigation">
3259    3.12.1.2. Navigation
3260   </h4>
3261   <p>
3262    The TV App MUST allow navigation for the following functions via the D-pad,
3263Back, and Home keys on the Android Television device&rsquo;s input device(s)
3264(i.e. remote control, remote control application, or game controller):
3265   </p>
3266   <ul>
3267    <li>
3268     Changing TV channels
3269    </li>
3270    <li>
3271     Opening EPG
3272    </li>
3273    <li>
3274     Configuring and tuning to third-party TIF-based inputs
3275    </li>
3276    <li>
3277     Opening Settings menu
3278    </li>
3279   </ul>
3280   <p>
3281    The TV App SHOULD pass key events to HDMI inputs through CEC.
3282   </p>
3283   <h4 id="3_12_1_3_tv_input_app_linking">
3284    3.12.1.3. TV input app linking
3285   </h4>
3286   <p>
3287    Android Television device implementations MUST support
3288    <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_APP_LINK_INTENT_URI">TV input app linking</a>, 
3289which allows all inputs to provide activity links from the current activity to
3290another activity (i.e. a link from live programming to related content). The TV
3291App MUST show TV input app linking when it is provided.
3292   </p>
3293   <h4 id="3_12_1_4_time_shifting">
3294    3.12.1.4. Time shifting
3295   </h4>
3296   <p>
3297    Android Television device implementations MUST support time shifting, which
3298allows the user to pause and resume live content. Device implementations MUST
3299provide the user a way to pause and resume the currently playing program, if
3300time shifting for that program
3301    <a href="https://developer.android.com/reference/android/media/tv/TvInputManager.html#TIME_SHIFT_STATUS_AVAILABLE">is available</a>. 
3302   </p>
3303   <h4 id="3_12_1_5_tv_recording">
3304    3.12.1.5. TV recording
3305   </h4>
3306   <p>
3307    Android Television device implementations are STRONGLY RECOMMENDED to support
3308TV recording. If the TV input supports recording, the EPG MAY provide a way to
3309    <a href="https://developer.android.com/reference/android/media/tv/TvInputInfo.html#canRecord()">record a program</a> if the recording of such a program is not
3310    <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html#COLUMN_RECORDING_PROHIBITED">prohibited</a>. 
3311Device implementations SHOULD provide a user interface to play recorded programs.
3312   </p>
3313   <h2 id="3_13_quick_settings">
3314    3.13. Quick Settings
3315   </h2>
3316   <p>
3317    Android device implementations SHOULD include a Quick Settings UI component that
3318allow quick access to frequently used or urgently needed actions.
3319   </p>
3320   <p>
3321    Android includes the
3322    <a href="https://developer.android.com/reference/android/service/quicksettings/package-summary.html">
3323     <code>quicksettings</code></a> API allowing third party apps to implement tiles that can be added by the user
3324alongside the system-provided tiles in the Quick Settings UI component. If a
3325device implementation has a Quick Settings UI component, it:
3326   </p>
3327   <ul>
3328    <li>
3329     MUST allow the user to add or remove tiles from a third-party app to Quick
3330    Settings.
3331    </li>
3332    <li>
3333     MUST NOT automatically add a tile from a third-party app directly to Quick
3334    Settings.
3335    </li>
3336    <li>
3337     MUST display all the user-added tiles from third-party apps alongside the
3338    system-provided quick setting tiles.
3339    </li>
3340   </ul>
3341   <h2 id="3_14_vehicle_ui_apis">
3342    3.14. Vehicle UI APIs
3343   </h2>
3344   <h3 id="3_14_1__vehicle_media_ui">
3345    3.14.1.  Vehicle Media UI
3346   </h3>
3347   <p>
3348    Any device implementation that
3349    <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html?#FEATURE_AUTOMOTIVE?">declares automotive support</a> MUST include a UI framework to support third-party apps consuming the
3350    <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.html">MediaBrowser</a> and
3351    <a href="http://developer.android.com/reference/android/media/session/MediaSession.html">MediaSession</a> APIs.
3352   </p>
3353   <p>
3354    The UI framework supporting third-party apps that depend on MediaBrowser and
3355MediaSession has the following visual requirements:
3356   </p>
3357   <ul>
3358    <li>
3359     MUST display
3360     <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.MediaItem.html">MediaItem</a> icons and notification icons unaltered.
3361    </li>
3362    <li>
3363     MUST display those items as described by MediaSession, e.g., metadata, icons,
3364  imagery.
3365    </li>
3366    <li>
3367     MUST show app title.
3368    </li>
3369    <li>
3370     MUST have drawer to present
3371     <a href="http://developer.android.com/reference/android/media/browse/MediaBrowser.html">MediaBrowser</a> hierarchy.
3372    </li>
3373   </ul>
3374   <h1 id="4_application_packaging_compatibility">
3375    4. Application Packaging Compatibility
3376   </h1>
3377   <p>
3378    Device implementations MUST install and run Android &ldquo;.apk&rdquo; files as generated
3379by the &ldquo;aapt&rdquo; tool included in the
3380    <a href="http://developer.android.com/tools/help/index.html">
3381     official Android
3382SDK
3383    </a>
3384    . For this reason device
3385implementations SHOULD use the reference implementation&rsquo;s package management
3386system.
3387   </p>
3388   <p>
3389    The package manager MUST support verifying &ldquo;.apk&rdquo; files using the
3390    <a href="https://source.android.com/security/apksigning/v2.html">
3391     APK Signature
3392Scheme v2
3393    </a>
3394    .
3395   </p>
3396   <p>
3397    Devices implementations MUST NOT extend either the
3398    <a href="http://developer.android.com/guide/components/fundamentals.html">.apk</a>, 
3399    <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">Android Manifest</a>, 
3400    <a href="https://android.googlesource.com/platform/dalvik/">Dalvik bytecode</a>,  or
3401RenderScript bytecode formats in such a way that would prevent those files from
3402installing and running correctly on other compatible devices.
3403   </p>
3404   <h1 id="5_multimedia_compatibility">
3405    5. Multimedia Compatibility
3406   </h1>
3407   <h2 id="5_1_media_codecs">
3408    5.1. Media Codecs
3409   </h2>
3410   <p>
3411    Device implementations&mdash;
3412   </p>
3413   <ul>
3414    <li>
3415     <p>
3416      MUST support the
3417      <a href="http://developer.android.com/guide/appendix/media-formats.html">
3418       core media formats </a> specified in the Android SDK documentation, except where explicitly permitted
3419in this document.
3420     </p>
3421    </li>
3422    <li>
3423     <p>
3424      MUST support the media formats, encoders, decoders, file types, and
3425container formats defined in the tables below and reported via
3426      <a href="http://developer.android.com/reference/android/media/MediaCodecList.html">MediaCodecList</a>. 
3427     </p>
3428    </li>
3429    <li>
3430     <p>
3431      MUST also be able to decode all profiles reported in its
3432      <a href="http://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>.</p>
3433    </li>
3434    <li>
3435     <p>
3436      MUST be able to decode all formats it can encode. This includes all
3437    bitstreams that its encoders generate.
3438     </p>
3439    </li>
3440   </ul>
3441   <p>
3442    Codecs SHOULD aim for minimum codec latency, in other words, codecs&mdash;
3443   </p>
3444   <ul>
3445    <li>
3446     SHOULD NOT consume and store input buffers and return input buffers only
3447once processed
3448    </li>
3449    <li>
3450     SHOULD NOT hold onto decoded buffers for longer than as specified by the
3451standard (e.g. SPS).
3452    </li>
3453    <li>
3454     SHOULD NOT hold onto encoded buffers longer than required by the GOP
3455structure.
3456    </li>
3457   </ul>
3458   <p>
3459    All of the  codecs listed in the table below are provided as software
3460implementations in the preferred Android implementation from the Android Open
3461Source Project.
3462   </p>
3463   <p>
3464    Please note that neither Google nor the Open Handset Alliance make any
3465representation that these codecs are free from third-party patents. Those
3466intending to use this source code in hardware or software products are advised
3467that implementations of this code, including in open source software or
3468shareware, may require patent licenses from the relevant patent holders.
3469   </p>
3470   <h3 id="5_1_1_audio_codecs">
3471    5.1.1. Audio Codecs
3472   </h3>
3473   <table>
3474    <tr>
3475     <th>
3476      Format/Codec
3477     </th>
3478     <th>
3479      Encoder
3480     </th>
3481     <th>
3482      Decoder
3483     </th>
3484     <th>
3485      Details
3486     </th>
3487     <th>
3488      Supported File Types/Container Formats
3489     </th>
3490    </tr>
3491    <tr>
3492     <td>
3493      MPEG-4 AAC Profile
3494      <br/>
3495      (AAC LC)
3496     </td>
3497     <td>
3498      REQUIRED
3499      <sup>
3500       1
3501      </sup>
3502     </td>
3503     <td>
3504      REQUIRED
3505     </td>
3506     <td>
3507      Support for mono/stereo/5.0/5.1
3508      <sup>
3509       2
3510      </sup>
3511      content with standard
3512    sampling rates from 8 to 48 kHz.
3513     </td>
3514     <td>
3515      <ul>
3516       <li class="table_list">
3517        3GPP (.3gp)
3518       </li>
3519       <li class="table_list">
3520        MPEG-4 (.mp4, .m4a)
3521       </li>
3522       <li class="table_list">
3523        ADTS raw AAC (.aac, decode in Android 3.1+, encode in
3524    Android 4.0+, ADIF not supported)
3525       </li>
3526       <li class="table_list">
3527        MPEG-TS (.ts, not seekable, Android 3.0+)
3528       </li>
3529      </ul>
3530     </td>
3531    </tr>
3532    <tr>
3533     <td>
3534      MPEG-4 HE AAC Profile (AAC+)
3535     </td>
3536     <td>
3537      REQUIRED
3538      <sup>
3539       1
3540      </sup>
3541      <br/>
3542      (Android 4.1+)
3543     </td>
3544     <td>
3545      REQUIRED
3546     </td>
3547     <td>
3548      Support for mono/stereo/5.0/5.1
3549      <sup>
3550       2
3551      </sup>
3552      content with standard
3553    sampling rates from 16 to 48 kHz.
3554     </td>
3555     <td>
3556     </td>
3557    </tr>
3558    <tr>
3559     <td>
3560      MPEG-4 HE AACv2
3561      <br/>
3562      Profile (enhanced AAC+)
3563     </td>
3564     <td>
3565     </td>
3566     <td>
3567      REQUIRED
3568     </td>
3569     <td>
3570      Support for mono/stereo/5.0/5.1
3571      <sup>
3572       2
3573      </sup>
3574      content with standard
3575    sampling rates from 16 to 48 kHz.
3576     </td>
3577     <td>
3578     </td>
3579    </tr>
3580    <tr>
3581     <td>
3582      AAC ELD (enhanced low delay AAC)
3583     </td>
3584     <td>
3585      REQUIRED
3586      <sup>
3587       1
3588      </sup>
3589      <br/>
3590      (Android 4.1+)
3591     </td>
3592     <td>
3593      REQUIRED
3594      <br/>
3595      (Android 4.1+)
3596     </td>
3597     <td>
3598      Support for mono/stereo content with standard sampling rates from 16 to
3599    48 kHz.
3600     </td>
3601     <td>
3602     </td>
3603    </tr>
3604    <tr>
3605     <td>
3606      AMR-NB
3607     </td>
3608     <td>
3609      REQUIRED
3610      <sup>
3611       3
3612      </sup>
3613     </td>
3614     <td>
3615      REQUIRED
3616      <sup>
3617       3
3618      </sup>
3619     </td>
3620     <td>
3621      4.75 to 12.2 kbps sampled @ 8 kHz
3622     </td>
3623     <td>
3624      3GPP (.3gp)
3625     </td>
3626    </tr>
3627    <tr>
3628     <td>
3629      AMR-WB
3630     </td>
3631     <td>
3632      REQUIRED
3633      <sup>
3634       3
3635      </sup>
3636     </td>
3637     <td>
3638      REQUIRED
3639      <sup>
3640       3
3641      </sup>
3642     </td>
3643     <td>
3644      9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16 kHz
3645     </td>
3646     <td>
3647     </td>
3648    </tr>
3649    <tr>
3650     <td>
3651      FLAC
3652     </td>
3653     <td>
3654     </td>
3655     <td>
3656      REQUIRED
3657      <br/>
3658      (Android 3.1+)
3659     </td>
3660     <td>
3661      Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1
3662    kHz is RECOMMENDED on devices with 44.1 kHz output, as the 48 to 44.1 kHz
3663    downsampler does not include a low-pass filter). 16-bit RECOMMENDED; no
3664    dither applied for 24-bit.
3665     </td>
3666     <td>
3667      FLAC (.flac) only
3668     </td>
3669    </tr>
3670    <tr>
3671     <td>
3672      MP3
3673     </td>
3674     <td>
3675     </td>
3676     <td>
3677      REQUIRED
3678     </td>
3679     <td>
3680      Mono/Stereo 8-320Kbps constant (CBR) or variable bitrate (VBR)
3681     </td>
3682     <td>
3683      MP3 (.mp3)
3684     </td>
3685    </tr>
3686    <tr>
3687     <td>
3688      MIDI
3689     </td>
3690     <td>
3691     </td>
3692     <td>
3693      REQUIRED
3694     </td>
3695     <td>
3696      MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for
3697    ringtone formats RTTTL/RTX, OTA, and iMelody
3698     </td>
3699     <td>
3700      <ul>
3701       <li class="table_list">
3702        Type 0 and 1 (.mid, .xmf, .mxmf)
3703       </li>
3704       <li class="table_list">
3705        RTTTL/RTX (.rtttl, .rtx)
3706       </li>
3707       <li class="table_list">
3708        OTA (.ota)
3709       </li>
3710       <li class="table_list">
3711        iMelody (.imy)
3712       </li>
3713      </ul>
3714     </td>
3715    </tr>
3716    <tr>
3717     <td>
3718      Vorbis
3719     </td>
3720     <td>
3721     </td>
3722     <td>
3723      REQUIRED
3724     </td>
3725     <td>
3726     </td>
3727     <td>
3728      <ul>
3729       <li class="table_list">
3730        Ogg (.ogg)
3731       </li>
3732       <li class="table_list">
3733        Matroska (.mkv, Android 4.0+)
3734       </li>
3735      </ul>
3736     </td>
3737    </tr>
3738    <tr>
3739     <td>
3740      PCM/WAVE
3741     </td>
3742     <td>
3743      REQUIRED
3744      <sup>
3745       4
3746      </sup>
3747      <br/>
3748      (Android 4.1+)
3749     </td>
3750     <td>
3751      REQUIRED
3752     </td>
3753     <td>
3754      16-bit linear PCM (rates up to limit of hardware). Devices MUST support
3755    sampling rates for raw PCM recording at 8000, 11025, 16000, and 44100 Hz
3756    frequencies.
3757     </td>
3758     <td>
3759      WAVE (.wav)
3760     </td>
3761    </tr>
3762    <tr>
3763     <td>
3764      Opus
3765     </td>
3766     <td>
3767     </td>
3768     <td>
3769      REQUIRED
3770      <br/>
3771      (Android 5.0+)
3772     </td>
3773     <td>
3774     </td>
3775     <td>
3776      Matroska (.mkv), Ogg(.ogg)
3777     </td>
3778    </tr>
3779   </table>
3780   <p class="table_footnote">
3781    1 Required for device implementations that define
3782android.hardware.microphone but optional for Android Watch device
3783implementations.
3784   </p>
3785   <p class="table_footnote">
3786    2 Recording or playback MAY be performed in mono
3787or stereo, but the decoding of AAC input buffers of multichannel streams
3788(i.e. more than two channels) to PCM through the default AAC audio decoder
3789in the android.media.MediaCodec API, the following MUST be supported:
3790   </p>
3791   <ul class="table_footnote">
3792    <li>
3793     decoding is performed without downmixing (e.g. a 5.0 AAC stream must be
3794decoded to five channels of PCM, a 5.1 AAC stream must be decoded to six
3795channels of PCM),
3796    </li>
3797    <li>
3798     dynamic range metadata, as defined in "Dynamic Range Control (DRC)"
3799in ISO/IEC 14496-3, and the android.media.MediaFormat DRC keys to
3800configure the dynamic range-related behaviors of the audio decoder. The
3801AAC DRC keys were introduced in API 21,and are:
3802KEY_AAC_DRC_ATTENUATION_FACTOR, KEY_AAC_DRC_BOOST_FACTOR,
3803KEY_AAC_DRC_HEAVY_COMPRESSION, KEY_AAC_DRC_TARGET_REFERENCE_LEVEL and
3804KEY_AAC_ENCODED_TARGET_LEVEL
3805    </li>
3806   </ul>
3807   <p class="table_footnote">
3808    3 Required for Android Handheld device
3809implementations.
3810   </p>
3811   <p class="table_footnote">
3812    4 Required for device implementations that define
3813android.hardware.microphone, including Android Watch device implementations.
3814   </p>
3815   <h3 id="5_1_2_image_codecs">
3816    5.1.2. Image Codecs
3817   </h3>
3818   <table>
3819    <tr>
3820     <th>
3821      Format/Codec
3822     </th>
3823     <th>
3824      Encoder
3825     </th>
3826     <th>
3827      Decoder
3828     </th>
3829     <th>
3830      Details
3831     </th>
3832     <th>
3833      Supported File Types/Container Formats
3834     </th>
3835    </tr>
3836    <tr>
3837     <td>
3838      JPEG
3839     </td>
3840     <td>
3841      REQUIRED
3842     </td>
3843     <td>
3844      REQUIRED
3845     </td>
3846     <td>
3847      Base+progressive
3848     </td>
3849     <td>
3850      JPEG (.jpg)
3851     </td>
3852    </tr>
3853    <tr>
3854     <td>
3855      GIF
3856     </td>
3857     <td>
3858     </td>
3859     <td>
3860      REQUIRED
3861     </td>
3862     <td>
3863     </td>
3864     <td>
3865      GIF (.gif)
3866     </td>
3867    </tr>
3868    <tr>
3869     <td>
3870      PNG
3871     </td>
3872     <td>
3873      REQUIRED
3874     </td>
3875     <td>
3876      REQUIRED
3877     </td>
3878     <td>
3879     </td>
3880     <td>
3881      PNG (.png)
3882     </td>
3883    </tr>
3884    <tr>
3885     <td>
3886      BMP
3887     </td>
3888     <td>
3889     </td>
3890     <td>
3891      REQUIRED
3892     </td>
3893     <td>
3894     </td>
3895     <td>
3896      BMP (.bmp)
3897     </td>
3898    </tr>
3899    <tr>
3900     <td>
3901      WebP
3902     </td>
3903     <td>
3904      REQUIRED
3905     </td>
3906     <td>
3907      REQUIRED
3908     </td>
3909     <td>
3910     </td>
3911     <td>
3912      WebP (.webp)
3913     </td>
3914    </tr>
3915    <tr>
3916     <td>
3917      Raw
3918     </td>
3919     <td>
3920     </td>
3921     <td>
3922      REQUIRED
3923     </td>
3924     <td>
3925     </td>
3926     <td>
3927      ARW (.arw), CR2 (.cr2), DNG (.dng), NEF (.nef), NRW (.nrw), ORF (.orf),
3928        PEF (.pef), RAF (.raf), RW2 (.rw2), SRW (.srw)
3929     </td>
3930    </tr>
3931   </table>
3932   <h3 id="5_1_3_video_codecs">
3933    5.1.3. Video Codecs
3934   </h3>
3935   <ul>
3936    <li>
3937     <p>
3938      Codecs advertising HDR profile support MUST support HDR static metadata
3939parsing and handling.
3940     </p>
3941    </li>
3942    <li>
3943     <p>
3944      If a media codec advertises intra refresh support, then it MUST support the
3945refresh periods in the range of 10 - 60 frames and accurately operate within
394620% of configured refresh period.
3947     </p>
3948    </li>
3949    <li>
3950     <p>
3951      Video codecs MUST support output and input bytebuffer sizes that
3952accommodate the largest feasible compressed and uncompressed frame as dictated
3953by the standard and configuration but also not overallocate.
3954     </p>
3955    </li>
3956    <li>
3957     <p>
3958      Video encoders and decoders MUST support YUV420 flexible color format
3959(COLOR_FormatYUV420Flexible).
3960     </p>
3961    </li>
3962   </ul>
3963   <table>
3964    <tr>
3965     <th>
3966      Format/Codec
3967     </th>
3968     <th>
3969      Encoder
3970     </th>
3971     <th>
3972      Decoder
3973     </th>
3974     <th>
3975      Details
3976     </th>
3977     <th>
3978      Supported File Types/
3979      <br/>
3980      Container Formats
3981     </th>
3982    </tr>
3983    <tr>
3984     <td>
3985      H.263
3986     </td>
3987     <td>
3988      MAY
3989     </td>
3990     <td>
3991      MAY
3992     </td>
3993     <td>
3994     </td>
3995     <td>
3996      <ul>
3997       <li class="table_list">
3998        3GPP (.3gp)
3999       </li>
4000       <li class="table_list">
4001        MPEG-4 (.mp4)
4002       </li>
4003      </ul>
4004     </td>
4005    </tr>
4006    <tr>
4007     <td>
4008      H.264 AVC
4009     </td>
4010     <td>
4011      REQUIRED
4012      <sup>
4013       2
4014      </sup>
4015     </td>
4016     <td>
4017      REQUIRED
4018      <sup>
4019       2
4020      </sup>
4021     </td>
4022     <td>
4023      See
4024      <a href="#5_2_video_encoding">section 5.2</a> and
4025      <a href="#5_3_video_decoding">5.3</a> for details
4026     </td>
4027     <td>
4028      <ul>
4029       <li class="table_list">
4030        3GPP (.3gp)
4031       </li>
4032       <li class="table_list">
4033        MPEG-4 (.mp4)
4034       </li>
4035       <li class="table_list">
4036        MPEG-2 TS (.ts, AAC audio only, not seekable, Android
4037    3.0+)
4038       </li>
4039      </ul>
4040     </td>
4041    </tr>
4042    <tr>
4043     <td>
4044      H.265 HEVC
4045     </td>
4046     <td>
4047     </td>
4048     <td>
4049      REQUIRED
4050      <sup>
4051       5
4052      </sup>
4053     </td>
4054     <td>
4055      See
4056      <a href="#5_3_video_decoding">section 5.3</a> for details
4057     </td>
4058     <td>
4059      MPEG-4 (.mp4)
4060     </td>
4061    </tr>
4062    <tr>
4063     <td>
4064      MPEG-2
4065     </td>
4066     <td>
4067     </td>
4068     <td>
4069      STRONGLY RECOMMENDED
4070      <sup>
4071       6
4072      </sup>
4073     </td>
4074     <td>
4075      Main Profile
4076     </td>
4077     <td>
4078      MPEG2-TS
4079     </td>
4080    </tr>
4081    <tr>
4082     <td>
4083      MPEG-4 SP
4084     </td>
4085     <td>
4086     </td>
4087     <td>
4088      REQUIRED
4089      <sup>
4090       2
4091      </sup>
4092     </td>
4093     <td>
4094     </td>
4095     <td>
4096      3GPP (.3gp)
4097     </td>
4098    </tr>
4099    <tr>
4100     <td>
4101      VP8
4102      <sup>
4103       3
4104      </sup>
4105     </td>
4106     <td>
4107      REQUIRED
4108      <sup>
4109       2
4110      </sup>
4111      <br/>
4112      (Android 4.3+)
4113     </td>
4114     <td>
4115      REQUIRED
4116      <sup>
4117       2
4118      </sup>
4119      <br/>
4120      (Android 2.3.3+)
4121     </td>
4122     <td>
4123      See
4124      <a href="#5_2_video_encoding">section 5.2</a> and
4125      <a href="#5_3_video_decoding">5.3</a> for details
4126     </td>
4127     <td>
4128      <ul>
4129       <li class="table_list">
4130        <a href="http://www.webmproject.org/">
4131         WebM
4132    (.webm)
4133        </a>
4134       </li>
4135       <li class="table_list">
4136        Matroska (.mkv, Android 4.0+)
4137        <sup>
4138         4
4139        </sup>
4140       </li>
4141      </ul>
4142     </td>
4143    </tr>
4144    <tr>
4145     <td>
4146      VP9
4147     </td>
4148     <td>
4149     </td>
4150     <td>
4151      REQUIRED
4152      <sup>
4153       2
4154      </sup>
4155      <br/>
4156      (Android 4.4+)
4157     </td>
4158     <td>
4159      See
4160      <a href="#5_3_video_decoding">section 5.3</a> for details
4161     </td>
4162     <td>
4163      <ul>
4164       <li class="table_list">
4165        <a href="http://www.webmproject.org/">
4166         WebM
4167    (.webm)
4168        </a>
4169       </li>
4170       <li class="table_list">
4171        Matroska (.mkv, Android 4.0+)
4172        <sup>
4173         4
4174        </sup>
4175       </li>
4176      </ul>
4177     </td>
4178    </tr>
4179   </table>
4180   <p class="table_footnote">
4181    1 Required for device implementations that include
4182camera hardware and define android.hardware.camera or
4183android.hardware.camera.front.
4184   </p>
4185   <p class="table_footnote">
4186    2 Required for device implementations except Android
4187Watch devices.
4188   </p>
4189   <p class="table_footnote">
4190    3 For acceptable quality of web video streaming and
4191video-conference services, device implementations SHOULD use a hardware VP8
4192codec that meets the
4193    <a href="http://www.webmproject.org/hardware/rtc-coding-requirements/">requirements</a>. 
4194   </p>
4195   <p class="table_footnote">
4196    4 Device implementations SHOULD support writing
4197Matroska WebM files.
4198   </p>
4199   <p class="table_footnote">
4200    5 STRONGLY RECOMMENDED for Android Automotive,
4201optional for Android Watch, and required for all other device types.
4202   </p>
4203   <p class="table_footnote">
4204    6 Applies only to Android Television device
4205implementations.
4206   </p>
4207   <h2 id="5_2_video_encoding">
4208    5.2. Video Encoding
4209   </h2>
4210   <div class="note">
4211    Video codecs are optional for Android Watch device implementations.
4212   </div>
4213   <p>
4214    H.264, VP8, VP9 and HEVC video encoders&mdash;
4215   </p>
4216   <ul>
4217    <li>
4218     MUST support dynamically configurable bitrates.
4219    </li>
4220    <li>
4221     SHOULD support variable frame rates, where video encoder SHOULD determine
4222instantaneous frame duration based on the timestamps of input buffers, and
4223allocate its bit bucket based on that frame duration.
4224    </li>
4225   </ul>
4226   <p>
4227    H.263 and MPEG-4 video encoder SHOULD support dynamically configurable
4228bitrates.
4229   </p>
4230   <p>
4231    All video encoders SHOULD meet the following bitrate targets over two sliding
4232windows:
4233   </p>
4234   <ul>
4235    <li>
4236     It SHOULD be not more than ~15% over the bitrate between intraframe
4237(I-frame) intervals.
4238    </li>
4239    <li>
4240     It SHOULD be not more than ~100% over the bitrate over a sliding window of
42411 second.
4242    </li>
4243   </ul>
4244   <h3 id="5_2_1_h_263">
4245    5.2.1. H.263
4246   </h3>
4247   <p>
4248    Android device implementations with H.263 encoders MUST support Baseline Profile Level 45.
4249   </p>
4250   <h3 id="5_2_2_h-264">
4251    5.2.2. H-264
4252   </h3>
4253   <p>
4254    Android device implementations with H.264 codec support:
4255   </p>
4256   <ul>
4257    <li>
4258     MUST support Baseline Profile Level 3.
4259     <br/>
4260     However, support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock
4261    Ordering) and RS (Redundant Slices) is OPTIONAL. Moreover, to maintain
4262    compatibility with other Android devices, it is RECOMMENDED that ASO, FMO
4263    and RS are not used for Baseline Profile by encoders.
4264    </li>
4265    <li>
4266     MUST support the  SD (Standard Definition) video encoding profiles in the following table.
4267    </li>
4268    <li>
4269     SHOULD support Main Profile Level 4.
4270    </li>
4271    <li>
4272     SHOULD support the  HD (High Definition) video encoding profiles as indicated in the following table.
4273    </li>
4274    <li>
4275     In addition, Android Television devices are STRONGLY RECOMMENDED to encode HD 1080p video at 30 fps.
4276    </li>
4277   </ul>
4278   <table>
4279    <tr>
4280     <th>
4281     </th>
4282     <th>
4283      SD (Low quality)
4284     </th>
4285     <th>
4286      SD (High quality)
4287     </th>
4288     <th>
4289      HD 720p
4290      <sup>
4291       1
4292      </sup>
4293     </th>
4294     <th>
4295      HD 1080p
4296      <sup>
4297       1
4298      </sup>
4299     </th>
4300    </tr>
4301    <tr>
4302     <th>
4303      Video resolution
4304     </th>
4305     <td>
4306      320 x 240 px
4307     </td>
4308     <td>
4309      720 x 480 px
4310     </td>
4311     <td>
4312      1280 x 720 px
4313     </td>
4314     <td>
4315      1920 x 1080 px
4316     </td>
4317    </tr>
4318    <tr>
4319     <th>
4320      Video frame rate
4321     </th>
4322     <td>
4323      20 fps
4324     </td>
4325     <td>
4326      30 fps
4327     </td>
4328     <td>
4329      30 fps
4330     </td>
4331     <td>
4332      30 fps
4333     </td>
4334    </tr>
4335    <tr>
4336     <th>
4337      Video bitrate
4338     </th>
4339     <td>
4340      384 Kbps
4341     </td>
4342     <td>
4343      2 Mbps
4344     </td>
4345     <td>
4346      4 Mbps
4347     </td>
4348     <td>
4349      10 Mbps
4350     </td>
4351    </tr>
4352   </table>
4353   <p class="table_footnote">
4354    1 When supported by hardware, but STRONGLY RECOMMENDED
4355for Android Television devices.
4356   </p>
4357   <h3 id="5_2_3_vp8">
4358    5.2.3. VP8
4359   </h3>
4360   <p>
4361    Android device implementations with VP8 codec support MUST support the SD video
4362encoding profiles and SHOULD support the following HD (High Definition) video encoding profiles.
4363   </p>
4364   <table>
4365    <tr>
4366     <th>
4367     </th>
4368     <th>
4369      SD (Low quality)
4370     </th>
4371     <th>
4372      SD (High quality)
4373     </th>
4374     <th>
4375      HD 720p
4376      <sup>
4377       1
4378      </sup>
4379     </th>
4380     <th>
4381      HD 1080p
4382      <sup>
4383       1
4384      </sup>
4385     </th>
4386    </tr>
4387    <tr>
4388     <th>
4389      Video resolution
4390     </th>
4391     <td>
4392      320 x 180 px
4393     </td>
4394     <td>
4395      640 x 360 px
4396     </td>
4397     <td>
4398      1280 x 720 px
4399     </td>
4400     <td>
4401      1920 x 1080 px
4402     </td>
4403    </tr>
4404    <tr>
4405     <th>
4406      Video frame rate
4407     </th>
4408     <td>
4409      30 fps
4410     </td>
4411     <td>
4412      30 fps
4413     </td>
4414     <td>
4415      30 fps
4416     </td>
4417     <td>
4418      30 fps
4419     </td>
4420    </tr>
4421    <tr>
4422     <th>
4423      Video bitrate
4424     </th>
4425     <td>
4426      800 Kbps
4427     </td>
4428     <td>
4429      2 Mbps
4430     </td>
4431     <td>
4432      4 Mbps
4433     </td>
4434     <td>
4435      10 Mbps
4436     </td>
4437    </tr>
4438   </table>
4439   <p class="table_footnote">
4440    1 When supported by hardware.
4441   </p>
4442   <h2 id="5_3_video_decoding">
4443    5.3. Video Decoding
4444   </h2>
4445   <div class="note">
4446    Video codecs are optional for Android Watch device implementations.
4447   </div>
4448   <p>
4449    Device implementations&mdash;
4450   </p>
4451   <ul>
4452    <li>
4453     <p>
4454      MUST support dynamic video resolution and frame rate switching through the
4455    standard Android APIs within the same stream for all VP8, VP9, H.264, and
4456    H.265 codecs in real time and up to the maximum resolution supported by each
4457    codec on the device.
4458     </p>
4459    </li>
4460    <li>
4461     <p>
4462      Implementations that support the Dolby Vision decoder&mdash;
4463     </p>
4464    </li>
4465    <li>
4466     MUST provide a Dolby Vision-capable extractor.
4467    </li>
4468    <li>
4469     <p>
4470      MUST properly display Dolby Vision content on the device screen or on a
4471       standard video output port (e.g., HDMI).
4472     </p>
4473    </li>
4474    <li>
4475     <p>
4476      Implementations that provide a Dolby Vision-capable extractor MUST set the
4477    track index of backward-compatible base-layer(s) (if present) to be the same
4478    as the combined Dolby Vision layer's track index.
4479     </p>
4480    </li>
4481   </ul>
4482   <h3 id="5_3_1_mpeg-2">
4483    5.3.1. MPEG-2
4484   </h3>
4485   <p>
4486    Android device implementations with MPEG-2 decoders must support the Main
4487Profile High Level.
4488   </p>
4489   <h3 id="5_3_2_h_263">
4490    5.3.2. H.263
4491   </h3>
4492   <p>
4493    Android device implementations with H.263 decoders MUST support Baseline Profile
4494Level 30 and Level 45.
4495   </p>
4496   <h3 id="5_3_3_mpeg-4">
4497    5.3.3. MPEG-4
4498   </h3>
4499   <p>
4500    Android device implementations with MPEG-4 decoders MUST support Simple Profile
4501Level 3.
4502   </p>
4503   <h3 id="5_3_4_h_264">
4504    5.3.4. H.264
4505   </h3>
4506   <p>
4507    Android device implementations with H.264 decoders:
4508   </p>
4509   <ul>
4510    <li>
4511     MUST support Main Profile Level 3.1 and Baseline Profile.
4512     <br/>
4513     Support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock Ordering)
4514    and RS (Redundant Slices) is OPTIONAL.
4515    </li>
4516    <li>
4517     MUST be capable of decoding videos with the SD (Standard Definition)
4518    profiles listed in the following table and encoded with the Baseline Profile and
4519    Main Profile Level 3.1 (including 720p30).
4520    </li>
4521    <li>
4522     SHOULD be capable of decoding videos with the HD (High Definition) profiles
4523    as indicated in the following table.
4524    </li>
4525    <li>
4526     In addition, Android Television devices&mdash;
4527     <ul>
4528      <li>
4529       MUST support High Profile Level 4.2 and the HD 1080p60 decoding profile.
4530      </li>
4531      <li>
4532       MUST be capable of decoding videos with both HD profiles as indicated
4533    in the following table and encoded with either the Baseline Profile, Main
4534    Profile, or the High Profile Level 4.2
4535      </li>
4536     </ul>
4537    </li>
4538   </ul>
4539   <table>
4540    <tr>
4541     <th>
4542     </th>
4543     <th>
4544      SD (Low quality)
4545     </th>
4546     <th>
4547      SD (High quality)
4548     </th>
4549     <th>
4550      HD 720p
4551      <sup>
4552       1
4553      </sup>
4554     </th>
4555     <th>
4556      HD 1080p
4557      <sup>
4558       1
4559      </sup>
4560     </th>
4561    </tr>
4562    <tr>
4563     <th>
4564      Video resolution
4565     </th>
4566     <td>
4567      320 x 240 px
4568     </td>
4569     <td>
4570      720 x 480 px
4571     </td>
4572     <td>
4573      1280 x 720 px
4574     </td>
4575     <td>
4576      1920 x 1080 px
4577     </td>
4578    </tr>
4579    <tr>
4580     <th>
4581      Video frame rate
4582     </th>
4583     <td>
4584      30 fps
4585     </td>
4586     <td>
4587      30 fps
4588     </td>
4589     <td>
4590      60 fps
4591     </td>
4592     <td>
4593      30 fps (60 fps
4594      <sup>
4595       2
4596      </sup>
4597      )
4598     </td>
4599    </tr>
4600    <tr>
4601     <th>
4602      Video bitrate
4603     </th>
4604     <td>
4605      800 Kbps
4606     </td>
4607     <td>
4608      2 Mbps
4609     </td>
4610     <td>
4611      8 Mbps
4612     </td>
4613     <td>
4614      20 Mbps
4615     </td>
4616    </tr>
4617   </table>
4618   <p class="table_footnote">
4619    1 REQUIRED for when the height as reported by the
4620Display.getSupportedModes() method is equal or greater than the video resolution.
4621   </p>
4622   <p class="table_footnote">
4623    2 REQUIRED for Android Television device
4624implementations.
4625   </p>
4626   <h3 id="5_3_5_h_265_(hevc)">
4627    5.3.5. H.265 (HEVC)
4628   </h3>
4629   <p>
4630    Android device implementations, when supporting H.265 codec as described in
4631    <a href="#5_1_3_video_codecs">section 5.1.3</a>: 
4632   </p>
4633   <ul>
4634    <li>
4635     MUST support the Main Profile Level 3 Main tier and the SD video decoding profiles
4636    as indicated in the following table.
4637    </li>
4638    <li>
4639     SHOULD support the HD decoding profiles as indicated in the following table.
4640    </li>
4641    <li>
4642     MUST support the HD decoding profiles as indicated in the following table
4643    if there is a hardware decoder.
4644    </li>
4645    <li>
4646     In addition, Android Television devices:
4647    </li>
4648    <li>
4649     MUST support the HD 720p decoding profile.
4650    </li>
4651    <li>
4652     STRONGLY RECOMMENDED to support the HD 1080p decoding profile. If the HD 1080p
4653       decoding profile is supported, it MUST support the Main Profile Level 4.1 Main tier.
4654    </li>
4655    <li>
4656     SHOULD support the UHD decoding profile. If the UHD decoding profile is supported the
4657    codec MUST support Main10 Level 5 Main Tier profile.
4658    </li>
4659   </ul>
4660   <table>
4661    <tr>
4662     <th>
4663     </th>
4664     <th>
4665      SD (Low quality)
4666     </th>
4667     <th>
4668      SD (High quality)
4669     </th>
4670     <th>
4671      HD 720p
4672     </th>
4673     <th>
4674      HD 1080p
4675     </th>
4676     <th>
4677      UHD
4678     </th>
4679    </tr>
4680    <tr>
4681     <th>
4682      Video resolution
4683     </th>
4684     <td>
4685      352 x 288 px
4686     </td>
4687     <td>
4688      720 x 480 px
4689     </td>
4690     <td>
4691      1280 x 720 px
4692     </td>
4693     <td>
4694      1920 x 1080 px
4695     </td>
4696     <td>
4697      3840 x 2160 px
4698     </td>
4699    </tr>
4700    <tr>
4701     <th>
4702      Video frame rate
4703     </th>
4704     <td>
4705      30 fps
4706     </td>
4707     <td>
4708      30 fps
4709     </td>
4710     <td>
4711      30 fps
4712     </td>
4713     <td>
4714      30 fps (60 fps
4715      <sup>
4716       1
4717      </sup>
4718      )
4719     </td>
4720     <td>
4721      60 fps
4722     </td>
4723    </tr>
4724    <tr>
4725     <th>
4726      Video bitrate
4727     </th>
4728     <td>
4729      600 Kbps
4730     </td>
4731     <td>
4732      1.6 Mbps
4733     </td>
4734     <td>
4735      4 Mbps
4736     </td>
4737     <td>
4738      10 Mbps
4739     </td>
4740     <td>
4741      20 Mbps
4742     </td>
4743    </tr>
4744   </table>
4745   <p class="table_footnote">
4746    1 REQUIRED for Android Television device
4747implementations with H.265 hardware decoding.
4748   </p>
4749   <h3 id="5_3_6_vp8">
4750    5.3.6. VP8
4751   </h3>
4752   <p>
4753    Android device implementations, when supporting VP8 codec as described in
4754    <a href="https://source.android.com/compatibility/android-cdd.html#5_1_3_video_codecs">section 5.1.3</a>: 
4755   </p>
4756   <ul>
4757    <li>
4758     MUST support the SD decoding profiles in the following table.
4759    </li>
4760    <li>
4761     SHOULD support the HD decoding profiles in the following table.
4762    </li>
4763    <li>
4764     Android Television devices MUST support the HD 1080p60 decoding profile.
4765    </li>
4766   </ul>
4767   <table>
4768    <tr>
4769     <th>
4770     </th>
4771     <th>
4772      SD (Low quality)
4773     </th>
4774     <th>
4775      SD (High quality)
4776     </th>
4777     <th>
4778      HD 720p
4779      <sup>
4780       1
4781      </sup>
4782     </th>
4783     <th>
4784      HD 1080p
4785      <sup>
4786       1
4787      </sup>
4788     </th>
4789    </tr>
4790    <tr>
4791     <th>
4792      Video resolution
4793     </th>
4794     <td>
4795      320 x 180 px
4796     </td>
4797     <td>
4798      640 x 360 px
4799     </td>
4800     <td>
4801      1280 x 720 px
4802     </td>
4803     <td>
4804      1920 x 1080 px
4805     </td>
4806    </tr>
4807    <tr>
4808     <th>
4809      Video frame rate
4810     </th>
4811     <td>
4812      30 fps
4813     </td>
4814     <td>
4815      30 fps
4816     </td>
4817     <td>
4818      30 fps (60 fps
4819      <sup>
4820       2
4821      </sup>
4822      )
4823     </td>
4824     <td>
4825      30 (60 fps
4826      <sup>
4827       2
4828      </sup>
4829      )
4830     </td>
4831    </tr>
4832    <tr>
4833     <th>
4834      Video bitrate
4835     </th>
4836     <td>
4837      800 Kbps
4838     </td>
4839     <td>
4840      2 Mbps
4841     </td>
4842     <td>
4843      8 Mbps
4844     </td>
4845     <td>
4846      20 Mbps
4847     </td>
4848    </tr>
4849   </table>
4850   <p class="table_footnote">
4851    1 REQUIRED for when the height as reported by the
4852Display.getSupportedModes() method is equal or greater than the video resolution.
4853   </p>
4854   <p class="table_footnote">
4855    2 REQUIRED for Android Television device
4856implementations.
4857   </p>
4858   <h3 id="5_3_7_vp9">
4859    5.3.7. VP9
4860   </h3>
4861   <p>
4862    Android device implementations, when supporting VP9 codec as described in
4863    <a href="https://source.android.com/compatibility/android-cdd.html#5_1_3_video_codecs">section 5.1.3</a>: 
4864   </p>
4865   <ul>
4866    <li>
4867     MUST support the SD video decoding profiles as indicated in the following table.
4868    </li>
4869    <li>
4870     SHOULD support the HD decoding profiles as indicated in the following table.
4871    </li>
4872    <li>
4873     MUST support the HD decoding profiles as indicated in the following table,
4874    if there is a hardware decoder.
4875    </li>
4876    <li>
4877     <p>
4878      In addition, Android Television devices:
4879     </p>
4880     <ul>
4881      <li>
4882       MUST support the HD 720p decoding profile.
4883      </li>
4884      <li>
4885       STRONGLY RECOMMENDED to support the HD 1080p decoding profile.
4886      </li>
4887      <li>
4888       SHOULD support the UHD decoding profile. If the UHD video decoding
4889    profile is supported, it MUST support 8-bit color depth and SHOULD
4890    support VP9 Profile 2 (10-bit).
4891      </li>
4892     </ul>
4893    </li>
4894   </ul>
4895   <table>
4896    <tr>
4897     <th>
4898     </th>
4899     <th>
4900      SD (Low quality)
4901     </th>
4902     <th>
4903      SD (High quality)
4904     </th>
4905     <th>
4906      HD 720p
4907     </th>
4908     <th>
4909      HD 1080p
4910     </th>
4911     <th>
4912      UHD
4913     </th>
4914    </tr>
4915    <tr>
4916     <th>
4917      Video resolution
4918     </th>
4919     <td>
4920      320 x 180 px
4921     </td>
4922     <td>
4923      640 x 360 px
4924     </td>
4925     <td>
4926      1280 x 720 px
4927     </td>
4928     <td>
4929      1920 x 1080 px
4930     </td>
4931     <td>
4932      3840 x 2160 px
4933     </td>
4934    </tr>
4935    <tr>
4936     <th>
4937      Video frame rate
4938     </th>
4939     <td>
4940      30 fps
4941     </td>
4942     <td>
4943      30 fps
4944     </td>
4945     <td>
4946      30 fps
4947     </td>
4948     <td>
4949      30 fps (60 fps
4950      <sup>
4951       1
4952      </sup>
4953      )
4954     </td>
4955     <td>
4956      60 fps
4957     </td>
4958    </tr>
4959    <tr>
4960     <th>
4961      Video bitrate
4962     </th>
4963     <td>
4964      600 Kbps
4965     </td>
4966     <td>
4967      1.6 Mbps
4968     </td>
4969     <td>
4970      4 Mbps
4971     </td>
4972     <td>
4973      5 Mbps
4974     </td>
4975     <td>
4976      20 Mbps
4977     </td>
4978    </tr>
4979   </table>
4980   <p class="table_footnote">
4981    1 REQUIRED for Android Television
4982device implementations with VP9 hardware decoding.
4983   </p>
4984   <h2 id="5_4_audio_recording">
4985    5.4. Audio Recording
4986   </h2>
4987   <p>
4988    While some of the requirements outlined in this section are stated as SHOULD
4989since Android 4.3, the Compatibility Definition for a future version is planned
4990to change these to MUST. Existing and new Android devices are
4991    <strong>
4992     STRONGLY
4993RECOMMENDED
4994    </strong>
4995    to meet these requirements that are stated as SHOULD, or they
4996will not be able to attain Android compatibility when upgraded to the future
4997version.
4998   </p>
4999   <h3 id="5_4_1_raw_audio_capture">
5000    5.4.1. Raw Audio Capture
5001   </h3>
5002   <p>
5003    Device implementations that declare android.hardware.microphone MUST allow
5004capture of raw audio content with the following characteristics:
5005   </p>
5006   <ul>
5007    <li>
5008     <strong>
5009      Format
5010     </strong>
5011     : Linear PCM, 16-bit
5012    </li>
5013    <li>
5014     <strong>
5015      Sampling rates
5016     </strong>
5017     : 8000, 11025, 16000, 44100
5018    </li>
5019    <li>
5020     <strong>
5021      Channels
5022     </strong>
5023     : Mono
5024    </li>
5025   </ul>
5026   <p>
5027    The capture for the above sample rates MUST be done without up-sampling, and
5028any down-sampling MUST include an appropriate anti-aliasing filter.
5029   </p>
5030   <p>
5031    Device implementations that declare android.hardware.microphone SHOULD allow
5032capture of raw audio content with the following characteristics:
5033   </p>
5034   <ul>
5035    <li>
5036     <strong>
5037      Format
5038     </strong>
5039     : Linear PCM, 16-bit
5040    </li>
5041    <li>
5042     <strong>
5043      Sampling rates
5044     </strong>
5045     : 22050, 48000
5046    </li>
5047    <li>
5048     <strong>
5049      Channels
5050     </strong>
5051     : Stereo
5052    </li>
5053   </ul>
5054   <p>
5055    If capture for the above sample rates is supported, then the capture MUST be
5056done without up-sampling at any ratio higher than 16000:22050 or 44100:48000.
5057Any up-sampling or down-sampling MUST include an appropriate anti-aliasing
5058filter.
5059   </p>
5060   <h3 id="5_4_2_capture_for_voice_recognition">
5061    5.4.2. Capture for Voice Recognition
5062   </h3>
5063   <p>
5064    The android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source MUST
5065support capture at one of the sampling rates, 44100 and 48000.
5066   </p>
5067   <p>
5068    In addition to the above recording specifications, when an application has
5069started recording an audio stream using the
5070android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION audio source:
5071   </p>
5072   <ul>
5073    <li>
5074     The device SHOULD exhibit approximately flat amplitude versus frequency
5075    characteristics: specifically, &plusmn;3 dB, from 100 Hz to 4000 Hz.
5076    </li>
5077    <li>
5078     Audio input sensitivity SHOULD be set such that a 90 dB sound power level
5079    (SPL) source at 1000 Hz yields RMS of 2500 for 16-bit samples.
5080    </li>
5081    <li>
5082     PCM amplitude levels SHOULD linearly track input SPL changes over at least a
5083    30 dB range from -18 dB to +12 dB re 90 dB SPL at the microphone.
5084    </li>
5085    <li>
5086     Total harmonic distortion SHOULD be less than 1% for 1 kHz at 90 dB SPL
5087    input level at the microphone.
5088    </li>
5089    <li>
5090     Noise reduction processing, if present, MUST be disabled.
5091    </li>
5092    <li>
5093     Automatic gain control, if present, MUST be disabled.
5094    </li>
5095   </ul>
5096   <p>
5097    If the platform supports noise suppression technologies tuned for speech
5098recognition, the effect MUST be controllable from the
5099android.media.audiofx.NoiseSuppressor API. Moreover, the UUID field for the
5100noise suppressor&rsquo;s effect descriptor MUST uniquely identify each implementation
5101of the noise suppression technology.
5102   </p>
5103   <h3 id="5_4_3_capture_for_rerouting_of_playback">
5104    5.4.3. Capture for Rerouting of Playback
5105   </h3>
5106   <p>
5107    The android.media.MediaRecorder.AudioSource class includes the REMOTE_SUBMIX
5108audio source. Devices that declare android.hardware.audio.output MUST properly
5109implement the REMOTE_SUBMIX audio source so that when an application uses the
5110android.media.AudioRecord API to record from this audio source, it can capture
5111a mix of all audio streams except for the following:
5112   </p>
5113   <ul>
5114    <li>
5115     STREAM_RING
5116    </li>
5117    <li>
5118     STREAM_ALARM
5119    </li>
5120    <li>
5121     STREAM_NOTIFICATION
5122    </li>
5123   </ul>
5124   <h2 id="5_5_audio_playback">
5125    5.5. Audio Playback
5126   </h2>
5127   <p>
5128    Device implementations that declare android.hardware.audio.output MUST conform
5129to the requirements in this section.
5130   </p>
5131   <h3 id="5_5_1_raw_audio_playback">
5132    5.5.1. Raw Audio Playback
5133   </h3>
5134   <p>
5135    The device MUST allow playback of raw audio content with the following
5136characteristics:
5137   </p>
5138   <ul>
5139    <li>
5140     <strong>
5141      Format
5142     </strong>
5143     : Linear PCM, 16-bit
5144    </li>
5145    <li>
5146     <strong>
5147      Sampling rates
5148     </strong>
5149     : 8000, 11025, 16000, 22050, 32000, 44100
5150    </li>
5151    <li>
5152     <strong>
5153      Channels
5154     </strong>
5155     : Mono, Stereo
5156    </li>
5157   </ul>
5158   <p>
5159    The device SHOULD allow playback of raw audio content with the following
5160characteristics:
5161   </p>
5162   <ul>
5163    <li>
5164     <strong>
5165      Sampling rates
5166     </strong>
5167     : 24000, 48000
5168    </li>
5169   </ul>
5170   <h3 id="5_5_2_audio_effects">
5171    5.5.2. Audio Effects
5172   </h3>
5173   <p>
5174    Android provides an
5175    <a href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html">
5176     API for audio effects</a> for device implementations. Device implementations that declare the feature
5177android.hardware.audio.output:
5178   </p>
5179   <ul>
5180    <li>
5181     MUST support the EFFECT_TYPE_EQUALIZER and EFFECT_TYPE_LOUDNESS_ENHANCER
5182implementations controllable through the AudioEffect subclasses Equalizer,
5183LoudnessEnhancer.
5184    </li>
5185    <li>
5186     MUST support the visualizer API implementation, controllable through the
5187Visualizer class.
5188    </li>
5189    <li>
5190     SHOULD support the EFFECT_TYPE_BASS_BOOST, EFFECT_TYPE_ENV_REVERB,
5191EFFECT_TYPE_PRESET_REVERB, and EFFECT_TYPE_VIRTUALIZER implementations
5192controllable through the AudioEffect sub-classes BassBoost,
5193EnvironmentalReverb, PresetReverb, and Virtualizer.
5194    </li>
5195   </ul>
5196   <h3 id="5_5_3_audio_output_volume">
5197    5.5.3. Audio Output Volume
5198   </h3>
5199   <p>
5200    Android Television device implementations MUST include support for system
5201Master Volume and digital audio output volume attenuation on supported outputs,
5202except for compressed audio passthrough output (where no audio decoding is done
5203on the device).
5204   </p>
5205   <p>
5206    Android Automotive device implementations SHOULD allow adjusting audio volume
5207separately per each audio stream using the content type or usage as defined
5208by
5209    <a href="" title="http://developer.android.com/reference/android/media/AudioAttributes.html">AudioAttributes</a> and car audio usage as publicly defined in
5210    <code>
5211     android.car.CarAudioManager
5212    </code>.
5213   </p>
5214   <h2 id="5_6_audio_latency">
5215    5.6. Audio Latency
5216   </h2>
5217   <p>
5218    Audio latency is the time delay as an audio signal passes through a system.
5219Many classes of applications rely on short latencies, to achieve real-time
5220sound effects.
5221   </p>
5222   <p>
5223    For the purposes of this section, use the following definitions:
5224   </p>
5225   <ul>
5226    <li>
5227     <strong>output latency</strong>. The interval between when an application writes a frame
5228of PCM-coded data and when the corresponding sound is presented to environment at an on-device transducer
5229or signal leaves the device via a port and can be observed externally.
5230    </li>
5231    <li>
5232     <strong>cold output latency</strong>. The output latency for the first frame, when the
5233audio output system has been idle and powered down prior to the request.
5234    </li>
5235    <li>
5236     <strong> continuous output latency</strong>. The output latency for subsequent frames,
5237after the device is playing audio.
5238    </li>
5239    <li>
5240     <strong>input latency</strong>. The interval between when a sound is presented by environment to device
5241at an on-device transducer or signal enters the device via a port
5242and when an application reads the corresponding frame of
5243PCM-coded data.
5244    </li>
5245    <li>
5246     <strong>lost input</strong>. The initial portion of an input signal that is unusable or unavailable. </li>
5247    <li>
5248     <strong>cold input latency</strong>. The sum of lost input time and the input latency
5249for the first frame, when the audio input system has been idle and powered down
5250prior to the request.
5251    </li>
5252    <li>
5253     <strong> continuous input latency</strong>. The input latency for subsequent frames,
5254while the device is capturing audio.
5255    </li>
5256    <li>
5257     <strong> cold output jitter</strong>. The variability among separate measurements of cold
5258output latency values.
5259    </li>
5260    <li>
5261     <strong> cold input jitter</strong>. The variability among separate measurements of cold
5262input latency values.
5263    </li>
5264    <li>
5265     <strong> continuous round-trip latency</strong>. The sum of continuous input latency plus
5266continuous output latency plus one buffer period. The buffer period allows
5267time for the app to process the signal and time for the app to mitigate phase difference
5268between input and output streams.
5269    </li>
5270    <li>
5271     <strong> OpenSL ES PCM buffer queue API</strong>. The set of PCM-related OpenSL ES APIs
5272within
5273     <a href="https://developer.android.com/ndk/index.html">Android NDK</a>. 
5274    </li>
5275   </ul>
5276   <p>
5277    Device implementations that declare android.hardware.audio.output are STRONGLY
5278RECOMMENDED to meet or exceed these audio output requirements:
5279   </p>
5280   <ul>
5281    <li>
5282     cold output latency of 100 milliseconds or less
5283    </li>
5284    <li>
5285     continuous output latency of 45 milliseconds or less
5286    </li>
5287    <li>
5288     minimize the cold output jitter
5289    </li>
5290   </ul>
5291   <p>
5292    If a device implementation meets the requirements of this section after any
5293initial calibration when using the OpenSL ES PCM buffer queue API, for
5294continuous output latency and cold output latency over at least one supported
5295audio output device, it is STRONGLY RECOMMENDED to report support for
5296low-latency audio, by reporting the feature android.hardware.audio.low_latency
5297via the
5298    <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class. Conversely, if the device implementation does not meet these
5299requirements it MUST NOT report support for low-latency audio.
5300   </p>
5301   <p>
5302    Device implementations that include android.hardware.microphone are STRONGLY
5303RECOMMENDED to meet these input audio requirements:
5304   </p>
5305   <ul>
5306    <li>
5307     cold input latency of 100 milliseconds or less
5308    </li>
5309    <li>
5310     continuous input latency of 30 milliseconds or less
5311    </li>
5312    <li>
5313     continuous round-trip latency of 50 milliseconds or less
5314    </li>
5315    <li>
5316     minimize the cold input jitter
5317    </li>
5318   </ul>
5319   <h2 id="5_7_network_protocols">
5320    5.7. Network Protocols
5321   </h2>
5322   <p>
5323    Devices MUST support the
5324    <a href="http://developer.android.com/guide/appendix/media-formats.html"> media network protocols</a> for
5325audio and video playback as specified in the Android SDK documentation.
5326Specifically, devices MUST support the following media network protocols:
5327   </p>
5328   <ul>
5329    <li>
5330     <p>
5331      HTTP(S) progressive streaming
5332      <br/>
5333      All required codecs and container formats in
5334      <a href="#5_1_media_codecs">section 5.1</a> MUST
5335    be supported over HTTP(S)
5336     </p>
5337    </li>
5338    <li>
5339     <p>
5340      <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-07">HTTP Live Streaming draft protocol, Version 7</a> <br/>
5341      The following media segment formats MUST be supported:
5342     </p>
5343    </li>
5344   </ul>
5345   <table>
5346    <tr>
5347     <th>
5348      Segment formats
5349     </th>
5350     <th>
5351      Reference(s)
5352     </th>
5353     <th>
5354      Required codec support
5355     </th>
5356    </tr>
5357    <tr id="mp2t">
5358     <td>
5359      MPEG-2 Transport Stream
5360     </td>
5361     <td>
5362      <a href="http://www.iso.org/iso/catalogue_detail?csnumber=44169">ISO 13818</a> </td>
5363     <td>
5364      Video codecs:
5365      <ul>
5366       <li class="table_list">
5367        H264 AVC
5368       </li>
5369       <li class="table_list">
5370        MPEG-4 SP
5371       </li>
5372       <li class="table_list">
5373        MPEG-2
5374       </li>
5375      </ul>
5376      See
5377      <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC, MPEG2-4 SP,
5378      <br/>
5379      and MPEG-2.
5380      <p>
5381       Audio codecs:
5382      </p>
5383      <ul>
5384       <li class="table_list">
5385        AAC
5386       </li>
5387      </ul>
5388      See
5389      <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants.
5390     </td>
5391    </tr>
5392    <tr>
5393     <td>
5394      AAC with ADTS framing and ID3 tags
5395     </td>
5396     <td>
5397      <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=43345">ISO 13818-7</a> </td>
5398     <td>
5399      See
5400      <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants
5401     </td>
5402    </tr>
5403    <tr>
5404     <td>
5405      WebVTT
5406     </td>
5407     <td>
5408      <a href="http://dev.w3.org/html5/webvtt/">WebVTT</a> </td>
5409     <td>
5410     </td>
5411    </tr>
5412   </table>
5413   <ul>
5414    <li>
5415     <p>
5416      RTSP (RTP, SDP)
5417     </p>
5418     <p>
5419      The following RTP audio video profile and related codecs MUST be supported.
5420For exceptions please see the table footnotes in
5421      <a href="#5_1_media_codecs">section 5.1</a>. 
5422     </p>
5423    </li>
5424   </ul>
5425   <table>
5426    <tr>
5427     <th>
5428      Profile name
5429     </th>
5430     <th>
5431      Reference(s)
5432     </th>
5433     <th>
5434      Required codec support
5435     </th>
5436    </tr>
5437    <tr>
5438     <td>
5439      H264 AVC
5440     </td>
5441     <td>
5442      <a href="https://tools.ietf.org/html/rfc6184">RFC 6184</a> </td>
5443     <td>
5444      See
5445      <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC
5446     </td>
5447    </tr>
5448    <tr>
5449     <td>
5450      MP4A-LATM
5451     </td>
5452     <td>
5453      <a href="https://tools.ietf.org/html/rfc6416">RFC 6416</a> </td>
5454     <td>
5455      See
5456      <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants
5457     </td>
5458    </tr>
5459    <tr>
5460     <td>
5461      H263-1998
5462     </td>
5463     <td>
5464      <a href="https://tools.ietf.org/html/rfc3551">RFC 3551</a> <br/>
5465      <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a> <br/>
5466      <a href="https://tools.ietf.org/html/rfc2190">RFC 2190</a> </td>
5467     <td>
5468      See
5469      <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H263
5470     </td>
5471    </tr>
5472    <tr>
5473     <td>
5474      H263-2000
5475     </td>
5476     <td>
5477      <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a> </td>
5478     <td>
5479      See
5480      <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H263
5481     </td>
5482    </tr>
5483    <tr>
5484     <td>
5485      AMR
5486     </td>
5487     <td>
5488      <a href="https://tools.ietf.org/html/rfc4867">RFC 4867</a> </td>
5489     <td>
5490      See
5491      <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AMR-NB
5492     </td>
5493    </tr>
5494    <tr>
5495     <td>
5496      AMR-WB
5497     </td>
5498     <td>
5499      <a href="https://tools.ietf.org/html/rfc4867">RFC 4867</a> </td>
5500     <td>
5501      See
5502      <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AMR-WB
5503     </td>
5504    </tr>
5505    <tr>
5506     <td>
5507      MP4V-ES
5508     </td>
5509     <td>
5510      <a href="https://tools.ietf.org/html/rfc6416">RFC 6416</a> </td>
5511     <td>
5512      See
5513      <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on MPEG-4 SP
5514     </td>
5515    </tr>
5516    <tr>
5517     <td>
5518      mpeg4-generic
5519     </td>
5520     <td>
5521      <a href="https://tools.ietf.org/html/rfc3640">RFC 3640</a> </td>
5522     <td>
5523      See
5524      <a href="#5_1_1_audio_codecs">section 5.1.1</a> for details on AAC and its variants
5525     </td>
5526    </tr>
5527    <tr>
5528     <td>
5529      MP2T
5530     </td>
5531     <td>
5532      <a href="https://tools.ietf.org/html/rfc2250">RFC 2250</a> </td>
5533     <td>
5534      See
5535      <a href="#mp2t">MPEG-2 Transport Stream</a> underneath HTTP Live Streaming for details
5536     </td>
5537    </tr>
5538   </table>
5539   <h2 id="5_8_secure_media">
5540    5.8. Secure Media
5541   </h2>
5542   <p>
5543    Device implementations that support secure video output and are capable of
5544supporting secure surfaces MUST declare support for Display.FLAG_SECURE. Device
5545implementations that declare support for Display.FLAG_SECURE, if they support a
5546wireless display protocol, MUST secure the link with a cryptographically strong
5547mechanism such as HDCP 2.x or higher for Miracast wireless displays. Similarly
5548if they support a wired external display, the device implementations MUST
5549support HDCP 1.2 or higher. Android Television device implementations MUST
5550support HDCP 2.2 for devices supporting 4K resolution and HDCP 1.4 or above for
5551lower resolutions. The upstream Android open source implementation includes
5552support for wireless (Miracast) and wired (HDMI) displays that satisfies this
5553requirement.
5554   </p>
5555   <h2 id="5_9_musical_instrument_digital_interface_(midi)">
5556    5.9. Musical Instrument Digital Interface (MIDI)
5557   </h2>
5558   <p>
5559    If a device implementation supports the inter-app MIDI software transport
5560(virtual MIDI devices), and it supports MIDI over
5561    <em>
5562     all
5563    </em>
5564    of the following
5565MIDI-capable hardware transports for which it provides generic non-MIDI
5566connectivity, it is STRONGLY RECOMMENDED to report support for feature
5567android.software.midi via the
5568    <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class.
5569   </p>
5570   <p>
5571    The MIDI-capable hardware transports are:
5572   </p>
5573   <ul>
5574    <li>
5575     USB host mode (section 7.7 USB)
5576    </li>
5577    <li>
5578     USB peripheral mode (section 7.7 USB)
5579    </li>
5580    <li>
5581     MIDI over Bluetooth LE acting in central role (section 7.4.3 Bluetooth)
5582    </li>
5583   </ul>
5584   <p>
5585    Conversely, if the device implementation provides generic non-MIDI connectivity
5586over a particular MIDI-capable hardware transport listed above, but does not
5587support MIDI over that hardware transport, it MUST NOT report support for
5588feature android.software.midi.
5589   </p>
5590   <h2 id="5_10_professional_audio">
5591    5.10. Professional Audio
5592   </h2>
5593   <p>
5594    If a device implementation meets
5595    <em>
5596     all
5597    </em>
5598    of the following requirements, it is
5599STRONGLY RECOMMENDED to report support for feature android.hardware.audio.pro
5600via the
5601    <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class.
5602   </p>
5603   <ul>
5604    <li>
5605     The device implementation MUST report support for feature
5606android.hardware.audio.low_latency.
5607    </li>
5608    <li>
5609     The continuous round-trip audio latency, as defined in section 5.6 Audio
5610Latency, MUST be 20 milliseconds or less and SHOULD be 10 milliseconds or less
5611over at least one supported path.
5612    </li>
5613    <li>
5614     If the device includes a 4 conductor 3.5mm audio jack, the continuous
5615round-trip audio latency MUST be 20 milliseconds or less over the audio jack
5616path, and SHOULD be 10 milliseconds or less over at the audio jack path.
5617    </li>
5618    <li>
5619     The device implementation MUST include a USB port(s) supporting USB host
5620mode and USB peripheral mode.
5621    </li>
5622    <li>
5623     The USB host mode MUST implement the USB audio class.
5624    </li>
5625    <li>
5626     If the device includes an HDMI port, the device implementation MUST support
5627output in stereo and eight channels at 20-bit or 24-bit depth and 192 kHz
5628without bit-depth loss or resampling.
5629    </li>
5630    <li>
5631     The device implementation MUST report support for feature
5632android.software.midi.
5633    </li>
5634    <li>
5635     If the device includes a 4 conductor 3.5mm audio jack, the device
5636implementation is STRONGLY RECOMMENDED to comply with section
5637     <a href="https://source.android.com/accessories/headset/specification.html#mobile_device_jack_specifications">
5638      Mobile device (jack) specifications</a> of the
5639     <a href="https://source.android.com/accessories/headset/specification.html">Wired Audio Headset Specification (v1.1)</a>. 
5640    </li>
5641   </ul>
5642   <p>
5643    Latencies and USB audio requirements MUST be met using the
5644    <a href="https://developer.android.com/ndk/guides/audio/opensl-for-android.html">OpenSL ES</a> PCM buffer queue API.
5645   </p>
5646   <p>
5647    In addition, a device implementation that reports support for this feature SHOULD:
5648   </p>
5649   <ul>
5650    <li>
5651     Provide a sustainable level of CPU performance while audio is active.
5652    </li>
5653    <li>
5654     Minimize audio clock inaccuracy and drift relative to standard time.
5655    </li>
5656    <li>
5657     Minimize audio clock drift relative to the CPU
5658     <code>
5659      CLOCK_MONOTONIC
5660     </code>
5661     when both are active.
5662    </li>
5663    <li>
5664     Minimize audio latency over on-device transducers.
5665    </li>
5666    <li>
5667     Minimize audio latency over USB digital audio.
5668    </li>
5669    <li>
5670     Document audio latency measurements over all paths.
5671    </li>
5672    <li>
5673     Minimize jitter in audio buffer completion callback entry times, as this affects usable percentage of full CPU bandwidth by the callback.
5674    </li>
5675    <li>
5676     Provide zero audio underruns (output) or overruns (input) under normal use at reported latency.
5677    </li>
5678    <li>
5679     Provide zero inter-channel latency difference.
5680    </li>
5681    <li>
5682     Minimize MIDI mean latency over all transports.
5683    </li>
5684    <li>
5685     Minimize MIDI latency variability under load (jitter) over all transports.
5686    </li>
5687    <li>
5688     Provide accurate MIDI timestamps over all transports.
5689    </li>
5690    <li>
5691     Minimize audio signal noise over on-device transducers, including the period immediately after cold start.
5692    </li>
5693    <li>
5694     Provide zero audio clock difference between the input and output sides of corresponding
5695    end-points, when both are active.  Examples of corresponding end-points include
5696    the on-device microphone and speaker, or the audio jack input and output.
5697    </li>
5698    <li>
5699     Handle audio buffer completion callbacks for the input and output sides of corresponding
5700    end-points on the same thread when both are active, and enter the output callback immediately
5701    after the return from the input callback.  Or if it is not feasible to handle the callbacks
5702    on the same thread, then enter the output callback shortly after entering the input callback
5703    to permit the application to have a consistent timing of the input and output sides.
5704    </li>
5705    <li>
5706     Minimize the phase difference between HAL audio buffering for the input and output
5707    sides of corresponding end-points.
5708    </li>
5709    <li>
5710     Minimize touch latency.
5711    </li>
5712    <li>
5713     Minimize touch latency variability under load (jitter).
5714    </li>
5715   </ul>
5716   <h2 id="5_11_capture_for_unprocessed">
5717    5.11. Capture for Unprocessed
5718   </h2>
5719   <p>
5720    Starting from Android 7.0,
5721a new recording source has been added. It can be accessed using
5722the
5723    <code>
5724     android.media.MediaRecorder.AudioSource.UNPROCESSED
5725    </code>
5726    audio
5727source. In OpenSL ES, it can be accessed with the record preset
5728    <code>
5729     SL_ANDROID_RECORDING_PRESET_UNPROCESSED
5730    </code>.
5731   </p>
5732   <p>
5733    A device MUST satisfy all of the following requirements to report support
5734of the unprocessed audio source via the
5735    <code>
5736     android.media.AudioManager
5737    </code>
5738    property
5739    <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED">PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED</a>: 
5740   </p>
5741   <ul>
5742    <li>
5743     <p>
5744      The device MUST exhibit approximately flat amplitude-versus-frequency
5745characteristics in the mid-frequency range: specifically &plusmn;10dB from
5746100 Hz to 7000 Hz.
5747     </p>
5748    </li>
5749    <li>
5750     <p>
5751      The device MUST exhibit amplitude levels in the low frequency range:
5752specifically from &plusmn;20 dB from 5 Hz to 100 Hz compared to the mid-frequency range.
5753     </p>
5754    </li>
5755    <li>
5756     <p>
5757      The device MUST exhibit amplitude levels in the high frequency range:
5758specifically from &plusmn;30 dB from 4000 Hz to 22 KHz compared to the mid-frequency range.
5759     </p>
5760    </li>
5761    <li>
5762     <p>
5763      Audio input sensitivity MUST be set such that a 1000 Hz sinusoidal tone
5764source played at 94 dB Sound Pressure Level (SPL)
5765yields a response with RMS of 520 for 16
5766bit-samples (or -36 dB Full Scale for floating point/double precision
5767samples).
5768     </p>
5769    </li>
5770    <li>
5771     <p>
5772      SNR &gt; 60 dB (difference between 94 dB SPL and equivalent SPL of self
5773noise, A-weighted).
5774     </p>
5775    </li>
5776    <li>
5777     <p>
5778      Total harmonic distortion MUST be less than 1% for 1 kHZ at 90 dB SPL
5779input level at the microphone.
5780     </p>
5781    </li>
5782    <li>
5783     <p>
5784      The only signal processing allowed in the path is a level multiplier
5785to bring the level to desired range. This level multiplier MUST NOT
5786introduce delay or latency to the signal path.
5787     </p>
5788    </li>
5789    <li>
5790     <p>
5791      No other signal processing is allowed in the path, such as Automatic Gain
5792Control, High Pass Filter, or Echo Cancellation. If any signal processing
5793is present in the architecture for any reason, it MUST be disabled and
5794effectively introduce zero delay or extra latency to the signal path.
5795     </p>
5796    </li>
5797   </ul>
5798   <p>
5799    All SPL measurements are made directly next to the microphone under test.
5800   </p>
5801   <p>
5802    For multiple microphone configurations, these requirements apply to each
5803microphone.
5804   </p>
5805   <p>
5806    It is STRONGLY RECOMMENDED that a device satisfy as many of the requirements for the signal
5807path for the unprocessed recording source; however, a device must satisfy
5808    <em>
5809     all
5810    </em>
5811    of these
5812requirements, listed above, if it claims to support the unprocessed audio source.
5813   </p>
5814   <h1 id="6_developer_tools_and_options_compatibility">
5815    6. Developer Tools and Options Compatibility
5816   </h1>
5817   <h2 id="6_1_developer_tools">
5818    6.1. Developer Tools
5819   </h2>
5820   <p>
5821    Device implementations MUST support the Android Developer Tools provided in the
5822Android SDK. Android compatible devices MUST be compatible with:
5823   </p>
5824   <ul>
5825    <li>
5826     <a href="http://developer.android.com/tools/help/adb.html">
5827      <strong>
5828       Android Debug Bridge (adb)
5829      </strong>
5830     </a>
5831     <ul>
5832      <li>
5833       Device implementations MUST support all adb functions as documented in
5834the Android SDK including
5835       <a href="https://source.android.com/devices/input/diagnostics.html">dumpsys</a>. 
5836      </li>
5837      <li>
5838       The device-side adb daemon MUST be inactive by default and there MUST
5839be a user-accessible mechanism to turn on the Android Debug Bridge. If a device
5840implementation omits USB peripheral mode, it MUST implement the Android Debug
5841Bridge via local-area network (such as Ethernet or 802.11).
5842      </li>
5843      <li>
5844       Android includes support for secure adb. Secure adb enables adb on
5845known authenticated hosts. Device implementations MUST support secure adb.
5846      </li>
5847     </ul>
5848    </li>
5849    <li>
5850     <a href="http://developer.android.com/tools/debugging/ddms.html">
5851      <strong>
5852       Dalvik Debug Monitor Service (ddms)
5853      </strong>
5854     </a>
5855     <ul>
5856      <li>
5857       Device implementations MUST support all ddms features as documented in the Android SDK.
5858      </li>
5859      <li>
5860       As ddms uses adb, support for ddms SHOULD be inactive by default, but MUST be supported whenever the user has activated the Android Debug Bridge, as above.
5861      </li>
5862     </ul>
5863    </li>
5864    <li>
5865     <a href="http://developer.android.com/tools/help/monkey.html">
5866      <strong>
5867       Monkey
5868      </strong>
5869     </a>
5870     . Device
5871implementations MUST include the Monkey framework, and make it available for
5872applications to use.
5873    </li>
5874    <li>
5875     <a href="http://developer.android.com/tools/help/systrace.html">
5876      <strong>
5877       SysTrace
5878      </strong>
5879     </a>
5880     <ul>
5881      <li>
5882       Device implementations MUST support systrace tool as documented in the
5883Android SDK. Systrace must be inactive by default, and there MUST be a
5884user-accessible mechanism to turn on Systrace.
5885      </li>
5886      <li>
5887       Most Linux-based systems and Apple Macintosh systems recognize Android
5888devices using the standard Android SDK tools, without additional support;
5889however Microsoft Windows systems typically require a driver for new Android
5890devices. (For instance, new vendor IDs and sometimes new device IDs require
5891custom USB drivers for Windows systems.)
5892      </li>
5893      <li>
5894       If a device implementation is unrecognized by the adb tool as provided
5895in the standard Android SDK, device implementers MUST provide Windows drivers
5896allowing developers to connect to the device using the adb protocol. These
5897drivers MUST be provided for Windows XP, Windows Vista, Windows 7, Windows 8,
5898and Windows 10 in both 32-bit and 64-bit versions.
5899      </li>
5900     </ul>
5901    </li>
5902   </ul>
5903   <h2 id="6_2_developer_options">
5904    6.2. Developer Options
5905   </h2>
5906   <p>
5907    Android includes support for developers to configure application
5908development-related settings. Device implementations MUST honor the
5909    <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS">android.settings.APPLICATION_DEVELOPMENT_SETTINGS</a> intent to show application development-related settings The upstream Android
5910implementation hides the Developer Options menu by default and enables users to
5911launch Developer Options after pressing seven (7) times on the
5912    <strong>
5913     Settings
5914    </strong>
5915    &gt;
5916    <strong>
5917     About Device
5918    </strong>
5919    &gt;
5920    <strong>
5921     Build Number
5922    </strong>
5923    menu item. Device implementations MUST
5924provide a consistent experience for Developer Options. Specifically, device
5925implementations MUST hide Developer Options by default and MUST provide a
5926mechanism to enable Developer Options that is consistent with the upstream
5927Android implementation.
5928   </p>
5929   <div class="note">
5930    Android Automotive implementations MAY limit access to the Developer Options
5931menu by visually hiding or disabling the menu when the vehicle is in motion.
5932   </div>
5933   <h1 id="7_hardware_compatibility">
5934    7. Hardware Compatibility
5935   </h1>
5936   <p>
5937    If a device includes a particular hardware component that has a corresponding
5938API for third-party developers, the device implementation MUST implement that
5939API as described in the Android SDK documentation. If an API in the SDK
5940interacts with a hardware component that is stated to be optional and the
5941device implementation does not possess that component:
5942   </p>
5943   <ul>
5944    <li>
5945     Complete class definitions (as documented by the SDK) for the component
5946APIs MUST still be presented.
5947    </li>
5948    <li>
5949     The API&rsquo;s behaviors MUST be implemented as no-ops in some reasonable
5950fashion.
5951    </li>
5952    <li>
5953     API methods MUST return null values where permitted by the SDK
5954documentation.
5955    </li>
5956    <li>
5957     API methods MUST return no-op implementations of classes where null values
5958are not permitted by the SDK documentation.
5959    </li>
5960    <li>
5961     API methods MUST NOT throw exceptions not documented by the SDK
5962documentation.
5963    </li>
5964   </ul>
5965   <p>
5966    A typical example of a scenario where these requirements apply is the telephony
5967API: Even on non-phone devices, these APIs must be implemented as reasonable
5968no-ops.
5969   </p>
5970   <p>
5971    Device implementations MUST consistently report accurate hardware configuration
5972information via the getSystemAvailableFeatures() and hasSystemFeature(String)
5973methods on the
5974    <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class for the same build fingerprint.
5975   </p>
5976   <h2 id="7_1_display_and_graphics">
5977    7.1. Display and Graphics
5978   </h2>
5979   <p>
5980    Android includes facilities that automatically adjust application assets and UI
5981layouts appropriately for the device to ensure that third-party applications
5982run well on a
5983    <a href="http://developer.android.com/guide/practices/screens_support.html">
5984     variety of hardware configurations</a>.
5985Devices MUST properly implement these APIs and behaviors, as detailed in this
5986section.
5987   </p>
5988   <p>
5989    The units referenced by the requirements in this section are defined as follows:
5990   </p>
5991   <ul>
5992    <li>
5993     <strong>
5994      physical diagonal size
5995     </strong>
5996     . The distance in inches between two opposing
5997corners of the illuminated portion of the display.
5998    </li>
5999    <li>
6000     <strong>
6001      dots per inch (dpi)
6002     </strong>
6003     . The number of pixels encompassed by a linear
6004horizontal or vertical span of 1&rdquo;. Where dpi values are listed, both horizontal
6005and vertical dpi must fall within the range.
6006    </li>
6007    <li>
6008     <strong>
6009      aspect ratio
6010     </strong>
6011     . The ratio of the pixels of the longer dimension to the
6012shorter dimension of the screen. For example, a display of 480x854 pixels would
6013be 854/480 = 1.779, or roughly &ldquo;16:9&rdquo;.
6014    </li>
6015    <li>
6016     <strong>
6017      density-independent pixel (dp)
6018     </strong>
6019     . The virtual pixel unit normalized to a
6020160 dpi screen, calculated as: pixels = dps * (density/160).
6021    </li>
6022   </ul>
6023   <h3 id="7_1_1_screen_configuration">
6024    7.1.1. Screen Configuration
6025   </h3>
6026   <h4 id="7_1_1_1_screen_size">
6027    7.1.1.1. Screen Size
6028   </h4>
6029   <div class="note">
6030    Android Watch devices (detailed in
6031    <a href="#2_device_types">section 2</a> ) MAY have
6032smaller screen sizes as described in this section.
6033   </div>
6034   <p>
6035    The Android UI framework supports a variety of different screen sizes, and
6036allows applications to query the device screen size (aka &ldquo;screen layout") via
6037android.content.res.Configuration.screenLayout with the SCREENLAYOUT_SIZE_MASK.
6038Device implementations MUST report the correct
6039    <a href="http://developer.android.com/guide/practices/screens_support.html">
6040     screen size</a> as
6041defined in the Android SDK documentation and determined by the upstream Android
6042platform. Specifically, device implementations MUST report the correct screen
6043size according to the following logical density-independent pixel (dp) screen
6044dimensions.
6045   </p>
6046   <ul>
6047    <li>
6048     Devices MUST have screen sizes of at least 426 dp x 320 dp (&lsquo;small&rsquo;),
6049unless it is an Android Watch device.
6050    </li>
6051    <li>
6052     Devices that report screen size &lsquo;normal&rsquo; MUST have screen sizes of at least
6053480 dp x 320 dp.
6054    </li>
6055    <li>
6056     Devices that report screen size &lsquo;large&rsquo; MUST have screen sizes of at least
6057640 dp x 480 dp.
6058    </li>
6059    <li>
6060     Devices that report screen size &lsquo;xlarge&rsquo; MUST have screen sizes of at least
6061960 dp x 720 dp.
6062    </li>
6063   </ul>
6064   <p>
6065    In addition:
6066   </p>
6067   <ul>
6068    <li>
6069     Android Watch devices MUST have a screen with the physical diagonal size in
6070the range from 1.1 to 2.5 inches.
6071    </li>
6072    <li>
6073     Android Automotive devices MUST have a screen with the physical diagonal
6074size greater than or equal to 6 inches.
6075    </li>
6076    <li>
6077     Android Automotive devices MUST have a screen size of at least 750 dp x
6078480 dp.
6079    </li>
6080    <li>
6081     Other types of Android device implementations, with a physically integrated
6082screen, MUST have a screen at least 2.5 inches in physical diagonal size.
6083    </li>
6084   </ul>
6085   <p>
6086    Devices MUST NOT change their reported screen size at any time.
6087   </p>
6088   <p>
6089    Applications optionally indicate which screen sizes they support via the
6090&lt;supports-screens&gt; attribute in the AndroidManifest.xml file. Device
6091implementations MUST correctly honor applications' stated support for small,
6092normal, large, and xlarge screens, as described in the Android SDK
6093documentation.
6094   </p>
6095   <h4 id="7_1_1_2_screen_aspect_ratio">
6096    7.1.1.2. Screen Aspect Ratio
6097   </h4>
6098   <div class="note">
6099    Android Watch devices MAY have an aspect ratio of 1.0 (1:1).
6100   </div>
6101   <p>
6102    The screen aspect ratio MUST be a value from 1.3333 (4:3) to 1.86 (roughly
610316:9), but Android Watch devices MAY have an aspect ratio of 1.0 (1:1) because
6104such a device implementation will use a UI_MODE_TYPE_WATCH as the
6105android.content.res.Configuration.uiMode.
6106   </p>
6107   <h4 id="7_1_1_3_screen_density">
6108    7.1.1.3. Screen Density
6109   </h4>
6110   <p>
6111    The Android UI framework defines a set of standard logical densities to help
6112application developers target application resources. Device implementations
6113MUST report only one of the following logical Android framework densities
6114through the android.util.DisplayMetrics APIs, and MUST execute applications at
6115this standard density and MUST NOT change the value at at any time for the
6116default display.
6117   </p>
6118   <ul>
6119    <li>
6120     120 dpi (ldpi)
6121    </li>
6122    <li>
6123     160 dpi (mdpi)
6124    </li>
6125    <li>
6126     213 dpi (tvdpi)
6127    </li>
6128    <li>
6129     240 dpi (hdpi)
6130    </li>
6131    <li>
6132     280 dpi (280dpi)
6133    </li>
6134    <li>
6135     320 dpi (xhdpi)
6136    </li>
6137    <li>
6138     360 dpi (360dpi)
6139    </li>
6140    <li>
6141     400 dpi (400dpi)
6142    </li>
6143    <li>
6144     420 dpi (420dpi)
6145    </li>
6146    <li>
6147     480 dpi (xxhdpi)
6148    </li>
6149    <li>
6150     560 dpi (560dpi)
6151    </li>
6152    <li>
6153     640 dpi (xxxhdpi)
6154    </li>
6155   </ul>
6156   <p>
6157    Device implementations SHOULD define the standard Android framework density
6158that is numerically closest to the physical density of the screen, unless that
6159logical density pushes the reported screen size below the minimum supported. If
6160the standard Android framework density that is numerically closest to the
6161physical density results in a screen size that is smaller than the smallest
6162supported compatible screen size (320 dp width), device implementations SHOULD
6163report the next lowest standard Android framework density.
6164   </p>
6165   <p>
6166    Device implementations are STRONGLY RECOMMENDED to provide users a setting to change
6167the display size. If there is an implementation to change the display size of the device,
6168it MUST align with the AOSP implementation as indicated below:
6169   </p>
6170   <ul>
6171    <li>
6172     The display size MUST NOT be scaled any larger than 1.5 times the native density or
6173   produce an effective minimum screen dimension smaller than 320dp (equivalent
6174   to resource qualifier sw320dp), whichever comes first.
6175    </li>
6176    <li>
6177     Display size MUST NOT be scaled any smaller than 0.85 times the native density.
6178    </li>
6179    <li>
6180     To ensure good usability and consistent font sizes, it is RECOMMENDED that the
6181   following scaling of Native Display options be provided (while complying with the limits
6182   specified above)
6183    </li>
6184    <li>
6185     Small: 0.85x
6186    </li>
6187    <li>
6188     Default: 1x (Native display scale)
6189    </li>
6190    <li>
6191     Large: 1.15x
6192    </li>
6193    <li>
6194     Larger: 1.3x
6195    </li>
6196    <li>
6197     Largest 1.45x
6198    </li>
6199   </ul>
6200   <h3 id="7_1_2_display_metrics">
6201    7.1.2. Display Metrics
6202   </h3>
6203   <p>
6204    Device implementations MUST report correct values for all display metrics
6205defined in
6206    <a href="http://developer.android.com/reference/android/util/DisplayMetrics.html">android.util.DisplayMetrics</a> and MUST report the same values regardless of whether the embedded or external
6207screen is used as the default display.
6208   </p>
6209   <h3 id="7_1_3_screen_orientation">
6210    7.1.3. Screen Orientation
6211   </h3>
6212   <p>
6213    Devices MUST report which screen orientations they support
6214(android.hardware.screen.portrait and/or android.hardware.screen.landscape) and
6215MUST report at least one supported orientation. For example, a device with a
6216fixed orientation landscape screen, such as a television or laptop, SHOULD only
6217report android.hardware.screen.landscape.
6218   </p>
6219   <p>
6220    Devices that report both screen orientations MUST support dynamic orientation
6221by applications to either portrait or landscape screen orientation. That is,
6222the device must respect the application&rsquo;s request for a specific screen
6223orientation. Device implementations MAY select either portrait or landscape
6224orientation as the default.
6225   </p>
6226   <p>
6227    Devices MUST report the correct value for the device&rsquo;s current orientation,
6228whenever queried via the android.content.res.Configuration.orientation,
6229android.view.Display.getOrientation(), or other APIs.
6230   </p>
6231   <p>
6232    Devices MUST NOT change the reported screen size or density when changing orientation.
6233   </p>
6234   <h3 id="7_1_4_2d_and_3d_graphics_acceleration">
6235    7.1.4. 2D and 3D Graphics Acceleration
6236   </h3>
6237   <p>
6238    Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and
6239detailed in the Android SDK documentations. Device implementations SHOULD
6240support OpenGL ES 3.0, 3.1, or 3.2 on devices capable of supporting it. Device
6241implementations MUST also support
6242    <a href="http://developer.android.com/guide/topics/renderscript/">
6243     Android RenderScript</a>, as detailed in the Android SDK documentation.
6244   </p>
6245   <p>
6246    Device implementations MUST also correctly identify themselves as supporting
6247OpenGL ES 1.0, OpenGL ES 2.0, OpenGL ES 3.0, OpenGL 3.1, or OpenGL 3.2. That is:
6248   </p>
6249   <ul>
6250    <li>
6251     The managed APIs (such as via the GLES10.getString() method) MUST report
6252support for OpenGL ES 1.0 and OpenGL ES 2.0.
6253    </li>
6254    <li>
6255     The native C/C++ OpenGL APIs (APIs available to apps via libGLES_v1CM.so,
6256libGLES_v2.so, or libEGL.so) MUST report support for OpenGL ES 1.0 and OpenGL
6257ES 2.0.
6258    </li>
6259    <li>
6260     Device implementations that declare support for OpenGL ES 3.0, 3.1, or 3.2 MUST
6261support the corresponding managed APIs and include support for native C/C++
6262APIs. On device implementations that declare support for OpenGL ES 3.0, 3.1, or
62633.2 libGLESv2.so MUST export the corresponding function symbols in addition to
6264the OpenGL ES 2.0 function symbols.
6265    </li>
6266   </ul>
6267   <p>
6268    Android provides an OpenGL ES
6269    <a href="https://developer.android.com/reference/android/opengl/GLES31Ext.html">extension pack</a> with Java interfaces and native support for advanced graphics functionality
6270such as tessellation and the ASTC texture compression format. Android device
6271implementations MUST support the extension pack if the device supports OpenGL
6272ES 3.2 and MAY support it otherwise. If the extension pack is supported in its
6273entirety, the device MUST identify the support through the
6274    <code>
6275     android.hardware.opengles.aep
6276    </code>
6277    feature flag.
6278   </p>
6279   <p>
6280    Also, device implementations MAY implement any desired OpenGL ES extensions.
6281However, device implementations MUST report via the OpenGL ES managed and
6282native APIs all extension strings that they do support, and conversely MUST NOT
6283report extension strings that they do not support.
6284   </p>
6285   <p>
6286    Note that Android includes support for applications to optionally specify that
6287they require specific OpenGL texture compression formats. These formats are
6288typically vendor-specific. Device implementations are not required by Android
6289to implement any specific texture compression format. However, they SHOULD
6290accurately report any texture compression formats that they do support, via the
6291getString() method in the OpenGL API.
6292   </p>
6293   <p>
6294    Android includes a mechanism for applications to declare that they want to
6295enable hardware acceleration for 2D graphics at the Application, Activity,
6296Window, or View level through the use of a manifest tag
6297    <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">android:hardwareAccelerated</a> or direct API calls.
6298   </p>
6299   <p>
6300    Device implementations MUST enable hardware acceleration by default, and MUST
6301disable hardware acceleration if the developer so requests by setting
6302android:hardwareAccelerated="false&rdquo; or disabling hardware acceleration directly
6303through the Android View APIs.
6304   </p>
6305   <p>
6306    In addition, device implementations MUST exhibit behavior consistent with the
6307Android SDK documentation on
6308    <a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html">
6309     hardware acceleration</a>.
6310   </p>
6311   <p>
6312    Android includes a TextureView object that lets developers directly integrate
6313hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy.
6314Device implementations MUST support the TextureView API, and MUST exhibit
6315consistent behavior with the upstream Android implementation.
6316   </p>
6317   <p>
6318    Android includes support for EGL_ANDROID_RECORDABLE, an EGLConfig attribute
6319that indicates whether the EGLConfig supports rendering to an ANativeWindow
6320that records images to a video. Device implementations MUST support
6321    <a href="https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt">EGL_ANDROID_RECORDABLE</a> extension.
6322   </p>
6323   <h3 id="7_1_5_legacy_application_compatibility_mode">
6324    7.1.5. Legacy Application Compatibility Mode
6325   </h3>
6326   <p>
6327    Android specifies a &ldquo;compatibility mode&rdquo; in which the framework operates in a
6328'normal' screen size equivalent (320dp width) mode for the benefit of legacy
6329applications not developed for old versions of Android that pre-date
6330screen-size independence.
6331   </p>
6332   <ul>
6333    <li>
6334     Android Automotive does not support legacy compatibility mode.
6335    </li>
6336    <li>
6337     All other device implementations MUST include support for legacy
6338application compatibility mode as implemented by the upstream Android open
6339source code. That is, device implementations MUST NOT alter the triggers or
6340thresholds at which compatibility mode is activated, and MUST NOT alter the
6341behavior of the compatibility mode itself.
6342    </li>
6343   </ul>
6344   <h3 id="7_1_6_screen_technology">
6345    7.1.6. Screen Technology
6346   </h3>
6347   <p>
6348    The Android platform includes APIs that allow applications to render rich
6349graphics to the display. Devices MUST support all of these APIs as defined by
6350the Android SDK unless specifically allowed in this document.
6351   </p>
6352   <ul>
6353    <li>
6354     Devices MUST support displays capable of rendering 16-bit color graphics
6355and SHOULD support displays capable of 24-bit color graphics.
6356    </li>
6357    <li>
6358     Devices MUST support displays capable of rendering animations.
6359    </li>
6360    <li>
6361     The display technology used MUST have a pixel aspect ratio (PAR) between
63620.9 and 1.15. That is, the pixel aspect ratio MUST be near square (1.0) with a
636310 ~ 15% tolerance.
6364    </li>
6365   </ul>
6366   <h3 id="7_1_7_secondary_displays">
6367    7.1.7. Secondary Displays
6368   </h3>
6369   <p>
6370    Android includes support for secondary display to enable media sharing
6371capabilities and developer APIs for accessing external displays. If a device
6372supports an external display either via a wired, wireless, or an embedded
6373additional display connection then the device implementation MUST implement the
6374    <a href="http://developer.android.com/reference/android/hardware/display/DisplayManager.html">
6375     display manager API</a> as described in the Android SDK documentation.
6376   </p>
6377   <h2 id="7_2_input_devices">
6378    7.2. Input Devices
6379   </h2>
6380   <p>
6381    Devices MUST support a touchscreen or meet the requirements listed in 7.2.2 for
6382non-touch navigation.
6383   </p>
6384   <h3 id="7_2_1_keyboard">
6385    7.2.1. Keyboard
6386   </h3>
6387   <div class="note">
6388    Android Watch and Android Automotive implementations MAY implement a soft
6389keyboard. All other device implementations MUST implement a soft keyboard and:
6390   </div>
6391   <p>
6392    Device implementations:
6393   </p>
6394   <ul>
6395    <li>
6396     MUST include support for the Input Management Framework (which allows
6397third-party developers to create Input Method Editors&mdash;i.e. soft keyboard) as
6398detailed at
6399     <a href="http://developer.android.com">http://developer.android.com</a>. 
6400    </li>
6401    <li>
6402     MUST provide at least one soft keyboard implementation (regardless of
6403whether a hard keyboard is present) except for Android Watch devices where the
6404screen size makes it less reasonable to have a soft keyboard.
6405    </li>
6406    <li>
6407     MAY include additional soft keyboard implementations.
6408    </li>
6409    <li>
6410     MAY include a hardware keyboard.
6411    </li>
6412    <li>
6413     MUST NOT include a hardware keyboard that does not match one of the formats
6414specified in
6415     <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.keyboard</a> (QWERTY or 12-key).
6416    </li>
6417   </ul>
6418   <h3 id="7_2_2_non_touch_navigation">
6419    7.2.2. Non-touch Navigation
6420   </h3>
6421   <div class="note">
6422    Android Television devices MUST support D-pad.
6423   </div>
6424   <p>
6425    Device implementations:
6426   </p>
6427   <ul>
6428    <li>
6429     MAY omit a non-touch navigation option (trackball, d-pad, or wheel) if the
6430device implementation is not an Android Television device.
6431    </li>
6432    <li>
6433     MUST report the correct value for
6434     <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.navigation</a>. 
6435    </li>
6436    <li>
6437     MUST provide a reasonable alternative user interface mechanism for the
6438selection and editing of text, compatible with Input Management Engines. The
6439upstream Android open source implementation includes a selection mechanism
6440suitable for use with devices that lack non-touch navigation inputs.
6441    </li>
6442   </ul>
6443   <h3 id="7_2_3_navigation_keys">
6444    7.2.3. Navigation Keys
6445   </h3>
6446   <div class="note">
6447    The availability and visibility requirement of the Home, Recents, and Back
6448functions differ between device types as described in this section.
6449   </div>
6450   <p>
6451    The Home, Recents, and Back functions (mapped to the key events KEYCODE_HOME,
6452KEYCODE_APP_SWITCH, KEYCODE_BACK, respectively) are essential to the Android
6453navigation paradigm and therefore:
6454   </p>
6455   <ul>
6456    <li>
6457     Android Handheld device implementations MUST provide the Home, Recents, and
6458    Back functions.
6459    </li>
6460    <li>
6461     Android Television device implementations MUST provide the Home and Back
6462    functions.
6463    </li>
6464    <li>
6465     Android Watch device implementations MUST have the Home function available
6466    to the user, and the Back function except for when it is in
6467     <code>
6468      UI_MODE_TYPE_WATCH
6469     </code>.
6470    </li>
6471    <li>
6472     Android Watch device implementations, and no other Android device types,
6473    MAY consume the long press event on the key event
6474     <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK">
6475      <code>KEYCODE_BACK</code></a>
6476     and omit it from being sent to the foreground application.
6477    </li>
6478    <li>
6479     Android Automotive implementations MUST provide the Home function and MAY
6480    provide Back and Recent functions.
6481    </li>
6482    <li>
6483     All other types of device implementations MUST provide the Home and Back
6484    functions.
6485    </li>
6486   </ul>
6487   <p>
6488    These functions MAY be implemented via dedicated physical buttons (such as
6489mechanical or capacitive touch buttons), or MAY be implemented using dedicated
6490software keys on a distinct portion of the screen, gestures, touch panel, etc.
6491Android supports both implementations. All of these functions MUST be accessible
6492with a single action (e.g. tap, double-click or gesture) when visible.
6493   </p>
6494   <p>
6495    Recents function, if provided, MUST have a visible button or icon unless hidden
6496together with other navigation functions in full-screen mode. This does not
6497apply to devices upgrading from earlier Android versions that have physical
6498buttons for navigation and no recents key.
6499   </p>
6500   <p>
6501    The Home and Back functions, if provided, MUST each have a visible button or
6502icon unless hidden together with other navigation functions in full-screen mode
6503or when the uiMode UI_MODE_TYPE_MASK is set to UI_MODE_TYPE_WATCH.
6504   </p>
6505   <p>
6506    The Menu function is deprecated in favor of action bar since Android 4.0.
6507Therefore the new device implementations shipping with Android 7.0
6508and later MUST NOT implement a dedicated physical button for the Menu function.
6509Older device implementations SHOULD NOT implement a dedicated physical button
6510for the Menu function, but if the physical Menu button is implemented and the
6511device is running applications with targetSdkVersion &gt; 10, the device
6512implementation:
6513   </p>
6514   <ul>
6515    <li>
6516     MUST display the action overflow button on the action bar when it is visible
6517and the resulting action overflow menu popup is not empty. For a device
6518implementation launched before Android 4.4 but upgrading to Android
65197.0, this is RECOMMENDED.
6520    </li>
6521    <li>
6522     MUST NOT modify the position of the action overflow popup displayed by
6523selecting the overflow button in the action bar.
6524    </li>
6525    <li>
6526     MAY render the action overflow popup at a modified position on the screen
6527when it is displayed by selecting the physical menu button.
6528    </li>
6529   </ul>
6530   <p>
6531    For backwards compatibility, device implementations MUST make the Menu function
6532available to applications when targetSdkVersion is less than 10, either by a
6533physical button, a software key, or gestures. This Menu function should be
6534presented unless hidden together with other navigation functions.
6535   </p>
6536   <p>
6537    Android device implementations supporting the
6538    <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</aand/or
6539    <a href="https://developer.android.com/reference/android/service/voice/VoiceInteractionService.html">
6540     <code> VoiceInteractionService</code></a>
6541    MUST be able to launch an assist app with a single interaction (e.g. tap,
6542double-click, or gesture) when other navigation keys are visible. It is STRONGLY
6543RECOMMENDED to use long press on home as this interaction. The designated
6544interaction MUST launch the user-selected assist app, in other words the app
6545that implements a VoiceInteractionService, or an activity handling the ACTION_ASSIST intent.
6546   </p>
6547   <p>
6548    Device implementations MAY use a distinct portion of the screen to display the
6549navigation keys, but if so, MUST meet these requirements:
6550   </p>
6551   <ul>
6552    <li>
6553     Device implementation navigation keys MUST use a distinct portion of the
6554screen, not available to applications, and MUST NOT obscure or otherwise
6555interfere with the portion of the screen available to applications.
6556    </li>
6557    <li>
6558     Device implementations MUST make available a portion of the display to
6559applications that meets the requirements defined in
6560     <a href="#7_1_1_screen_configuration">
6561      section
65627.1.1
6563     </a>
6564     .
6565    </li>
6566    <li>
6567     Device implementations MUST display the navigation keys when applications do
6568not specify a system UI mode, or specify SYSTEM_UI_FLAG_VISIBLE.
6569    </li>
6570    <li>
6571     Device implementations MUST present the navigation keys in an unobtrusive
6572&ldquo;low profile&rdquo; (eg. dimmed) mode when applications specify
6573SYSTEM_UI_FLAG_LOW_PROFILE.
6574    </li>
6575    <li>
6576     Device implementations MUST hide the navigation keys when applications
6577specify SYSTEM_UI_FLAG_HIDE_NAVIGATION.
6578    </li>
6579   </ul>
6580   <h3 id="7_2_4_touchscreen_input">
6581    7.2.4. Touchscreen Input
6582   </h3>
6583   <div class="note">
6584    Android Handhelds and Watch Devices MUST support touchscreen input.
6585   </div>
6586   <p>
6587    Device implementations SHOULD have a pointer input system of some kind (either
6588mouse-like or touch). However, if a device implementation does not support a
6589pointer input system, it MUST NOT report the android.hardware.touchscreen or
6590android.hardware.faketouch feature constant. Device implementations that do
6591include a pointer input system:
6592   </p>
6593   <ul>
6594    <li>
6595     SHOULD support fully independently tracked pointers, if the device input
6596system supports multiple pointers.
6597    </li>
6598    <li>
6599     MUST report the value of
6600     <a href="http://developer.android.com/reference/android/content/res/Configuration.html">android.content.res.Configuration.touchscreen</a> corresponding to the type of the specific touchscreen on the device.
6601    </li>
6602   </ul>
6603   <p>
6604    Android includes support for a variety of touchscreens, touch pads, and fake
6605touch input devices.
6606    <a href="http://source.android.com/devices/tech/input/touch-devices.html">
6607     Touchscreen based device implementations</a> are associated with a display
6608     such that the user has the impression of directly
6609manipulating items on screen. Since the user is directly touching the screen,
6610the system does not require any additional affordances to indicate the objects
6611being manipulated. In contrast, a fake touch interface provides a user input
6612system that approximates a subset of touchscreen capabilities. For example, a
6613mouse or remote control that drives an on-screen cursor approximates touch, but
6614requires the user to first point or focus then click. Numerous input devices
6615like the mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick, and
6616multi-touch trackpad can support fake touch interactions. Android includes the
6617feature constant android.hardware.faketouch, which corresponds to a
6618high-fidelity non-touch (pointer-based) input device such as a mouse or trackpad
6619that can adequately emulate touch-based input (including basic gesture support),
6620and indicates that the device supports an emulated subset of touchscreen
6621functionality. Device implementations that declare the fake touch feature MUST
6622meet the fake touch requirements in
6623    <a href="#7_2_5_fake_touch_input">section 7.2.5</a>. 
6624   </p>
6625   <p>
6626    Device implementations MUST report the correct feature corresponding to the type
6627of input used. Device implementations that include a touchscreen (single-touch
6628or better) MUST report the platform feature constant
6629android.hardware.touchscreen. Device implementations that report the platform
6630feature constant android.hardware.touchscreen MUST also report the platform
6631feature constant android.hardware.faketouch. Device implementations that do not
6632include a touchscreen (and rely on a pointer device only) MUST NOT report any
6633touchscreen feature, and MUST report only android.hardware.faketouch if they
6634meet the fake touch requirements in
6635    <a href="#7_2_5_fake_touch_input">section 7.2.5</a>. 
6636   </p>
6637   <h3 id="7_2_5_fake_touch_input">
6638    7.2.5. Fake Touch Input
6639   </h3>
6640   <p>
6641    Device implementations that declare support for android.hardware.faketouch:
6642   </p>
6643   <ul>
6644    <li>
6645     MUST report the
6646     <a href="http://developer.android.com/reference/android/view/MotionEvent.html">
6647      absolute X and Y screen positions</a> of the pointer location and display a visual pointer on the screen.
6648    </li>
6649    <li>
6650     MUST report touch event with the action code that specifies the state change
6651that occurs on the pointer
6652     <a href="http://developer.android.com/reference/android/view/MotionEvent.html">
6653      going down or up on the screen</a>.
6654    </li>
6655    <li>
6656     MUST support pointer down and up on an object on the screen, which allows
6657users to emulate tap on an object on the screen.
6658    </li>
6659    <li>
6660     MUST support pointer down, pointer up, pointer down then pointer up in the
6661same place on an object on the screen within a time threshold, which allows
6662users to
6663     <a href="http://developer.android.com/reference/android/view/MotionEvent.html">
6664      emulate double tap</a> on an object on the screen.
6665    </li>
6666    <li>
6667     MUST support pointer down on an arbitrary point on the screen, pointer move
6668to any other arbitrary point on the screen, followed by a pointer up, which
6669allows users to emulate a touch drag.
6670    </li>
6671    <li>
6672     MUST support pointer down then allow users to quickly move the object to a
6673different position on the screen and then pointer up on the screen, which allows
6674users to fling an object on the screen.
6675    </li>
6676   </ul>
6677   <p>
6678    Devices that declare support for android.hardware.faketouch.multitouch.distinct
6679MUST meet the requirements for faketouch above, and MUST also support distinct
6680tracking of two or more independent pointer inputs.
6681   </p>
6682   <h3 id="7_2_6_game_controller_support">
6683    7.2.6. Game Controller Support
6684   </h3>
6685   <p>
6686    Android Television device implementations MUST support button mappings for game
6687controllers as listed below. The upstream Android implementation includes
6688implementation for game controllers that satisfies this requirement.
6689   </p>
6690   <h4 id="7_2_6_1_button_mappings">
6691    7.2.6.1. Button Mappings
6692   </h4>
6693   <p>
6694    Android Television device implementations MUST support the following key mappings:
6695   </p>
6696   <table>
6697    <tr>
6698     <th>
6699      Button
6700     </th>
6701     <th>
6702      HID Usage
6703      <sup>
6704       2
6705      </sup>
6706     </th>
6707     <th>
6708      Android Button
6709     </th>
6710    </tr>
6711    <tr>
6712     <td>
6713      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_A">A</a> <sup>
6714       1
6715      </sup>
6716     </td>
6717     <td>
6718      0x09 0x0001
6719     </td>
6720     <td>
6721      KEYCODE_BUTTON_A (96)
6722     </td>
6723    </tr>
6724    <tr>
6725     <td>
6726      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_B">B</a> <sup>
6727       1
6728      </sup>
6729     </td>
6730     <td>
6731      0x09 0x0002
6732     </td>
6733     <td>
6734      KEYCODE_BUTTON_B (97)
6735     </td>
6736    </tr>
6737    <tr>
6738     <td>
6739      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_X">X</a> <sup>
6740       1
6741      </sup>
6742     </td>
6743     <td>
6744      0x09 0x0004
6745     </td>
6746     <td>
6747      KEYCODE_BUTTON_X (99)
6748     </td>
6749    </tr>
6750    <tr>
6751     <td>
6752      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_Y">Y</a> <sup>
6753       1
6754      </sup>
6755     </td>
6756     <td>
6757      0x09 0x0005
6758     </td>
6759     <td>
6760      KEYCODE_BUTTON_Y (100)
6761     </td>
6762    </tr>
6763    <tr>
6764     <td>
6765      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a> <sup>
6766       1
6767      </sup>
6768      <br/>
6769      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_DOWN">D-pad down</a> <sup>
6770       1
6771      </sup>
6772     </td>
6773     <td>
6774      0x01 0x0039
6775      <sup>
6776       3
6777      </sup>
6778     </td>
6779     <td>
6780      <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_Y">AXIS_HAT_Y</a> <sup>
6781       4
6782      </sup>
6783     </td>
6784    </tr>
6785    <tr>
6786     <td>
6787      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a> 1
6788      <br/>
6789      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_RIGHT">D-pad right</a> <sup>
6790       1
6791      </sup>
6792     </td>
6793     <td>
6794      0x01 0x0039
6795      <sup>
6796       3
6797      </sup>
6798     </td>
6799     <td>
6800      <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_HAT_X">AXIS_HAT_X</a> <sup>
6801       4
6802      </sup>
6803     </td>
6804    </tr>
6805    <tr>
6806     <td>
6807      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_L1">Left shoulder button</a> <sup>
6808       1
6809      </sup>
6810     </td>
6811     <td>
6812      0x09 0x0007
6813     </td>
6814     <td>
6815      KEYCODE_BUTTON_L1 (102)
6816     </td>
6817    </tr>
6818    <tr>
6819     <td>
6820      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_R1">Right shoulder button</a> <sup>
6821       1
6822      </sup>
6823     </td>
6824     <td>
6825      0x09 0x0008
6826     </td>
6827     <td>
6828      KEYCODE_BUTTON_R1 (103)
6829     </td>
6830    </tr>
6831    <tr>
6832     <td>
6833      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBL">Left stick click</a> <sup>
6834       1
6835      </sup>
6836     </td>
6837     <td>
6838      0x09 0x000E
6839     </td>
6840     <td>
6841      KEYCODE_BUTTON_THUMBL (106)
6842     </td>
6843    </tr>
6844    <tr>
6845     <td>
6846      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BUTTON_THUMBR">Right stick click</a> <sup>
6847       1
6848      </sup>
6849     </td>
6850     <td>
6851      0x09 0x000F
6852     </td>
6853     <td>
6854      KEYCODE_BUTTON_THUMBR (107)
6855     </td>
6856    </tr>
6857    <tr>
6858     <td>
6859      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME">Home</a> <sup>
6860       1
6861      </sup>
6862     </td>
6863     <td>
6864      0x0c 0x0223
6865     </td>
6866     <td>
6867      KEYCODE_HOME (3)
6868     </td>
6869    </tr>
6870    <tr>
6871     <td>
6872      <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK">Back</a> <sup>
6873       1
6874      </sup>
6875     </td>
6876     <td>
6877      0x0c 0x0224
6878     </td>
6879     <td>
6880      KEYCODE_BACK (4)
6881     </td>
6882    </tr>
6883   </table>
6884   <p class="table_footnote">
6885    1
6886    <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a> </p>
6887   <p class="table_footnote">
6888    2 The above HID usages must be declared within a Game
6889pad CA (0x01 0x0005).
6890   </p>
6891   <p class="table_footnote">
6892    3 This usage must have a Logical Minimum of 0, a
6893Logical Maximum of 7, a Physical Minimum of 0, a Physical Maximum of 315, Units
6894in Degrees, and a Report Size of 4. The logical value is defined to be the
6895clockwise rotation away from the vertical axis; for example, a logical value of
68960 represents no rotation and the up button being pressed, while a logical value
6897of 1 represents a rotation of 45 degrees and both the up and left keys being
6898pressed.
6899   </p>
6900   <p class="table_footnote">
6901    4
6902    <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> </p>
6903   <table>
6904    <tr>
6905     <th>
6906      Analog Controls
6907      <sup>
6908       1
6909      </sup>
6910     </th>
6911     <th>
6912      HID Usage
6913     </th>
6914     <th>
6915      Android Button
6916     </th>
6917    </tr>
6918    <tr>
6919     <td>
6920      <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_LTRIGGER">Left Trigger</a> </td>
6921     <td>
6922      0x02 0x00C5
6923     </td>
6924     <td>
6925      AXIS_LTRIGGER
6926     </td>
6927    </tr>
6928    <tr>
6929     <td>
6930      <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_THROTTLE">Right Trigger</a> </td>
6931     <td>
6932      0x02 0x00C4
6933     </td>
6934     <td>
6935      AXIS_RTRIGGER
6936     </td>
6937    </tr>
6938    <tr>
6939     <td>
6940      <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y">Left Joystick</a> </td>
6941     <td>
6942      0x01 0x0030
6943      <br/>
6944      0x01 0x0031
6945     </td>
6946     <td>
6947      AXIS_X
6948      <br/>
6949      AXIS_Y
6950     </td>
6951    </tr>
6952    <tr>
6953     <td>
6954      <a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z">Right Joystick</a> </td>
6955     <td>
6956      0x01 0x0032
6957      <br/>
6958      0x01 0x0035
6959     </td>
6960     <td>
6961      AXIS_Z
6962      <br/>
6963      AXIS_RZ
6964     </td>
6965    </tr>
6966   </table>
6967   <p class="table_footnote">
6968    1
6969    <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> </p>
6970   <h3 id="7_2_7_remote_control">
6971    7.2.7. Remote Control
6972   </h3>
6973   <p>
6974    Android Television device implementations SHOULD provide a remote control to
6975allow users to access the TV interface. The remote control MAY be a physical
6976remote or can be a software-based remote that is accessible from a mobile phone
6977or tablet. The remote control MUST meet the requirements defined below.
6978   </p>
6979   <ul>
6980    <li>
6981     <strong>
6982      Search affordance
6983     </strong>
6984     . Device implementations MUST fire KEYCODE_SEARCH when
6985the user invokes voice search either on the physical or software-based remote.
6986    </li>
6987    <li>
6988     <strong>
6989      Navigation
6990     </strong>
6991     . All Android Television remotes MUST include
6992     <a href="http://developer.android.com/reference/android/view/KeyEvent.html">
6993      Back, Home, and
6994Select buttons and support for D-pad events</a>.
6995    </li>
6996   </ul>
6997   <h2 id="7_3_sensors">
6998    7.3. Sensors
6999   </h2>
7000   <p>
7001    Android includes APIs for accessing a variety of sensor types. Devices
7002implementations generally MAY omit these sensors, as provided for in the
7003following subsections. If a device includes a particular sensor type that has a
7004corresponding API for third-party developers, the device implementation MUST
7005implement that API as described in the Android SDK documentation and the
7006Android Open Source documentation on
7007    <a href="http://source.android.com/devices/sensors/">sensors</a>.  For example, device
7008implementations:
7009   </p>
7010   <ul>
7011    <li>
7012     MUST accurately report the presence or absence of sensors per the
7013     <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager</a> class.
7014    </li>
7015    <li>
7016     MUST return an accurate list of supported sensors via the
7017SensorManager.getSensorList() and similar methods.
7018    </li>
7019    <li>
7020     MUST behave reasonably for all other sensor APIs (for example, by returning
7021true or false as appropriate when applications attempt to register listeners,
7022not calling sensor listeners when the corresponding sensors are not present;
7023etc.).
7024    </li>
7025    <li>
7026     MUST
7027     <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">
7028      report all sensor measurements</a> using the relevant International System of Units (metric) values for each
7029sensor type as defined in the Android SDK documentation.
7030    </li>
7031    <li>
7032     SHOULD
7033     <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp">
7034      report the event time</a> in nanoseconds as defined in the Android SDK documentation, representing the
7035time the event happened and synchronized with the
7036SystemClock.elapsedRealtimeNano() clock. Existing and new Android devices are
7037     <strong>
7038      STRONGLY RECOMMENDED
7039     </strong>
7040     to meet these requirements so they will be able to
7041upgrade to the future platform releases where this might become a REQUIRED
7042component. The synchronization error SHOULD be below 100 milliseconds.
7043    </li>
7044    <li>
7045     MUST report sensor data with a maximum latency of 100 milliseconds + 2 *
7046sample_time for the case of a sensor streamed with a minimum required latency
7047of 5 ms + 2 * sample_time when the application processor is active. This delay
7048does not include any filtering delays.
7049    </li>
7050    <li>
7051     MUST report the first sensor sample within 400 milliseconds + 2 *
7052sample_time of the sensor being activated. It is acceptable for this sample to
7053have an accuracy of 0.
7054    </li>
7055   </ul>
7056   <p>
7057    The list above is not comprehensive; the documented behavior of the Android SDK
7058and the Android Open Source Documentations on
7059    <a href="http://source.android.com/devices/sensors/">sensors</a> is to be considered
7060authoritative.
7061   </p>
7062   <p>
7063    Some sensor types are composite, meaning they can be derived from data provided
7064by one or more other sensors. (Examples include the orientation sensor and the
7065linear acceleration sensor.) Device implementations SHOULD implement these
7066sensor types, when they include the prerequisite physical sensors as described
7067in
7068    <a href="https://source.android.com/devices/sensors/sensor-types.html">
7069     sensor types</a>. If a
7070device implementation includes a composite sensor it MUST implement the sensor
7071as described in the Android Open Source documentation on
7072    <a href="https://source.android.com/devices/sensors/sensor-types.html#composite_sensor_type_summary">
7073     composite sensors</a>.</p>
7074   <p>
7075    Some Android sensors support a
7076    <a href="https://source.android.com/devices/sensors/report-modes.html#continuous">
7077     &ldquo;continuous&rdquo; trigger mode</a>,
7078which returns data continuously. For any API indicated by the Android SDK
7079documentation to be a continuous sensor, device implementations MUST
7080continuously provide periodic data samples that SHOULD have a jitter below 3%,
7081where jitter is defined as the standard deviation of the difference of the
7082reported timestamp values between consecutive events.
7083   </p>
7084   <p>
7085    Note that the device implementations MUST ensure that the sensor event stream
7086MUST NOT prevent the device CPU from entering a suspend state or waking up from
7087a suspend state.
7088   </p>
7089   <p>
7090    Finally, when several sensors are activated, the power consumption SHOULD NOT
7091exceed the sum of the individual sensor&rsquo;s reported power consumption.
7092   </p>
7093   <h3 id="7_3_1_accelerometer">
7094    7.3.1. Accelerometer
7095   </h3>
7096   <p>
7097    Device implementations SHOULD include a 3-axis accelerometer. Android Handheld
7098devices, Android Automotive implementations, and Android Watch devices are STRONGLY
7099RECOMMENDED to include this sensor. If a device implementation does include a
71003-axis accelerometer, it:
7101   </p>
7102   <ul>
7103    <li>
7104     MUST implement and report
7105     <a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">
7106      TYPE_ACCELEROMETER sensor</a>.
7107    </li>
7108    <li>
7109     MUST be able to report events up to a frequency of at least 50 Hz for
7110Android Watch devices as such devices have a stricter power constraint and 100
7111Hz for all other device types.
7112    </li>
7113    <li>
7114     SHOULD report events up to at least 200 Hz.
7115    </li>
7116    <li>
7117     MUST comply with the
7118     <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">
7119      Android sensor coordinate system </a>
7120     as detailed in the Android APIs. Android Automotive implementations MUST comply
7121with the Android
7122     <a href="http://source.android.com/devices/sensors/sensor-types.html#auto_axes">car sensor coordinate system</a>. 
7123    </li>
7124    <li>
7125     MUST be capable of measuring from freefall up to four times the gravity
7126(4g) or more on any axis.
7127    </li>
7128    <li>
7129     MUST have a resolution of at least 12-bits and SHOULD have a resolution of
7130at least 16-bits.
7131    </li>
7132    <li>
7133     SHOULD be calibrated while in use if the characteristics changes over the
7134life cycle and compensated, and preserve the compensation parameters between
7135device reboots.
7136    </li>
7137    <li>
7138     SHOULD be temperature compensated.
7139    </li>
7140    <li>
7141     MUST have a standard deviation no greater than 0.05 m/s^, where the
7142standard deviation should be calculated on a per axis basis on samples
7143collected over a period of at least 3 seconds at the fastest sampling rate.
7144    </li>
7145    <li>
7146     SHOULD implement the TYPE_SIGNIFICANT_MOTION, TYPE_TILT_DETECTOR,
7147TYPE_STEP_DETECTOR, TYPE_STEP_COUNTER composite sensors as described in the
7148Android SDK document. Existing and new Android devices are
7149     <strong>
7150      STRONGLY
7151RECOMMENDED
7152     </strong>
7153     to implement the TYPE_SIGNIFICANT_MOTION composite sensor. If any
7154of these sensors are implemented, the sum of their power consumption MUST
7155always be less than 4 mW and SHOULD each be below 2 mW and 0.5 mW for when the
7156device is in a dynamic or static condition.
7157    </li>
7158    <li>
7159     If a gyroscope sensor is included, MUST implement the TYPE_GRAVITY and
7160TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
7161TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
7162are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor.
7163    </li>
7164    <li>
7165     MUST implement a TYPE_ROTATION_VECTOR composite sensor, if a gyroscope
7166sensor and a magnetometer sensor is also included.
7167    </li>
7168   </ul>
7169   <h3 id="7_3_2_magnetometer">
7170    7.3.2. Magnetometer
7171   </h3>
7172   <p>
7173    Device implementations SHOULD include a 3-axis magnetometer (compass). If a
7174device does include a 3-axis magnetometer, it:
7175   </p>
7176   <ul>
7177    <li>
7178     MUST implement the TYPE_MAGNETIC_FIELD sensor and SHOULD also implement
7179TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor. Existing and new Android devices are
7180STRONGLY RECOMMENDED to implement the TYPE_MAGNETIC_FIELD_UNCALIBRATED sensor.
7181    </li>
7182    <li>
7183     MUST be able to report events up to a frequency of at least 10 Hz and
7184SHOULD report events up to at least 50 Hz.
7185    </li>
7186    <li>
7187     MUST comply with the
7188     <a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">
7189      Android sensor coordinate system</a> as detailed in the Android APIs.
7190    </li>
7191    <li>
7192     MUST be capable of measuring between -900 &micro;T and +900 &micro;T on each axis
7193before saturating.
7194    </li>
7195    <li>
7196     MUST have a hard iron offset value less than 700 &micro;T and SHOULD have a value
7197below 200 &micro;T, by placing the magnetometer far from dynamic (current-induced)
7198and static (magnet-induced) magnetic fields.
7199    </li>
7200    <li>
7201     MUST have a resolution equal or denser than 0.6 &micro;T and SHOULD have a
7202resolution equal or denser than 0.2 &micro;T.
7203    </li>
7204    <li>
7205     SHOULD be temperature compensated.
7206    </li>
7207    <li>
7208     MUST support online calibration and compensation of the hard iron bias, and
7209preserve the compensation parameters between device reboots.
7210    </li>
7211    <li>
7212     MUST have the soft iron compensation applied&mdash;the calibration can be done
7213either while in use or during the production of the device.
7214    </li>
7215    <li>
7216     SHOULD have a standard deviation, calculated on a per axis basis on samples
7217collected over a period of at least 3 seconds at the fastest sampling rate, no
7218greater than 0.5 &micro;T.
7219    </li>
7220    <li>
7221     MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer
7222sensor and a gyroscope sensor is also included.
7223    </li>
7224    <li>
7225     MAY implement the TYPE_GEOMAGNETIC_ROTATION_VECTOR sensor if an
7226accelerometer sensor is also implemented. However if implemented, it MUST
7227consume less than 10 mW and SHOULD consume less than 3 mW when the sensor is
7228registered for batch mode at 10 Hz.
7229    </li>
7230   </ul>
7231   <h3 id="7_3_3_gps">
7232    7.3.3. GPS
7233   </h3>
7234   <p>
7235    Device implementations SHOULD include a GPS/GNSS receiver. If a device implementation
7236does include a GPS/GNSS receiver and reports the capability to applications through the
7237    <code>
7238     android.hardware.location.gps
7239    </code>
7240    feature flag:
7241   </p>
7242   <ul>
7243    <li>
7244     It is STRONGLY RECOMMENDED that the device continue to deliver normal GPS/GNSS
7245    outputs to applications during an emergency phone call and that location output
7246    not be blocked during an emergency phone call.
7247    </li>
7248    <li>
7249     It MUST support location outputs at a rate of at least 1 Hz when requested via
7250     <code>
7251      LocationManager#requestLocationUpdate
7252     </code>.
7253    </li>
7254    <li>
7255     It MUST be able to determine the location in open-sky conditions (strong signals,
7256    negligible multipath, HDOP &lt; 2) within 10 seconds (fast time to first fix), when
7257    connected to a 0.5 Mbps or faster data speed internet connection. This requirement
7258    is typically met by the use of some form of Assisted or Predicted GPS/GNSS technique
7259    to minimize GPS/GNSS lock-on time (Assistance data includes Reference Time, Reference
7260    Location and Satellite Ephemeris/Clock).
7261     <ul>
7262      <li>
7263       After making such a location calculation, it is STRONGLY RECOMMENDED for the device to
7264     be able to determine its location, in open sky, within 10 seconds, when location
7265     requests are restarted, up to an hour after the initial location calculation,
7266     even when the subsequent request is made without a data connection, and/or after a power
7267     cycle.
7268      </li>
7269     </ul>
7270    </li>
7271    <li>
7272     In open sky conditions after determining the location, while stationary or moving with less
7273    than 1 meter per second squared of acceleration:
7274     <ul>
7275      <li>
7276       It MUST be able to determine location within 20 meters, and speed within 0.5 meters
7277     per second, at least 95% of the time.
7278      </li>
7279      <li>
7280       It MUST simultaneously track and report via
7281       <a href="https://developer.android.com/reference/android/location/GnssStatus.Callback.html#GnssStatus.Callback()'">GnssStatus.Callback</a> at least 8 satellites from one constellation.
7282      </li>
7283      <li>
7284       It SHOULD be able to simultaneously track at least 24 satellites, from multiple
7285     constellations (e.g. GPS + at least one of Glonass, Beidou, Galileo).
7286      </li>
7287     </ul>
7288    </li>
7289    <li>
7290     It MUST report the GNSS technology generation through the test API &lsquo;getGnssYearOfHardware&rsquo;.
7291    </li>
7292    <li>
7293     It is STRONGLY RECOMMENDED to meet and MUST meet all requirements below if the GNSS technology
7294    generation is reported as the year "2016" or newer.
7295     <ul>
7296      <li>
7297       It MUST report GPS measurements, as soon as they are found, even if a location calculated
7298     from GPS/GNSS is not yet reported.
7299      </li>
7300      <li>
7301       It MUST report GPS pseudoranges and pseudorange rates, that, in open-sky conditions
7302     after determining the location, while stationary or moving with less than 0.2 meter
7303     per second squared of acceleration, are sufficient to calculate position within
7304     20 meters, and speed within 0.2 meters per second, at least 95% of the time.
7305      </li>
7306     </ul>
7307    </li>
7308   </ul>
7309   <p>
7310    Note that while some of the GPS requirements above are stated as STRONGLY RECOMMENDED, the
7311Compatibility Definition for the next major version is expected to change these to a MUST.
7312   </p>
7313   <h3 id="7_3_4_gyroscope">
7314    7.3.4. Gyroscope
7315   </h3>
7316   <p>
7317    Device implementations SHOULD include a gyroscope (angular change sensor).
7318Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is
7319also included. If a device implementation includes a gyroscope, it:
7320   </p>
7321   <ul>
7322    <li>
7323     MUST implement the TYPE_GYROSCOPE sensor and SHOULD also implement
7324TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are
7325STRONGLY RECOMMENDED to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED
7326sensor.
7327    </li>
7328    <li>
7329     MUST be capable of measuring orientation changes up to 1,000 degrees per
7330second.
7331    </li>
7332    <li>
7333     MUST be able to report events up to a frequency of at least 50 Hz for
7334Android Watch devices as such devices have a stricter power constraint and 100
7335Hz for all other device types.
7336    </li>
7337    <li>
7338     SHOULD report events up to at least 200 Hz.
7339    </li>
7340    <li>
7341     MUST have a resolution of 12-bits or more and SHOULD have a resolution of
734216-bits or more.
7343    </li>
7344    <li>
7345     MUST be temperature compensated.
7346    </li>
7347    <li>
7348     MUST be calibrated and compensated while in use, and preserve the
7349compensation parameters between device reboots.
7350    </li>
7351    <li>
7352     MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per
7353Hz, or rad^2 / s). The variance is allowed to vary with the sampling rate, but
7354must be constrained by this value. In other words, if you measure the variance
7355of the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2.
7356    </li>
7357    <li>
7358     MUST implement a TYPE_ROTATION_VECTOR composite sensor, if an accelerometer
7359sensor and a magnetometer sensor is also included.
7360    </li>
7361    <li>
7362     If an accelerometer sensor is included, MUST implement the TYPE_GRAVITY and
7363TYPE_LINEAR_ACCELERATION composite sensors and SHOULD implement the
7364TYPE_GAME_ROTATION_VECTOR composite sensor. Existing and new Android devices
7365are STRONGLY RECOMMENDED to implement the TYPE_GAME_ROTATION_VECTOR sensor.
7366    </li>
7367   </ul>
7368   <h3 id="7_3_5_barometer">
7369    7.3.5. Barometer
7370   </h3>
7371   <p>
7372    Device implementations SHOULD include a barometer (ambient air pressure
7373sensor). If a device implementation includes a barometer, it:
7374   </p>
7375   <ul>
7376    <li>
7377     MUST implement and report TYPE_PRESSURE sensor.
7378    </li>
7379    <li>
7380     MUST be able to deliver events at 5 Hz or greater.
7381    </li>
7382    <li>
7383     MUST have adequate precision to enable estimating altitude.
7384    </li>
7385    <li>
7386     MUST be temperature compensated.
7387    </li>
7388   </ul>
7389   <h3 id="7_3_6_thermometer">
7390    7.3.6. Thermometer
7391   </h3>
7392   <p>
7393    Device implementations MAY include an ambient thermometer (temperature sensor).
7394If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE and it MUST
7395measure the ambient (room) temperature in degrees Celsius.
7396   </p>
7397   <p>
7398    Device implementations MAY but SHOULD NOT include a CPU temperature sensor. If
7399present, it MUST be defined as SENSOR_TYPE_TEMPERATURE, it MUST measure the
7400temperature of the device CPU, and it MUST NOT measure any other temperature.
7401Note the SENSOR_TYPE_TEMPERATURE sensor type was deprecated in Android 4.0.
7402   </p>
7403   <div class="note">
7404    For Android Automotive implementations, SENSOR_TYPE_AMBIENT_TEMPERATURE MUST
7405measure the temperature inside the vehicle cabin.
7406   </div>
7407   <h3 id="7_3_7_photometer">
7408    7.3.7. Photometer
7409   </h3>
7410   <p>
7411    Device implementations MAY include a photometer (ambient light sensor).
7412   </p>
7413   <h3 id="7_3_8_proximity_sensor">
7414    7.3.8. Proximity Sensor
7415   </h3>
7416   <p>
7417    Device implementations MAY include a proximity sensor. Devices that can make a
7418voice call and indicate any value other than PHONE_TYPE_NONE in getPhoneType
7419SHOULD include a proximity sensor. If a device implementation does include a
7420proximity sensor, it:
7421   </p>
7422   <ul>
7423    <li>
7424     MUST measure the proximity of an object in the same direction as the
7425screen. That is, the proximity sensor MUST be oriented to detect objects close
7426to the screen, as the primary intent of this sensor type is to detect a phone
7427in use by the user. If a device implementation includes a proximity sensor with
7428any other orientation, it MUST NOT be accessible through this API.
7429    </li>
7430    <li>
7431     MUST have 1-bit of accuracy or more.
7432    </li>
7433   </ul>
7434   <h3 id="7_3_9_high_fidelity_sensors">
7435    7.3.9. High Fidelity Sensors
7436   </h3>
7437   <p>
7438    Device implementations supporting a set of higher quality sensors that can meet
7439all the requirements listed in this section MUST identify the support through
7440the
7441    <code>
7442     android.hardware.sensor.hifi_sensors
7443    </code>
7444    feature flag.
7445   </p>
7446   <p>
7447    A device declaring android.hardware.sensor.hifi_sensors MUST support all of the
7448following sensor types meeting the quality requirements as below:
7449   </p>
7450   <ul>
7451    <li>
7452     SENSOR_TYPE_ACCELEROMETER
7453     <ul>
7454      <li>
7455       MUST have a measurement range between at least -8g and +8g.
7456      </li>
7457      <li>
7458       MUST have a measurement resolution of at least 1024 LSB/G.
7459      </li>
7460      <li>
7461       MUST have a minimum measurement frequency of 12.5 Hz or lower.
7462      </li>
7463      <li>
7464       MUST have a maximum measurement frequency of 400 Hz or higher.
7465      </li>
7466      <li>
7467       MUST have a measurement noise not above 400 uG/&radic;Hz.
7468      </li>
7469      <li>
7470       MUST implement a non-wake-up form of this sensor with a buffering
7471    capability of at least 3000 sensor events.
7472      </li>
7473      <li>
7474       MUST have a batching power consumption not worse than 3 mW.
7475      </li>
7476      <li>
7477       SHOULD have a stationary noise bias stability of \&lt;15 &mu;g &radic;Hz from 24hr static
7478    dataset.
7479      </li>
7480      <li>
7481       SHOULD have a bias change vs. temperature of &le; +/- 1mg / &deg;C.
7482      </li>
7483      <li>
7484       SHOULD have a best-fit line non-linearity of &le; 0.5%, and sensitivity change vs. temperature of &le;
7485    0.03%/C&deg;.
7486      </li>
7487     </ul>
7488    </li>
7489    <li>
7490     <p>
7491      SENSOR_TYPE_GYROSCOPE
7492     </p>
7493     <ul>
7494      <li>
7495       MUST have a measurement range between at least -1000 and +1000 dps.
7496      </li>
7497      <li>
7498       MUST have a measurement resolution of at least 16 LSB/dps.
7499      </li>
7500      <li>
7501       MUST have a minimum measurement frequency of 12.5 Hz or lower.
7502      </li>
7503      <li>
7504       MUST have a maximum measurement frequency of 200 Hz or higher.
7505      </li>
7506      <li>
7507       MUST have a measurement noise not above 0.014&deg;/s/&radic;Hz.
7508      </li>
7509      <li>
7510       SHOULD have a stationary bias stability of &lt; 0.0002 &deg;/s &radic;Hz from 24-hour static dataset.
7511      </li>
7512      <li>
7513       SHOULD have a bias change vs. temperature of &le; +/- 0.05 &deg;/ s / &deg;C.
7514      </li>
7515      <li>
7516       SHOULD have a sensitivity change vs. temperature of &le; 0.02% / &deg;C.
7517      </li>
7518      <li>
7519       SHOULD have a best-fit line non-linearity of &le; 0.2%.
7520      </li>
7521      <li>
7522       SHOULD have a noise density of &le; 0.07 &deg;/s/&radic;Hz.
7523      </li>
7524     </ul>
7525    </li>
7526    <li>
7527     <p>
7528      SENSOR_TYPE_GYROSCOPE_UNCALIBRATED with the same quality requirements as
7529    SENSOR_TYPE_GYROSCOPE.
7530     </p>
7531    </li>
7532    <li>
7533     SENSOR_TYPE_GEOMAGNETIC_FIELD
7534     <ul>
7535      <li>
7536       MUST have a measurement range between at least -900 and +900 uT.
7537      </li>
7538      <li>
7539       MUST have a measurement resolution of at least 5 LSB/uT.
7540      </li>
7541      <li>
7542       MUST have a minimum measurement frequency of 5 Hz or lower.
7543      </li>
7544      <li>
7545       MUST have a maximum measurement frequency of 50 Hz or higher.
7546      </li>
7547      <li>
7548       MUST have a measurement noise not above 0.5 uT.
7549      </li>
7550     </ul>
7551    </li>
7552    <li>
7553     SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED with the same quality requirements
7554    as SENSOR_TYPE_GEOMAGNETIC_FIELD and in addition:
7555     <ul>
7556      <li>
7557       MUST implement a non-wake-up form of this sensor with a buffering
7558    capability of at least 600 sensor events.
7559      </li>
7560     </ul>
7561    </li>
7562    <li>
7563     SENSOR_TYPE_PRESSURE
7564     <ul>
7565      <li>
7566       MUST have a measurement range between at least 300 and 1100 hPa.
7567      </li>
7568      <li>
7569       MUST have a measurement resolution of at least 80 LSB/hPa.
7570      </li>
7571      <li>
7572       MUST have a minimum measurement frequency of 1 Hz or lower.
7573      </li>
7574      <li>
7575       MUST have a maximum measurement frequency of 10 Hz or higher.
7576      </li>
7577      <li>
7578       MUST have a measurement noise not above 2 Pa/&radic;Hz.
7579      </li>
7580      <li>
7581       MUST implement a non-wake-up form of this sensor with a buffering
7582    capability of at least 300 sensor events.
7583      </li>
7584      <li>
7585       MUST have a batching power consumption not worse than 2 mW.
7586      </li>
7587     </ul>
7588    </li>
7589    <li>
7590     SENSOR_TYPE_GAME_ROTATION_VECTOR
7591     <ul>
7592      <li>
7593       MUST implement a non-wake-up form of this sensor with a buffering
7594    capability of at least 300 sensor events.
7595      </li>
7596      <li>
7597       MUST have a batching power consumption not worse than 4 mW.
7598      </li>
7599     </ul>
7600    </li>
7601    <li>
7602     SENSOR_TYPE_SIGNIFICANT_MOTION
7603     <ul>
7604      <li>
7605       MUST have a power consumption not worse than 0.5 mW when device is
7606    static and 1.5 mW when device is moving.
7607      </li>
7608     </ul>
7609    </li>
7610    <li>
7611     SENSOR_TYPE_STEP_DETECTOR
7612     <ul>
7613      <li>
7614       MUST implement a non-wake-up form of this sensor with a buffering
7615    capability of at least 100 sensor events.
7616      </li>
7617      <li>
7618       MUST have a power consumption not worse than 0.5 mW when device is
7619    static and 1.5 mW when device is moving.
7620      </li>
7621      <li>
7622       MUST have a batching power consumption not worse than 4 mW.
7623      </li>
7624     </ul>
7625    </li>
7626    <li>
7627     SENSOR_TYPE_STEP_COUNTER
7628     <ul>
7629      <li>
7630       MUST have a power consumption not worse than 0.5 mW when device is
7631    static and 1.5 mW when device is moving.
7632      </li>
7633     </ul>
7634    </li>
7635    <li>
7636     SENSOR_TILT_DETECTOR
7637     <ul>
7638      <li>
7639       MUST have a power consumption not worse than 0.5 mW when device is
7640    static and 1.5 mW when device is moving.
7641      </li>
7642     </ul>
7643    </li>
7644   </ul>
7645   <p>
7646    Also such a device MUST meet the following sensor subsystem requirements:
7647   </p>
7648   <ul>
7649    <li>
7650     The event timestamp of the same physical event reported by the
7651Accelerometer, Gyroscope sensor and Magnetometer MUST be within 2.5
7652milliseconds of each other.
7653    </li>
7654    <li>
7655     The Gyroscope sensor event timestamps MUST be on the same time base as the
7656camera subsystem and within 1 milliseconds of error.
7657    </li>
7658    <li>
7659     High Fidelity sensors MUST deliver samples to applications within 5
7660milliseconds from the time when the data is available on the physical sensor
7661to the application.
7662    </li>
7663    <li>
7664     The power consumption MUST not be higher than 0.5 mW when device is static
7665and 2.0 mW when device is moving when any combination of the following sensors
7666are enabled:
7667     <ul>
7668      <li>
7669       SENSOR_TYPE_SIGNIFICANT_MOTION
7670      </li>
7671      <li>
7672       SENSOR_TYPE_STEP_DETECTOR
7673      </li>
7674      <li>
7675       SENSOR_TYPE_STEP_COUNTER
7676      </li>
7677      <li>
7678       SENSOR_TILT_DETECTORS
7679      </li>
7680     </ul>
7681    </li>
7682   </ul>
7683   <p>
7684    Note that all power consumption requirements in this section do not include the
7685power consumption of the Application Processor. It is inclusive of the power
7686drawn by the entire sensor chain&mdash;the sensor, any supporting circuitry, any
7687dedicated sensor processing system, etc.
7688   </p>
7689   <p>
7690    The following sensor types MAY also be supported on a device implementation
7691declaring android.hardware.sensor.hifi_sensors, but if these sensor types are
7692present they MUST meet the following minimum buffering capability requirement:
7693   </p>
7694   <ul>
7695    <li>
7696     SENSOR_TYPE_PROXIMITY: 100 sensor events
7697    </li>
7698   </ul>
7699   <h3 id="7_3_10_fingerprint_sensor">
7700    7.3.10. Fingerprint Sensor
7701   </h3>
7702   <p>
7703    Device implementations with a secure lock screen SHOULD include a fingerprint
7704sensor. If a device implementation includes a fingerprint sensor and has a
7705corresponding API for third-party developers, it:
7706   </p>
7707   <ul>
7708    <li>
7709     MUST declare support for the android.hardware.fingerprint feature.
7710    </li>
7711    <li>
7712     MUST fully implement the
7713     <a href="https://developer.android.com/reference/android/hardware/fingerprint/package-summary.html">
7714      corresponding API</a> as described in the Android SDK documentation.
7715    </li>
7716    <li>
7717     MUST have a false acceptance rate not higher than 0.002%.
7718    </li>
7719    <li>
7720     Is STRONGLY RECOMMENDED to have a false rejection rate of less than 10%, as
7721measured on the device
7722    </li>
7723    <li>
7724     Is STRONGLY RECOMMENDED to have a latency below 1 second, measured from
7725when the fingerprint sensor is touched until the screen is unlocked, for one
7726enrolled finger.
7727    </li>
7728    <li>
7729     MUST rate limit attempts for at least 30 seconds after five false trials
7730for fingerprint verification.
7731    </li>
7732    <li>
7733     MUST have a hardware-backed keystore implementation, and perform the
7734fingerprint matching in a Trusted Execution Environment (TEE) or on a chip with
7735a secure channel to the TEE.
7736    </li>
7737    <li>
7738     MUST have all identifiable fingerprint data encrypted and cryptographically
7739authenticated such that they cannot be acquired, read or altered outside of the
7740Trusted Execution Environment (TEE) as documented in the
7741     <a href="https://source.android.com/devices/tech/security/authentication/fingerprint-hal.html">
7742      implementation guidelines</a> on the Android Open Source Project site.
7743    </li>
7744    <li>
7745     MUST prevent adding a fingerprint without first establishing a chain of
7746trust by having the user confirm existing or add a new device credential
7747(PIN/pattern/password) using the TEE as implemented in the Android Open Source
7748project.
7749    </li>
7750    <li>
7751     MUST NOT enable 3rd-party applications to distinguish between individual
7752fingerprints.
7753    </li>
7754    <li>
7755     MUST honor the DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT flag.
7756    </li>
7757    <li>
7758     MUST, when upgraded from a version earlier than Android 6.0, have the
7759fingerprint data securely migrated to meet the above requirements or removed.
7760    </li>
7761    <li>
7762     SHOULD use the Android Fingerprint icon provided in the Android Open Source
7763Project.
7764    </li>
7765   </ul>
7766   <h3 id="7_3_11_android_automotive-only_sensors">
7767    7.3.11. Android Automotive-only sensors
7768   </h3>
7769   <p>
7770    Automotive-specific sensors are defined in the
7771    <code>
7772     android.car.CarSensorManager API
7773    </code>.
7774   </p>
7775   <h4 id="7_3_11_1_current_gear">
7776    7.3.11.1. Current Gear
7777   </h4>
7778   <p>
7779    Android Automotive implementations SHOULD provide current gear as SENSOR_TYPE_GEAR.
7780   </p>
7781   <h4 id="7_3_11_2_day_night_mode">
7782    7.3.11.2. Day Night Mode
7783   </h4>
7784   <p>
7785    Android Automotive implementations MUST support day/night mode defined as
7786SENSOR_TYPE_NIGHT. The value of this flag MUST be consistent with dashboard
7787day/night mode and SHOULD be based on ambient light sensor input. The
7788underlying ambient light sensor MAY be the same as
7789    <a href="#7_3_7_photometer">Photometer</a>. 
7790   </p>
7791   <h4 id="7_3_11_3_driving_status">
7792    7.3.11.3. Driving Status
7793   </h4>
7794   <p>
7795    Android Automotive implementations MUST support driving status defined as
7796SENSOR_TYPE_DRIVING_STATUS, with a default value of DRIVE_STATUS_UNRESTRICTED
7797when the vehicle is fully stopped and parked. It is the responsibility of device
7798manufacturers to configure SENSOR_TYPE_DRIVING_STATUS in compliance with all
7799laws and regulations that apply to markets where the product is shipping.
7800   </p>
7801   <h4 id="7_3_11_4_wheel_speed">
7802    7.3.11.4. Wheel Speed
7803   </h4>
7804   <p>
7805    Android Automotive implementations MUST provide vehicle speed defined as
7806SENSOR_TYPE_CAR_SPEED.
7807   </p>
7808   <h2 id="7_3_12_pose_sensor">
7809    7.3.12. Pose Sensor
7810   </h2>
7811   <p>
7812    Device implementations MAY support pose sensor with 6 degrees of freedom. Android Handheld
7813devices are RECOMMENDED to support this sensor. If a device implementation does support pose
7814sensor with 6 degrees of freedom, it:
7815   </p>
7816   <ul>
7817    <li>
7818     MUST implement and report
7819     <a href="https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_POSE_6DOF">
7820      <code> TYPE_POSE_6DOF</code></a> sensor.
7821    </li>
7822    <li>
7823     MUST be more accurate than the rotation vector alone.
7824    </li>
7825   </ul>
7826   <h2 id="7_4_data_connectivity">
7827    7.4. Data Connectivity
7828   </h2>
7829   <h3 id="7_4_1_telephony">
7830    7.4.1. Telephony
7831   </h3>
7832   <p>
7833    &ldquo;Telephony&rdquo; as used by the Android APIs and this document refers specifically
7834to hardware related to placing voice calls and sending SMS messages via a GSM
7835or CDMA network. While these voice calls may or may not be packet-switched,
7836they are for the purposes of Android considered independent of any data
7837connectivity that may be implemented using the same network. In other words,
7838the Android &ldquo;telephony&rdquo; functionality and APIs refer specifically to voice
7839calls and SMS. For instance, device implementations that cannot place calls or
7840send/receive SMS messages MUST NOT report the android.hardware.telephony
7841feature or any subfeatures, regardless of whether they use a cellular network
7842for data connectivity.
7843   </p>
7844   <p>
7845    Android MAY be used on devices that do not include telephony hardware. That is,
7846Android is compatible with devices that are not phones. However, if a device
7847implementation does include GSM or CDMA telephony, it MUST implement full
7848support for the API for that technology. Device implementations that do not
7849include telephony hardware MUST implement the full APIs as no-ops.
7850   </p>
7851   <h4 id="7_4_1_1_number_blocking_compatibility">
7852    7.4.1.1. Number Blocking Compatibility
7853   </h4>
7854   <p>
7855    Android Telephony device implementations MUST include number blocking support
7856and:
7857   </p>
7858   <ul>
7859    <li>
7860     MUST fully implement
7861     <a href="http://developer.android.com/reference/android/provider/BlockedNumberContract.html">BlockedNumberContract</a> and the corresponding API as described in the SDK documentation.
7862    </li>
7863    <li>
7864     MUST block all calls and messages from a phone number in
7865'BlockedNumberProvider' without any interaction with apps. The only exception
7866is when number blocking is temporarily lifted as described in the SDK
7867documentation.
7868    </li>
7869    <li>
7870     MUST NOT write to the
7871     <a href="http://developer.android.com/reference/android/provider/CallLog.html">platform call log provider</a> for a blocked call.
7872    </li>
7873    <li>
7874     MUST NOT write to the
7875     <a href="http://developer.android.com/reference/android/provider/Telephony.html">telephony provider</a> for a blocked message.
7876    </li>
7877    <li>
7878     MUST implement a blocked numbers management UI, which is opened with the
7879intent returned by TelecomManager.createManageBlockedNumbersIntent() method.
7880    </li>
7881    <li>
7882     MUST NOT allow secondary users to view or edit the blocked numbers on the
7883device as the Android platform assumes the primary user to have full control
7884of the telephony services, a single instance, on the device. All blocking
7885related UI MUST be hidden for secondary users and the blocked list MUST still
7886be respected.
7887    </li>
7888    <li>
7889     SHOULD migrate the blocked numbers into the provider when a device updates
7890to Android 7.0.
7891    </li>
7892   </ul>
7893   <h3 id="7_4_2_ieee_802_11_(wi-fi)">
7894    7.4.2. IEEE 802.11 (Wi-Fi)
7895   </h3>
7896   <p>
7897    All Android device implementations SHOULD include support for one or more forms
7898of 802.11. If a device implementation does include support for 802.11 and exposes the
7899functionality to a third-party application, it MUST implement the corresponding
7900Android API and:
7901   </p>
7902   <ul>
7903    <li>
7904     MUST report the hardware feature flag android.hardware.wifi.
7905    </li>
7906    <li>
7907     MUST implement the
7908     <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html">multicast API</a> as described in the SDK documentation.
7909    </li>
7910    <li>
7911     MUST support multicast DNS (mDNS) and MUST NOT filter mDNS packets
7912(224.0.0.251) at any time of operation including:
7913     <ul>
7914      <li>
7915       Even when the screen is not in an active state.
7916      </li>
7917      <li>
7918       For Android Television device implementations, even when in standby
7919power states.
7920      </li>
7921     </ul>
7922    </li>
7923   </ul>
7924   <h4 id="7_4_2_1_wi-fi_direct">
7925    7.4.2.1. Wi-Fi Direct
7926   </h4>
7927   <p>
7928    Device implementations SHOULD include support for Wi-Fi Direct (Wi-Fi
7929peer-to-peer). If a device implementation does include support for Wi-Fi
7930Direct, it MUST implement the
7931    <a href="http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html">corresponding Android API</a> as described in the SDK documentation. If a device implementation includes
7932support for Wi-Fi Direct, then it:
7933   </p>
7934   <ul>
7935    <li>
7936     MUST report the hardware feature android.hardware.wifi.direct.
7937    </li>
7938    <li>
7939     MUST support regular Wi-Fi operation.
7940    </li>
7941    <li>
7942     SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation.
7943    </li>
7944   </ul>
7945   <h4 id="7_4_2_2_wi-fi_tunneled_direct_link_setup">
7946    7.4.2.2. Wi-Fi Tunneled Direct Link Setup
7947   </h4>
7948   <p>
7949    Device implementations SHOULD include support for
7950    <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html">
7951     Wi-Fi Tunneled Direct Link Setup (TDLS)</a> as described in the Android SDK Documentation. If a device
7952implementation does include support for TDLS and TDLS is enabled by the
7953WiFiManager API, the device:
7954   </p>
7955   <ul>
7956    <li>
7957     SHOULD use TDLS only when it is possible AND beneficial.
7958    </li>
7959    <li>
7960     SHOULD have some heuristic and NOT use TDLS when its performance might be
7961worse than going through the Wi-Fi access point.
7962    </li>
7963   </ul>
7964   <h3 id="7_4_3_bluetooth">
7965    7.4.3. Bluetooth
7966   </h3>
7967   <div class="note">
7968    Android Watch implementations MUST support Bluetooth. Android Television
7969implementations MUST support Bluetooth and Bluetooth LE. Android Automotive
7970implementations MUST support Bluetooth and SHOULD support Bluetooth LE.
7971   </div>
7972   <p>
7973    Device implementations that support
7974    <code>
7975     android.hardware.vr.high_performance
7976    </code>
7977    feature MUST
7978support Bluetooth 4.2 and Bluetooth LE Data Length Extension.
7979   </p>
7980   <p>
7981    Android includes support for
7982    <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">Bluetooth and Bluetooth Low Energy</a>.  Device implementations that include support for Bluetooth and Bluetooth Low
7983Energy MUST declare the relevant platform features (android.hardware.bluetooth
7984and android.hardware.bluetooth_le respectively) and implement the platform
7985APIs. Device implementations SHOULD implement relevant Bluetooth profiles such
7986as A2DP, AVCP, OBEX, etc. as appropriate for the device.
7987   </p>
7988   <p>
7989    Android Automotive implementations SHOULD support Message Access Profile (MAP).
7990Android Automotive implementations MUST support the following Bluetooth
7991profiles:
7992   </p>
7993   <ul>
7994    <li>
7995     Phone calling over Hands-Free Profile (HFP).
7996    </li>
7997    <li>
7998     Media playback over Audio Distribution Profile (A2DP).
7999    </li>
8000    <li>
8001     Media playback control over Remote Control Profile (AVRCP).
8002    </li>
8003    <li>
8004     Contact sharing using the Phone Book Access Profile (PBAP).
8005    </li>
8006   </ul>
8007   <p>
8008    Device implementations including support for Bluetooth Low Energy:
8009   </p>
8010   <ul>
8011    <li>
8012     MUST declare the hardware feature android.hardware.bluetooth_le.
8013    </li>
8014    <li>
8015     MUST enable the GATT (generic attribute profile) based Bluetooth APIs as
8016described in the SDK documentation and
8017     <a href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a>. 
8018    </li>
8019    <li>
8020     are STRONGLY RECOMMENDED to implement a Resolvable Private Address (RPA)
8021timeout no longer than 15 minutes and rotate the address at timeout to protect
8022user privacy.
8023    </li>
8024    <li>
8025     SHOULD support offloading of the filtering logic to the bluetooth chipset
8026when implementing the
8027     <a href="https://developer.android.com/reference/android/bluetooth/le/ScanFilter.html">ScanFilter API</a>, 
8028and MUST report the correct value of where the filtering logic is implemented
8029whenever queried via the
8030android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported() method.
8031    </li>
8032    <li>
8033     SHOULD support offloading of the batched scanning to the bluetooth chipset,
8034but if not supported, MUST report &lsquo;false&rsquo; whenever queried via the
8035android.bluetooth.BluetoothAdapter.isOffloadedScanBatchingSupported() method.
8036    </li>
8037    <li>
8038     SHOULD support multi advertisement with at least 4 slots, but if not
8039supported, MUST report &lsquo;false&rsquo; whenever queried via the
8040android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported() method.
8041    </li>
8042   </ul>
8043   <h3 id="7_4_4_near-field_communications">
8044    7.4.4. Near-Field Communications
8045   </h3>
8046   <p>
8047    Device implementations SHOULD include a transceiver and related hardware for
8048Near-Field Communications (NFC). If a device implementation does include NFC
8049hardware and plans to make it available to third-party apps, then it:
8050   </p>
8051   <ul>
8052    <li>
8053     MUST report the android.hardware.nfc feature from the
8054     <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature() method</a>. 
8055    </li>
8056    <li>
8057     <p>
8058      MUST be capable of reading and writing NDEF messages via the following NFC
8059standards:
8060     </p>
8061     <ul>
8062      <li>
8063       MUST be capable of acting as an NFC Forum reader/writer (as defined by
8064the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the
8065following NFC standards:
8066       <ul>
8067        <li>
8068         NfcA (ISO14443-3A)
8069        </li>
8070        <li>
8071         NfcB (ISO14443-3B)
8072        </li>
8073        <li>
8074         NfcF (JIS X 6319-4)
8075        </li>
8076        <li>
8077         IsoDep (ISO 14443-4)
8078        </li>
8079        <li>
8080         NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum)
8081        </li>
8082        <li>
8083         STRONGLY RECOMMENDED to be capable of reading and writing NDEF messages
8084as well as raw data via the following NFC standards. Note that while the NFC
8085standards below are stated as STRONGLY RECOMMENDED, the Compatibility
8086Definition for a future version is planned to change these to MUST. These
8087standards are optional in this version but will be required in future versions.
8088Existing and new devices that run this version of Android are very strongly
8089encouraged to meet these requirements now so they will be able to upgrade to
8090the future platform releases.
8091        </li>
8092        <li>
8093         NfcV (ISO 15693)
8094        </li>
8095       </ul>
8096      </li>
8097      <li>
8098       SHOULD be capable of reading the barcode and URL (if encoded) of
8099       <a href="http://developer.android.com/reference/android/nfc/tech/NfcBarcode.html">Thinfilm NFC Barcode</a> products.
8100      </li>
8101      <li>
8102       MUST be capable of transmitting and receiving data via the following
8103peer-to-peer standards and protocols:
8104       <ul>
8105        <li>
8106         ISO 18092
8107        </li>
8108        <li>
8109         LLCP 1.2 (defined by the NFC Forum)
8110        </li>
8111        <li>
8112         SDP 1.0 (defined by the NFC Forum)
8113        </li>
8114        <li>
8115         <a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">NDEF Push Protocol</a> </li>
8116        <li>
8117         SNEP 1.0 (defined by the NFC Forum)
8118        </li>
8119       </ul>
8120      </li>
8121      <li>
8122       MUST include support for
8123       <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">Android Beam</a>. 
8124      </li>
8125      <li>
8126       MUST implement the SNEP default server. Valid NDEF messages received by
8127    the default SNEP server MUST be dispatched to applications using the
8128    android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in
8129    settings MUST NOT disable dispatch of incoming NDEF message.
8130      </li>
8131      <li>
8132       MUST honor the android.settings.NFCSHARING_SETTINGS intent to show
8133       <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS">NFC sharing settings</a>. 
8134      </li>
8135      <li>
8136       MUST implement the NPP server. Messages received by the NPP server MUST
8137    be processed the same way as the SNEP default server.
8138      </li>
8139      <li>
8140       MUST implement a SNEP client and attempt to send outbound P2P NDEF to
8141    the default SNEP server when Android Beam is enabled. If no default SNEP
8142    server is found then the client MUST attempt to send to an NPP server.
8143      </li>
8144      <li>
8145       MUST allow foreground activities to set the outbound P2P NDEF message
8146    using android.nfc.NfcAdapter.setNdefPushMessage, and
8147    android.nfc.NfcAdapter.setNdefPushMessageCallback, and
8148    android.nfc.NfcAdapter.enableForegroundNdefPush.
8149      </li>
8150      <li>
8151       SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam',
8152    before sending outbound P2P NDEF messages.
8153      </li>
8154      <li>
8155       <p>
8156        SHOULD enable Android Beam by default and MUST be able to send and
8157    receive using Android Beam, even when another proprietary NFC P2p mode
8158    is turned on.
8159       </p>
8160      </li>
8161      <li>
8162       <p>
8163        MUST support NFC Connection handover to Bluetooth when the device
8164supports Bluetooth Object Push Profile. Device implementations MUST support
8165connection handover to Bluetooth when using
8166android.nfc.NfcAdapter.setBeamPushUris, by implementing the &ldquo;
8167        <a href="http://members.nfc-forum.org/specs/spec_list/#conn_handover">Connection Handover version 1.2</a> &rdquo; and
8168&ldquo;
8169        <a href="http://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf">Bluetooth Secure Simple Pairing Using NFC version 1.0</a> &rdquo;
8170specs from the NFC Forum. Such an implementation MUST implement the handover
8171LLCP service with service name &ldquo;urn:nfc:sn:handover&rdquo; for exchanging the
8172handover request/select records over NFC, and it MUST use the Bluetooth Object
8173Push Profile for the actual Bluetooth data transfer. For legacy reasons (to
8174remain compatible with Android 4.1 devices), the implementation SHOULD still
8175accept SNEP GET requests for exchanging the handover request/select records
8176over NFC. However an implementation itself SHOULD NOT send SNEP GET requests
8177for performing connection handover.
8178       </p>
8179      </li>
8180      <li>
8181       MUST poll for all supported technologies while in NFC discovery mode.
8182      </li>
8183      <li>
8184       SHOULD be in NFC discovery mode while the device is awake with the
8185screen active and the lock-screen unlocked.
8186      </li>
8187     </ul>
8188    </li>
8189   </ul>
8190   <p>
8191    (Note that publicly available links are not available for the JIS, ISO, and NFC
8192Forum specifications cited above.)
8193   </p>
8194   <p>
8195    Android includes support for NFC Host Card Emulation (HCE) mode. If a device
8196implementation does include an NFC controller chipset capable of HCE (for NfcA
8197and/or NfcB) and it supports Application ID (AID) routing, then it:
8198   </p>
8199   <ul>
8200    <li>
8201     MUST report the android.hardware.nfc.hce feature constant.
8202    </li>
8203    <li>
8204     MUST support
8205     <a href="http://developer.android.com/guide/topics/connectivity/nfc/hce.html">
8206      NFC HCE APIs</a> as defined in the Android SDK.
8207    </li>
8208   </ul>
8209   <p>
8210    If a device implementation does include an NFC controller chipset capable of HCE
8211for NfcF, and it implements the feature for third-party applications, then it:
8212   </p>
8213   <ul>
8214    <li>
8215     MUST report the android.hardware.nfc.hcef feature constant.
8216    </li>
8217    <li>
8218     MUST implement the
8219     <a href="https://developer.android.com/reference/android/nfc/cardemulation/NfcFCardEmulation.html">NfcF Card Emulation APIs</a> as defined in the Android SDK.
8220    </li>
8221   </ul>
8222   <p>
8223    Additionally, device implementations MAY include reader/writer support for the
8224following MIFARE technologies.
8225   </p>
8226   <ul>
8227    <li>
8228     MIFARE Classic
8229    </li>
8230    <li>
8231     MIFARE Ultralight
8232    </li>
8233    <li>
8234     NDEF on MIFARE Classic
8235    </li>
8236   </ul>
8237   <p>
8238    Note that Android includes APIs for these MIFARE types. If a device
8239implementation supports MIFARE in the reader/writer role, it:
8240   </p>
8241   <ul>
8242    <li>
8243     MUST implement the corresponding Android APIs as documented by the Android SDK.
8244    </li>
8245    <li>
8246     MUST report the feature com.nxp.mifare from the
8247     <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature()</a> method. Note that this is not a standard Android feature and as such does
8248    not appear as a constant in the android.content.pm.PackageManager class.
8249    </li>
8250    <li>
8251     MUST NOT implement the corresponding Android APIs nor report the
8252    com.nxp.mifare feature unless it also implements general NFC support as
8253    described in this section.
8254    </li>
8255   </ul>
8256   <p>
8257    If a device implementation does not include NFC hardware, it MUST NOT declare
8258the android.hardware.nfc feature from the
8259    <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html">android.content.pm.PackageManager.hasSystemFeature()</a> method, and MUST implement the Android NFC API as a no-op.
8260   </p>
8261   <p>
8262    As the classes android.nfc.NdefMessage and android.nfc.NdefRecord represent a
8263protocol-independent data representation format, device implementations MUST
8264implement these APIs even if they do not include support for NFC or declare the
8265android.hardware.nfc feature.
8266   </p>
8267   <h3 id="7_4_5_minimum_network_capability">
8268    7.4.5. Minimum Network Capability
8269   </h3>
8270   <p>
8271    Device implementations MUST include support for one or more forms of data
8272networking. Specifically, device implementations MUST include support for at
8273least one data standard capable of 200 Kbit/sec or greater. Examples of
8274technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g,
8275Ethernet, Bluetooth PAN, etc.
8276   </p>
8277   <p>
8278    Device implementations where a physical networking standard (such as Ethernet)
8279is the primary data connection SHOULD also include support for at least one
8280common wireless data standard, such as 802.11 (Wi-Fi).
8281   </p>
8282   <p>
8283    Devices MAY implement more than one form of data connectivity.
8284   </p>
8285   <p>
8286    Devices MUST include an IPv6 networking stack and support IPv6 communication
8287using the managed APIs, such as
8288    <code>
8289     java.net.Socket
8290    </code>
8291    and
8292    <code>
8293     java.net.URLConnection
8294    </code>,
8295as well as the native APIs, such as
8296    <code>
8297     AF_INET6
8298    </code>
8299    sockets. The required level of
8300IPv6 support depends on the network type, as follows:
8301   </p>
8302   <ul>
8303    <li>
8304     Devices that support Wi-Fi networks MUST support dual-stack and IPv6-only
8305    operation on Wi-Fi.
8306    </li>
8307    <li>
8308     Devices that support Ethernet networks MUST support dual-stack operation on
8309    Ethernet.
8310    </li>
8311    <li>
8312     Devices that support cellular data SHOULD support IPv6 operation (IPv6-only
8313    and possibly dual-stack) on cellular data.
8314    </li>
8315    <li>
8316     When a device is simultaneously connected to more than one network (e.g.,
8317    Wi-Fi and cellular data), it MUST simultaneously meet these requirements on
8318    each network to which it is connected.
8319    </li>
8320   </ul>
8321   <p>
8322    IPv6 MUST be enabled by default.
8323   </p>
8324   <p>
8325    In order to ensure that IPv6 communication is as reliable as IPv4, unicast IPv6
8326packets sent to the device MUST NOT be dropped, even when the screen is not in
8327an active state. Redundant multicast IPv6 packets, such as repeated identical
8328Router Advertisements, MAY be rate-limited in hardware or firmware if doing so
8329is necessary to save power. In such cases, rate-limiting MUST NOT cause the
8330device to lose IPv6 connectivity on any IPv6-compliant network that uses RA
8331lifetimes of at least 180 seconds.
8332   </p>
8333   <p>
8334    IPv6 connectivity MUST be maintained in doze mode.
8335   </p>
8336   <h3 id="7_4_6_sync_settings">
8337    7.4.6. Sync Settings
8338   </h3>
8339   <p>
8340    Device implementations MUST have the master auto-sync setting on by default so
8341that the method
8342    <a href="http://developer.android.com/reference/android/content/ContentResolver.html">getMasterSyncAutomatically()</a> returns &ldquo;true&rdquo;.
8343   </p>
8344   <h3 id="7_4_7_data_saver">
8345    7.4.7. Data Saver
8346   </h3>
8347   <p>
8348    Device implementations with a metered connection are STRONGLY RECOMMENDED to provide the
8349data saver mode.
8350   </p>
8351   <p>
8352    If a device implementation provides the data saver mode, it:
8353   </p>
8354   <ul>
8355    <li>
8356     <p>
8357      MUST support all the APIs in the
8358      <code>
8359       ConnectivityManager
8360      </code>
8361      class as described in the
8362      <a href="https://developer.android.com/training/basics/network-ops/data-saver.html">SDK documentation</a>. 
8363     </p>
8364    </li>
8365    <li>
8366     <p>
8367      MUST provide a user interface in the settings, allowing users to add
8368    applications to or remove applications from the whitelist.
8369     </p>
8370    </li>
8371   </ul>
8372   <p>
8373    Conversely if a device implementation does not provide the data saver mode, it:
8374   </p>
8375   <ul>
8376    <li>
8377     <p>
8378      MUST return the value
8379      <code>
8380       RESTRICT_BACKGROUND_STATUS_DISABLED
8381      </code>
8382      for
8383      <a href="https://developer.android.com/reference/android/net/ConnectivityManager.html#getRestrictBackgroundStatus%28%29">
8384       <code>
8385        ConnectivityManager.getRestrictBackgroundStatus
8386       </code>
8387      </a>
8388     </p>
8389    </li>
8390    <li>
8391     <p>
8392      MUST not broadcast
8393      <code>
8394       ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED
8395      </code>
8396     </p>
8397    </li>
8398    <li>
8399     <p>
8400      MUST have an activity that handles the
8401      <code>
8402       Settings.ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS
8403      </code>
8404      intent but MAY implement it as a no-op.
8405     </p>
8406    </li>
8407   </ul>
8408   <h2 id="7_5_cameras">
8409    7.5. Cameras
8410   </h2>
8411   <p>
8412    Device implementations SHOULD include a rear-facing camera and MAY include a
8413front-facing camera. A rear-facing camera is a camera located on the side of
8414the device opposite the display; that is, it images scenes on the far side of
8415the device, like a traditional camera. A front-facing camera is a camera
8416located on the same side of the device as the display; that is, a camera
8417typically used to image the user, such as for video conferencing and similar
8418applications.
8419   </p>
8420   <p>
8421    If a device implementation includes at least one camera, it MUST be possible for
8422an application to simultaneously allocate 3 RGBA_8888 bitmaps equal to the size
8423of the images produced by the largest-resolution camera sensor on the device,
8424while camera is open for the purpose of basic preview and still capture.
8425   </p>
8426   <h3 id="7_5_1_rear-facing_camera">
8427    7.5.1. Rear-Facing Camera
8428   </h3>
8429   <p>
8430    Device implementations SHOULD include a rear-facing camera. If a device
8431implementation includes at least one rear-facing camera, it:
8432   </p>
8433   <ul>
8434    <li>
8435     MUST report the feature flag android.hardware.camera and
8436android.hardware.camera.any.
8437    </li>
8438    <li>
8439     MUST have a resolution of at least 2 megapixels.
8440    </li>
8441    <li>
8442     SHOULD have either hardware auto-focus or software auto-focus implemented
8443in the camera driver (transparent to application software).
8444    </li>
8445    <li>
8446     MAY have fixed-focus or EDOF (extended depth of field) hardware.
8447    </li>
8448    <li>
8449     MAY include a flash. If the Camera includes a flash, the flash lamp MUST
8450NOT be lit while an android.hardware.Camera.PreviewCallback instance has been
8451registered on a Camera preview surface, unless the application has explicitly
8452enabled the flash by enabling the FLASH_MODE_AUTO or FLASH_MODE_ON attributes
8453of a Camera.Parameters object. Note that this constraint does not apply to the
8454device&rsquo;s built-in system camera application, but only to third-party
8455applications using Camera.PreviewCallback.
8456    </li>
8457   </ul>
8458   <h3 id="7_5_2_front-facing_camera">
8459    7.5.2. Front-Facing Camera
8460   </h3>
8461   <p>
8462    Device implementations MAY include a front-facing camera. If a device
8463implementation includes at least one front-facing camera, it:
8464   </p>
8465   <ul>
8466    <li>
8467     MUST report the feature flag android.hardware.camera.any and
8468android.hardware.camera.front.
8469    </li>
8470    <li>
8471     MUST have a resolution of at least VGA (640x480 pixels).
8472    </li>
8473    <li>
8474     MUST NOT use a front-facing camera as the default for the Camera API. The
8475camera API in Android has specific support for front-facing cameras and device
8476implementations MUST NOT configure the API to to treat a front-facing camera as
8477the default rear-facing camera, even if it is the only camera on the device.
8478    </li>
8479    <li>
8480     MAY include features (such as auto-focus, flash, etc.) available to
8481rear-facing cameras as described in
8482     <a href="#7_5_1_rear-facing_camera">section 7.5.1</a>. 
8483    </li>
8484    <li>
8485     MUST horizontally reflect (i.e. mirror) the stream displayed by an app in a
8486CameraPreview, as follows:
8487     <ul>
8488      <li>
8489       If the device implementation is capable of being rotated by user (such
8490as automatically via an accelerometer or manually via user input), the camera
8491preview MUST be mirrored horizontally relative to the device&rsquo;s current
8492orientation.
8493      </li>
8494      <li>
8495       If the current application has explicitly requested that the Camera
8496display be rotated via a call to the
8497       <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)">android.hardware.Camera.setDisplayOrientation()</a> method, the camera preview MUST be mirrored horizontally relative to the
8498orientation specified by the application.
8499      </li>
8500      <li>
8501       Otherwise, the preview MUST be mirrored along the device&rsquo;s default
8502horizontal axis.
8503      </li>
8504     </ul>
8505    </li>
8506    <li>
8507     MUST mirror the image displayed by the postview in the same manner as the
8508camera preview image stream. If the device implementation does not support
8509postview, this requirement obviously does not apply.
8510    </li>
8511    <li>
8512     MUST NOT mirror the final captured still image or video streams returned to
8513application callbacks or committed to media storage.
8514    </li>
8515   </ul>
8516   <h3 id="7_5_3_external_camera">
8517    7.5.3. External Camera
8518   </h3>
8519   <p>
8520    Device implementations MAY include support for an external camera that is not
8521necessarily always connected. If a device includes support for an external camera,
8522it:
8523   </p>
8524   <ul>
8525    <li>
8526     MUST declare the platform feature flag
8527     <code>
8528      android.hardware.camera.external
8529     </code>
8530     and
8531     <code>
8532      android.hardware camera.any
8533     </code>.
8534    </li>
8535    <li>
8536     MAY support multiple cameras.
8537    </li>
8538    <li>
8539     MUST support USB Video Class (UVC 1.0 or higher) if the external camera
8540    connects through the USB port.
8541    </li>
8542    <li>
8543     SHOULD support video compressions such as MJPEG to enable transfer of
8544    high-quality unencoded streams (i.e. raw or independently compressed picture
8545    streams).
8546    </li>
8547    <li>
8548     MAY support camera-based video encoding. If supported, a simultaneous
8549    unencoded / MJPEG stream (QVGA or greater resolution) MUST be accessible to
8550    the device implementation.
8551    </li>
8552   </ul>
8553   <h3 id="7_5_4_camera_api_behavior">
8554    7.5.4. Camera API Behavior
8555   </h3>
8556   <p>
8557    Android includes two API packages to access the camera, the newer
8558android.hardware.camera2 API expose lower-level camera control to the app,
8559including efficient zero-copy burst/streaming flows and per-frame controls of
8560exposure, gain, white balance gains, color conversion, denoising, sharpening,
8561and more.
8562   </p>
8563   <p>
8564    The older API package, android.hardware.Camera, is marked as deprecated in
8565Android 5.0 but as it should still be available for apps to use Android device
8566implementations MUST ensure the continued support of the API as described in
8567this section and in the Android SDK.
8568   </p>
8569   <p>
8570    Device implementations MUST implement the following behaviors for the
8571camera-related APIs, for all available cameras:
8572   </p>
8573   <ul>
8574    <li>
8575     If an application has never called
8576android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST
8577use android.hardware.PixelFormat.YCbCr_420_SP for preview data provided to
8578application callbacks.
8579    </li>
8580    <li>
8581     If an application registers an android.hardware.Camera.PreviewCallback
8582instance and the system calls the onPreviewFrame() method when the preview
8583format is YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame()
8584must further be in the NV21 encoding format. That is, NV21 MUST be the default.
8585    </li>
8586    <li>
8587     For android.hardware.Camera, device implementations MUST support the YV12
8588format (as denoted by the android.graphics.ImageFormat.YV12 constant) for
8589camera previews for both front- and rear-facing cameras. (The hardware video
8590encoder and camera may use any native pixel format, but the device
8591implementation MUST support conversion to YV12.)
8592    </li>
8593    <li>
8594     For android.hardware.camera2, device implementations must support the
8595android.hardware.ImageFormat.YUV_420_888 and android.hardware.ImageFormat.JPEG
8596formats as outputs through the android.media.ImageReader API.
8597    </li>
8598   </ul>
8599   <p>
8600    Device implementations MUST still implement the full
8601    <a href="http://developer.android.com/reference/android/hardware/Camera.html">
8602     Camera
8603API
8604    </a>
8605    included in the Android SDK documentation, regardless of whether the device
8606includes hardware autofocus or other capabilities. For instance, cameras that
8607lack autofocus MUST still call any registered
8608android.hardware.Camera.AutoFocusCallback instances (even though this has no
8609relevance to a non-autofocus camera.) Note that this does apply to front-facing
8610cameras; for instance, even though most front-facing cameras do not support
8611autofocus, the API callbacks must still be &ldquo;faked&rdquo; as described.
8612   </p>
8613   <p>
8614    Device implementations MUST recognize and honor each parameter name defined as
8615a constant on the
8616    <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html">android.hardware.Camera.Parameters</a> class, if the underlying hardware supports the feature. If the device hardware
8617does not support a feature, the API must behave as documented. Conversely,
8618device implementations MUST NOT honor or recognize string constants passed to
8619the android.hardware.Camera.setParameters() method other than those documented
8620as constants on the android.hardware.Camera.Parameters. That is, device
8621implementations MUST support all standard Camera parameters if the hardware
8622allows, and MUST NOT support custom Camera parameter types. For instance,
8623device implementations that support image capture using high dynamic range
8624(HDR) imaging techniques MUST support camera parameter Camera.SCENE_MODE_HDR.
8625   </p>
8626   <p>
8627    Because not all device implementations can fully support all the features of
8628the android.hardware.camera2 API, device implementations MUST report the proper
8629level of support with the
8630    <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#INFO_SUPPORTED_HARDWARE_LEVEL">android.info.supportedHardwareLevel</a> property as described in the Android SDK and report the appropriate
8631    <a href="http://source.android.com/devices/camera/versioning.html">
8632     framework feature flags</a>.
8633   </p>
8634   <p>
8635    Device implementations MUST also declare its Individual camera capabilities of
8636android.hardware.camera2 via the android.request.availableCapabilities property
8637and declare the appropriate
8638    <a href="http://source.android.com/devices/camera/versioning.html">
8639     feature flags</a>; a device must
8640define the feature flag if any of its attached camera devices supports the
8641feature.
8642   </p>
8643   <p>
8644    Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE intent
8645whenever a new picture is taken by the camera and the entry of the picture has
8646been added to the media store.
8647   </p>
8648   <p>
8649    Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO intent
8650whenever a new video is recorded by the camera and the entry of the picture has
8651been added to the media store.
8652   </p>
8653   <h3 id="7_5_5_camera_orientation">
8654    7.5.5. Camera Orientation
8655   </h3>
8656   <p>
8657    Both front- and rear-facing cameras, if present, MUST be oriented so that the
8658long dimension of the camera aligns with the screen&rsquo;s long dimension. That is,
8659when the device is held in the landscape orientation, cameras MUST capture
8660images in the landscape orientation. This applies regardless of the device&rsquo;s
8661natural orientation; that is, it applies to landscape-primary devices as well
8662as portrait-primary devices.
8663   </p>
8664   <h2 id="7_6_memory_and_storage">
8665    7.6. Memory and Storage
8666   </h2>
8667   <h3 id="7_6_1_minimum_memory_and_storage">
8668    7.6.1. Minimum Memory and Storage
8669   </h3>
8670   <div class="note">
8671    Android Television devices MUST have at least 4GB of non-volatile storage
8672available for application private data.
8673   </div>
8674   <p>
8675    The memory available to the kernel and userspace on device implementations MUST
8676be at least equal or larger than the minimum values specified by the following
8677table. (See
8678    <a href="#7_1_1_screen_configuration">section 7.1.1</a> for screen size and
8679density definitions.)
8680   </p>
8681   <table>
8682    <tr>
8683     <th>
8684      Density and screen size
8685     </th>
8686     <th>
8687      32-bit device
8688     </th>
8689     <th>
8690      64-bit device
8691     </th>
8692    </tr>
8693    <tr>
8694     <td>
8695      Android Watch devices (due to smaller screens)
8696     </td>
8697     <td>
8698      416MB
8699     </td>
8700     <td>
8701      Not applicable
8702     </td>
8703    </tr>
8704    <tr>
8705     <td>
8706      <ul>
8707       <li class="table_list">
8708        280dpi or lower on small/normal screens
8709       </li>
8710       <li class="table_list">
8711        mdpi or lower on large screens
8712       </li>
8713       <li class="table_list">
8714        ldpi or lower on extra large screens
8715       </li>
8716      </ul>
8717     </td>
8718     <td>
8719      512MB
8720     </td>
8721     <td>
8722      816MB
8723     </td>
8724    </tr>
8725    <tr>
8726     <td>
8727      <ul>
8728       <li class="table_list">
8729        xhdpi or higher on small/normal screens
8730       </li>
8731       <li class="table_list">
8732        hdpi or higher on large screens
8733       </li>
8734       <li class="table_list">
8735        mdpi or higher on extra large screens
8736       </li>
8737      </ul>
8738     </td>
8739     <td>
8740      608MB
8741     </td>
8742     <td>
8743      944MB
8744     </td>
8745    </tr>
8746    <tr>
8747     <td>
8748      <ul>
8749       <li class="table_list">
8750        400dpi or higher on small/normal screens
8751       </li>
8752       <li class="table_list">
8753        xhdpi or higher on large screens
8754       </li>
8755       <li class="table_list">
8756        tvdpi or higher on extra large screens
8757       </li>
8758      </ul>
8759     </td>
8760     <td>
8761      896MB
8762     </td>
8763     <td>
8764      1280MB
8765     </td>
8766    </tr>
8767    <tr>
8768     <td>
8769      <ul>
8770       <li class="table_list">
8771        560dpi or higher on small/normal screens
8772       </li>
8773       <li class="table_list">
8774        400dpi or higher on large screens
8775       </li>
8776       <li class="table_list">
8777        xhdpi or higher on extra large screens
8778       </li>
8779      </ul>
8780     </td>
8781     <td>
8782      1344MB
8783     </td>
8784     <td>
8785      1824MB
8786     </td>
8787    </tr>
8788   </table>
8789   <p>
8790    The minimum memory values MUST be in addition to any memory space already
8791dedicated to hardware components such as radio, video, and so on that is not
8792under the kernel&rsquo;s control.
8793   </p>
8794   <p>
8795    Device implementations with less than 512MB of memory available to the kernel
8796and userspace, unless an Android Watch, MUST return the value "true" for
8797ActivityManager.isLowRamDevice().
8798   </p>
8799   <p>
8800    Android Television devices MUST have at least 4GB and other device
8801implementations MUST have at least 3GB of non-volatile storage available for
8802application private data. That is, the /data partition MUST be at least 4GB for
8803Android Television devices and at least 3GB for other device implementations.
8804Device implementations that run Android are
8805    <strong>
8806     STRONGLY RECOMMENDED
8807    </strong>
8808    to have at
8809least 4GB of non-volatile storage for application private data so they will be
8810able to upgrade to the future platform releases.
8811   </p>
8812   <p>
8813    The Android APIs include a
8814    <a href="http://developer.android.com/reference/android/app/DownloadManager.html">
8815     Download Manager</a> that applications MAY use to download data files. The device implementation of
8816the Download Manager MUST be capable of downloading individual files of at
8817least 100MB in size to the default &ldquo;cache&rdquo; location.
8818   </p>
8819   <h3 id="7_6_2_application_shared_storage">
8820    7.6.2. Application Shared Storage
8821   </h3>
8822   <p>
8823    Device implementations MUST offer shared storage for applications also often
8824referred as &ldquo;shared external storage&rdquo;.
8825   </p>
8826   <p>
8827    Device implementations MUST be configured with shared storage mounted by
8828default, &ldquo;out of the box&rdquo;. If the shared storage is not mounted on the
8829Linuxpath /sdcard, then the device MUST include a Linux symbolic link from
8830/sdcard to the actual mount point.
8831   </p>
8832   <p>
8833    Device implementations MAY have hardware for user-accessible removable storage,
8834such as a Secure Digital (SD) card slot. If this slot is used to satisfy the
8835shared storage requirement, the device implementation:
8836   </p>
8837   <ul>
8838    <li>
8839     MUST implement a toast or pop-up user interface warning the user when there
8840is no SD card.
8841    </li>
8842    <li>
8843     MUST include a FAT-formatted SD card 1GB in size or larger OR show on the
8844box and other material available at time of purchase that the SD card has to be
8845separately purchased.
8846    </li>
8847    <li>
8848     MUST mount the SD card by default.
8849    </li>
8850   </ul>
8851   <p>
8852    Alternatively, device implementations MAY allocate internal (non-removable)
8853storage as shared storage for apps as included in the upstream Android Open
8854Source Project; device implementations SHOULD use this configuration and
8855software implementation. If a device implementation uses internal
8856(non-removable) storage to satisfy the shared storage requirement, while that
8857storage MAY share space with the application private data, it MUST be at least
88581GB in size and mounted on /sdcard (or /sdcard MUST be a symbolic link to the
8859physical location if it is mounted elsewhere).
8860   </p>
8861   <p>
8862    Device implementations MUST enforce as documented the
8863android.permission.WRITE_EXTERNAL_STORAGE permission on this shared storage.
8864Shared storage MUST otherwise be writable by any application that obtains that
8865permission.
8866   </p>
8867   <p>
8868    Device implementations that include multiple shared storage paths (such as both
8869an SD card slot and shared internal storage) MUST allow only pre-installed &amp;
8870privileged Android applications with the WRITE_EXTERNAL_STORAGE permission to
8871write to the secondary external storage, except when writing to their
8872package-specific directories or within the
8873    <code>
8874     URI
8875    </code>
8876    returned by firing the
8877    <code>
8878     ACTION_OPEN_DOCUMENT_TREE
8879    </code>
8880    intent.
8881   </p>
8882   <p>
8883    However, device implementations SHOULD expose content from both storage paths
8884transparently through Android&rsquo;s media scanner service and
8885android.provider.MediaStore.
8886   </p>
8887   <p>
8888    Regardless of the form of shared storage used, if the device implementation has
8889a USB port with USB peripheral mode support, it MUST provide some mechanism to
8890access the contents of shared storage from a host computer. Device
8891implementations MAY use USB mass storage, but SHOULD use Media Transfer
8892Protocol to satisfy this requirement. If the device implementation supports
8893Media Transfer Protocol, it:
8894   </p>
8895   <ul>
8896    <li>
8897     SHOULD be compatible with the reference Android MTP host,
8898     <a href="http://www.android.com/filetransfer">
8899      Android File
8900Transfer
8901     </a>
8902     .
8903    </li>
8904    <li>
8905     SHOULD report a USB device class of 0x00.
8906    </li>
8907    <li>
8908     SHOULD report a USB interface name of 'MTP'.
8909    </li>
8910   </ul>
8911   <h3 id="7_6_3_adoptable_storage">
8912    7.6.3. Adoptable Storage
8913   </h3>
8914   <p>
8915    Device implementations are STRONGLY RECOMMENDED to implement
8916    <a href="http://source.android.com/devices/storage/adoptable.html">
8917     adoptable storage</a> if the
8918removable storage device port is in a long-term stable location, such as within
8919the battery compartment or other protective cover.
8920   </p>
8921   <p>
8922    Device implementations such as a television, MAY enable adoption through USB
8923ports as the device is expected to be static and not mobile. But for other
8924device implementations that are mobile in nature, it is STRONGLY RECOMMENDED to
8925implement the adoptable storage in a long-term stable location, since
8926accidentally disconnecting them can cause data loss/corruption.
8927   </p>
8928   <h2 id="7_7_usb">
8929    7.7. USB
8930   </h2>
8931   <p>
8932    Device implementations SHOULD support USB peripheral mode and SHOULD support USB
8933host mode.
8934   </p>
8935   <h3 id="7_7_1_usb_peripheral_mode">
8936    7.7.1. USB peripheral mode
8937   </h3>
8938   <p>
8939    If a device implementation includes a USB port supporting peripheral mode:
8940   </p>
8941   <ul>
8942    <li>
8943     The port MUST be connectable to a USB host that has a standard type-A or
8944    type-C USB port.
8945    </li>
8946    <li>
8947     The port SHOULD use micro-B, micro-AB or Type-C USB form factor. Existing
8948    and new Android devices are
8949     <strong>
8950      STRONGLY RECOMMENDED to meet these
8951    requirements
8952     </strong>
8953     so they will be able to upgrade to the future platform
8954    releases.
8955    </li>
8956    <li>
8957     The port SHOULD be located on the bottom of the device
8958    (according to natural orientation) or enable software screen rotation for
8959    all apps (including home screen), so that the display draws correctly when
8960    the device is oriented with the port at bottom. Existing and new Android
8961    devices are
8962     <strong>
8963      STRONGLY RECOMMENDED to meet these requirements
8964     </strong>
8965     so they will
8966    be able to upgrade to future platform releases.
8967    </li>
8968    <li>
8969     It MUST allow a USB host connected with the Android device to access the
8970    contents of the shared storage volume using either USB mass storage or Media
8971    Transfer Protocol.
8972    </li>
8973    <li>
8974     It SHOULD implement the Android Open Accessory (AOA) API and specification
8975    as documented in the Android SDK documentation, and if it is an Android
8976    Handheld device it MUST implement the AOA API. Device implementations
8977    implementing the AOA specification:
8978     <ul>
8979      <li>
8980       MUST declare support for the hardware feature
8981       <a href="http://developer.android.com/guide/topics/connectivity/usb/accessory.html">android.hardware.usb.accessory</a>. 
8982      </li>
8983      <li>
8984       MUST implement the
8985       <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">
8986        USB audio
8987    class
8988       </a>
8989       as
8990    documented in the Android SDK documentation.
8991      </li>
8992      <li>
8993       The USB mass storage class MUST include the string "android" at the end
8994    of the interface description
8995       <code>
8996        iInterface
8997       </code>
8998       string of the USB mass storage
8999      </li>
9000     </ul>
9001    </li>
9002    <li>
9003     It SHOULD implement support to draw 1.5 A current during HS chirp and
9004    traffic as specified in the
9005     <a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">
9006      USB Battery Charging specification, revision
9007    1.2
9008     </a>
9009     .
9010    Existing and new Android devices are
9011     <strong>
9012      STRONGLY RECOMMENDED to meet these
9013    requirements
9014     </strong>
9015     so they will be able to upgrade to the future platform
9016    releases.
9017    </li>
9018    <li>
9019     Type-C devices MUST detect 1.5A and 3.0A chargers per the Type-C resistor
9020    standard and it must detect changes in the advertisement.
9021    </li>
9022    <li>
9023     Type-C devices also supporting USB host mode are STRONGLY RECOMMENDED to
9024    support Power Delivery for data and power role swapping.
9025    </li>
9026    <li>
9027     Type-C devices SHOULD support Power Delivery for high-voltage charging and
9028    support for Alternate Modes such as display out.
9029    </li>
9030    <li>
9031     The value of iSerialNumber in USB standard device descriptor MUST be equal
9032    to the value of android.os.Build.SERIAL.
9033    </li>
9034    <li>
9035     Type-C devices are STRONGLY RECOMMENDED to not support proprietary charging
9036    methods that modify Vbus voltage beyond default levels, or alter sink/source
9037    roles as such may result in interoperability issues with the chargers or
9038    devices that support the standard USB Power Delivery methods. While this is
9039    called out as "STRONGLY RECOMMENDED", in future Android versions we might
9040    REQUIRE all type-C devices to support full interoperability with standard
9041    type-C chargers.
9042    </li>
9043   </ul>
9044   <h3 id="7_7_2_usb_host_mode">
9045    7.7.2. USB host mode
9046   </h3>
9047   <p>
9048    If a device implementation includes a USB port supporting host mode, it:
9049   </p>
9050   <ul>
9051    <li>
9052     SHOULD use a type-C USB port, if the device implementation supports USB 3.1.
9053    </li>
9054    <li>
9055     MAY use a non-standard port form factor, but if so MUST ship with a cable or
9056    cables adapting the port to a standard type-A or type-C USB port.
9057    </li>
9058    <li>
9059     MAY use a micro-AB USB port, but if so SHOULD ship with a cable or cables adapting the port to a standard type-A or type-C USB port.
9060    </li>
9061    <li>
9062     is
9063     <strong>
9064      STRONGLY RECOMMENDED
9065     </strong>
9066     to implement the
9067     <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">
9068      USB audio
9069    class
9070     </a>
9071     as documented in the Android SDK documentation.
9072    </li>
9073    <li>
9074     MUST implement the Android USB host API as documented in the Android SDK,
9075    and MUST declare support for the hardware feature
9076     <a href="http://developer.android.com/guide/topics/connectivity/usb/host.html">android.hardware.usb.host</a>. 
9077    </li>
9078    <li>
9079     SHOULD support the Charging Downstream Port output current range of 1.5 A ~
9080    5 A as specified in the
9081     <a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">USB Battery Charging specifications, revision 1.2</a>. 
9082    </li>
9083    <li>
9084     USB Type-C devices are STRONGLY RECOMMENDED to support DisplayPort, SHOULD
9085    support USB SuperSpeed Data Rates, and are STRONGLY RECOMMENDED to support
9086    Power Delivery for data and power role swapping.
9087    </li>
9088    <li>
9089     Devices with any type-A or type-AB ports MUST NOT ship with an adapter converting
9090    from this port to a type-C receptacle.
9091    </li>
9092    <li>
9093     MUST recognize any remotely connected MTP (Media Transfer Protocol) devices
9094    and make their contents accessible through the
9095     <code>
9096      ACTION_GET_CONTENT
9097     </code>,
9098     <code>
9099      ACTION_OPEN_DOCUMENT
9100     </code>, and
9101     <code>
9102      ACTION_CREATE_DOCUMENT
9103     </code>
9104     intents, if the Storage Access
9105    Framework (SAF) is supported.
9106    </li>
9107    <li>
9108     MUST, if using a Type-C USB port and including support for peripheral mode,
9109    implement Dual Role Port functionality as defined by the USB Type-C
9110    specification (section 4.5.1.3.3).
9111    </li>
9112    <li>
9113     SHOULD, if the Dual Role Port functionality is supported, implement the
9114    Try.* model that is most appropriate for the device form factor. For
9115    example a handheld device SHOULD implement the Try.SNK model.
9116    </li>
9117   </ul>
9118   <h2 id="7_8_audio">
9119    7.8. Audio
9120   </h2>
9121   <h3 id="7_8_1_microphone">
9122    7.8.1. Microphone
9123   </h3>
9124   <div class="note">
9125    Android Handheld, Watch, and Automotive implementations MUST include a
9126microphone.
9127   </div>
9128   <p>
9129    Device implementations MAY omit a microphone. However, if a device
9130implementation omits a microphone, it MUST NOT report the
9131android.hardware.microphone feature constant, and MUST implement the audio
9132recording API at least as no-ops, per
9133    <a href="#7_hardware_compatibility">section 7</a>. 
9134Conversely, device implementations that do possess a microphone:
9135   </p>
9136   <ul>
9137    <li>
9138     MUST report the android.hardware.microphone feature constant.
9139    </li>
9140    <li>
9141     MUST meet the audio recording requirements in
9142     <a href="#5_4_audio_recording">section 5.4</a>. 
9143    </li>
9144    <li>
9145     MUST meet the audio latency requirements in
9146     <a href="#5_6_audio_latency">section 5.6</a>. 
9147    </li>
9148    <li>
9149     STRONGLY RECOMMENDED to support near-ultrasound recording as described in
9150     <a href="#7_8_3_near_ultrasound">section 7.8.3</a>. 
9151    </li>
9152   </ul>
9153   <h3 id="7_8_2_audio_output">
9154    7.8.2. Audio Output
9155   </h3>
9156   <div class="note">
9157    Android Watch devices MAY include an audio output.
9158   </div>
9159   <p>
9160    Device implementations including a speaker or with an audio/multimedia output
9161port for an audio output peripheral as a headset or an external speaker:
9162   </p>
9163   <ul>
9164    <li>
9165     MUST report the android.hardware.audio.output feature constant.
9166    </li>
9167    <li>
9168     MUST meet the audio playback requirements in
9169     <a href="#5_5_audio_playback">section 5.5</a>. 
9170    </li>
9171    <li>
9172     MUST meet the audio latency requirements in
9173     <a href="#5_6_audio_latency">section 5.6</a>. 
9174    </li>
9175    <li>
9176     STRONGLY RECOMMENDED to support near-ultrasound playback as described in
9177     <a href="#7_8_3_near_ultrasound">section 7.8.3</a>. 
9178    </li>
9179   </ul>
9180   <p>
9181    Conversely, if a device implementation does not include a speaker or audio
9182output port, it MUST NOT report the android.hardware.audio output feature, and
9183MUST implement the Audio Output related APIs as no-ops at least.
9184   </p>
9185   <p>
9186    Android Watch device implementation MAY but SHOULD NOT have audio output, but
9187other types of Android device implementations MUST have an audio output and
9188declare android.hardware.audio.output.
9189   </p>
9190   <h4 id="7_8_2_1_analog_audio_ports">
9191    7.8.2.1. Analog Audio Ports
9192   </h4>
9193   <p>
9194    In order to be compatible with the
9195    <a href="http://source.android.com/accessories/headset-spec.html">
9196     headsets and other audio accessories</a> using the
91973.5mm audio plug across the Android ecosystem, if a device implementation
9198includes one or more analog audio ports, at least one of the audio port(s)
9199SHOULD be a 4 conductor 3.5mm audio jack. If a device implementation has a 4
9200conductor 3.5mm audio jack, it:
9201   </p>
9202   <ul>
9203    <li>
9204     MUST support audio playback to stereo headphones and stereo headsets with a
9205microphone, and SHOULD support audio recording from stereo headsets with a
9206microphone.
9207    </li>
9208    <li>
9209     MUST support TRRS audio plugs with the CTIA pin-out order, and SHOULD
9210support audio plugs with the OMTP pin-out order.
9211    </li>
9212    <li>
9213     MUST support the detection of microphone on the plugged in audio accessory,
9214if the device implementation supports a microphone, and broadcast the
9215android.intent.action.HEADSET_PLUG with the extra value microphone set as 1.
9216    </li>
9217    <li>
9218     MUST support the detection and mapping to the keycodes for the following
92193 ranges of equivalent impedance between the microphone and ground conductors
9220on the audio plug:
9221     <ul>
9222      <li>
9223       <strong>
9224        70 ohm or less
9225       </strong>
9226       : KEYCODE_HEADSETHOOK
9227      </li>
9228      <li>
9229       <strong>
9230        210-290 Ohm
9231       </strong>
9232       : KEYCODE_VOLUME_UP
9233      </li>
9234      <li>
9235       <strong>
9236        360-680 Ohm
9237       </strong>
9238       : KEYCODE_VOLUME_DOWN
9239      </li>
9240     </ul>
9241    </li>
9242    <li>
9243     STRONGLY RECOMMENDED to detect and map to the keycode for the following
9244range of equivalent impedance between the microphone and ground conductors
9245on the audio plug:
9246     <ul>
9247      <li>
9248       <strong>
9249        110-180 Ohm:
9250       </strong>
9251       KEYCODE_VOICE_ASSIST
9252      </li>
9253     </ul>
9254    </li>
9255    <li>
9256     MUST trigger ACTION_HEADSET_PLUG upon a plug insert, but only after all
9257contacts on plug are touching their relevant segments on the jack.
9258    </li>
9259    <li>
9260     MUST be capable of driving at least 150mV &plusmn; 10% of output voltage on a 32
9261Ohm speaker impedance.
9262    </li>
9263    <li>
9264     MUST have a microphone bias voltage between 1.8V ~ 2.9V.
9265    </li>
9266   </ul>
9267   <h3 id="7_8_3_near-ultrasound">
9268    7.8.3. Near-Ultrasound
9269   </h3>
9270   <p>
9271    Near-Ultrasound audio is the 18.5 kHz to 20 kHz band. Device implementations
9272MUST correctly report the support of near-ultrasound audio capability via the
9273    <a href="http://developer.android.com/reference/android/media/AudioManager.html#getProperty(java.lang.String)">AudioManager.getProperty</a> API as follows:
9274   </p>
9275   <ul>
9276    <li>
9277     If
9278     <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND">PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND</a> is "true", then the following requirements must be met by the
9279VOICE_RECOGNITION and UNPROCESSED audio sources:
9280     <ul>
9281      <li>
9282       The microphone's mean power response in the 18.5 kHz to 20 kHz band
9283MUST be no more than 15 dB below the response at 2 kHz.
9284      </li>
9285      <li>
9286       The microphone's unweighted signal to noise ratio over 18.5 kHz to 20 kHz
9287for a 19 kHz tone at -26 dBFS MUST be no lower than 50 dB.
9288      </li>
9289     </ul>
9290    </li>
9291    <li>
9292     If
9293     <a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND">PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND</a> is "true", then the speaker's mean response in 18.5 kHz - 20 kHz MUST be no
9294lower than 40 dB below the response at 2 kHz.
9295    </li>
9296   </ul>
9297   <h2 id="7_9_virtual_reality">
9298    7.9. Virtual Reality
9299   </h2>
9300   <p>
9301    Android includes APIs and facilities to build "Virtual Reality" (VR) applications including high
9302quality mobile VR experiences. Device implementations MUST properly implement these APIs and
9303behaviors, as detailed in this section.
9304   </p>
9305   <h3 id="7_9_1_virtual_reality_mode">
9306    7.9.1. Virtual Reality Mode
9307   </h3>
9308   <p>
9309    Android handheld device implementations that support a mode for VR applications that handles
9310stereoscopic rendering of notifications and disable monocular system UI components while a VR
9311application has user focus MUST declare
9312    <code>
9313     android.software.vr.mode
9314    </code>
9315    feature. Devices declaring this
9316feature MUST include an application implementing
9317    <code>
9318     android.service.vr.VrListenerService
9319    </code>
9320    that can be
9321enabled by VR applications via
9322    <code>
9323     android.app.Activity#setVrModeEnabled
9324    </code>.
9325   </p>
9326   <h3 id="7_9_2_virtual_reality_high_performance">
9327    7.9.2. Virtual Reality High Performance
9328   </h3>
9329   <p>
9330    Android handheld device implementations MUST identify the support of high performance virtual
9331reality for longer user periods through the
9332    <code>
9333     android.hardware.vr.high_performance
9334    </code>
9335    feature flag and
9336meet the following requirements.
9337   </p>
9338   <ul>
9339    <li>
9340     Device implementations MUST have at least 2 physical cores.
9341    </li>
9342    <li>
9343     Device implementations MUST declare android.software.vr.mode feature.
9344    </li>
9345    <li>
9346     Device implementations MUST provide an exclusive core to the foreground application and MUST
9347    support the Process.getExclusiveCores API to return the numbers of the cpu cores that are
9348    exclusive to the top foreground application. This core MUST not allow any other userspace
9349    processes to run on it (except device drivers used by the application), but MAY allow some
9350    kernel processes to run as necessary.
9351    </li>
9352    <li>
9353     Device implementations MUST support sustained performance mode.
9354    </li>
9355    <li>
9356     Device implementations MUST support OpenGL ES 3.2.
9357    </li>
9358    <li>
9359     Device implementations MUST support Vulkan Hardware Level 0 and SHOULD support
9360    Vulkan Hardware Level 1.
9361    </li>
9362    <li>
9363     Device implementations MUST implement EGL_KHR_mutable_render_buffer and
9364    EGL_ANDROID_front_buffer_auto_refresh, EGL_ANDROID_create_native_client_buffer,
9365    EGL_KHR_fence_sync and EGL_KHR_wait_sync so that they may be used for Shared Buffer Mode, and
9366    expose the extensions in the list of available EGL extensions.
9367    </li>
9368    <li>
9369     The GPU and display MUST be able to synchronize access to the shared front buffer such that
9370    alternating-eye rendering of VR content at 60fps with two render contexts will be displayed with
9371    no visible tearing artifacts.
9372    </li>
9373    <li>
9374     Device implementations MUST implement EGL_IMG_context_priority, and expose the extension in the
9375    list of available EGL extensions.
9376    </li>
9377    <li>
9378     Device implementations MUST implement GL_EXT_multisampled_render_to_texture, GL_OVR_multiview,
9379    GL_OVR_multiview2 and GL_OVR_multiview_multisampled_render_to_texture, and expose the extensions
9380    in the list of available GL extensions.
9381    </li>
9382    <li>
9383     Device implementations MUST implement EGL_EXT_protected_content and GL_EXT_protected_textures so
9384    that it may be used for Secure Texture Video Playback, and expose the extensions in the list of
9385    available EGL and GL extensions.
9386    </li>
9387    <li>
9388     Device implementations MUST support H.264 decoding at least 3840x2160@30fps-40Mbps (equivalent
9389    to 4 instances of 1920x1080@30fps-10Mbps or 2 instances of 1920x1080@60fps-20Mbps).
9390    </li>
9391    <li>
9392     Device implementations MUST support HEVC and VP9, MUST be capable to decode at least
9393    1920x1080@30fps-10Mbps and SHOULD be capable to decode 3840x2160@30fps-20Mbps (equivalent to
9394    4 instances of 1920x1080@30fps-5Mbps).
9395    </li>
9396    <li>
9397     The device implementations are STRONGLY RECOMMENDED to support
9398    android.hardware.sensor.hifi_sensors feature and MUST meet the gyroscope, accelerometer, and
9399    magnetometer related requirements for android.hardware.hifi_sensors.
9400    </li>
9401    <li>
9402     Device implementations MUST support HardwarePropertiesManager.getDeviceTemperatures API and
9403    return accurate values for skin temperature.
9404    </li>
9405    <li>
9406     The device implementation MUST have an embedded screen, and its resolution MUST be at least be
9407    FullHD(1080p) and STRONGLY RECOMMENDED TO BE  be QuadHD (1440p) or higher.
9408    </li>
9409    <li>
9410     The display MUST measure between 4.7" and 6" diagonal.
9411    </li>
9412    <li>
9413     The display MUST update at least 60 Hz while in VR Mode.
9414    </li>
9415    <li>
9416     The display latency on Gray-to-Gray, White-to-Black, and Black-to-White switching time MUST
9417    be &le; 3 ms.
9418    </li>
9419    <li>
9420     The display MUST support a low-persistence mode with &le;5 ms persistence,persistence being
9421    defined as the amount of time for which a pixel is emitting light.
9422    </li>
9423    <li>
9424     Device implementations MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension
9425     <a href="#7_4_3_bluetooth">section 7.4.3</a>. 
9426    </li>
9427   </ul>
9428   <h1 id="8_performance_and_power">
9429    8. Performance and Power
9430   </h1>
9431   <p>
9432    Some minimum performance and power criteria are critical to the user experience
9433and impact the baseline assumptions developers would have when developing an
9434app. Android Watch devices SHOULD and other type of device implementations MUST
9435meet the following criteria.
9436   </p>
9437   <h2 id="8_1_user_experience_consistency">
9438    8.1. User Experience Consistency
9439   </h2>
9440   <p>
9441    Device implementations MUST provide a smooth user interface by ensuring a
9442consistent frame rate and response times for applications and games. Device
9443implementations MUST meet the following requirements:
9444   </p>
9445   <ul>
9446    <li>
9447     <strong>
9448      Consistent frame latency
9449     </strong>
9450     . Inconsistent frame latency or a delay to
9451render frames MUST NOT happen more often than 5 frames in a second, and SHOULD
9452be below 1 frames in a second.
9453    </li>
9454    <li>
9455     <strong>
9456      User interface latency
9457     </strong>
9458     . Device implementations MUST ensure low latency
9459user experience by scrolling a list of 10K list entries as defined by the
9460Android Compatibility Test Suite (CTS) in less than 36 secs.
9461    </li>
9462    <li>
9463     <strong>
9464      Task switching
9465     </strong>
9466     . When multiple applications have been launched,
9467re-launching an already-running application after it has been launched MUST
9468take less than 1 second.
9469    </li>
9470   </ul>
9471   <h2 id="8_2_file_i/o_access_performance">
9472    8.2. File I/O Access Performance
9473   </h2>
9474   <p>
9475    Device implementations MUST ensure internal storage file access performance
9476consistency for read and write operations.
9477   </p>
9478   <ul>
9479    <li>
9480     <strong>
9481      Sequential write
9482     </strong>
9483     . Device implementations MUST ensure a sequential write
9484performance of at least 5MB/s for a 256MB file using 10MB write buffer.
9485    </li>
9486    <li>
9487     <strong>
9488      Random write
9489     </strong>
9490     . Device implementations MUST ensure a random write
9491performance of at least 0.5MB/s for a 256MB file using 4KB write buffer.
9492    </li>
9493    <li>
9494     <strong>
9495      Sequential read
9496     </strong>
9497     . Device implementations MUST ensure a sequential read
9498performance of at least 15MB/s for a 256MB file using 10MB write buffer.
9499    </li>
9500    <li>
9501     <strong>
9502      Random read
9503     </strong>
9504     . Device implementations MUST ensure a random read
9505performance of at least 3.5MB/s for a 256MB file using 4KB write buffer.
9506    </li>
9507   </ul>
9508   <h2 id="8_3_power-saving_modes">
9509    8.3. Power-Saving Modes
9510   </h2>
9511   <p>
9512    Android 6.0 introduced App Standby and Doze power-saving modes to optimize
9513battery usage.  All Apps exempted from these modes MUST be made visible to the
9514end user. Further, the triggering, maintenance, wakeup algorithms and the use of
9515global system settings of these power-saving modes MUST not deviate from the
9516Android Open Source Project.
9517   </p>
9518   <p>
9519    In addition to the power-saving modes, Android device implementations MAY
9520implement any or all of the 4 sleeping power states as defined by the Advanced
9521Configuration and Power Interface (ACPI), but if it implements S3 and S4
9522power states, it can only enter these states when closing a lid that is
9523physically part of the device.
9524   </p>
9525   <h2 id="8_4_power_consumption_accounting">
9526    8.4. Power Consumption Accounting
9527   </h2>
9528   <p>
9529    A more accurate accounting and reporting of the power consumption provides the
9530app developer both the incentives and the tools to optimize the power usage
9531pattern of the application. Therefore, device implementations:
9532   </p>
9533   <ul>
9534    <li>
9535     MUST be able to track hardware component power usage and attribute that
9536power usage to specific applications. Specifically, implementations:
9537     <ul>
9538      <li>
9539       MUST provide a per-component power profile that defines the
9540       <a href="http://source.android.com/devices/tech/power/values.html">
9541        current consumption value</a> for each hardware component and the approximate battery drain caused by the
9542components over time as documented in the Android Open Source Project site.
9543      </li>
9544      <li>
9545       MUST report all power consumption values in milliampere hours (mAh).
9546      </li>
9547      <li>
9548       SHOULD be attributed to the hardware component itself if unable to
9549attribute hardware component power usage to an application.
9550      </li>
9551      <li>
9552       MUST report CPU power consumption per each process's UID. The Android
9553Open Source Project meets the requirement through the
9554       <code>
9555        uid_cputime
9556       </code>
9557       kernel
9558module implementation.
9559      </li>
9560     </ul>
9561    </li>
9562    <li>
9563     MUST make this power usage available via the
9564     <a href="http://source.android.com/devices/tech/power/batterystats.html">
9565      <code> adb shell dumpsys batterystats </code></a> shell command to the app developer.
9566    </li>
9567    <li>
9568     MUST honor the
9569     <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY">android.intent.action.POWER_USAGE_SUMMARY</a> intent and display a settings menu that shows this power usage.
9570    </li>
9571   </ul>
9572   <h2 id="8_5_consistent_performance">
9573    8.5. Consistent Performance
9574   </h2>
9575   <p>
9576    Performance can fluctuate dramatically for high-performance long-running apps,
9577either because of the other apps running in the background or the CPU throttling
9578due to temperature limits. Android includes programmatic interfaces so that when
9579the device is capable, the top foreground application can request that the system
9580optimize the allocation of the resources to address such fluctuations.
9581   </p>
9582   <p>
9583    Device implementations SHOULD support Sustained Performance Mode which can
9584provide the top foreground application a consistent level of performance for a
9585prolonged amount of time when requested through the
9586    <a href="https://developer.android.com/reference/android/view/Window.html#setSustainedPerformanceMode%28boolean%29">
9587     <code> Window.setSustainedPerformanceMode()</code></a>
9588    API method. A Device implementation MUST report the support of Sustained
9589Performance Mode accurately through the
9590    <a href="https://developer.android.com/reference/android/os/PowerManager.html#isSustainedPerformanceModeSupported%28%29">
9591     <code> PowerManager.isSustainedPerformanceModeSupported()</code></a> API method.
9592   </p>
9593   <p>
9594    Device implementations with two or more CPU cores SHOULD provide at least one exclusive core that
9595can be reserved by the top foreground application. If provided, implementations MUST meet the
9596following requirements:
9597   </p>
9598   <ul>
9599    <li>
9600     Implementations MUST report through the
9601     <a href="https://developer.android.com/reference/android/os/Process.html#getExclusiveCores()">
9602      <code> Process.getExclusiveCores()</code></a>
9603     API method the id numbers of the exclusive cores that can be reserved by the top foreground
9604     application.
9605    </li>
9606    <li>
9607     Device implementations MUST not allow any user space processes except the device drivers used
9608     by the application to run on the exclusive cores, but MAY allow some kernel processes to run
9609     as necessary.
9610    </li>
9611   </ul>
9612   <p>
9613    If a device implementation does not support an exclusive core, it MUST return an
9614empty list through the
9615    <a href="https://developer.android.com/reference/android/os/Process.html#getExclusiveCores()">
9616     <code> Process.getExclusiveCores()</code></a> API method.
9617   </p>
9618   <h1 id="9_security_model_compatibility">
9619    9. Security Model Compatibility
9620   </h1>
9621   <p>
9622    Device implementations MUST implement a security model consistent with the
9623Android platform security model as defined in
9624    <a href="http://developer.android.com/guide/topics/security/permissions.html">
9625     Security and Permissions
9626reference document
9627    </a>
9628    in the APIs in the Android developer documentation. Device implementations MUST
9629support installation of self-signed applications without requiring any
9630additional permissions/certificates from any third parties/authorities.
9631Specifically, compatible devices MUST support the security mechanisms described
9632in the follow subsections.
9633   </p>
9634   <h2 id="9_1_permissions">
9635    9.1. Permissions
9636   </h2>
9637   <p>
9638    Device implementations MUST support the
9639    <a href="http://developer.android.com/guide/topics/security/permissions.html">
9640     Android permissions model</a> as
9641defined in the Android developer documentation. Specifically, implementations
9642MUST enforce each permission defined as described in the SDK documentation; no
9643permissions may be omitted, altered, or ignored. Implementations MAY add
9644additional permissions, provided the new permission ID strings are not in the
9645android.* namespace.
9646   </p>
9647   <p>
9648    Permissions with a protection level of dangerous are runtime permissions.
9649Applications with targetSdkVersion &gt; 22 request them at runtime. Device
9650implementations:
9651   </p>
9652   <ul>
9653    <li>
9654     MUST show a dedicated interface for the user to decide whether to grant the
9655requested runtime permissions and also provide an interface for the user to
9656manage runtime permissions.
9657    </li>
9658    <li>
9659     MUST have one and only one implementation of both user interfaces.
9660    </li>
9661    <li>
9662     MUST NOT grant any runtime permissions to preinstalled apps unless:
9663     <ul>
9664      <li>
9665       the user's consent can be obtained before the application uses it
9666      </li>
9667      <li>
9668       the runtime permissions are associated with an intent pattern for which
9669the preinstalled application is set as the default handler
9670      </li>
9671     </ul>
9672    </li>
9673   </ul>
9674   <h2 id="9_2_uid_and_process_isolation">
9675    9.2. UID and Process Isolation
9676   </h2>
9677   <p>
9678    Device implementations MUST support the Android application sandbox model, in
9679which each application runs as a unique Unixstyle UID and in a separate
9680process. Device implementations MUST support running multiple applications as
9681the same Linux user ID, provided that the applications are properly signed and
9682constructed, as defined in the
9683    <a href="http://developer.android.com/guide/topics/security/permissions.html">
9684     Security and Permissions reference</a>.
9685   </p>
9686   <h2 id="9_3_filesystem_permissions">
9687    9.3. Filesystem Permissions
9688   </h2>
9689   <p>
9690    Device implementations MUST support the Android file access permissions model
9691as defined in the
9692    <a href="http://developer.android.com/guide/topics/security/permissions.html">
9693     Security and Permissions reference</a>.
9694   </p>
9695   <h2 id="9_4_alternate_execution_environments">
9696    9.4. Alternate Execution Environments
9697   </h2>
9698   <p>
9699    Device implementations MAY include runtime environments that execute
9700applications using some other software or technology than the Dalvik Executable
9701Format or native code. However, such alternate execution environments MUST NOT
9702compromise the Android security model or the security of installed Android
9703applications, as described in this section.
9704   </p>
9705   <p>
9706    Alternate runtimes MUST themselves be Android applications, and abide by the
9707standard Android security model, as described elsewhere in
9708    <a href="#9_security_model_compatibility">
9709     section 9</a>.
9710   </p>
9711   <p>
9712    Alternate runtimes MUST NOT be granted access to resources protected by
9713permissions not requested in the runtime&rsquo;s AndroidManifest.xml file via the
9714&lt;uses-permission&gt; mechanism.
9715   </p>
9716   <p>
9717    Alternate runtimes MUST NOT permit applications to make use of features
9718protected by Android permissions restricted to system applications.
9719   </p>
9720   <p>
9721    Alternate runtimes MUST abide by the Android sandbox model. Specifically,
9722alternate runtimes:
9723   </p>
9724   <ul>
9725    <li>
9726     SHOULD install apps via the PackageManager into separate Android sandboxes
9727(Linux user IDs, etc.).
9728    </li>
9729    <li>
9730     MAY provide a single Android sandbox shared by all applications using the
9731alternate runtime.
9732    </li>
9733    <li>
9734     Installed applications using an alternate runtime MUST NOT reuse the
9735sandbox of any other app installed on the device, except through the standard
9736Android mechanisms of shared user ID and signing certificate.
9737    </li>
9738    <li>
9739     MUST NOT launch with, grant, or be granted access to the sandboxes
9740corresponding to other Android applications.
9741    </li>
9742    <li>
9743     MUST NOT be launched with, be granted, or grant to other applications any
9744privileges of the superuser (root), or of any other user ID.
9745    </li>
9746   </ul>
9747   <p>
9748    The .apk files of alternate runtimes MAY be included in the system image of a
9749device implementation, but MUST be signed with a key distinct from the key used
9750to sign other applications included with the device implementation.
9751   </p>
9752   <p>
9753    When installing applications, alternate runtimes MUST obtain user consent for
9754the Android permissions used by the application. If an application needs to
9755make use of a device resource for which there is a corresponding Android
9756permission (such as Camera, GPS, etc.), the alternate runtime MUST inform the
9757user that the application will be able to access that resource. If the runtime
9758environment does not record application capabilities in this manner, the
9759runtime environment MUST list all permissions held by the runtime itself when
9760installing any application using that runtime.
9761   </p>
9762   <h2 id="9_5_multi-user_support">
9763    9.5. Multi-User Support
9764   </h2>
9765   <div class="note">
9766    This feature is optional for all device types.
9767   </div>
9768   <p>
9769    Android includes
9770    <a href="http://developer.android.com/reference/android/os/UserManager.html">
9771     support for multiple users</a> and
9772provides support for full user isolation. Device implementations MAY enable
9773multiple users, but when enabled MUST meet the following requirements related
9774to
9775    <a href="http://source.android.com/devices/storage/traditional.html">multi-user support</a>: 
9776   </p>
9777   <ul>
9778    <li>
9779     Android Automotive device implementations with multi-user support enabled
9780MUST include a guest account that allows all functions provided by the vehicle
9781system without requiring a user to log in.
9782    </li>
9783    <li>
9784     Device implementations that do not declare the android.hardware.telephony
9785feature flag MUST support restricted profiles, a feature that allows device
9786owners to manage additional users and their capabilities on the device. With
9787restricted profiles, device owners can quickly set up separate environments for
9788additional users to work in, with the ability to manage finer-grained
9789restrictions in the apps that are available in those environments.
9790    </li>
9791    <li>
9792     Conversely device implementations that declare the
9793android.hardware.telephony feature flag MUST NOT support restricted profiles
9794but MUST align with the AOSP implementation of controls to enable /disable
9795other users from accessing the voice calls and SMS.
9796    </li>
9797    <li>
9798     Device implementations MUST, for each user, implement a security model
9799consistent with the Android platform security model as defined in
9800     <a href="http://developer.android.com/guide/topics/security/permissions.html">
9801      Security and Permissions reference document</a> in the APIs.
9802    </li>
9803    <li>
9804     Each user instance on an Android device MUST have separate and isolated
9805external storage directories. Device implementations MAY store multiple users'
9806data on the same volume or filesystem. However, the device implementation MUST
9807ensure that applications owned by and running on behalf a given user cannot
9808list, read, or write to data owned by any other user. Note that removable
9809media, such as SD card slots, can allow one user to access another&rsquo;s data by
9810means of a host PC. For this reason, device implementations that use removable
9811media for the external storage APIs MUST encrypt the contents of the SD card if
9812multiuser is enabled using a key stored only on non-removable media accessible
9813only to the system. As this will make the media unreadable by a host PC, device
9814implementations will be required to switch to MTP or a similar system to
9815provide host PCs with access to the current user&rsquo;s data. Accordingly, device
9816implementations MAY but SHOULD NOT enable multi-user if they use
9817     <a href="http://developer.android.com/reference/android/os/Environment.html">
9818      removable media</a> for primary external storage.
9819    </li>
9820   </ul>
9821   <h2 id="9_6_premium_sms_warning">
9822    9.6. Premium SMS Warning
9823   </h2>
9824   <p>
9825    Android includes support for warning users of any outgoing
9826    <a href="http://en.wikipedia.org/wiki/Short_code">
9827     premium SMS message</a>. Premium SMS messages are
9828text messages sent to a service registered with a carrier that may incur a
9829charge to the user. Device implementations that declare support for
9830android.hardware.telephony MUST warn users before sending a SMS message to
9831numbers identified by regular expressions defined in /data/misc/sms/codes.xml
9832file in the device. The upstream Android Open Source Project provides an
9833implementation that satisfies this requirement.
9834   </p>
9835   <h2 id="9_7_kernel_security_features">
9836    9.7. Kernel Security Features
9837   </h2>
9838   <p>
9839    The Android Sandbox includes features that use the Security-Enhanced Linux
9840(SELinux) mandatory access control (MAC) system, seccomp sandboxing, and other
9841security features in the Linux kernel. SELinux or any other security features
9842implemented below the Android framework:
9843   </p>
9844   <ul>
9845    <li>
9846     MUST maintain compatibility with existing applications.
9847    </li>
9848    <li>
9849     MUST NOT have a visible user interface when a security violation is
9850detected and successfully blocked, but MAY have a visible user interface when
9851an unblocked security violation occurs resulting in a successful exploit.
9852    </li>
9853    <li>
9854     SHOULD NOT be user or developer configurable.
9855    </li>
9856   </ul>
9857   <p>
9858    If any API for configuration of policy is exposed to an application that can
9859affect another application (such as a Device Administration API), the API MUST
9860NOT allow configurations that break compatibility.
9861   </p>
9862   <p>
9863    Devices MUST implement SELinux or, if using a kernel other than Linux, an
9864equivalent mandatory access control system. Devices MUST also meet the
9865following requirements, which are satisfied by the reference implementation in
9866the upstream Android Open Source Project.
9867   </p>
9868   <p>
9869    Device implementations:
9870   </p>
9871   <ul>
9872    <li>
9873     MUST set SELinux to global enforcing mode.
9874    </li>
9875    <li>
9876     MUST configure all domains in enforcing mode. No permissive mode domains
9877are allowed, including domains specific to a device/vendor.
9878    </li>
9879    <li>
9880     MUST NOT modify, omit, or replace the neverallow rules present within the
9881system/sepolicy folder provided in the upstream Android Open Source Project
9882(AOSP) and the policy MUST compile with all neverallow rules present, for both
9883AOSP SELinux domains as well as device/vendor specific domains.
9884    </li>
9885    <li>
9886     MUST split the media framework into multiple processes so that it
9887is possible to more narrowly grant access for each process as
9888     <a href="https://source.android.com/devices/media/framework-hardening.html#arch_changes">described</a> in the Android Open Source Project site.
9889    </li>
9890   </ul>
9891   <p>
9892    Device implementations SHOULD retain the default SELinux policy provided in the
9893system/sepolicy folder of the upstream Android Open Source Project and only
9894further add to this policy for their own device-specific configuration. Device
9895implementations MUST be compatible with the upstream Android Open Source
9896Project.
9897   </p>
9898   <p>
9899    Devices MUST implement a kernel application sandboxing mechanism which allows
9900filtering of system calls using a configurable policy from multithreaded
9901programs. The upstream Android Open Source Project meets this requirement
9902through enabling the seccomp-BPF with threadgroup synchronization (TSYNC) as
9903described
9904    <a href="http://source.android.com/devices/tech/config/kernel.html#Seccomp-BPF-TSYNC">in the Kernel Configuration section of source.android.com</a>. 
9905   </p>
9906   <h2 id="9_8_privacy">
9907    9.8. Privacy
9908   </h2>
9909   <p>
9910    If the device implements functionality in the system that captures the contents
9911displayed on the screen and/or records the audio stream played on the device,
9912it MUST continuously notify the user whenever this functionality is enabled and
9913actively capturing/recording.
9914   </p>
9915   <p>
9916    If a device implementation has a mechanism that routes network data traffic
9917through a proxy server or VPN gateway by default (for example, preloading a VPN
9918service with android.permission.CONTROL_VPN granted), the device implementation
9919MUST ask for the user's consent before enabling that mechanism, unless that
9920VPN is enabled by the Device Policy Controller via the
9921    <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setAlwaysOnVpnPackage(android.content.ComponentName, java.lang.String, boolean)">
9922     <code> DevicePolicyManager.setAlwaysOnVpnPackage()</code></a>, in which case
9923     the user does not need to provide a separate consent, but MUST
9924only be notified.
9925   </p>
9926   <p>
9927    Device implementations MUST ship with an empty user-added Certificate Authority
9928(CA) store, and MUST preinstall the same root certificates for the system-trusted
9929CA store as
9930    <a href="https://source.android.com/security/overview/app-security.html#certificate-authorities">provided</a> in the upstream Android Open Source Project.
9931   </p>
9932   <p>
9933    When devices are routed through a VPN, or a user root CA is installed, the
9934implementation MUST display a warning indicating the network traffic may be
9935monitored to the user.
9936   </p>
9937   <p>
9938    If a device implementation has a USB port with USB peripheral mode support, it
9939MUST present a user interface asking for the user's consent before allowing
9940access to the contents of the shared storage over the USB port.
9941   </p>
9942   <h2 id="9_9_data_storage_encryption">
9943    9.9. Data Storage Encryption
9944   </h2>
9945   <div class="note">
9946    Optional for Android device implementations without a secure lock screen.
9947   </div>
9948   <p>
9949    If the device implementation supports a secure lock screen as described in section 9.11.1,
9950then the device MUST support data storage encryption of the application private data (/data partition), as well as the
9951application shared storage partition (/sdcard partition) if it is a permanent,
9952non-removable part of the device.
9953   </p>
9954   <p>
9955    For device implementations supporting data storage encryption and with Advanced
9956Encryption Standard (AES) crypto performance above 50MiB/sec, the data storage
9957encryption MUST be enabled by default at the time the user has completed the
9958out-of-box setup experience. If a device implementation is already launched on
9959an earlier Android version with encryption disabled by default, such
9960a device cannot meet the requirement through a system software update and thus
9961MAY be exempted.
9962   </p>
9963   <p>
9964    Device implementations SHOULD meet the above data storage encryption requirement
9965via implementing
9966    <a href="https://source.android.com/security/encryption/file-based.html">File Based Encryption</a>( FBE).
9967   </p>
9968   <h3 id="9_9_1_direct_boot">
9969    9.9.1. Direct Boot
9970   </h3>
9971   <p>
9972    All devices MUST implement the
9973    <a href="http://developer.android.com/preview/features/direct-boot.html">
9974     Direct Boot
9975mode
9976    </a>
9977    APIs even
9978if they do not support Storage Encryption. In particular, the
9979LOCKED_BOOT_COMPLETED(https://developer.android.com/reference/android/content/Intent.html#LOCKED_BOOT_COMPLETED)
9980and
9981    <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_USER_UNLOCKED">ACTION_USER_UNLOCKED</a> Intents must still be broadcast to signal Direct Boot aware applications that
9982Device Encrypted (DE) and Credential Encrypted (CE) storage locations are
9983available for user.
9984   </p>
9985   <h3 id="9_9_2_file_based_encryption">
9986    9.9.2. File Based Encryption
9987   </h3>
9988   <p>
9989    Device implementations supporting FBE:
9990   </p>
9991   <ul>
9992    <li>
9993     MUST boot up without challenging the user for credentials and allow Direct
9994  Boot aware apps to access to the Device Encrypted (DE) storage after the
9995  LOCKED_BOOT_COMPLETED message is broadcasted.
9996    </li>
9997    <li>
9998     MUST only allow access to Credential Encrypted (CE) storage after the user
9999  has unlocked the device by supplying their credentials (eg. passcode, pin,
10000  pattern or fingerprint) and the ACTION_USER_UNLOCKED message is broadcasted.
10001  Device implementations MUST NOT offer any
10002  method to unlock the CE protected storage without the user supplied
10003  credentials.
10004    </li>
10005    <li>
10006     MUST support Verified Boot and ensure that DE keys are cryptographically
10007  bound to the device's hardware root of trust.
10008    </li>
10009    <li>
10010     MUST support encrypting file contents using AES with a key length of 256-bits
10011  in XTS mode.
10012    </li>
10013    <li>
10014     MUST support encrypting file name using AES with a key length of 256-bits in
10015  CBC-CTS mode.
10016    </li>
10017    <li>
10018     MAY support alternative ciphers, key lengths and modes for file content and
10019  file name encryption, but MUST use the mandatorily supported ciphers,
10020  key lengths and modes by default.
10021    </li>
10022    <li>
10023     SHOULD make preloaded essential apps (e.g. Alarm, Phone, Messenger)
10024  Direct Boot aware.
10025    </li>
10026   </ul>
10027   <p>
10028    The keys protecting CE and DE storage areas:
10029   </p>
10030   <ul>
10031    <li>
10032     MUST be cryptographically bound to a hardware-backed Keystore. CE keys
10033  must be bound to a user's lock screen credentials. If the user has
10034  specified no lock screen credentials then the CE keys MUST be bound to
10035  a default passcode.
10036    </li>
10037    <li>
10038     MUST be unique and distinct, in other words no user's CE or DE key
10039  may match any other user's CE or DE keys.
10040    </li>
10041   </ul>
10042   <p>
10043    The upstream Android Open Source project provides a preferred implementation of
10044this feature based on the Linux kernel ext4 encryption feature.
10045   </p>
10046   <h3 id="9_9_3_full_disk_encryption">
10047    9.9.3. Full Disk Encryption
10048   </h3>
10049   <p>
10050    Device implementations supporting
10051    <a href="http://source.android.com/devices/tech/security/encryption/index.html">full disk encryption</a> (FDE). MUST use AES with a key of 128-bits
10052  (or greater) and a mode designed for storage (for example, AES-XTS,
10053  AES-CBC-ESSIV). The encryption key MUST NOT be written to storage at any time
10054  without being encrypted. Other than when in active use, the encryption key
10055  SHOULD be AES encrypted with the lock screen credentials stretched using a slow
10056  stretching algorithm (e.g. PBKDF2 or scrypt). If the user has not specified
10057  a lock screen credentials or has disabled use of the passcode for encryption, the
10058  system SHOULD use a default passcode to wrap the encryption key. If the
10059  device provides a hardware-backed keystore, the password stretching algorithm
10060  MUST be cryptographically bound to that keystore. The encryption key MUST NOT
10061  be sent off the device (even when wrapped with the user passcode and/or
10062  hardware bound key). The upstream Android Open Source project provides a
10063  preferred implementation of this feature based on the Linux kernel feature
10064  dm-crypt.
10065   </p>
10066   <h2 id="9_10_device_integrity">
10067    9.10. Device Integrity
10068   </h2>
10069   <p>
10070    The following requirements ensures there is transparancy to the status of the
10071device integrity.
10072   </p>
10073   <p>
10074    Device implementations MUST correctly report through the System API method
10075PersistentDataBlockManager.getFlashLockState() whether their bootloader state
10076permits flashing of the system image. The
10077    <code>
10078     FLASH_LOCK_UNKNOWN
10079    </code>
10080    state is reserved
10081for device implementations upgrading from an earlier version of Android where this
10082new system API method did not exist.
10083   </p>
10084   <p>
10085    Verified boot is a feature that guarantees the integrity of the device
10086software. If a device implementation supports the feature, it MUST:
10087   </p>
10088   <ul>
10089    <li>
10090     Declare the platform feature flag android.software.verified_boot.
10091    </li>
10092    <li>
10093     Perform verification on every boot sequence.
10094    </li>
10095    <li>
10096     Start verification from an immutable hardware key that is the root of trust
10097and go all the way up to the system partition.
10098    </li>
10099    <li>
10100     Implement each stage of verification to check the integrity and
10101authenticity of all the bytes in the next stage before executing the code in
10102the next stage.
10103    </li>
10104    <li>
10105     Use verification algorithms as strong as current recommendations from NIST
10106for hashing algorithms (SHA-256) and public key sizes (RSA-2048).
10107    </li>
10108    <li>
10109     MUST NOT allow boot to complete when system verification fails, unless the
10110user consents to attempt booting anyway, in which case the data from any
10111non-verified storage blocks MUST not be used.
10112    </li>
10113    <li>
10114     MUST NOT allow verified partitions on the device to be modified unless the
10115user has explicitly unlocked the boot loader.
10116    </li>
10117   </ul>
10118   <p>
10119    The upstream Android Open Source Project provides a preferred implementation of
10120this feature based on the Linux kernel feature dm-verity.
10121   </p>
10122   <p>
10123    Starting from Android 6.0, device implementations with Advanced Encryption
10124Standard (AES) crypto performance above 50 MiB/seconds MUST support verified boot
10125for device integrity.
10126   </p>
10127   <p>
10128    If a device implementation is already launched without supporting verified boot
10129on an earlier version of Android, such a device can not add support for this feature
10130with a system software update and thus are exempted from the requirement.
10131   </p>
10132   <h2 id="9_11_keys_and_credentials">
10133    9.11. Keys and Credentials
10134   </h2>
10135   <p>
10136    The
10137    <a href="https://developer.android.com/training/articles/keystore.html">
10138     Android Keystore System</a> allows
10139app developers to store cryptographic keys in a container and use them in
10140cryptographic operations through the
10141    <a href="https://developer.android.com/reference/android/security/KeyChain.html">
10142     KeyChain API</a> or the
10143    <a href="https://developer.android.com/reference/java/security/KeyStore.html">Keystore API</a>. 
10144   </p>
10145   <p>
10146    All Android device implementations MUST meet the following requirements:
10147   </p>
10148   <ul>
10149    <li>
10150     SHOULD not limit the number of keys that can be generated, and MUST at
10151    least allow more than 8,192 keys to be imported.
10152    </li>
10153    <li>
10154     The lock screen authentication MUST rate limit attempts and MUST have an
10155    exponential backoff algorithm. Beyond 150 failed attempts, the delay MUST be
10156    at least 24 hours per attempt.
10157    </li>
10158    <li>
10159     When the device implementation supports a secure lock screen it MUST back up the
10160    keystore implementation with secure hardware and meet following requirements:
10161     <ul>
10162      <li>
10163       MUST have hardware backed implementations of RSA, AES, ECDSA and HMAC cryptographic
10164algorithms and MD5, SHA1, SHA-2 Family hash functions to properly support the
10165       <a href="https://developer.android.com/training/articles/keystore.html#SupportedAlgorithms">Android Keystore system's supported algorithms</a>. 
10166      </li>
10167      <li>
10168       MUST perform the lock screen authentication in the secure hardware and only when
10169successful allow the authentication-bound keys to be used. The upstream Android
10170Open Source Project provides the
10171       <a href="http://source.android.com/devices/tech/security/authentication/gatekeeper.html">
10172        Gatekeeper Hardware Abstraction Layer (HAL)</a> that can be used to satisfy this requirement.
10173      </li>
10174     </ul>
10175    </li>
10176   </ul>
10177   <p>
10178    Note that if a device implementation is already launched on an earlier Android version, and does
10179not have a fingerprint scanner, such a device is exempted from the requirement to have a
10180hardware-backed keystore.
10181   </p>
10182   <h3 id="9_11_1_secure_lock_screen">
10183    9.11.1. Secure Lock Screen
10184   </h3>
10185   <p>
10186    Device implementations MAY add or modify the authentication methods to unlock
10187the lock screen, but MUST still meet the following requirements:
10188   </p>
10189   <ul>
10190    <li>
10191     The authentication method, if based on a known secret, MUST NOT be treated
10192    as a secure lock screen unless it meets all following requirements:
10193     <ul>
10194      <li>
10195       The entropy of the shortest allowed length of inputs MUST be greater
10196     than 10 bits.
10197      </li>
10198      <li>
10199       The maximum entropy of all possible inputs MUST be greater than 18 bits.
10200      </li>
10201      <li>
10202       MUST not replace any of the existing authentication methods (PIN,
10203     pattern, password) implemented and provided in AOSP.
10204      </li>
10205      <li>
10206       MUST be disabled when the Device Policy Controller (DPC) application
10207     has set the password quality policy via the
10208       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality(android.content.ComponentName,%20int)">
10209        <code> DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than
10210       <code> PASSWORD_QUALITY_SOMETHING</code>.
10211      </li>
10212     </ul>
10213    </li>
10214    <li>
10215     The authenticaion method, if based on a physical token or the location,
10216    MUST NOT be treated as a secure lock screen unless it meets all following
10217    requirements:
10218     <ul>
10219      <li>
10220       It MUST have a fall-back mechanism to use one of the primary
10221     authentication methods which is based on a known secret and meets
10222     the requirements to be treated as a secure lock screen.
10223      </li>
10224      <li>
10225       It MUST be disabled and only allow the primary authentication to
10226     unlock the screen when the Device Policy Controller (DPC) application
10227     has set the policy with either the
10228       <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setKeyguardDisabledFeatures(android.content.ComponentName,%20int)">
10229        <code> DevicePolicyManager.setKeyguardDisabledFeatures(KEYGUARD_DISABLE_TRUST_AGENTS)</code></a> method or the
10230       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality(android.content.ComponentName,%20int)">
10231        <code> DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than
10232       <code> PASSWORD_QUALITY_UNSPECIFIED</code>.
10233      </li>
10234     </ul>
10235    </li>
10236    <li>
10237     The authentication method, if based on biometrics, MUST NOT be treated as a
10238     secure lock screen unless it meets all following requirements:
10239     <ul>
10240      <li>
10241       It MUST have a fall-back mechanism to use one of the primary
10242      authentication methods which is based on a known secret and meets
10243      the requirements to be treated as a secure lock screen.
10244      </li>
10245      <li>
10246       It MUST be disabled and only allow the primary authentication to
10247      unlock the screen when the Device Policy Controller (DPC) application
10248      has set the keguard feature policy by calling the method
10249       <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setKeyguardDisabledFeatures(android.content.ComponentName,%20int)">
10250        <code> DevicePolicyManager.setKeyguardDisabledFeatures(KEYGUARD_DISABLE_FINGERPRINT)</code></a>.
10251      </li>
10252      <li>
10253       It MUST have a false acceptance rate that is equal or stronger than
10254      what is required for a fingerprint sensor as described in
10255      section 7.3.10, or otherwise MUST be disabled and only allow the
10256      primary authentication to unlock the screen when the Device Policy
10257      Controller (DPC) application has set the password quality policy
10258      via the
10259       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality(android.content.ComponentName,%20int)">
10260        <code> DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than
10261       <code> PASSWORD_QUALITY_BIOMETRIC_WEAK</code>.
10262      </li>
10263     </ul>
10264    </li>
10265    <li>
10266     If the authentication method can not be treated as a secure lock screen,
10267     it:
10268     <ul>
10269      <li>
10270       MUST return
10271       <code>
10272        false
10273       </code>
10274       for both the
10275       <a href="http://developer.android.com/reference/android/app/KeyguardManager.html#isKeyguardSecure()">
10276        <code> KeyguardManager.isKeyguardSecure()</code></a> and the
10277       <a href="https://developer.android.com/reference/android/app/KeyguardManager.html#isDeviceSecure()">
10278        <code> KeyguardManager.isDeviceSecure()</code></a> methods.
10279      </li>
10280      <li>
10281       MUST be disabled when the Device Policy Controller (DPC) application
10282      has set the password quality policy via the
10283       <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordQuality(android.content.ComponentName,%20int)">
10284        <code> DevicePolicyManager.setPasswordQuality()</code></a> method with a more restrictive quality constant than
10285       <code> PASSWORD_QUALITY_UNSPECIFIED</code>.
10286      </li>
10287      <li>
10288       MUST NOT reset the password expiration timers set by
10289       <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordExpirationTimeout(android.content.ComponentName,%20long)">
10290        <code> DevicePolicyManager.setPasswordExpirationTimeout()</code></a>.
10291      </li>
10292      <li>
10293       MUST NOT authenticate access to keystores if the application has called
10294       <a href="https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setUserAuthenticationRequired(boolean)">
10295        <code> KeyGenParameterSpec.Builder.setUserAuthenticationRequired(true)</code></a>.
10296      </li>
10297     </ul>
10298    </li>
10299    <li>
10300     If the authentication method is based on a physical token, the location,
10301     or biometrics that has higher false acceptance rate than what is required
10302     for fingerprint sensors as described in section 7.3.10, then it:
10303     <ul>
10304      <li>
10305       MUST NOT reset the password expiration timers set by
10306       <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setPasswordExpirationTimeout(android.content.ComponentName,%20long)">
10307        <code> DevicePolicyManager.setPasswordExpirationTimeout()</code></a>.
10308      </li>
10309      <li>
10310       MUST NOT authenticate access to keystores if the application has called
10311       <a href="https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setUserAuthenticationRequired(boolean)">
10312        <code> KeyGenParameterSpec.Builder.setUserAuthenticationRequired(true)</code></a>.
10313      </li>
10314     </ul>
10315    </li>
10316   </ul>
10317   <h2 id="9_12_data_deletion">
10318    9.12. Data Deletion
10319   </h2>
10320   <p>
10321    Devices MUST provide users with a mechanism to perform a "Factory Data Reset"
10322that allows logical and physical deletion of all data except for the following:
10323   </p>
10324   <ul>
10325    <li>
10326     The system image
10327    </li>
10328    <li>
10329     Any operating system files required by the system image
10330    </li>
10331   </ul>
10332   <p>
10333    All user-generated data MUST be deleted. This MUST satisfy relevant industry
10334standards for data deletion such as NIST SP800-88. This MUST be used for the
10335implementation of the wipeData() API (part of the Android Device Administration
10336API) described in
10337    <a href="#3_9_device_administration">
10338     section 3.9 Device Administration</a>.
10339   </p>
10340   <p>
10341    Devices MAY provide a fast data wipe that conducts a logical data erase.
10342   </p>
10343   <h2 id="9_13_safe_boot_mode">
10344    9.13. Safe Boot Mode
10345   </h2>
10346   <p>
10347    Android provides a mode enabling users to boot up into a mode where only
10348preinstalled system apps are allowed to run and all third-party apps are
10349disabled. This mode, known as "Safe Boot Mode", provides the user the
10350capability to uninstall potentially harmful third-party apps.
10351   </p>
10352   <p>
10353    Android device implementations are STRONGLY RECOMENDED to implement Safe Boot
10354Mode and meet following requirements:
10355   </p>
10356   <ul>
10357    <li>
10358     <p>
10359      Device implementations SHOULD provide the user an option to enter Safe Boot
10360   Mode from the boot menu which is reachable through a workflow that is different
10361   from that of normal boot.
10362     </p>
10363    </li>
10364    <li>
10365     <p>
10366      Device implementations MUST provide the user an option to enter Safe Boot Mode
10367   in such a way that is uninterruptible from third-party apps installed on
10368   the device, except for when the third party app is a Device Policy Controller
10369   and has set the
10370      <a href="https://developer.android.com/reference/android/os/UserManager.html#DISALLOW_SAFE_BOOT">
10371       <code> UserManager.DISALLOW_SAFE_BOOT</code></a> flag as true.
10372     </p>
10373    </li>
10374    <li>
10375     <p>
10376      Device implementations MUST provide the user the capability to uninstall
10377   any third-party apps within Safe Mode.
10378     </p>
10379    </li>
10380   </ul>
10381   <h2 id="9_14_automotive_vehicle_system_isolation">
10382    9.14. Automotive Vehicle System Isolation
10383   </h2>
10384   <p>
10385    Android Automotive devices are expected to exchange data with critical vehicle
10386subsystems, e.g., by using the
10387    <a href="http://source.android.com/devices/automotive.html">vehicle HAL</a> to send and receive
10388messages over vehicle networks such as CAN bus. Android Automotive device
10389implementations MUST implement security features below the Android framework
10390layers to prevent malicious or unintentional interaction between the Android
10391framework or third-party apps and vehicle subsystems. These security features
10392are as follows:
10393   </p>
10394   <ul>
10395    <li>
10396     Gatekeeping messages from Android framework vehicle subsystems, e.g.,
10397  whitelisting permitted message types and message sources.
10398    </li>
10399    <li>
10400     Watchdog against denial of service attacks from the Android framework or
10401  third-party apps. This guards against malicious software flooding the vehicle
10402  network with traffic, which may lead to malfunctioning vehicle subsystems.
10403    </li>
10404   </ul>
10405   <h1 id="10_software_compatibility_testing">
10406    10. Software Compatibility Testing
10407   </h1>
10408   <p>
10409    Device implementations MUST pass all tests described in this section.
10410   </p>
10411   <p>
10412    However, note that no software test package is fully comprehensive. For this
10413reason, device implementers are
10414    <strong>
10415     STRONGLY RECOMMENDED
10416    </strong>
10417    to make the minimum
10418number of changes as possible to the reference and preferred implementation of
10419Android available from the Android Open Source Project. This will minimize the
10420risk of introducing bugs that create incompatibilities requiring rework and
10421potential device updates.
10422   </p>
10423   <h2 id="10_1_compatibility_test_suite">
10424    10.1. Compatibility Test Suite
10425   </h2>
10426   <p>
10427    Device implementations MUST pass the
10428    <a href="http://source.android.com/compatibility/index.html">
10429     Android Compatibility Test Suite (CTS)</a> available from the
10430Android Open Source Project, using the final shipping software on the device.
10431Additionally, device implementers SHOULD use the reference implementation in
10432the Android Open Source tree as much as possible, and MUST ensure compatibility
10433in cases of ambiguity in CTS and for any reimplementations of parts of the
10434reference source code.
10435   </p>
10436   <p>
10437    The CTS is designed to be run on an actual device. Like any software, the CTS
10438may itself contain bugs. The CTS will be versioned independently of this
10439Compatibility Definition, and multiple revisions of the CTS may be released for
10440Android 7.0. Device implementations MUST pass the latest CTS
10441version available at the time the device software is completed.
10442   </p>
10443   <h2 id="10_2_cts_verifier">
10444    10.2. CTS Verifier
10445   </h2>
10446   <p>
10447    Device implementations MUST correctly execute all applicable cases in the CTS
10448Verifier. The CTS Verifier is included with the Compatibility Test Suite, and
10449is intended to be run by a human operator to test functionality that cannot be
10450tested by an automated system, such as correct functioning of a camera and
10451sensors.
10452   </p>
10453   <p>
10454    The CTS Verifier has tests for many kinds of hardware, including some hardware
10455that is optional. Device implementations MUST pass all tests for hardware that
10456they possess; for instance, if a device possesses an accelerometer, it MUST
10457correctly execute the Accelerometer test case in the CTS Verifier. Test cases
10458for features noted as optional by this Compatibility Definition Document MAY be
10459skipped or omitted.
10460   </p>
10461   <p>
10462    Every device and every build MUST correctly run the CTS Verifier, as noted
10463above. However, since many builds are very similar, device implementers are not
10464expected to explicitly run the CTS Verifier on builds that differ only in
10465trivial ways. Specifically, device implementations that differ from an
10466implementation that has passed the CTS Verifier only by the set of included
10467locales, branding, etc. MAY omit the CTS Verifier test.
10468   </p>
10469   <h1 id="11_updatable_software">
10470    11. Updatable Software
10471   </h1>
10472   <p>
10473    Device implementations MUST include a mechanism to replace the entirety of the
10474system software. The mechanism need not perform &ldquo;live&rdquo; upgrades&mdash;that is, a
10475device restart MAY be required.
10476   </p>
10477   <p>
10478    Any method can be used, provided that it can replace the entirety of the
10479software preinstalled on the device. For instance, any of the following
10480approaches will satisfy this requirement:
10481   </p>
10482   <ul>
10483    <li>
10484     &ldquo;Over-the-air (OTA)&rdquo; downloads with offline update via reboot.
10485    </li>
10486    <li>
10487     &ldquo;Tethered&rdquo; updates over USB from a host PC.
10488    </li>
10489    <li>
10490     &ldquo;Offline&rdquo; updates via a reboot and update from a file on removable storage.
10491    </li>
10492   </ul>
10493   <p>
10494    However, if the device implementation includes support for an unmetered data
10495connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, it
10496MUST support OTA downloads with offline update via reboot.
10497   </p>
10498   <p>
10499    The update mechanism used MUST support updates without wiping user data. That
10500is, the update mechanism MUST preserve application private data and application
10501shared data. Note that the upstream Android software includes an update
10502mechanism that satisfies this requirement.
10503   </p>
10504   <p>
10505    For device implementations that are launching with Android 7.0 and
10506later, the update mechanism SHOULD support verifying that the system image is
10507binary identical to expected result following an OTA. The block-based OTA
10508implementation in the upstream Android Open Source Project, added since Android
105095.1, satisfies this requirement.
10510   </p>
10511   <p>
10512    If an error is found in a device implementation after it has been released but
10513within its reasonable product lifetime that is determined in consultation with
10514the Android Compatibility Team to affect the compatibility of third-party
10515applications, the device implementer MUST correct the error via a software
10516update available that can be applied per the mechanism just described.
10517   </p>
10518   <p>
10519    Android includes features that allow the Device Owner app (if present) to
10520control the installation of system updates. To facilitate this, the system
10521update subsystem for devices that report android.software.device_admin MUST
10522implement the behavior described in the
10523    <a href="http://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html">SystemUpdatePolicy</a> class.
10524   </p>
10525   <h1 id="12_document_changelog">
10526    12. Document Changelog
10527   </h1>
10528   <p>
10529    For a summary of changes to the Compatibility Definition in this release:
10530   </p>
10531   <ul>
10532    <li>
10533     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/?pretty=full&amp;no-merges">Document changelog</a> </li>
10534   </ul>
10535   <p>
10536    For a summary of changes to individuals sections:
10537   </p>
10538   <ol>
10539    <li>
10540     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/1_introduction?pretty=full&amp;no-merges">Introduction</a> </li>
10541    <li>
10542     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/2_device_types?pretty=full&amp;no-merges">Device Types</a> </li>
10543    <li>
10544     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/3_software?pretty=full&amp;no-merges">Software</a> </li>
10545    <li>
10546     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/4_application-packaging?pretty=full&amp;no-merges">Application Packaging</a> </li>
10547    <li>
10548     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/5_multimedia?pretty=full&amp;no-merges">Multimedia</a> </li>
10549    <li>
10550     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/6_dev-tools-and-options?pretty=full&amp;no-merges">Developer Tools and Options</a> </li>
10551    <li>
10552     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/7_hardware-compatibility?pretty=full&amp;no-merges">Hardware Compatibility</a> </li>
10553    <li>
10554     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/8_performance-and-power?pretty=full&amp;no-merges">Performance and Power</a> </li>
10555    <li>
10556     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/9_security-model?pretty=full&amp;no-merges">Security Model</a> </li>
10557    <li>
10558     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/10_software-compatibility-testing?pretty=full&amp;no-merges">Software Compatibility Testing</a> </li>
10559    <li>
10560     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/11_updatable-software?pretty=full&amp;no-merges">Updatable Software</a> </li>
10561    <li>
10562     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/12_document-changelog?pretty=full&amp;no-merges">Document Changelog</a> </li>
10563    <li>
10564     <a href="https://android.googlesource.com/platform/compatibility/cdd/+log/nougat-dev/13_contact-us?pretty=full&amp;no-merges">Contact Us</a> </li>
10565   </ol>
10566   <h2 id="12_1_changelog_viewing_tips">
10567    12.1. Changelog Viewing Tips
10568   </h2>
10569   <p>
10570    Changes are marked as follows:
10571   </p>
10572   <ul>
10573    <li>
10574     <p>
10575      <strong>
10576       CDD
10577      </strong>
10578      <br/>
10579      Substantive changes to the compatibility requirements.
10580     </p>
10581    </li>
10582    <li>
10583     <p>
10584      <strong>
10585       Docs
10586      </strong>
10587      <br/>
10588      Cosmetic or build related changes.
10589     </p>
10590    </li>
10591   </ul>
10592   <p>
10593    For best viewing, append the
10594    <code>
10595     pretty=full
10596    </code>
10597    and
10598    <code>
10599     no-merges
10600    </code>
10601    URL parameters to your
10602changelog URLs.
10603   </p>
10604   <h1 id="13_contact_us">
10605    13. Contact Us
10606   </h1>
10607   <p>
10608    You can join the
10609    <a href="https://groups.google.com/forum/#!forum/android-compatibility">
10610     android-compatibility forum</a> and ask
10611for clarifications or bring up any issues that you think the document does not
10612cover.
10613   </p>
10614  </div>
10615 </body>
10616</html>
10617