1## 7.9\. Virtual Reality 2 3Android includes APIs and facilities to build "Virtual Reality" (VR) 4applications including high quality mobile VR experiences. Device 5implementations MUST properly implement these APIs and behaviors, 6as detailed in this section. 7 8### 7.9.1\. Virtual Reality Mode 9 10Android includes support for [VR Mode]( 11https://developer.android.com/reference/android/app/Activity.html#setVrModeEnabled%28boolean, android.content.ComponentName%29), 12a feature which handles stereoscopic rendering of notifications and disables 13monocular system UI components while a VR application has user focus. 14 15### 7.9.2\. Virtual Reality High Performance 16 17If device implementations identify the support of high performance VR 18for longer user periods through the `android.hardware.vr.high_performance` 19feature flag, they: 20 21* [C-1-1] MUST have at least 2 physical cores. 22* [C-1-2] MUST declare `android.software.vr.mode feature`. 23* [C-1-3] MUST support sustained performance mode. 24* [C-1-4] MUST support OpenGL ES 3.2. 25* [C-1-5] MUST support Vulkan Hardware Level 0 and SHOULD support 26 Vulkan Hardware Level 1. 27* [C-1-6] MUST implement 28 [`EGL_KHR_mutable_render_buffer`](https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_mutable_render_buffer.txt), 29 [`EGL_ANDROID_front_buffer_auto_refresh`](https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_front_buffer_auto_refresh.txt), 30 [`EGL_ANDROID_get_native_client_buffer`](https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_get_native_client_buffer.txt), 31 [`EGL_KHR_fence_sync`](https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt), 32 [`EGL_KHR_wait_sync`](https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_wait_sync.txt), 33 [`EGL_IMG_context_priority`](https://www.khronos.org/registry/EGL/extensions/IMG/EGL_IMG_context_priority.txt), 34 [`EGL_EXT_protected_content`](https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_protected_content.txt), 35 and expose the extensions in the list of available EGL extensions. 36* [C-1-7] The GPU and display MUST be able to synchronize access to the shared 37front buffer such that alternating-eye rendering of VR content at 60fps with two 38render contexts will be displayed with no visible tearing artifacts. 39* [C-1-8] MUST implement 40 [`GL_EXT_multisampled_render_to_texture`](https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture.txt), 41 [`GL_OVR_multiview`](https://www.khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview.txt), 42 [`GL_OVR_multiview2`](https://www.khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview2.txt), 43 [`GL_OVR_multiview_multisampled_render_to_texture`](https://www.khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview_multisampled_render_to_texture.txt), 44 [`GL_EXT_protected_textures`](https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_protected_textures.txt), 45 [`GL_EXT_EGL_image_array`](https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_EGL_image_array.txt), 46 [`GL_EXT_external_buffer`](https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_external_buffer.txt), 47 and expose the extensions in the list of available GL extensions. 48* [C-1-9] MUST implement support for [`AHardwareBuffer`](https://developer.android.com/ndk/reference/hardware__buffer_8h.html) 49 flags `AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER` and 50 `AHARDWAREBUFFER_USAGE_SENSOR_DIRECT_DATA` as 51 described in the NDK. 52* [C-1-10] MUST implement support for `AHardwareBuffers` with more than one 53layer. 54* [C-1-11] MUST support H.264 decoding at least 3840x2160@30fps-40Mbps 55(equivalent to 4 instances of 1920x1080@30fps-10Mbps or 2 instances of 561920x1080@60fps-20Mbps). 57* [C-1-12] MUST support HEVC and VP9, MUST be capable to decode at least 58 1920x1080@30fps-10Mbps and SHOULD be capable to decode 59 3840x2160@30fps-20Mbps (equivalent to 60 4 instances of 1920x1080@30fps-5Mbps). 61* [C-1-13] MUST support `HardwarePropertiesManager.getDeviceTemperatures` API 62and return accurate values for skin temperature. 63* [C-1-14] MUST have an embedded screen, and its resolution MUST be at least be 64 FullHD(1080p) and STRONGLY RECOMMENDED TO BE be QuadHD (1440p) or higher. 65* [C-1-15] The display MUST update at least 60 Hz while in VR Mode. 66* [C-1-16] The display latency (as measured on Gray-to-Gray, White-to-Black, and 67Black-to-White switching time) MUST be ≤ 6 milliseconds. 68* [C-1-17] The display MUST support a low-persistence mode with ≤ 5 milliseconds 69persistence, persistence being defined as the amount of time for 70which a pixel is emitting light. 71* [C-1-18] MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension 72 [section 7.4.3](#7_4_3_bluetooth). 73* [C-1-19] MUST support and properly report [Direct Channel Type]( 74 https://developer.android.com/reference/android/hardware/Sensor.html#isDirectChannelTypeSupported%28int%29") 75 for all of the following default sensor types: 76 * `TYPE_ACCELEROMETER` 77 * `TYPE_ACCELEROMETER_UNCALIBRATED` 78 * `TYPE_GYROSCOPE` 79 * `TYPE_GYROSCOPE_UNCALIBRATED` 80 * `TYPE_MAGNETIC_FIELD` 81 * `TYPE_MAGNETIC_FIELD_UNCALIBRATED` 82* [C-1-20] MUST support the [`TYPE_HARDWARE_BUFFER`]( 83https://developer.android.com/reference/android/hardware/SensorDirectChannel.html#TYPE_HARDWARE_BUFFER) 84 direct channel type for all Direct Channel Types listed above. 85* [SR] Are STRONGLY RECOMMENDED to support 86 `android.hardware.sensor.hifi_sensors` feature and MUST meet the gyroscope, 87 accelerometer, and magnetometer related requirements for 88 `android.hardware.hifi_sensors`. 89* MAY provide an exclusive core to the foreground 90 application and MAY support the `Process.getExclusiveCores` API to return 91 the numbers of the cpu cores that are exclusive to the top foreground 92 application. 93 94If exclusive core is supported, then the core: 95 96* [C-2-1] MUST not allow any other userspace processes to run on it 97(except device drivers used by the application), but MAY allow some kernel 98processes to run as necessary. 99