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