aboutsummaryrefslogtreecommitdiff
path: root/zh-cn/devices/tech/power/device.html
diff options
context:
space:
mode:
Diffstat (limited to 'zh-cn/devices/tech/power/device.html')
-rw-r--r--zh-cn/devices/tech/power/device.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/zh-cn/devices/tech/power/device.html b/zh-cn/devices/tech/power/device.html
index 3f96b798..92a1e8e7 100644
--- a/zh-cn/devices/tech/power/device.html
+++ b/zh-cn/devices/tech/power/device.html
@@ -30,7 +30,7 @@
<p>要读取耗电量数据,请在测试代码中插入对 API 的调用。</p>
-<pre>
+<pre class="prettyprint">
import android.os.BatteryManager;
import android.content.Context;
BatteryManager mBatteryManager =
@@ -44,7 +44,7 @@ Slog.i(TAG, "Remaining energy = " + energy + "nWh");
<p>Android 支持以下电池电量计属性:</p>
-<pre>
+<pre class="devsite-click-to-copy">
BATTERY_PROPERTY_CHARGE_COUNTER Remaining battery capacity in microampere-hours
BATTERY_PROPERTY_CURRENT_NOW Instantaneous battery current in microamperes
BATTERY_PROPERTY_CURRENT_AVERAGE Average battery current in microamperes
@@ -202,7 +202,7 @@ CURRENT_AVERAGE 更新周期为 28 秒(不可配置)。<br />
CHARGE_COUNTER(累计电流,不可扩展精度)解析度为 625 微安时。<br />
CHARGE_COUNTER_EXT(内核扩展精度)解析度为 144 纳安时。<br />
当额定电压为 3.7 伏时,ENERGY_COUNTER 为 CHARGE_COUNTER_EXT。<br />
-全部更新周期为 3.5 秒。</td>
+更新周期均为 3.5 秒。</td>
</tr>
</tbody>
</table>