CDD: Add new sections for power-saving modes and accounting

The algorithms of the power-saving modes, in Android 6.0,
are mainly implemented within the DeviceIdleController class.

If the algorithm varies across devices, the app developers will
not have a reliable method to tune the experience of their apps
under the power-saving modes.

Bug: 19324406
Bug: 23760090

Change-Id: I28611e8b5780a1871743237043756f6b619161c6
diff --git a/src/compatibility/android-cdd.html b/src/compatibility/android-cdd.html
index d8f7e6b..c7b863d 100644
--- a/src/compatibility/android-cdd.html
+++ b/src/compatibility/android-cdd.html
@@ -293,6 +293,10 @@
 
 <p class="toc_h2"><a href="#8_2_file_i_o_access_performance">8.2. File I/O Access Performance</a></p>
 
+<p class="toc_h2"><a href="#8_3_power_saving_modes">8.3. Power-Saving Modes</a></p>
+
+<p class="toc_h2"><a href="#8_4_power_consumption_accounting">8.4. Power Consumption Accounting</a></p>
+
 </div>
 
 <div style="clear: both; page-break-after:always; height:1px"></div>
@@ -4585,11 +4589,11 @@
   </li>
 </ul>
 
-<h1 id="8_performance_compatibility">8. Performance Compatibility</h1>
+<h1 id="8_performance_compatibility">8. Performance and Power</h1>
 
 
-<p>Some minimum performance criterias are critical to the user experience and
-impacts the baseline assumptions developers would have when developing an app.
+<p>Some minimum performance and power criteria are critical to the user experience
+and impact the baseline assumptions developers would have when developing an app.
 Android Watch devices SHOULD and other type of device implementations MUST meet
 the following criteria:</p>
 
@@ -4627,6 +4631,44 @@
 256MB file using 4KB write buffer.</li>
 </ul>
 
+<h2 id="8_3_power_saving_modes">8.3. Power-Saving Modes</h2>
+
+<p>All apps exempted from App Standby and/or Doze mode MUST be made visible to
+the end user. Further, the triggering, maintenance, wakeup algorithms and
+the use of Global system settings of these power-saving modes MUST not deviate
+from the Android Open Source Project.</p>
+
+<h2 id="8_4_power_consumption_accounting">8.4. Power Consumption Accounting</h2>
+
+<p>A more accurate accounting and reporting of the power consumption provides the
+app developer both the incentives and the tools to optimize the power usage pattern
+of the application. Therefore, device implementations:</p>
+
+<ul>
+  <li>MUST be able to track hardware component power usage and attribute that power
+    usage to specific applications. Specifically, implementations:
+    <ul>
+      <li>MUST provide a per-component power profile that defines the current consumption
+        value for each hardware component and the approximate battery drain caused by the
+        components over time as documented in the Android Open Source Project site [<a
+href="http://source.android.com/devices/tech/power/values.html">Resources, XX</a>].</li>
+      <li>MUST report all power consumption values in milliampere hours (mAh)</li>
+      <li>SHOULD be attributed to the hardware component itself if unable to
+        attribute hardware component power usage to an application.</li>
+      <li>MUST report CPU power consumption per each process's UID. The Android Open
+        Source Project meets the requirement through the <code>uid_cputime</code>
+        kernel module implementation.</li>
+    </ul>
+  </li>
+  <li>MUST make this power usage available via the <code>adb shell dumpsys
+    batterystats</code> shell command to the app developer [<a
+href="http://source.android.com/devices/tech/power/batterystats.html">Resources,XX</a>].</li>
+  <li>MUST honor the android.intent.action.POWER_USAGE_SUMMARY intent and display
+    a settings menu that shows this power usage [<a
+href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY">Resources,
+XX</a>].</li>
+</ul>
+
 <h1 id="9_security_model_compatibility">9. Security Model Compatibility</h1>