aboutsummaryrefslogtreecommitdiff
path: root/en/devices/tech/power/mgmt.html
diff options
context:
space:
mode:
Diffstat (limited to 'en/devices/tech/power/mgmt.html')
-rw-r--r--en/devices/tech/power/mgmt.html76
1 files changed, 42 insertions, 34 deletions
diff --git a/en/devices/tech/power/mgmt.html b/en/devices/tech/power/mgmt.html
index 7dd0862b..c54821f0 100644
--- a/en/devices/tech/power/mgmt.html
+++ b/en/devices/tech/power/mgmt.html
@@ -35,8 +35,9 @@ access and deferring syncs and jobs for those applications.</li>
<li><a href="#doze">Doze</a>. The platform can enter a state of
deep sleep (periodically resuming normal operations) if users have not actively
used their device (screen off and stationary) for extended periods of time.
-Android 7.0 and later also enables Doze to trigger a lighter set of optimizations when
-users turn off the device screen yet continue to move around.</li>
+Android 7.0 and higher also enables Doze to trigger a lighter set of
+optimizations when users turn off the device screen yet continue to move around.
+</li>
<li><a href="#exempt-apps">Exemptions</a>. System apps and
cloud messaging services preloaded on a device are typically exempted from App
Standby and Doze by default (although app developers can intent their
@@ -95,7 +96,8 @@ a period of time.
</p>
<h3 id=testing_app_standby>Testing App Standby</h3>
-<p>You can manually test App Standby using the following <code>adb</code> commands:</p>
+<p>You can manually test App Standby using the following <code>adb</code>
+commands:</p>
<pre class="devsite-click-to-copy">
<code class="devsite-terminal">adb shell dumpsys battery unplug</code>
@@ -110,37 +112,39 @@ a period of time.
network activity when a device is unused for long periods.</p>
<p>Idle devices in Doze periodically enter a maintenance window, during which
-apps can complete pending activities (syncs, jobs, etc.). Doze then resumes sleep
-for a longer period of time, followed by another maintenance window. The
+apps can complete pending activities (syncs, jobs, etc.). Doze then resumes
+sleep for a longer period of time, followed by another maintenance window. The
platform continues the Doze sleep/maintenance sequence, increasing the length of
idle each time, until a maximum of a few hours of sleep time is reached. At all
times, a device in Doze remains aware of motion and immediately leaves Doze
if motion is detected.</p>
-<p>Android 7.0 and later extends Doze to trigger a lighter set of optimizations every time
-a user turns off the device screen, even when the user continues to move around,
-enabling longer lasting battery life.</p>
+<p>Android 7.0 and higher extends Doze to trigger a lighter set of optimizations
+every time a user turns off the device screen, even when the user continues to
+move around, enabling longer lasting battery life.</p>
<p>System services (such as telephony) may be preloaded and exempted from Doze
by default. Users can also exempt specific applications from Doze in the
-Settings menu. By default, Doze is <strong>disabled</strong> in AOSP; for details on
-enabling Doze, see <a href="#integrate-doze">Integrating Doze</a>.</p>
+Settings menu. By default, Doze is <strong>disabled</strong> in AOSP; for
+details on enabling Doze, see <a href="#integrate-doze">Integrating Doze</a>.
+</p>
<h3 id="doze-reqs">Doze requirements</h3>
<p>Doze support requires the device has a cloud messaging service, such as
-<a href="https://developers.google.com/cloud-messaging/">Google Cloud Messaging
-(GCM)</a>. This enables the device to know when to wake from Doze.</p>
+<a href="https://firebase.google.com/docs/cloud-messaging/">Firebase Cloud
+Messaging (FCM)</a>. This enables the device to know when to wake from Doze.</p>
+
<p>Full Doze support also requires a
<a href="/devices/sensors/sensor-types.html#significant_motion">Significant
Motion Detector (SMD)</a> on the device; however, the lightweight Doze mode in
-Android 7.0 and later does not require an SMD. If Doze is enabled on a device that:</p>
+Android 7.0 and higher does not require an SMD. If Doze is enabled on a device
+that:</p>
<ul>
<li>Has an SMD, full Doze optimizations occur (includes lightweight
optimizations).</li>
<li>Does not have an SMD, only the lightweight Doze optimizations occur.</li>
</ul>
-
<h3 id="doze-life">Doze lifecycle</h3>
<p>Doze begins when the platform detects the device is idle and
@@ -193,11 +197,12 @@ they can complete their processing.</li>
</tbody>
</table>
-<p>Android 7.0 and later extends Doze by enabling a lightweight sleep mode during screen
-off, before the device is idle.</p>
+<p>Android 7.0 and higher extends Doze by enabling a lightweight sleep mode
+during screen off, before the device is idle.</p>
+
<p><img src="/devices/tech/images/doze_lightweight.png"></p>
-<p class="img-caption">Figure 1. Doze modes for non-stationary and stationary
-devices.</p>
+<figcaption><strong>Figure 1.</strong> Doze modes for non-stationary and
+stationary devices.</figcaption>
<table>
<tbody>
@@ -218,14 +223,16 @@ devices.</p>
</tr>
<tr>
<td>Restrictions</td>
-<td>No network access, wake lock, or GPS/Wi-FI scan. Alarms and jobs/syncs deferred.</td>
-<td>No network access. Jobs/syncs deferred except during maintenance windows.</td>
+<td>No network access, wake lock, or GPS/Wi-FI scan. Alarms and jobs/syncs
+deferred.</td>
+<td>No network access. Jobs/syncs deferred except during maintenance windows.
+</td>
</tr>
<tr>
<td>Behavior</td>
<td>Only high-priority push notification messages received.</td>
-<td>All real-time messages (instant messages, calls, etc.) received. High-priority push
- notification message enables temporary network access.</td>
+<td>All real-time messages (instant messages, calls, etc.) received.
+High-priority push notification message enables temporary network access.</td>
</tr>
<tr>
<td>Exit</td>
@@ -279,14 +286,14 @@ optimizing applications</a>.
<h4 id="doze-tips">Tips</h4>
<ul>
-<li>If possible, use GCM for
-<a href="https://developers.google.com/cloud-messaging/downstream">downstream
+<li>If possible, use FCM for
+<a href="https://firebase.google.com/docs/cloud-messaging/http-server-ref#send-downstream">downstream
messaging</a>.</li>
<li>If your users must see a notification right away, use a
-<a href="https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message">GCM
+<a href="https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message">FCM
high priority message</a>.</li>
<li>Provide sufficient information within the initial
-<a href="https://developers.google.com/cloud-messaging/concept-options#payload">message
+<a href="https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages">message
payload</a> (to avoid unnecessary subsequent network access).</li>
<li>Set critical alarms with
<a href="http://developer.android.com/reference/android/app/AlarmManager.html#setAndAllowWhileIdle(int,%20long,%20android.app.PendingIntent)">setAndAllowWhileIdle()</a>
@@ -309,9 +316,9 @@ mode.</p>
<p>You can exempt applications from being subject to Doze or App Standby.
Exemptions may be needed in the following use cases:</p>
<ul>
-<li>OEM using non-GCM Cloud Messaging platform</li>
-<li>Carrier using non-GCM Cloud Messaging platform</li>
-<li>Third-party application using non-GCM Cloud Messaging platform</li>
+<li>OEM using non-FCM Cloud Messaging platform</li>
+<li>Carrier using non-FCM Cloud Messaging platform</li>
+<li>Third-party application using non-FCM Cloud Messaging platform</li>
</ul>
<p class="warning"><strong>Warning</strong>: Do not exempt apps to avoid testing
@@ -325,14 +332,15 @@ these reasons, we strongly recommend that you do not exempt third-party
applications and instead exempt only cloud messaging services or apps with
similar functions.</p>
-<p>Apps exempted by default are listed in a single view in <em>Settings > Battery</em>.
-This list is used for exempting the app from both Doze and App
+<p>Apps exempted by default are listed in a single view in <em>Settings >
+Battery</em>. This list is used for exempting the app from both Doze and App
Standby modes. To provide transparency to the user, the Settings menu
<strong>MUST</strong> show all exempted applications.</p>
-<p>Users can manually exempt apps via <em>Settings > Battery > Battery optimization > All apps</em>
-and then selecting the app to turn off (or back on) optimization. However, users cannot unexempt
-any application or service that is exempted by default in the system image.</p>
+<p>Users can manually exempt apps via <em>Settings > Battery > Battery
+optimization > All apps</em> and then selecting the app to turn off (or back on)
+optimization. However, users cannot unexempt any application or service that is
+exempted by default in the system image.</p>
</body>
</html>