第4课第4节_Android灯光系统_源码分析_电池灯
?
?
?
電池的監(jiān)聽器:
?
?
Android燈光系統(tǒng)的源碼分析與使用
4. 電池?zé)?br />a. batteryPropertiesRegistrar.registerListener(new BatteryListener());
b. sendIntentLocked(); ? //這個(gè)是比較重要的
c. mLed.updateLightsLocked();
d.
// Register for broadcasts from other components of the system.
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
mContext.registerReceiver(new BatteryReceiver(), filter, null, mHandler);
e.
onReceive
handleBatteryStateChangedLocked
updatePowerStateLocked
參考文章
Android4.4電池管理
http://blog.csdn.net/wlwl0071986/article/details/38778897
轉(zhuǎn)載于:https://www.cnblogs.com/zhulinhaibao/p/7068508.html
超強(qiáng)干貨來襲 云風(fēng)專訪:近40年碼齡,通宵達(dá)旦的技術(shù)人生總結(jié)
以上是生活随笔為你收集整理的第4课第4节_Android灯光系统_源码分析_电池灯的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 移动端页面
- 下一篇: Android源代码解析之(四)--gt