1# 7\. Hardware Compatibility
2
3If a device includes a particular hardware component that has a corresponding
4API for third-party developers:
5
6*    [C-0-1] The device implementation MUST implement that
7API as described in the Android SDK documentation.
8
9If an API in the SDK
10interacts with a hardware component that is stated to be optional and the
11device implementation does not possess that component:
12
13*   [C-0-2] Complete class definitions (as documented by the SDK) for the component
14APIs MUST still be presented.
15*   [C-0-3] The API’s behaviors MUST be implemented as no-ops in some reasonable
16fashion.
17*   [C-0-4] API methods MUST return null values where permitted by the SDK
18documentation.
19*   [C-0-5] API methods MUST return no-op implementations of classes where null values
20are not permitted by the SDK documentation.
21*   [C-0-6] API methods MUST NOT throw exceptions not documented by the SDK
22documentation.
23*    [C-0-7] Device implementations MUST consistently report accurate hardware
24configuration information via the `getSystemAvailableFeatures()` and
25`hasSystemFeature(String)` methods on the
26[android.content.pm.PackageManager](
27http://developer.android.com/reference/android/content/pm/PackageManager.html)
28class for the same build fingerprint.
29
30A typical example of a scenario where these requirements apply is the telephony
31API: Even on non-phone devices, these APIs must be implemented as reasonable
32no-ops.