1 ## 8.4\. Power Consumption Accounting 2 3 A more accurate accounting and reporting of the power consumption provides the 4 app developer both the incentives and the tools to optimize the power usage 5 pattern of the application. 6 7 Handheld device implementations: 8 9 * [H-0-1] MUST provide a per-component power profile that defines the 10 [current consumption value]( 11 http://source.android.com/devices/tech/power/values.html) 12 for each hardware component and the approximate battery drain caused by the 13 components over time as documented in the Android Open Source Project site. 14 * [H-0-2] MUST report all power consumption values in milliampere 15 hours (mAh). 16 * [H-0-3] MUST report CPU power consumption per each process's UID. 17 The Android Open Source Project meets the requirement through the 18 `uid_cputime` kernel module implementation. 19 * SHOULD be attributed to the hardware component itself if unable to 20 attribute hardware component power usage to an application. 21 * [H-0-4] MUST make this power usage available via the 22 [`adb shell dumpsys batterystats`]( 23 http://source.android.com/devices/tech/power/batterystats.html) 24 shell command to the app developer. 25 26 Television device implementations: 27 28 * [T-0-1] MUST provide a per-component power profile that defines the 29 [current consumption value]( 30 http://source.android.com/devices/tech/power/values.html) 31 for each hardware component and the approximate battery drain caused by the 32 components over time as documented in the Android Open Source Project site. 33 * [T-0-2] MUST report all power consumption values in milliampere 34 hours (mAh). 35 * [T-0-3] MUST report CPU power consumption per each process's UID. 36 The Android Open Source Project meets the requirement through the 37 `uid_cputime` kernel module implementation. 38 * SHOULD be attributed to the hardware component itself if unable to 39 attribute hardware component power usage to an application. 40 * [T-0-4] MUST make this power usage available via the 41 [`adb shell dumpsys batterystats`]( 42 http://source.android.com/devices/tech/power/batterystats.html) 43 shell command to the app developer. 44 45 Automotive device implementations: 46 47 * [A-0-1] MUST provide a per-component power profile that defines the 48 [current consumption value]( 49 http://source.android.com/devices/tech/power/values.html) 50 for each hardware component and the approximate battery drain caused by the 51 components over time as documented in the Android Open Source Project site. 52 * [A-0-2] MUST report all power consumption values in milliampere 53 hours (mAh). 54 * [A-0-3] MUST report CPU power consumption per each process's UID. 55 The Android Open Source Project meets the requirement through the 56 `uid_cputime` kernel module implementation. 57 * SHOULD be attributed to the hardware component itself if unable to 58 attribute hardware component power usage to an application. 59 * [A-0-4] MUST make this power usage available via the 60 [`adb shell dumpsys batterystats`]( 61 http://source.android.com/devices/tech/power/batterystats.html) 62 shell command to the app developer. 63 64 Device implementations: 65 66 * [SR] STRONGLY RECOMMENDED to provide a per-component power profile 67 that defines the [current consumption value]( 68 http://source.android.com/devices/tech/power/values.html) 69 for each hardware component and the approximate battery drain caused by the 70 components over time as documented in the Android Open Source Project site. 71 * [SR] STRONGLY RECOMMENDED to report all power consumption values in milliampere 72 hours (mAh). 73 * [SR] STRONGLY RECOMMENDED to report CPU power consumption per each process's UID. 74 The Android Open Source Project meets the requirement through the 75 `uid_cputime` kernel module implementation. 76 * [SR] STRONGLY RECOMMENDED to make this power usage available via the 77 [`adb shell dumpsys batterystats`]( 78 http://source.android.com/devices/tech/power/batterystats.html) 79 shell command to the app developer. 80 * SHOULD be attributed to the hardware component itself if unable to 81 attribute hardware component power usage to an application. 82 83 84 If Handheld device implementations include a screen or video output, they: 85 86 * [H-1-1] MUST honor the [`android.intent.action.POWER_USAGE_SUMMARY`]( 87 http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY) 88 intent and display a settings menu that shows this power usage. 89 90